On Wed, Mar 9, 2011 at 10:12 AM, Simon Matter simon.matter@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@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 ..
- 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".
- The directory "lost+found" can be recreated using the command
'mklost+found'
- 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
On Wed, Mar 9, 2011 at 10:24 AM, Simon Matter simon.matter@invoca.ch wrote:
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
Oh, I didn't know that.... Don't use EL4
on 09:24 Wed 09 Mar, Simon Matter (simon.matter@invoca.ch) wrote:
On Wed, Mar 9, 2011 at 10:12 AM, Simon Matter simon.matter@invoca.ch wrote:
<user deletes /boot, hilarity ensues>
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 :)
It doesn't?
rpm -Uvh <packagelist>
The -U (upgrade) should occur regardless of the current install state, though mucking with '--force' may be necessary. '--replacepkgs' should cover it.
On Wed, Mar 09, 2011 at 01:44:18PM -0800, Dr. Ed Morbius wrote:
on 09:24 Wed 09 Mar, Simon Matter (simon.matter@invoca.ch) wrote:
Yes, only that reinstall doesn't exist in EL4 :)
It doesn't?
rpm -Uvh <packagelist>
Creating the package list is what yum does automatically; using rpm directly means creating a list of URLs or downloading rpms individually. It's the same end result, but yum is a lot easier if you know only the package names (and not specific URLs and/or versions of packages). (And it may not be the same end result if you don't get the versions correct.)
I also read this snippet from man yum:
reinstall Will reinstall the identically versioned package as is currently installed. This does not work for "installonly" packages, like Kernels.
So maybe yum reinstall wouldn't fully fix the OP's problem after all?
--keith
on 15:49 Wed 09 Mar, Keith Keller (kkeller@wombat.san-francisco.ca.us) wrote:
On Wed, Mar 09, 2011 at 01:44:18PM -0800, Dr. Ed Morbius wrote:
on 09:24 Wed 09 Mar, Simon Matter (simon.matter@invoca.ch) wrote:
Yes, only that reinstall doesn't exist in EL4 :)
It doesn't?
rpm -Uvh <packagelist>
Creating the package list is what yum does automatically; using rpm directly means creating a list of URLs or downloading rpms individually.
See my other recent post to this thread for how that's done.
Essentially: use RPM to generate a list of all packages. List all files in those packages. Filter for files on /boot. Identify the packages with files on /boot. Reinstall those packages.
It's a shell one-liner.
On Wed, Mar 9, 2011 at 7:48 PM, Dr. Ed Morbius dredmorbius@gmail.com wrote:
on 15:49 Wed 09 Mar, Keith Keller (kkeller@wombat.san-francisco.ca.us) wrote:
On Wed, Mar 09, 2011 at 01:44:18PM -0800, Dr. Ed Morbius wrote:
on 09:24 Wed 09 Mar, Simon Matter (simon.matter@invoca.ch) wrote:
Yes, only that reinstall doesn't exist in EL4 :)
It doesn't?
rpm -Uvh <packagelist>
Creating the package list is what yum does automatically; using rpm directly means creating a list of URLs or downloading rpms individually.
See my other recent post to this thread for how that's done.
Essentially: use RPM to generate a list of all packages. List all files in those packages. Filter for files on /boot. Identify the packages with files on /boot. Reinstall those packages.
It's a shell one-liner.
The packages, as of the last night's cron jobs, are typically in "/var/log/rpmpkgs", generated by the "/etc/cron.daily/rpm" script. That script is not mandatory and does not seem to be in RHEL 6 nor will it therefore be in CentOS 6, but lord, it's useful in this kind of situation. It's also much faster to parse, than manually issuing "yum" commands.