Announcement

Collapse
No announcement yet.

Had to reinstall windows and it wrote over GRUB

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Had to reinstall windows and it wrote over GRUB

    So I had to reinstall windows (after screwing up my hard drive partitions) and now I need to reinstall GRUB. I understand that there are some other posts about this, but the only problem is that since the Dapper install CD works so much differently than older versions, none of the advice I saw in the other threads actually helps. I see no place to type "recover" or whatever. I tried typing it in at that prompt that appears when you press F6, but that doesnt help. How can I reinstall GRUB using the Dapper live/install combo CD? Also, I know the command to install GRUB involves specifying where to install it to. So, where do I install it to? The Linux partition or what?

    #2
    Re: Had to reinstall windows and it wrote over GRUB

    Boot from the live cd,

    Open konsole then type:
    sudo grub
    root (hdx,y) x is the hard drive, y partition, so (hd0,1) is the first hard drive and second partition where kubuntu is installer.
    setup (hd0)
    quit

    And you're done.

    Comment


      #3
      Re: Had to reinstall windows and it wrote over GRUB

      Thanks for the very helpful post, that did the trick. However, my Kubuntu is still not useable.

      What happened is I added a fat32 partition between my windows and linux partitions, so my linux partition used to be on hda2, but now its on hda3. So at first GRUB wouldn't load anything, but then I booted into a live cd and changed the kubuntu entiries from hd(0,1) to hd(0,2). That helped a bit, as things started to boot. Then, however, I got a bunch of errors referencing hda2 (since it's no longer the root linux filesystem). I know I could do things like update fstab or whatever, but I'm wondering if there's a bunch of places where references to hda2 will need to be changed to hda3. Perhaps someone who has been in a similar situation could give me a hand here.

      Comment


        #4
        Re: Had to reinstall windows and it wrote over GRUB

        Boot into the live CD, open a konsole window and type:
        sudo mkdir -p /hd
        sudo mount /dev/hda3 /hd
        sudo kate /hd/etc/fstab

        and change the hda2 to hda3, then resave and:

        sudo umount /hd

        then reboot and it should work again.

        Comment

        Working...
        X