Re: Hosed Grub with the push of a button

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



max wrote:
max wrote:
Jim Webb wrote:
max wrote:
I hosed grub. I need to fix it. I booted from fedora rescue. I chroot to /mnt/sysimage. All good. I tried :

grub-install  /dev/sda

The  file /boot/grub/stage1 not read correctly

tried:

grub-install /dev/VolGroup00/LogVol00

The file /boot/grub/stage1 not read correctly


tried:

cd /boot/grub

cat stage1

output maybe human readable by some humans but not this one.

So far I can still see all the user files so I can backup and reinstall but that wouldn't teach me anything.
All suggestions/insults/how-to's welcome.

Max

Max,
I looked this up on Red Hat's KBase:

http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/en-US/RHEL510/Installation_Guide/s2-rescuemode-boot-reinstall-bootloader.html

Hope this helps,
Jim


Thanks for the link but i had tried that and it didn't work. The following explains why but I don't see an easy way to do it, i'll do it the hard way , its the only option left, I need some help on best method or whether its even possible.



 From rescue cd, l let me outline what i see like a terminal :

sh-3.2# chroot /mnt/sysimage
sh-3.2# cd boot
sh-3.2#ls
boot grub (there shouldn't another boot directory should there?Also no config files, no initrd, no system map,no vmlinuz, will copying from another f8 be good enough to restore these, i would guess yes but I am getting hungry so i'll deal with that first, i should have noticed these missing yesterday but it was late etc....rest of this probably doesn't matter but for the sake of thoroughness i'll go through everything anyway)

sh-3.2#cd grub
sh-3.2#ls
device.map ffs_stage1_5 reiserfs_stage1_5 vstafs_stage1_5 device.map.backup iso9660_stage1_5 stage1 xfs_stage1_5 e2fs_stage1_5 jfs_stage1_5 stage2 fat_stage1_5 minix_stage1_5 ufs2_stage1_5

I notice as I type this that menu.lst, menu.lst.backup, and splash.xpm.gz are all missing, i'm not quite sure how to regenerate them, I could copy them from my other box but menu.lst won't be identical.....i'll have to think about that one but without missing files in boot what does it matter?Missing files would explain why grub says it can't find stage1, presumably it needs the missing files in /boot to locate stage1

If you remember I noticed another boot directory inside /boot

sh-3.2#cd /
sh-3.2#cd boot
sh-3.2#ls
boot     grub
sh-3.2#cd boot
sh-3.2#ls
grub

sh-3.2#cd grub
sh-3.2#ls

device.map ffs_stage1_5 reiserfs_stage1_5 vstafs_stage1_5 iso9660_stage1_5 stage1 xfs_stage1_5 e2fs_stage1_5 jfs_stage1_5 stage2 fat_stage1_5 minix_stage1_5 ufs2_stage1_5


It is the same as the contents of the other grub directory minus the device.map.backup. I don't think this directory should exist at all but it may have been created by my earlier attempts to fix grub. While I don't think it should be there, i don't think it should cause a problem because I never told grub to look in /boot/boot/grub , without the missing files from /boot i think i'm screwed. Will copying these from another f8 do the trick? I think that is the question of the moment. I am thinking yes because these boxes are updated to the same point(i've complied a kernel or two so i think it will work) but how much trouble will it cause? Well I'm off to dinner. All suggestion, insults, etc

Thanks

Max



Well I copied all the files from boot that I needed to the other machine. Two files system.map and vmlinuz would not copy because they were in use but these are created on the fly for the running system, I think, i'd appreciate some confirmation here. The other thing I did was to blow away the contents of the /boot/grub. Then i did :

#grub-install /dev/sda

The file /boot/grub/stage1 not read correctly.

I can't imagine that menu.lst or the splash file are that important but grub.conf probably is, i would have thought that installing grub would create one, so I will recreate that next and see what happens, i'll pull a copy of the splash and menu.lst in too and modify what needs modifying from memory.

thanks,

Max


I finally wised up and ran fdsik -l ( it aint pretty):

sh-3.2#fdisk -l

Device    	Boot			Start		End		Blocks		Id	System
/dev/sda1 	*			30076	     30401	   2618563         c	W95 FAT32(LBA)
/dev/sda2				    26		30401	      243995220	    8e   Linux LVM

Partition table entries are not in disk order.

I really could use a few pointers here as I am not sure that its even possible to recover at this point. I wish I'd have thought to run this command sooner, course i'd not have learned some of the handy info I've picked up since I touched off this mess so I guess I've broken even, not bad but I'd still like to think I could come out ahead on this one or should I just backup and install/upgrade to Sulphur.



Max




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux