Grub - i broke it.

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).
6 answers Last reply
More about grub broke
  1. 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)


    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.
  2. 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 :)
  3. 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.
  4. 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.
  5. 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.
  6. 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.
Ask a new question

Read More

Ubuntu Grub Linux