[CentOS] [Newbie] Reclaiming /boot space

Wed Mar 9 08:24:36 UTC 2011
Simon Matter <simon.matter at invoca.ch>

> On Wed, Mar 9, 2011 at 10:12 AM, Simon Matter <simon.matter at invoca.ch>
> wrote:
>>> Yes...thank you for the suggestion...since that was the cause of
>>> my problem in the first place!!  I should have known better; all
>>> I had to do was remove some of the outdated kernel files.  And
>>> when I did the dumb thing of deleting the /boot files, they were
>>> moved into the "protected" .Trash-boot directory.
>>
>> OK, now let us know exactly what you have. Is it CentOS 4 as I expected?
>> If so, the listing of files in /boot should look like so:
>>
>> [root at abc ~]# ls -laR /boot/
>> /boot/:
>> total 3771
>> drwxr-xr-x   4 root root    1024 Mar  3 11:31 .
>> drwxr-xr-x  24 root root    4096 Mar  3 11:37 ..
>> -rw-r--r--   1 root root   51676 Feb 18 07:41 config-2.6.9-100.EL
>> drwxr-xr-x   2 root root    1024 Mar  3 11:31 grub
>> -rw-r--r--   1 root root 1364958 Mar  3 11:20 initrd-2.6.9-100.EL.img
>> drwx------   2 root root   12288 Jul  8  2005 lost+found
>> -rw-r--r--   1 root root    9371 Aug 13  2006 message
>> -rw-r--r--   1 root root    9371 Aug 13  2006 message.ja
>> -rw-r--r--   1 root root   67797 Feb 18 07:41 symvers-2.6.9-100.EL.gz
>> -rw-r--r--   1 root root  770652 Feb 18 07:41 System.map-2.6.9-100.EL
>> -rw-r--r--   1 root root 1538264 Feb 18 07:41 vmlinuz-2.6.9-100.EL
>>
>> /boot/grub:
>> total 198
>> drwxr-xr-x  2 root root   1024 Mar  3 11:31 .
>> drwxr-xr-x  4 root root   1024 Mar  3 11:31 ..
>> -rw-r--r--  1 root root     82 Aug  9  2005 device.map
>> -rw-r--r--  1 root root   7956 Aug  9  2005 e2fs_stage1_5
>> -rw-r--r--  1 root root   7684 Aug  9  2005 fat_stage1_5
>> -rw-r--r--  1 root root   6996 Aug  9  2005 ffs_stage1_5
>> -rw-------  1 root root    589 Mar  3 11:31 grub.conf
>> -rw-------  1 root root    593 Aug  9  2005 grub.conf.orig
>> -rw-r--r--  1 root root   7028 Aug  9  2005 iso9660_stage1_5
>> -rw-r--r--  1 root root   8448 Aug  9  2005 jfs_stage1_5
>> lrwxrwxrwx  1 root root     11 Aug  9  2005 menu.lst -> ./grub.conf
>> -rw-r--r--  1 root root   7188 Aug  9  2005 minix_stage1_5
>> -rw-r--r--  1 root root   9396 Aug  9  2005 reiserfs_stage1_5
>> -rw-r--r--  1 root root   3605 Aug 13  2006 splash.xpm.gz
>> -rw-r--r--  1 root root    512 Aug  9  2005 stage1
>> -rw-r--r--  1 root root 103816 Aug  9  2005 stage2
>> -rw-r--r--  1 root root   7272 Aug  9  2005 ufs2_stage1_5
>> -rw-r--r--  1 root root   6612 Aug  9  2005 vstafs_stage1_5
>> -rw-r--r--  1 root root   9308 Aug  9  2005 xfs_stage1_5
>>
>> /boot/lost+found:
>> total 14
>> drwx------  2 root root 12288 Jul  8  2005 .
>> drwxr-xr-x  4 root root  1024 Mar  3 11:31 ..
>>
>> 1) I don't know which tool you have used to move things to "Trash" but
>> you
>> should be aware that it may well be the case that some permissions and
>> or
>> file types like symlinks may not be correct after recovering from
>> "Trash".
>>
>> 2) The directory "lost+found" can be recreated using the command
>> 'mklost+found'
>>
>> 3) I'm not sure on how to make grub work again, but maybe some steps qre
>> required after copying everything back to /boot. I hope someone else can
>> give you better info about this.
>>
>> Simon
>>
>>
>
>
> Wouldn't it have been easier to reinstall the kernel & grub, i.e.:
>
> yum reinstall kernel grub
>
> Surely if yum reinstalls it, it would re-create the permissions &
> symlinks as well?

Yes, only that reinstall doesn't exist in EL4 :)

Simon