Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Grub problems - Error 17 but not I think

  1. #1
    Join Date
    Nov 2008
    Beans
    26

    Grub problems - Error 17 but not I think

    Hi,

    I (also) have grub pain.

    LSI Logic Ultra320 SCSI Adapter with 3 SCSI drives + 1 SATA drive

    When I installed my Ubuntu 8.10, I forgot to attach a SCSI drive. I realized some time later. When I powered up the drive and tried to boot my PC I got error 17 from grub.

    I tried a number of things, most drastically, fdisking all the partitions on my Ubuntu disk, reformating them and installing Ubuntu 9.4. However no matter what I try as long as the 3rd SCSI drive is attached I get error 17.

    I booted with the install CD, saw and mounted all the drives individually. chroot, tried to use grub to setup (hd3,1) but I get one form of error or another depending on whether or not I have chroot'ed. If I chroot, the probe happens very quickly and find doesn't return anything. If I chroot, I get an error from setup(hd3) "Can't find /boot/stage1.." I checked the UUIDs in the menu.lst, all is correct

    17 : Cannot mount selected partition
    This error is returned if the partition requested exists, but the filesystem type cannot be recognized by GRUB.

    I have formatted and resized /boot as ext2 so I don't think error 17 is the problem.

    I could use a few ideas as I'm all out. Any thoughts anyone?
    TIA,

  2. #2
    Join Date
    Nov 2008
    Beans
    479
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Grub problems - Error 17 but not I think

    What are the systems on the other disks? Could you post the output of boot_info_script, or at least
    Code:
    sudo fdisk -l
    sudo blkid -c /dev/null
    Are you able to use UUID instead of (hdx,y)?
    5127d464-4548-4993-a138-f546f2fd2a33

  3. #3
    Join Date
    Nov 2008
    Beans
    26

    Re: Grub problems - Error 17 but not I think

    Thanx for taking the time.

    Here's the fdisk. I have booted from install CD. All the other drives are NTFS (windoze). As I said I only get the error when /dev/sdc is powered-up.

    Code:
    root@ubuntu:~# fdisk -l
    
    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xd4cd1c09
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1       19457   156288321    7  HPFS/NTFS
    
    Disk /dev/sdb: 36.9 GB, 36969185280 bytes
    255 heads, 63 sectors/track, 4494 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xd4b3c8f8
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *           1        4493    36089991    7  HPFS/NTFS
    
    Disk /dev/sdc: 73.4 GB, 73407865856 bytes
    255 heads, 63 sectors/track, 8924 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xa9b50246
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdc1   *           1        8924    71681998+   7  HPFS/NTFS
    
    Disk /dev/sdd: 36.9 GB, 36969185280 bytes
    255 heads, 63 sectors/track, 4494 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x13338976
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdd1               1          18      144553+  83  Linux
    /dev/sdd2              19        1586    12594960   83  Linux
    /dev/sdd3            1587        1652      530145   82  Linux swap / Solaris
    /dev/sdd4            1653        4494    22828365    5  Extended
    /dev/sdd5            1653        4494    22828333+  83  Linux
    /dev/sdc has one NTFS partition. Is that marked as first boot?

    I've uploaded the results.txt from the boot_info_script

    I also tried
    Code:
    root@ubuntu:~/Desktop# mkdir /target
    root@ubuntu:~/Desktop# mount -t ext4 /dev/sdd2 /target
    root@ubuntu:~/Desktop# mount -t ext2 /dev/sdd1 /target/boot
    root@ubuntu:~/Desktop# chroot /target /bin/bash
    root@ubuntu:/# grub
    Probing devices to guess BIOS drives. This may take a long time...
    grub> find /boot/grub/menu.lst
    
    Error 15: File not found
    
    grub> find /boot/grub/stage1  
    
    Error 15: File not found
    
    grub> find (hd ...tab
    grub> find (hd3 ...tab
    grub> find (hd3, ...tab
    Error 21: Selected disk does not exist
    
    grub> find (hd0 ...tab
    grub> find (hd0, ...tab
    Error 21: Selected disk does not exist
    That probe was too quick. I think there is a issue using grub in this way. Are there any hints here?

    Thanx.
    Dp.
    Attached Files Attached Files

  4. #4
    Join Date
    Nov 2008
    Beans
    479
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Grub problems - Error 17 but not I think

    With all the drives attached, ALL options give you Error 17?
    Code:
    Ubuntu 9.04, kernel 2.6.28-15-generic
    Ubuntu 9.04, kernel 2.6.28-15-generic (recovery mode)
    Ubuntu 9.04, kernel 2.6.28-11-generic
    Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
    Ubuntu 9.04, memtest86+
    Other operating systems:
    Microsoft Windows XP Professional
    5127d464-4548-4993-a138-f546f2fd2a33

  5. #5
    Join Date
    Nov 2008
    Beans
    26

    Re: Grub problems - Error 17 but not I think

    I don't get a menu at all. The error kicks in just as BIOS hands over. Even if I boot from the CD and choose the boot from first disk option I get something like


    Code:
    stage 1.5
    
    Error 17

  6. #6
    Join Date
    Sep 2008
    Location
    Philadelphia, PA
    Beans
    5,193
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Grub problems - Error 17 but not I think

    Go into BIOS please & report back the hard disk boot order.
    Multi-boot: Arch linux, Ubuntu 12.04, Windows 7 & Windows 8

  7. #7
    Join Date
    Nov 2008
    Beans
    479
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Grub problems - Error 17 but not I think

    What I would do is this:

    1 setup BIOS so that it boots sdd first
    2 run LiveCD and Terminal there
    3 run sudo grub and install grub on sdd MBR (no chrooting necessary)
    Code:
    find /grub/stage2
    root (hdx,y)
    setup (hdx)
    quit
    where x,y are numbers from the output of find /grub/stage2 command.

    Now the problematic part is to find the correct addressing for the Windows boot in menu.lst. The numbers in (hda,b) could be different with and without the extra drive attached and, as far as I know, you can't use UUID or LABEL for Win partitions. So you will probably have to experiment there.

    You could also check the Editing GRUB's device.map section on this page.

    BTW, are you going to attach the new drive permanently?
    5127d464-4548-4993-a138-f546f2fd2a33

  8. #8
    Join Date
    Sep 2008
    Location
    Philadelphia, PA
    Beans
    5,193
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Grub problems - Error 17 but not I think

    Quote Originally Posted by arrange View Post

    Now the problematic part is to find the correct addressing for the Windows boot in menu.lst. The numbers in (hda,b) could be different with and without the extra drive attached and, as far as I know, you can't use UUID or LABEL for Win partitions. So you will probably have to experiment there.
    No experimenting necessary, that is why I asked for the order of hard disk booting in BIOS. When using (hdx,y) in GRUB x is determined by the order of hard disk boot in BIOS.

    Before I gave OP instructions on how to set up GRUB, I wanted that info also so I could explain how to edit menu.lst so windows will boot from the GRUB menu once GRUB is set up.

    There is no reason to guess or experiment, GRUB is very orderly and detailed. All you need is the correct info to set it up properly.
    Multi-boot: Arch linux, Ubuntu 12.04, Windows 7 & Windows 8

  9. #9
    Join Date
    Nov 2008
    Beans
    26

    Re: Grub problems - Error 17 but not I think

    I had a quick attempt at this morning. I have been a bit of a spanner I now realise. I didn't think to look at the BIOS. The BIOS can specify the disk boot order of the disks it can see on the SCSI controller. It's not an on-board controller so I was surprised by that.

    I experimented a bit. Set the wrong disk as the 1st boot and got an NT loader error. I have 2 HITACHI 36GB drives. One of them is Ubuntu, the other Windows. I had a look in /proc/scsi/scsi. The disks I am concerned with are ID:0 and ID:2. I set ID:2 as the 1st boot. Booted from the CD and followed the code from your last post (thanx). It appeared to work. At least I didn't get any errors from grub this time. However when I booted I got the same error.

    Code:
    Loading Grub. Stage 1.5
    Error 17
    A couple of questions:

    You said install grub on the MBR of /sdd. Does the code snippet you supplied do that or is there another step to get the MBR pointing to the correct root drive?

    find /grub/stage2 returned (hd3,0)
    Should I then set root as (h3,1) as my / (root partition) is on /dev/sdd2. Assuming grub is indexing the partitions from 0 (zero).


    Yes I do want to keep this drive on-line permanently. It has a lot of data on.

    I appreciate what your saying about the Windoze partition. I expect that will be easily fixed by editing the menu.lst and a bit of trial and error.

    Thanx for you help so far. I don't think I'm that far away from getting this fixed.
    Dp.

  10. #10
    Join Date
    Nov 2008
    Beans
    26

    Re: Grub problems - Error 17 but not I think

    Sorry Presence, I think we cross-posted.

    I have changed the boot order in the BIOS now so it may not be what it was. The current disk order is

    SCSI ID:2
    SCSI ID:0
    SATA disk
    SCSI ID:8

    I'm fairly certain that ID2 is the Ubuntu disk. As both disks are manufactured by Hitachi and are the same size it's tricky to determine which device is which.

    From the boot_info script it looks like I may have grub installed on both /sda and /sdb.

    If I change the boot order, do I also change the device naming scheme?

    ============================= Boot Info Summary:

    => Grub0.97 is installed in the MBR of /dev/sda and looks on boot drive #4 in
    partition #1 for /grub/stage2 and /grub/menu.lst.
    => Grub0.97 is installed in the MBR of /dev/sdb and looks on boot drive #3 in
    partition #1 for /grub/stage2 and /grub/menu.lst.
    => Windows is installed in the MBR of /dev/sdc
    => Windows is installed in the MBR of /dev/sdd


    I'm not by my machine at the moment. It will be a few hours before I'm home again and can work on it.

    Thanx,
    Dp.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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