resie /boot partition

Noob question, I goofed during install and only set /boot to 70mb, I’m already out of space there, is there a way to resize that partition?

The files in /boot total less than 20MB. Have you added files to that directory?

did not add anything yet it tells me that there is 4mb left and cannot upgrade or install

If you don’t have any limitations with the BIOS and large disks and the root partition being too far away from the start of the disk, you could just merge /boot into / and not bother with a separate /boot partition.

sounds like good idea, how do i do that

Hi!

you could just merge /boot into / and not bother with a separate /boot partition.

Although in theory this sounds really good, without the appropriate steps to follow being provided, I wouldn’t attempt this! If you installed grub in boot, you may need to re-install and modify the grub config and if you merge boot with root, you may need to modify your fstab, otherwise things won’t boot!

There is a utility cd called gparted, that allows you to resize ext3 partitions, e.g. grow and shrink them. I haven’t used it for the purposes you mention, however there is quite a bit of documentation for this available, and may be a safer alternative to above named solution until and if appropriate steps are given to you!

Here you will find the cd:

GParted – Live CD/USB/PXE/HD

Hoefully this helps, good luck!

Ok, I don’t recommend that you do this if you don’t understand what the following means. It involves quite a bit of CLI work and if you make a mistake at any step you will have to start up with a repair CD. However I will outline the steps to keep my promise to explain things.

  1. You don’t delete any partitions, so the numbering of the partitions remains the same.

  2. You copy /boot onto say /newboot, then move it into /boot

mkdir /newboot
cp -a /boot/. /newboot
umount /boot
rmdir /boot
mv /newboot /boot

At the end of this you have a copy of the boot files on your root partition in /boot.

  1. Remove /boot from /etc/fstab so that next boot it won’t be mounted.

  2. Let’s say for example your /boot is (hd0,0) and / is (hd0,1). An entry in your menu.lst will look something like this:

title OpenSUSE 11.0 blah blah
    root (hd0,1)
    kernel (hd0,0)/vmlinuz root=/dev/sda2 splash=silent showopts
    initrd (hd0,0)/initrd

Actually that sda2 will be some long name. It gets simplified to:

title OpenSUSE 11.0 blah blah
    root (hd0,1)
    kernel /boot/vmlinuz root=/dev/sda2 splash=silent showopts
    initrd /boot/initrd

because /boot is now on the same device.

  1. Now you have to regenerate the boot loader.
grub-install /dev/sda

Again, I don’t recommend you do this if you don’t understand what every step is supposed to do. Even if I did it myself, I might end up having to boot with a rescue CD.

For extra masochism, one could merge the space in /boot with / and get 70MB extra. (Wow!) And all the device numbers will shift too. More editing and rebuilding.

Comment 1: Why isn’t 70MB enough in the first place? What is in /boot anyway?

Comment 2: Next time, unless YaST specifically requires a separate /boot partition, just let it live on /.