The file /boot/grub/stage1 not read correctly.
somehow my mbr got borked. So I booted up knoppix, and did the following:
# mount /dev/hda1 /mnt/hda1
# mount /dev/hda2 mnt/hda1/var
# mount /dev/hda5 mnt/hda1/tmp
# chroot /mnt/hda1 bash
# grub-install /dev/hda
But I get this error message: The file /boot/grub/stage1 not read correctly.
/dev/hda1 is / including /boot and everything which belongs there (kernel-image, directory "grub" with grub's files and menu.lst)
/dev/hda2 contains everything from /var (it is mounted to /var)
/dev/hda5 contains everything from /tmp
Is the file /boot/grub/stage1 there?
if yes ->
it should go like this:
mount -t proc none /mnt/hda1/proc -> mount /proc to /mnt/hda1/proc - which is going to be /proc when chroot is done
mount -o bind /dev /mnt/hda1/dev -> mount the /dev directory to /mnt/hda1/dev - which is otherwise empty
chroot /mnt/hda1 /bin/bash
cp /proc/mounts /etc/mtab -> adjust the list of mounted filesystems - because it is needed for grub-install to find the right devices
Everything you say makes sense now that I read it. But I still get the same error.
mount now gives:
Upon further investigation:
Any thoughts jomen?
instead of cp /proc/mounts /etc/mtab
grep -v rootfs /proc/mounts > /etc/mtab
this will eliminate the line:
rootfs on / type rootfs (rw)
I don't think that this a problem though...
maybe this is:
(however this is done in kubuntu - probably apt-get -install ?)
yes, of course I check that the file existed. Ok, breifly looking at the script '/sbin/grub-install' shows that it creates a log, then greps the log for errors. So I looked that the log. The error it is getting, is the same one I am getting, when I do "root (hd0,0)" --> "The selected disk does not exist". So once I fix this error, grub-install should work. (not that much of a suprise really). But atleast I know that the problem really isn't with /boot/grub/stage1, but with not being able to see /dev/hda, and that I should be googling for "The selected disk does not exist", instead of "stage1 not read properly." Talk about shoddy error reporting...
It is interesting to note that running grub from knoppix (outside my chroot), the root (hd0,0) command does not fail, and gives this:
Press "c" for ("command-line") to get to a command-line-interface, when you see the screen.
There you enter:
configfile (hd0,0)/boot/grub/menu.lst -> which gets you to your boot-menu
which you can always use as long as you see a grub-screen...even without any working setup (wrong config-file for example)
thanks, I tried that out to test a few different settings. Turned out the reason I couldn't boot was because RESUME= was pointing to the wrong partition in my /etc/mkinitrd/mkinitrd.conf file. Generating a new mkinitrd file fixed that. So now I am booting.
Thanks for all the help.
|All times are GMT -5. The time now is 08:52 AM.|