Problem in Booting Linux(GRUB2)
Okay, so I had a problem recently with my dual-boot Windows XP and Ubuntu laptop. GRUB2 was installed to MBR and booting fine, but Windows XP started going screwy and I had to reinstall XP to fix it. Due to my attempts to fix XP and re-installation, XP overwrote the MBR so no more GRUB - just boots straight to XP. Now I want it to dual-boot again.
I have actually come across this problem several times before for some reason or another, and I usually just boot GRUB (v.0.95) off a cd, edit up the lines to point to the right initrd, kernel, and root partition - boot up my linux and reinstall grub or lilo. As long as I can boot linux once, I'll have no problem. But GRUB is having problems with my hard drive (there is some sort of strange hardware configuration with this laptop: its a Compaq CQ50-110US - I previously had lots of problems installing Linux at all until I tried the latest Ubuntu)
Anyway I use these commands:
root (hd0,4)
kernel /boot/vmlinuz-(version-stuff)-generic root=/dev/sda5
initrd /boot/initrd.img-(version-stuff)-generic
Not sure if initrd is right, but it doesnt matter it doesnt get past the kernel line, it cant find it. It confirms (hd0,4) is ext4, then complains of a "Bad file or directory type". Any attempts afterwards (even the exact same attempt) give "Disk read error". It seems to me like its just locking up after the root is set, and I doubt I can use GRUB v.0.95 at all.
I also tried Smart BootManager, Gujin, GAG, XOSL, but they all suck and do not let you boot a kernel or sometimes even recognize a linux partition.
I tried booting off my ubuntu install disc as a liveCD and trying things from there. Turns out its either impossible or difficult to reinstall grub with chroot or lilo off a liveCD.
Anyone have any suggestions how to boot up my Ubuntu linux? Better bootloaders? Method of installing a working bootloader from a liveCD? Cosmic Rays? Anything, really. Thanks in advance for any help.
EDIT:
I just solved this myself, sorry for unnecessarily posting - got grub2 re-installed from the liveCD, in a complicated manner. For anyone who ends up in a situation where you get grub-probe errors, try this:
sudo grub-install --recheck --root-directory=/mnt/ /dev/sda
(assuming you mounted the partition to /mnt)
Last edited by Kcghost; 12-04-2009 at 02:00 PM.
Reason: Solved
|