Sign in with
Sign up | Sign in
Your question

Grub - i broke it.

Last response: in Linux/Free BSD
Share
July 10, 2008 8:20:52 AM

well i left yesterday planning to do some benchmarks on linux/wine.

i installed Linux on my machine setting it up on another partition on the same drive as my windows, when i rebooted the machine went straight into windows and didnt offer the Grub bootloader options, so i used the 'super grub boot loader cd' and swapped round the partitions, so now grub boots and gives me the option to boot Ubuntu or XP.

when i choose Ubuntu i get the error 'No active partitions', when i choose XP i get no NTLDR available. so i decided to check the options and booted using the ubuntu live cd.

Grub has recognised that Ubuntu is on: (hd2,4), although this means i get the error mentioned above.

let me know if this is just a case of something simple, like loading partition magic and setting the linux drive as an active partition, im pretty sure that it already is, im just a bit confused over why i didnt get any grub options to overwrite the windows boot loader, when i installed the newest version of Ubuntu(8.04).

More about : grub broke

July 10, 2008 12:17:49 PM

yeah, i think ill have to try partition magic and check to see if the partition is active(there is no reason why it shouldnt be), after that i guess ill have to play around with the HD numbers((hd0,0) (hd0, 1) etc) then if none of that works, well im stumped, i can still retrieve all my files so there isnt any loss, i might just format with a brand new partition of Linux, (and i just got my XP exactly how i like it aswell)

p.s

the strange thing is ive installed ubuntu many times in the past and never had a single problem like this, normally it installs Grub and sets everything up automatically, but this time it didnt.
a b 5 Linux
July 10, 2008 3:42:25 PM

You can try booting from the ubuntu live CD

sudo su -

mount /dev/sdc1 /mnt

/sbin/grub-install --recheck --no-floppy --root-directory=/mnt /dev/sda

/mnt is your installation's root directory


Change /dev/sdc1 accordingly to mount your Ubuntu partition

Replace /dev/sda with the drive you want to install GRUB on and make sure your BIOS is set to boot from that drive.

You can install GRUB on /dev/sdb or /dev/sdc and so on but you have to ensure you are set to boot from the drive with GRUB on it.


GL :) 
Related resources
July 10, 2008 7:45:19 PM

just to update here, i decided just to format my XP drive and only have ubuntu, although the grub loader still put in the wrong drive (hd2,0) when it should be hd(0,0) im starting to think this version of grub with the new ubuntu is a bit well faulty.

i keep all my files separate to my boot drive, so by formatting i didnt loose anything but windows.
July 15, 2008 9:34:47 PM

What I am doing currently while I educate myself on grub and learn various options of how to repair/reinstall it (i.e. grub) is install a liveCD that allows you to edit grub or a CD that 'fixes' it for you. It's an option while you learn.

I suggest installing Mepis 7 for this (for now) as it has a utility built-in that restores GRUB to the MBR for you. It scans your operating systems and writes its grub to the MBR. You then get the Mepis grub menu and can choose your OS. The advantage of this is if you have to reinstall XP (for e.g.) is that when XP borks your grub and you can't boot up Ubuntu or any other non-Windows operating system, the Mepis LiveCD will usually restore your grub with the utility. You can do it manually but you need to know how and what to edit (which is what I am currently learning). It's just an idea.
July 16, 2008 7:09:37 AM

yeah i used the grub live cd to fix Grub, but the problem i had was that it consistently choose the wrong HDD, now this could be because i have a RAID 0 array and Grub might of been detecting my HDDs incorrectly. so when i repaired Grub it pointed to the wrong drive, in my case this was hd2,0 when it should of been pointing to hd0,0. Although Easy enough to fix, it would of been nice for grub to have done it correctly.
a b 5 Linux
July 24, 2008 2:35:00 AM

Yes, while the auto-setup and install stuff that GRUB does is nice when it works (most of the time it does), just such an occasion is why I still do my GRUB-ing manually: it tells you info about the "root" (where /boot is, i.e. is it the correct partition type? what's in the root of that partition?), the kernel (if it a valid image?) and the initrd (is the initrd valid? does it match the kernel version?) But again, that's the great thing about FOSS: you have many choices.
!