Ubuntu Install Show Free Disk Space


Question: How To Fix “Not Enough Free Disk Space On /boot” In Ubuntu? Today, I got the following error, but a simple one, when try to update my Lubuntu 14.04 desktop. “Not Enough Free Disk Space On /boot” This is because my /boot partition has caught up with unwanted old kernels, packages etc.



  • To use this option, type df, a space, and then -B and a letter from the list of K, M, G, T, P, E, Z or Y. These letters represent the kilo, mega, giga, tera, peta, exa, zeta, and yotta values from the multiple of 1024 scale. For example, to see the disk usage figures in megabytes, you would use the following command.
  • Ubuntu's default installer when you don't change options only allocates a small amount of space to install itself. 4 GB sounds about right. It setup LVM as seen by your filesystem output and the rest of the space is still available in the Volume Group, I wager. Your root partition is full.

This HowTo explains how to setup LVM (Logical Volume Management) on an existing system. The typical way of setting up LVM on Ubuntu is to use the alternative installation CD to wipe your whole hard drive and setup LVM. Instead of starting from scratch with a clean system, we're going to add LVM to your already running Ubuntu.

Ubuntu Install Show Free Disk Space Windows 10

This has been tested on Ubuntu 7.04 (Feisty Fawn) through 8.04 (Hardy Heron), but should work on previous releases.

An alternative option is to use blocks to-lvm, which does an automated in-place conversion.

  1. Backup your data!!

  2. Map out your goals for LVM. Do you just want some expandable space for media files? Do you want to move your /home into LVM? Do you want to move everything under LVM? If you want to put everything under LVM, you should create a separate /boot partition (100MB should be fine) - otherwise you may not be able to boot your system.
  3. You're going to need some free space to setup your volume groups. You can use:
    1. Free space on your primary hard drive.
    2. A partition that you are not using any more. (such as the Windows partion you haven't booted in 6 months, that is what Qemu/VMWare are for isn't it??)
    3. A new blank hard drive you've added to your system.
  4. Format your free space/partition/new drive using your favorite disk management tool to 'Linux LVM'. Also use some of this space to create your separate /boot partition (100MB, ext3, bootable flag) if you are planning on putting everything under LVM.
  5. Now that you have an LVM partition you can create your volume groups on. Note that you don't need a single large partition formated to Linux LVM, you can format as many smaller LVM partitions as you like, and combine them into a single filesystem using the power of LVM later - this is the preferred method as it allows more flexibility.
  6. Install 'lvm2' from the Ubuntu repositories. ('sudo aptitude install lvm2')
  7. Optionally install 'system-config-lvm'. Here: http://ubuntuforums.org/showthread.php?t=216117 is a forum thread on how to install it from Fedora RPM, (its not available in Ubuntu repositories.)

  8. Load the LVM module - modprobe dm-mod. You can skip this step in Jaunty (9.04) because the dm-mod module is compiled into the kernel.

  9. If that works without any errors, you can go ahead and add dm-mod to the end of your /etc/modules file (sudo nano /etc/modules). This will autoload LVM when Ubuntu starts - very important if you plan on moving your system directories under LVM.

Code Listing 2.2: Activating LVM

Ubuntu disk use

(Avoid scanning all devices but our disks)

(Look for the following line)

(Replace it with the following one to scan /dev/hda and /dev/hdb and reject anything else)

(Save the file and quit nano) NOTE: The default setup of Ubuntu 7.04 LVM2 already has this setup correctly.

(Make any previously set up volume groups available)

Prepare the partitions.

Preparing the partitions

Setup a volume group. A volume group is the result of combining several physical units into a single logical device.

In our example, /dev/hda1, /dev/hda2 and /dev/hda3 are the /boot, swap and root partitions so we need to combine /dev/hda4 and /dev/hdb1. It can be done with a single command, but, as an example, we will create our volume group and extend it.

Code Listing 2.4: Creating and extending a volume group

Ubuntu Install Show Free Disk Space Linux

(Create a volume group named vg)

Create the logical volumes. Logical volumes are the equivalent of partitions you would create using fdisk in a non LVM2 environment. In our example, we create the following partitions:

Since we are going to use LVM2, we should not worry too much about partition sizes because they can always be expanded as needed. However, it is easier to enlarge partitions than it is to shrink them, so it is best to start smaller and add space as needed.

Creating and extending logical volumes

(As an example, let's extend a logical volume with 5 extra Gbytes)

Create filesystems on the logical volumes the same way you would on a regular partition. We use ext3 on the logical volumes but any filesystem of your choice will work:

Creating the filesystems:

Mount your partitions as described in the handbook and mount your LVM2 logical volumes as if they were partitions. Replace the usual /dev/hdxx with /dev/vg/logical_volumename.

Code Listing 2.7: Mounting your logical volumes

(Make sure you have mounted your root partition as described in the handbook first)

NOTE: These mount points are for testing purposes. After you have copied /usr to /mnt/ubuntu/usr, (and also for home, opt, var, tmp, etc), You can change your /etc/fstab mount points to permantent paths.

For a nice GUI, you can run system-config-lvm from the shell. This will let you manage your LVM volume groups more easily. However, be careful, as changes are made immediately and you don't want to accidentally wipe your data.

Much of this HowTo was copied from the Gentoo Documentation and modified for Ubuntu. http://www.gentoo.org/doc/en/lvm2.xml

Ubuntu's default installer when you don't change options only allocates a small amount of space to install itself. 4 GB sounds about right. It setup LVM as seen by your filesystem output and the rest of the space is still available in the Volume Group, I wager.

Your root partition is full. You need to free up a bit of space before you can run lvm tools to enlarge your logical volumes that root is part of. Delete some files that are safe to delete. You can remove some log files from /var/log which often will do the trick to get you working again.

Check how large your volume group(s) is/are and how much space is left in them. In particular you are interested in the volume group named 'ubuntu-vg'

I think you will find that it will show free PE (physical extents). This means you can increase size of logical volumes.

If you just want to maximize the root filesystem to use all available space:

The first command expands the logical volume. The second resizes the filesystem itself (I assume ext4 but adjust the command if needed).


Related Posts

 cleardn.ajkernilphamari.co © 2021