Find the answer to your Linux question:
Results 1 to 10 of 10
Ever since i plugged in my new sata hard drive i have been locked out of grub. I get something like this... Code: Grub loading stage 1.5. Grub loading, please ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2009
    Posts
    5

    Grub "error 17" ever since i plugged in my new sata drive.


    Ever since i plugged in my new sata hard drive i have been locked out of grub. I get something like this...
    Code:
    Grub loading stage 1.5.
    
    Grub loading, please wait ...
    Error 17
    _
    I have spent many hours trying to fix this but cant seem to get it working. Could someone please help me. Also im farily new to linux so I would appreciate it if you could be as specific as possible.

    Here is what i got

    Code:
    ubuntu*ubuntu:~$ sudo fdisk -l
    
    Disk /dev/sda: 40.0 GB, 40000000000 bytes
    255 heads, 63 sectors/track, 4863 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xaf33af33
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1        4862    39053983+   7  HPFS/NTFS
    
    Disk /dev/sdb: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x6ea5d11f
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1               1       60801   488384001    7  HPFS/NTFS
    
    Disk /dev/sdc: 30.7 GB, 30750031872 bytes
    255 heads, 63 sectors/track, 3738 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x000d7ce5
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdc1               1        3579    28748286   83  Linux
    /dev/sdc2            3580        3738     1277167+   5  Extended
    /dev/sdc5            3580        3738     1277136   82  Linux swap / Solaris
    
    Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x0005411e
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdd1               1        6527    52428096    7  HPFS/NTFS
    /dev/sdd2            6528       10443    31455270   83  Linux
    /dev/sdd3           10444       14359    31455270   83  Linux
    /dev/sdd4           14360      121601   861421365    7  HPFS/NTFS
    bios boots to sda which has windows on it
    sdb is just a data drive
    sdc is my xubuntu
    and sdd is the new sata drive
    Code:
    grub> find /boot/grub/stage1
     (hd2,0)
    i think my problem is that grub needs to be in hd0 but i dont know how to change that

    Note: my system was working perfectly up untill i plugged in the sata and turned that on in my bios. I think that this grub error is specifically caused by a new sata drive and think that it would be working right now if the drive i added wasnt sata

  2. #2
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493
    have you changed the position of HDD before attached to the computer
    Only if I could understand the man pages
    Registered Linux user #492640
    OS: RHEL4,5 ,RH 9,Ubuntu

  3. #3
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    3,040
    You should have two options:-
    Option 1 install grub to MBR of sda using
    Code:
    sudo grub
    root (hd2,0)
    setup (hd0)
    quit
    Reboot and see if that fixes things ... if you get Linux to boot from the hard drive and Windows will not then post the output of
    Code:
    cat /boot/grub/menu.lst
    Option 2 swap boot order so you boot from the drive with linux on, before you do this type
    Code:
    sudo grub
    root (hd2,0)
    setup (hd2)
    quit
    Once you do this boot Linux from the hard drive and repost the output of
    Code:
    sudo fdisk -l
    Of the two options ... I recommend option 2

  4. #4
    Just Joined!
    Join Date
    Jun 2009
    Posts
    5
    Quote Originally Posted by Jonathan183 View Post
    You should have two options:-
    Option 1 install grub to MBR of sda using
    Code:
    sudo grub
    root (hd2,0)
    setup (hd0)
    quit
    Reboot and see if that fixes things ... if you get Linux to boot from the hard drive and Windows will not then post the output of
    Code:
    cat /boot/grub/menu.lst
    Option 2 swap boot order so you boot from the drive with linux on, before you do this type
    Code:
    sudo grub
    root (hd2,0)
    setup (hd2)
    quit
    Once you do this boot Linux from the hard drive and repost the output of
    Code:
    sudo fdisk -l
    Of the two options ... I recommend option 2
    after using option one i did the find command and it wasnt on hd0
    Code:
    grub> root (hd2,0)
    grub> setup (hd0)
    Checking if "/boot/grub/stage1" exists... yes
    Checking if "/boot/grub/stage2" exists... yes
    Checking if "/boot/grub/e2fs_stage1_5" exists... y
    Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  16 sectors are embedded.
    succeeded
    Running "install /boot/grub/stage1 d (hd0) (hd0)1+16 p (hd2,0)/boot/grub/stage
    2 /boot/grub/menu.lst"... succeeded
    Done.
    
    grub> find /boot/grub/stage1
    (hd2,0)
    so i went to option two,restarted my computer, but same still getting same error

  5. #5
    Just Joined!
    Join Date
    Jun 2009
    Posts
    5
    o wait...i think i forgot to do something from option 2...how do you swap the boot order? from the bios...Im not able to change it from sda

  6. #6
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    3,040
    Grub has two parts ... one part that sits in the MBR and the other part which has config information. When you enter the search command you are searching for the second part (location does not move). When you install grub to the MBR you must let it know where stage 1.5 or stage 2 part of grub is located.

    From the output you have given you have installed grub to the MBR of the first hard drive (hd0) - based on fdisk output this is a 40GB drive with an ntfs partition only. Try selecting that as the boot device ... do you get a grub menu?

  7. #7
    Just Joined!
    Join Date
    Jun 2009
    Posts
    5
    Quote Originally Posted by Jonathan183 View Post
    Grub has two parts ... one part that sits in the MBR and the other part which has config information. When you enter the search command you are searching for the second part (location does not move). When you install grub to the MBR you must let it know where stage 1.5 or stage 2 part of grub is located.

    From the output you have given you have installed grub to the MBR of the first hard drive (hd0) - based on fdisk output this is a 40GB drive with an ntfs partition only. Try selecting that as the boot device ... do you get a grub menu?
    no i dont get to the menu

  8. #8
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,113
    Did you do both of jonathan183's options? You should do one or the other not both. If you did option one, your Grub stage1 file should be in the mbr of the first disk and if you have the first disk set as first in boot priority it should boot.

    If you did both options, it won't work. If you did option two last and haven't changed anything, set the 30GB drive first in boot priority and try booting.

    after using option one i did the find command and it wasnt on hd0
    It won't show (hd0), it will only show the root or boot partition it is in such as (hd2,0).

  9. #9
    Just Joined!
    Join Date
    Jun 2009
    Posts
    5
    ughh... i did 1 then 2 then i thnk i triend one again lol. What should i do?

  10. #10
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    3,040
    You can try just option 2. I also suggest you try disconnecting or disabling all drives except the Linux drive and check it will boot correctly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •