红联Linux门户
Linux帮助

linux grub confusion

发布时间:2007-12-14 01:14:32来源:红联作者:verytow
After installing ubuntu gutsy, I modified the disk partition using fdisk - fix the partition order during the installation, changed the root partition /dev/hda10 to /dev/hda9. then reboot
"
grub error 25
"
I guess the grub can't find the stage2 according to the stage1.5 embedded MBR, or something that leads to menu.list load failure.
Now what I have to do is tore-install the ubuntu gutsy's grub. "chroot" into the root system will enable gutsy fix itself.
but , bad news, my CD-ROM's broken. I have to boot my notebook from a USB-Disk which recognized by BIOS as "hd0". It matters a lot. I can't manually boot the gutsy in the grub on this "hd0" disk, in turn, I have to boot another LiveCD using unionfs, and eventually "chroot" into the gutsy.
"grub-install /dev/hda" ? It doesn't work! It's reported that "grub: not found or no block device".

....(hard time)

the problem is, chroot do all the static configuration but the dynamic things, such as mount the peripheral device ,etc. So, Prior to chroot, you need to tell the target system all these runtime information by "mount". Here is more details:


from Gerhard Brauer came the solution:
only grub as bootloader on /dev/hda
1. booting the clone in rescue-mode and mount /dev/hda1 /mnt
2. mount -o bind /dev /mnt/dev
3. mount -o bind -t proc /proc /mnt/proc
4. chroot /mnt
5. grub-shell with root (hd0,0) and setup (hd0)

I tried different ways, but only this one worked.

Don't delete stage2

don't run grub-install. It'll produce the error
/dev/sda1 does not have corresponding BIOS drive
文章评论

共有 0 条评论