Help can't install GRUB

Discussion in 'all things UNIX' started by yeow, Mar 4, 2009.

Thread Status:
Not open for further replies.
  1. yeow

    yeow Registered Member

    Joined:
    Dec 11, 2006
    Posts:
    225
    On my new computer I installed Pardus Linux to dual-boot with WinXP. But upon restart no GRUB boot selection screen & it booted straight into WinXP :ouch: . I then used Ubuntu LiveCD and opened a few things (see pic) & tried to install GRUB by referencing Mrk's tutorial:

    1. I opened Pardus's boot/grub/menu.lst file, I see it states "root (hd0,2)" <- shown at pic bottom right

    2. In Terminal, I typed "grub" and then entered "root (hd0,2)", but grub says "Error 21" Selected disk does not exist" <- shown at pic top left

    3. In Gparted, I'm confused as I see my two SATA2 hdds as hda & sda?
    - My motherboard SATA is running in "IDE mode" because I didn't have floppy for SATA driver during WinXP install.
    - My 500GB SATA2 hdd (=sda) contains WinXP & Pardus Linux. In last column "Flags", there's a word "boot" next to WinXP partition only - what does that mean?
    - My 1000GB SATA2 hdd (=hda) is a single extended partition, contains just data.

    Any suggestions what I should do? o_O :blink: :'(
     

    Attached Files:

  2. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,695
    Hello,

    The specific section is to fix GRUB. You have not installed it at all, it seems.
    The boot flag means the XP partition is marked as the boot partition and not sda3.

    Ubuntu reports all disks as sd. GRUB uses hd notation regardless of the type. I don't know why your two drives are seen as hd and sd versus two sds.

    Did you try SGD?

    Now, that said, try only: setup (hd0). See if this solves the problem. If not, boot into live session again and then run root (hdx,y), setup etc.

    Regards,
    Mrk
     
  3. yeow

    yeow Registered Member

    Joined:
    Dec 11, 2006
    Posts:
    225
    Hi Mrkvonic, thanks for responding. :)
    I just tried and this is the result.
    Code:
    grub> setup (hd0)
    
    Error 12: Invalid device requested
    Do I type "root (SGD)" ? I get "Error while parsing number" for that.
     
  4. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,695
    SGD - Super Grub Disk.
    Mrk
     
  5. yeow

    yeow Registered Member

    Joined:
    Dec 11, 2006
    Posts:
    225
    Oh, SGD = Super GRUB Disk. Slaps forehead. So i booted SGD & opted to autofix GRUB for GNU/Linux (forgot exact wording):
    Code:
    Booting <---- BACK (Error 6 is OK)
    
    adhocerror
    
    Error 6 : Mismatched or corrupt version of Stage1/Stage2
    
    N IDE  SCSI  GRUB   HURD  TYPE  SIZE  OS
    3 hda3 sda3 (hd0,2) hd0s3 ext2fs 21GB [0;33;01;37,mPardus GNU Linux -> /boot/grub/stage1
    So Pardus is at fault then? Anyway via SGD, I could select to boot Pardus & it did. So probably some setup files inside boot/grub/ weren't not correctly written up during Pardus install? I tried installing twice already.

    Btw I ran Gparted in Pardus, and it did list my drives as sda (1000GB) & sdb (500GB) now. The previous hda & sda names were from Gparted in older version Ubuntu 8.04LTS LiveCD.

    Back in Pardus - I typed "grub" in Terminal but it wasn't an accepted command there. Pardus' package manager showed grub package already installed, but no idea how to start grub & try fixing again. o_O :blink: :D
     
  6. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,695
    Why didn't you let SGD fix the GRUB? Let it do the hard work for you.
    As to Pardus, please check if there's an option in one of the menus to install GRUB or similar. Then try that option, if it exists. Also, try the setup command from GRUB CLI in Pardus live CD <- not native install.
    Mrk
     
  7. yeow

    yeow Registered Member

    Joined:
    Dec 11, 2006
    Posts:
    225
    Hi Mrk, I did select SGB to fix GRUB and the error is stated above. But hurrah, out of the blue everything is OK now!!:D :D Not sure how but now I've the GRUB boot selection screen.

    It's weird because I tried same SGD fix, each time same error:
    - Above failed, but from SGD I could boot into Pardus
    - In Pardus, I installed ATI drivers & set higher resolution but settings didn't take effect. So I rebooted
    - Upon reboot, it went straight into windows. So I put SGD disk in & rebooted.
    - In SGD, tried again to fix GRUB but same error. Selected to boot Pardus.
    - Pardus started booting but failed to start, probably something changed after ATI driver install?
    - Many tries later, I got into Pardus after changing boot parameters. Along the way, tried SGD fix but same error.
    - Then I took out SGD disk, wanting to boot into windows -> Then I see GRUB boot selection screen!

    NO WAY! But I'm happy lol :eek: :eek: :D :D
     
  8. yeow

    yeow Registered Member

    Joined:
    Dec 11, 2006
    Posts:
    225
    I checked the current menu.lst file & compared to the pic above, found the differences in red. Previously there was "(hd0,2)" in the lines, but it's not there anymore. Self-fixed, by whom I wonder?

    BTW, thanks for looking in Mrk!
     
  9. yeow

    yeow Registered Member

    Joined:
    Dec 11, 2006
    Posts:
    225
    I found out what caused the problem apparently. My 2 drives were connected to SATA4 & SATA5 ports on the motherboard, cause I didn't know better. Just noticed the labels on the motherboard a few days ago.

    I reconnected them to SATA1 & SATA2 ports, and then no such GRUB problems when I installed Pardus again to test. Cause I'm running the SATA ports at Native IDE mode, I think something funny goes on when they're connected to 4/5/6 or something.

    Just thought I'd post back, in case someone lands in a similar predicament.
     
Loading...
Thread Status:
Not open for further replies.