Announcement

Collapse
No announcement yet.

Re-installing GRUB (basic questions)Kubuntu

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

    Re-installing GRUB (basic questions)Kubuntu



    Here's what i want to ask;

    If this method works, do you think the Grub setting will still be maintained? i don't want to have only Windoze on my system as i just use it for specific activities.

    If it doesn't work (i'm not counting too much on the problem getting fixed) then obviously i have to re-install windows which means it will wipe the current settings. I re-searched the possible things i could do if that happened, i want you to tell me if this will surely work. I can't afford to lose the Grub settings
    You can't boot into any of your Linux OSs.
    First, you need to get a grub prompt (grub>) somehow. Your two choices are: (1) Use a rescue disk, like Super Grub Disk, from which you can boot into your OS, or press the “c” key to get a GRUB prompt. Or, (2) Use your Live Kubuntu CD. Let's assume (2) here. Put your Live CD in the CD tray, re-boot your PC, startup your Live Kubuntu. Then open a terminal (Konsole) get a GRUB prompt as root by typing sudo grub (then press Enter), and type the following (press Enter after each command):
    grub> root (hdx,y) # (hdx,y) is the partition of your "main" Linux OS
    grub> setup (hd0) # This assumes (hd0) is your “main” booting hard drive MBR
    grub> quit
    $ exit
    I have a Kubuntu Live CD ordered through Shipit which i can use. What i want to know is that the grub> root (hdx,y) what are the x and y figures?

    Here's what fdisk -lu gives me;

    Code:
    nikhil@nikhil-laptop:~$ sudo fdisk -lu
    
    Disk /dev/sda: 120.0 GB, 120034123776 bytes
    255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0xd0f4738c
    
      Device Boot   Start     End   Blocks  Id System
    /dev/sda1  *     63  45062324  22531131  7 HPFS/NTFS
    /dev/sda2    45062325  234436544  94687110  f W95 Ext'd (LBA)
    /dev/sda5    45062388  49255289   2096451  82 Linux swap / Solaris
    /dev/sda6    49255353  65047184   7895916  83 Linux
    /dev/sda7    65047248  234436544  84694648+ 83 Linux
    I'm hoping i can get a reply, and then try and fix this today..any suggestions from you guys would be great.

    Thanks

    #2
    Re: Re-installing GRUB (basic questions)Kubuntu

    Re-installing GRUB in your hard drive Master Boot Record
    will not do any harm to Windows or to Kubuntu.
    (It will, of course, overwrite your MBR and
    any other bootloader that might be in the MBR.)

    grub> root (hdx,y) # (hdx,y) is the partition of your "main" Linux OS
    grub> setup (hd0) # This assumes (hd0) is your “main” booting hard drive MBR
    grub> quit
    $ exit

    It's either
    root (hd0,5) or
    root (hd0,6).

    (Probably (hd0,5))
    (NOTE: (hd0,5) = sda6 and (hd0,6) = sda7))

    To find out,
    Open K > System > Konsole.
    Type
    sudo grub
    so you now have a GRUB prompt, grub>
    then type
    grub> find /boot/grub/stage1

    The answer you get is the answer you need in the setup command.
    (I'm pretty sure, in your case, you'll get just one answer --
    as you only have only Kubuntu/GRUB installation.)

    So just keep typing, using the correct (hdx,y):
    grub> root ( etc etc
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    Comment


      #3
      Re: Re-installing GRUB (basic questions)Kubuntu

      Code:
      grub> find /boot/grub/stage1
       (hd0,5)
      
      Right?
      
      Now, Hd5, which partition does it correspond to? is it my main linux home partition? i kind of know why i'm writing hd0 (because that's the first part of the HDD where the grub bootloader is) but which part is hd05?
      
      Thanks in advance, just want to know what i'm doing before i do it.

      Comment


        #4
        Re: Re-installing GRUB (basic questions)Kubuntu

        (hdx,y) where x is the drive number and y is the partition number (both starting at 0).

        Oh, and could you please change the code tag to a quote in your first post and properly close the code tag in your second? You're stretching the page...
        For external use only.

        Comment


          #5
          Re: Re-installing GRUB (basic questions)Kubuntu

          (hd0,5) is sda6 (see you fdisk output) --
          that's where your Kubuntu is, and that's also where the GRUB files were installed.
          In fact, you can see them: go to Kubuntu on sda6 (which is also called (hd0,5)),
          open Konqueror, type /boot in the location window, and you'll see the grub folder there.
          The GRUB files are inside that folder.

          So
          root (hd0,5)
          setup (hd0)

          means: set up GRUB in the MBR of the drive hd0 using the GRUB files located at (hd0,5).

          The boot menu, /boot/grub/menu.lst, will also be located on (hd0,5).
          When this is done, the initial program loader (IPL) in the MBR will be that of GRUB (called GRUB Stage_1),
          which will point to GRUB Stage_1.5 (in the 16 sectors following the MBR on hd0),
          which in turn will point at the Stage_2 GRUB files on (hd0,5) including the boot menu there (/boot/grub/menu.lst).

          In theory, you could set up GRUB in hd0 using GRUB files from anywhere! B
          But, here, you are doing it using the GRUB in (hd0,5).
          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

          Comment


            #6
            Re: Re-installing GRUB (basic questions)Kubuntu

            Well, i have good and bad news

            i got windows to boot up using the method suggested.seems to be working fine..However, when i launch Skype (which is 50% of the reason i wanted to get windows up) it just failed on me..goes back to the blue screen of death. This seriously lame and i don't know what to do.

            I've just started a thread to get my microphone working,i'll be a little more than happy if my microphone starts to work.

            Thanks,

            Comment

            Working...
            X