Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have an older machine that I originally set up as a dual boot with Windows 7 and Lubuntu. Part of that setup was establishing a small partition for /boot. The partition is 89 MB, and with recent changes in the initrd it's too small to support upgrading even though I only have the most recent kernel version in there (the updater wants 41 MB of free space, but I have only 40 and it's as stripped down as I can get it).

What I'd like to do is to just abandon the 89MB partition to the dustbin of bad ideas and move /boot into the root partition, where there is ample space. I don't want to mess with the partition layout on the disk, and I don't want to reinstall anything unless there is no other way.

So my question is, what is the easiest, least likely to cause downtime way to switch away from using a separate partition for /boot?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I don't think a separate /boot is a bad idea, but I'll try to answer your question.

Outline:

  1. Boot up a live OS (like lubuntu) off of a DVD in the drive, or by using a bootable USB stick.
  2. Mount both /boot and / (root)
  3. make a directory in / called /boot
  4. copy or rsync over all the files
  5. using gParted, delete the original /boot partition

I'll try to flesh the outline out with specific details, but instead you might want to try this general plan to just enlarge /boot to whatever size you need:

  1. Boot up a live OS
  2. Back up your installation
  3. Using Gparted, enlarge your /boot directory to whatever size you need. I usually go to 512 MiB, as hard drive space is cheap. This might require shifting or shrinking (or both) another partition slightly. Usually, gParted is really good about doing this but I did warn you to back everything up. If you are shrinking the NTFS partition, you must have shutdown MS-Windows completely or gParted won't let you manipulate the size.

More details for the first version:

  1. After booting the live OS, open a terminal, figure out what partition is what. Here I'll assume sda1 is /boot and sda3 is / (root)
  2. Mount /boot

    sudo mkdir /media/boot

    sudo mount /dev/sda1 /media/boot

  3. Mount (root)

    sudo mkdir /media/root

    sudo mount /dev/sda3 /media/root

  4. create new boot area:

    sudo mkdir /media/root/boot

  5. copy all files over

    rsync -av /media/boot /media/root/boot

  6. Test. When you are where you want to be, boot into the live OS again and use gParted to remove sda1 (former boot partition)

share|improve this answer
    
Thanks, I hadn't realized it would be so simple to resize the partitions. I'll try that way first. –  Erik May 22 '13 at 1:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.