2

This is the current state of my partition table. As can be seen, the boot is very small, and I can't upgrade the kernel, because the update-manager tells me there isnt enough space on /boot :( Which effectively means that I can't update my kernel. Can I change the size of my boot, without necessitating a reinstall of either of the installed system?

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda5              12G  4.9G  6.2G  45% /
none                  2.0G  284K  2.0G   1% /dev
none                  2.0G  8.5M  2.0G   1% /dev/shm
none                  2.0G   92K  2.0G   1% /var/run
none                  2.0G     0  2.0G   0% /var/lock
/dev/sda3              42G   21G   22G  49% /media/Erste
/dev/sda2             5.1G  2.5G  2.7G  48% /media/Swap
/dev/sda1              30G   25G  4.9G  84% /media/Windows7
/dev/sda9              47G   28G   20G  60% /media/Zweite
/dev/sda6              11G  7.6G  2.0G  80% /home
/dev/sda8              49M   31M   16M  66% /boot

This is the output of

sudo fdisk -lu

theTuxRacer
  • 16,185

2 Answers2

5

Maybe you can avoid this instead? It looks like your partition is big enough. Is it ok to remove old kernels? What is the kernel you are currently using? (uname -r) It might output something like 2.6.35-24-generic. And which kernels are installed? (ls /boot | grep vmlinuz), which might output something like

vmlinuz-2.6.35-22-generic
vmlinuz-2.6.35-24-generic

In this example, you know you are using 2.6.35-24, so look for 2.6.35-22.

dpkg -l | grep 2.6.35-22

The output tells us which names to use for removing them

ii  linux-headers-2.6.35-22 2.6.35-22.35
    Header files related to Linux kernel version 2.6.35
ii  linux-headers-2.6.35-22-generic 2.6.35-22.35
    Linux kernel headers for version 2.6.35 on x86/x86_64
ii  linux-image-2.6.35-22-generic 2.6.35-22.35
    Linux kernel image for version 2.6.35 on x86/x86_64

Now we can

sudo apt-get remove linux-headers-2.6.35-22 linux-headers-2.6.35-22-generic linux-image-2.6.35-22-generic

to make room for the new kernel to be installed.

  • Mind to not remove the current kernel by accident. Take double extra care on what you do. You might better control this and avoid typing errors by using a GUI like Synaptic. – Takkat Jan 10 '11 at 20:57
  • uname -r and ls /boot | grep vmlinuz give the same kernel, which means there is only one installed! – theTuxRacer Jan 11 '11 at 04:16
  • 1
    psusi has a great suggestion –  Jan 11 '11 at 16:20
5

You posted the output of df, which is not a listing of your partition table. For that you need to post the output of fdisk -lu. The question is, what follows your /boot partition on the disk? If it is not free space, or another partition that you can shrink a bit and move over, then no, you can not expand the /boot partition.

An alternative is to simply do away with the /boot partition. First unmount the /boot partition and then remount it somewhere else, like /mnt. Then sudo cp -ax /mnt /boot to copy all of the files over to your root partition. Then remove the /boot partition entry from your /etc/fstab, and finally reinstall grub with sudo grub-install /dev/sda.

psusi
  • 37,551