[CentOS] [Newbie] Reclaiming /boot space

Tue Mar 8 23:16:24 UTC 2011
Steve Barnes <steve at echo.id.au>

> When trying to do a yum update, I am told I need more space in
> /boot.  When I check the contents of /boot (ls -l /boot), there
> are no files.
>
> If I do a df -h, there is no available space yet it shows that it
> has a lot of used space.
>
> The fstab shows the following:
>
> # This file is edited by fstab-sync - see 'man fstab-sync' for
> details
> /dev/VolGroup00/LogVol00 /                       ext3
> defaults        1 1
> LABEL=/boot             /boot                   ext3
> defaults        1 2
> none                    /dev/pts                devpts
> gid=5,mode=620  0 0
> none                    /dev/shm                tmpfs
> defaults        0 0
> none                    /proc                   proc
> defaults        0 0
> none                    /sys                    sysfs
> defaults        0 0
> /dev/VolGroup00/LogVol01 swap                    swap
> defaults        0 0
> /dev/hda                /media/cdrom            auto
> pamconsole,exec,noauto,managed 0 0
>
> # fschk.ext3 /boot gives this error:
>
> The superblock could not be read or does not describe a correct ext2
> filesystem.  If the device is valid and it really contains an ext2
> filesystem (and not swap or ufs or something else), then the
> superblock
> is corrupt, and you might try running e2fsck with an alternate
> superblock:
>      e2fsck -b 8193 <device>
>
> I am not sure what I should do next.
>
> Thank you in advance for any suggestions...
>
> Todd

(caveat: I'm as newbie at this as you)

I can't tell from your email which partition /boot is mounted to (/dev/hda1?), but to get a list of the alternative superblocks, you can do this:

   dumpe2fs /dev/hda1 | grep superblock

AFAIK, dumpe2fs doesn't support labels as device specifiers, so you will need to substitute /dev/hda1 for whichever partition /boot is mounted to.

You should probably boot into single-user mode and unmount /boot before running fsck.ext3 -b <superblock> <device> on it btw.

Also:

   http://www.cyberciti.biz/faq/recover-bad-superblock-from-corrupted-partition/
   http://planet.admon.org/using-alternative-superblock-to-check-ext3/

HTH

Steve