Find the answer to your Linux question:
Results 1 to 7 of 7
Hello everyone, After compiling my kernel I have left with very low space in several hundred MBs. Each time when I start my system it prompts me with the same ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2012
    Location
    Bangalore
    Posts
    22

    Very low drive space remained after kernel compilation


    Hello everyone,
    After compiling my kernel I have left with very low space in several hundred MBs. Each time when I start my system it prompts me with the same message. I don't know how to reduce the space because majority of space is taken by /usr directory. (screenshot attached)
    Screenshot from 2012-09-29 12:17:09.jpg

    So I was thinking of merging my my sda6 with other drive (maybe with sda4). Is it possible ?
    Or can I mount sda4 by default every time u boot ?
    Screenshot from 2012-09-29 12:08:56.jpg
    With this situation shoud I continue installing my compiled kernel ? Is it safe ?

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Screenshots are bit small and blurred. Post the output of these commands :
    Code:
    sudo fdisk -l
    Code:
    df -h
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Just Joined!
    Join Date
    Sep 2012
    Location
    Bangalore
    Posts
    22
    root@{Just Do It !}:/usr/src/linux-3.5.3# fdisk -l

    Code:
    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x2a429592
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *          63    94260855    47130396+   7  HPFS/NTFS/exFAT
    /dev/sda2        94261246   121661439    13700097    5  Extended
    /dev/sda3       121661440   952297471   415318016    7  HPFS/NTFS/exFAT
    /dev/sda4       952297472   974424063    11063296   83  Linux
    /dev/sda5       120416256   121661439      622592   82  Linux swap / Solaris
    /dev/sda6        94261248   120416255    13077504   83  Linux
    
    Partition table entries are not in disk order
    root@{Just Do It !}:/usr/src/linux-3.5.3# 
    
    
    
    root@{Just Do It !}:/usr/src/linux-3.5.3# df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda6        13G   12G  310M  98% /
    udev            2.0G  4.0K  2.0G   1% /dev
    tmpfs           799M  960K  798M   1% /run
    none            5.0M     0  5.0M   0% /run/lock
    none            2.0G  3.3M  2.0G   1% /run/shm
    cgroup          2.0G     0  2.0G   0% /sys/fs/cgroup
    /dev/sda3       397G  370G   27G  94% /media/All in 1
    root@{Just Do It !}:/usr/src/linux-3.5.3#
    Last edited by MikeTbob; 09-29-2012 at 04:20 PM. Reason: added code tags

  4. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Which Linux distro are you using? Have you cleaned Package Manager's cache? What is in /dev/sda4 partition? How many kernel versions have you installed?
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  5. #5
    Just Joined!
    Join Date
    Sep 2012
    Location
    Bangalore
    Posts
    22
    I am using Ubuntu 12.4. I don't know how to clear package manages cache...
    The problem was I had enough space on my sda6 partition (about 5GB). But after configuring and compiling new kernel 'linux-3.5.3' very low space is remaining.

    So I used Gparted to see whether I can merge any space with sda6.
    there was 11GB unallocated space on my HDD. So I formed a new partition called /dev/sda4 and tried merging/ mounting it with my sda6..... but don't know how to do that....
    sda1 and sda3 are my Windows drives.

    I was using earlier version of Ubuntu but suddenly It stopped working so I installed recent one.
    The op of $ ls -l /boot :

    root@{Just Do It !}:/boot# ls -l /boot
    Code:
    total 92512
    -rw-r--r-- 1 root root   800195 Apr 11 07:47 abi-3.2.0-23-generic-pae
    -rw-r--r-- 1 root root   800453 Jul  6 21:37 abi-3.2.0-27-generic-pae
    -rw-r--r-- 1 root root   800453 Jul 28 00:05 abi-3.2.0-29-generic-pae
    -rw-r--r-- 1 root root   800618 Aug 24 23:45 abi-3.2.0-30-generic-pae
    -rw-r--r-- 1 root root   147226 Apr 11 07:47 config-3.2.0-23-generic-pae
    -rw-r--r-- 1 root root   147401 Jul  6 21:37 config-3.2.0-27-generic-pae
    -rw-r--r-- 1 root root   147379 Jul 28 00:05 config-3.2.0-29-generic-pae
    -rw-r--r-- 1 root root   147379 Aug 24 23:45 config-3.2.0-30-generic-pae
    drwxr-xr-x 3 root root    12288 Sep 19 15:13 grub
    -rw-r--r-- 1 root root 14123645 Jul 17 22:24 initrd.img-3.2.0-23-generic-pae
    -rw-r--r-- 1 root root 14153080 Aug  9 18:36 initrd.img-3.2.0-27-generic-pae
    -rw-r--r-- 1 root root 14153685 Sep  6 09:38 initrd.img-3.2.0-29-generic-pae
    -rw-r--r-- 1 root root 14157109 Sep  6 09:41 initrd.img-3.2.0-30-generic-pae
    -rw-r--r-- 1 root root   176764 Nov 27  2011 memtest86+.bin
    -rw-r--r-- 1 root root   178944 Nov 27  2011 memtest86+_multiboot.bin
    -rw------- 1 root root  2313006 Apr 11 07:47 System.map-3.2.0-23-generic-pae
    -rw------- 1 root root  2311276 Jul  6 21:37 System.map-3.2.0-27-generic-pae
    -rw------- 1 root root  2311324 Jul 28 00:05 System.map-3.2.0-29-generic-pae
    -rw------- 1 root root  2312370 Aug 24 23:45 System.map-3.2.0-30-generic-pae
    -rw-r--r-- 1 root root  5015840 Apr 23 23:27 vmlinuz-3.2.0-23-generic-pae
    -rw------- 1 root root  5010688 Jul  6 21:37 vmlinuz-3.2.0-27-generic-pae
    -rw------- 1 root root  5010176 Jul 28 00:05 vmlinuz-3.2.0-29-generic-pae
    -rw------- 1 root root  5011712 Aug 24 23:45 vmlinuz-3.2.0-30-generic-pae
    -rwxr-xr-x 1 root root  4643952 Sep 29 14:29 vmlinuz-3.5.3
    root@{Just Do It !}:/boot#
    Last edited by MikeTbob; 09-29-2012 at 04:21 PM. Reason: added code tags

  6. #6
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    You have installed 5 kernels. If latest kernel is working fine ( 3.2.0-30 ), remove all other older kernels. Keep newly complied kernel as it is for a while.

    Execute this to clean cache:
    Code:
    sudo apt-get clean all
    Execute df -h command to check free space.

    Its not easy to merge sda4 and sda6 partitions. /dev/sda5 (SWAP) partition is in between 4 and 6.
    There will be a lot of steps to do that :

    * Delete SWAP and /dev/sda4 partitions.
    * Merge free space in /dev/sda6. It will become /dev/sda4.
    * Shrink /dev/sda4 to create new SWAP, /dev/sda5.
    * You have to edit a few conf files to boot up Ubuntu again.

    I would suggest you not to do this at this moment. First of all, free some space in /dev/sda6 and merge /dev/sda4 only if its really necessary.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  7. #7
    Just Joined!
    Join Date
    Sep 2012
    Location
    Bangalore
    Posts
    22
    Hey, thanks buddy !

    I deleted older kernels and executed command for cleaning the cache.
    With this I freed about 1GB of memory.
    This is OK for a while.
    I'll do the merging when it will be req.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •