common n00b issue, read "grub rescue"

來源: 2007-08-22 09:15:36 [博客] [舊帖] [給我悄悄話] 本文已被閱讀:

read this thinkwiki (not only for thinkpad here): http://www.thinkwiki.org/wiki/Rescue_and_Recovery also this dual-boot howto: http://www.geocities.com/epark/linux/grub-w2k-HOWTO.html in short, the 1024 cylinder limit is for old BIOS(before LBA) , since you have 64 bit machine, you don't have to be worried. However, the /boot should be on the same disk as windoze C: (not an absolute, read the thinkwiki link for more) you have done the windoze part for dual-boot, and grub is in /boot partition. Now, boot any linux livecd, mount your / partition, and chroot. example, $ sudo -i
# mkdir -p /mnt/rh && mount /dev/sda3 /mnt/rh
# mount -o bind /proc /mnt/rh/proc
# mount -o bind /dev /mnt/rh/dev
# chroot /mnt/rh /bin/bash -i
# mount /boot
# grub-install $(egrep -v '^#' /etc/fstab|grep '/boot'|awk '{print $1}'
/dev/sda1)
# umount /boot
# exit
# umount /mnt/rh/dev
# umount /mnt/rh/proc
# umount /mnt/rh
Finally, don't forget to copy the boot sector to windoze again (read the thinkwiki page for more)