[SOLVED] GRUB Error 17 after installing Ubuntu 7.04


Results 1 to 11 of 11

Thread: [SOLVED] GRUB Error 17 after installing Ubuntu 7.04

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Posts
    3

    [SOLVED] GRUB Error 17 after installing Ubuntu 7.04

    Hello,

    I recently decided to install Ubuntu Linux onto my computer, to dual-boot with Windows XP. I had my Windows XP on one partition, and had another partition of extra space. I did the installation and and the guided partiton maker, and made the Ubuntu partition about 60 GB. I'm pretty sure that I formatted it as an ext3 partition, but I can't remember exactly. Now when I try to boot up my computer, I get an error message that says
    "GRUB stage 1.5

    Grub Error 17"

    Now I know that GRUB Error 17 has to do with the filesystems, but I don't know how to fix this problem.

    here is my menu.lst file:
    Code:
     # menu.lst - See: grub(8), info grub, update-grub(8)
    # grub-install(8), grub-floppy(8),
    # grub-md5-crypt, /usr/share/doc/grub
    # and /usr/share/doc/grub-doc/.
    
    ## default num
    # Set the default entry to the entry number NUM. Numbering starts from 0, and
    # the entry number 0 is the default if the command is not used.
    #
    # You can specify 'saved' instead of a number. In this case, the default entry
    # is the entry saved with the command 'savedefault'.
    # WARNING: If you are using dmraid do not change this entry to 'saved' or your
    # array will desync and will not let you boot your system.
    default 0
    
    ## timeout sec
    # Set a timeout, in SEC seconds, before automatically booting the default entry
    # (normally the first entry defined).
    timeout 10
    
    ## hiddenmenu
    # Hides the menu by default (press ESC to see the menu)
    #hiddenmenu
    
    # Pretty colours
    #color cyan/blue white/blue
    
    ## password ['--md5'] passwd
    # If used in the first section of a menu file, disable all interactive editing
    # control (menu entry editor and command-line) and entries protected by the
    # command 'lock'
    # e.g. password topsecret
    # password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
    # password topsecret
    
    #
    # examples
    #
    # title Windows 95/98/NT/2000
    # root (hd0,0)
    # makeactive
    # chainloader +1
    #
    # title Linux
    # root (hd0,1)
    # kernel /vmlinuz root=/dev/hda2 ro
    #
    
    #
    # Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
    
    ### BEGIN AUTOMAGIC KERNELS LIST
    ## lines between the AUTOMAGIC KERNELS LIST markers will be modified
    ## by the debian update-grub script except for the default options below
    
    ## DO NOT UNCOMMENT THEM, Just edit them to your needs
    
    ## ## Start Default Options ##
    ## default kernel options
    ## default kernel options for automagic boot options
    ## If you want special options for specific kernels use kopt_x_y_z
    ## where x.y.z is kernel version. Minor versions can be omitted.
    ## e.g. kopt=root=/dev/hda1 ro
    ## kopt_2_6_8=root=/dev/hdc1 ro
    ## kopt_2_6_8_2_686=root=/dev/hdc2 ro
    # kopt=root=UUID=65619789-a4bf-4d31-9957-6b3d4cdb5c6f ro
    
    ## Setup crashdump menu entries
    ## e.g. crashdump=1
    # crashdump=0
    
    ## default grub root device
    ## e.g. groot=(hd0,0)
    # groot=(hd0,3)
    
    ## should update-grub create alternative automagic boot options
    ## e.g. alternative=true
    ## alternative=false
    # alternative=true
    
    ## should update-grub lock alternative automagic boot options
    ## e.g. lockalternative=true
    ## lockalternative=false
    # lockalternative=false
    
    ## additional options to use with the default boot option, but not with the
    ## alternatives
    ## e.g. defoptions=vga=791 resume=/dev/hda5
    # defoptions=quiet splash
    
    ## should update-grub lock old automagic boot options
    ## e.g. lockold=false
    ## lockold=true
    # lockold=false
    
    ## Xen hypervisor options to use with the default Xen boot option
    # xenhopt=
    
    ## Xen Linux kernel options to use with the default Xen boot option
    # xenkopt=console=tty0
    
    ## altoption boot targets option
    ## multiple altoptions lines are allowed
    ## e.g. altoptions=(extra menu suffix) extra boot options
    ## altoptions=(recovery) single
    # altoptions=(recovery mode) single
    
    ## controls how many kernels should be put into the menu.lst
    ## only counts the first occurence of a kernel, not the
    ## alternative kernel options
    ## e.g. howmany=all
    ## howmany=7
    # howmany=all
    
    ## should update-grub create memtest86 boot option
    ## e.g. memtest86=true
    ## memtest86=false
    # memtest86=true
    
    ## should update-grub adjust the value of the default booted system
    ## can be true or false
    # updatedefaultentry=false
    
    ## ## End Default Options ##
    
    title Ubuntu, kernel 2.6.20-15-generic
    root (hd0,3)
    kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=65619789-a4bf-4d31-9957-6b3d4cdb5c6f ro quiet splash
    initrd /boot/initrd.img-2.6.20-15-generic
    quiet
    savedefault
    
    title Ubuntu, kernel 2.6.20-15-generic (recovery mode)
    root (hd0,3)
    kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=65619789-a4bf-4d31-9957-6b3d4cdb5c6f ro single
    initrd /boot/initrd.img-2.6.20-15-generic
    
    title Ubuntu, memtest86+
    root (hd0,3)
    kernel /boot/memtest86+.bin
    quiet
    
    ### END DEBIAN AUTOMAGIC KERNELS LIST
    
    # This is a divider, added to separate the menu items below from the Debian
    # ones.
    title Other operating systems:
    root
    
    
    # This entry automatically added by the Debian installer for a non-linux OS
    # on /dev/sda1
    title Microsoft Windows XP Professional
    root (hd0,0)
    savedefault
    makeactive
    chainloader +1
    and here's the disk information from fdisk:
    Code:
     Disk /dev/sda: 203.9 GB, 203928109056 bytes
    255 heads, 63 sectors/track, 24792 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
    Device Boot Start End Blocks Id System
    /dev/sda1 1 8924 71681998+ 7 HPFS/NTFS
    /dev/sda2 8925 16805 63304132+ f W95 Ext'd (LBA)
    /dev/sda3 24788 24792 40131 83 Linux
    Partition 3 does not end on cylinder boundary.
    /dev/sda4 * 16806 24787 64115415 83 Linux
    /dev/sda5 8925 16712 62557078+ 7 HPFS/NTFS
    /dev/sda6 16713 16805 746991 82 Linux swap / Solaris
    
    Partition table entries are not in disk order
    
    Disk /dev/sdb: 80.0 GB, 80026361856 bytes
    255 heads, 63 sectors/track, 9729 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
    Device Boot Start End Blocks Id System
    /dev/sdb1 * 1 9729 78148161 7 HPFS/NTFS
    Thanks!

  2. #2
    Join Date
    Oct 2002
    Location
    Republic of Texas
    Posts
    5,898
    It's been awhile since I've fooled with any logical partitions but perhaps you should change root (hd0,3) to root (hd0,4) since the _real_ hda4 is just a container for the logical partitions. (remember, grub starts counting from 0 so sda2 for fdisk is (hd0,1) for grub)
    Need help in realtime? Visit us at #linuxnewbie on irc.libera.chat

    Few of us will do as much for our fellow man as he has done.
    --Andrew Morton on RMS

  3. #3
    Join Date
    Jun 2007
    Posts
    3
    thank you, but how exactly would I go about doing that?

  4. #4
    Join Date
    May 2007
    Location
    Aurora, Illinois
    Posts
    2
    I am also having a problem with 'grub error 17' but mine is with debian, trying it out but it won't boot. When the error comes up, it just locks up solid. If I wanted to change the root location? I've tried reloading and checking cds thinking I did sumpin' wrong.

    Thanks

  5. #5
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    darqstar,

    You need to supply the output of

    (1) fdisk -l
    (2) /boot/grub/menu.lst
    (3) /boot/grub/device.map
    (4) /etc/fstab

    so that advice can be tailored to suit your case.
    Last edited by saikee; 06-03-2007 at 10:29 AM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  6. #6
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    Let's look at how Ubuntu boots itself with the 4 essential statements (other statements are optional and can be ignored)
    Code:
    title Ubuntu, kernel 2.6.20-15-generic
    root (hd0,3)
    kernel /boot/vmlinuz-2.6.20-15-generic  root=UUID=65619789-a4bf-4d31-9957-6b3d4cdb5c6f ro quiet splash
    initrd /boot/initrd.img-2.6.20-15-generic
    As far a Grub is concerned it has been informed the "root" of the Linux is in partition (hd0,3). This would be sda4 if the disk sda has been elected as the first bootable disk in the bios.

    Grub will then go into sda4's /boot to find the kernal specified as vmlinuz-2.6.20-15-generic .

    The Error 17, according to Grub Manual, is "17 : Cannot mount selected partition"

    This means Grub is experiencing difficulty to get inside sda4 to read the specified file.

    If we take a look at the Post #1 the output of fdisk -l shows
    Code:
    /dev/sda3 24788 24792 40131 83 Linux
    Partition 3 does not end on cylinder boundary.
    /dev/sda4 * 16806 24787 64115415 83 Linux
    The above suggests sda3's boundary has conflict and it could be the border with sda4. According to the partition table the primary partition sda4 has been positioned behind the extended partition sda2 which defines the borders of logical partitions sda5 and sda6. It is then followed by primary partition sda3 which is positioned at the end of the hard disk. Thus the order of the paritions are

    sda1, sda5, sda6, sda4, sda3.

    In Linux or any PC system the first 4 partitions are always the primaries but any one of them could have been turned into an extended partition. Logical partitions always start at the 5th position.

    There is nothing wrong with such a arrangement but there has been an boundary conflict with sda3 and that may be the root cause of why Grub can't read the file (by claiming the partition cannot be mounted).

    I would recommend the Ubuntu to be re-installed and the suggested procedure is as follow:

    (1) Boot up Ubuntu CD
    (2) Click terminal, then use cfdisk to partition the hard disk sda by command
    Code:
    sudo cfdisk /dev/sda
    (3) delete partition sda3, sda4, sda5 and sda5. sda2 will not be reported by cfdisk but will disappear if all the logical partitions are gone.
    (4) Reboot with Ubuntu Live CD. It is a good practice to do a reboot if you want the partition validated.
    (5) Check hard disk partitions by command "sudo fdisk -l". This time it should show only sda1 present.
    (6) Use cfdisk again, by command "sudo fdisk /dev/sda", to create two logical partitions; sda5 of 1Gb swap and sda6 say 60Gb for Ubuntu. To make sure sda5 being the swap you need to highlight "Type" and select partition No. 82. Highlight "write", press enter, then confirm with "yes" and then quit cfdisk.
    (7) Recheck the partitioning scheme by "sudo fdisk -l".
    (8) When sda5 and sda6 has been formed successfully click Ubuntu installer and tell it to install Ubuntu into sda6. This mean at some point inside the installer you highlight sda6 partition, click edit, select it as the mounting point for "/", format it with Ext2/3 or Reiserfs and click confirm.
    (9) Place the boot loader in the MBR.

    You will find Ubuntu installed and working perfectly for you.

    A few points of interest

    (a) Ubuntu uses UUID method to identify the partition reference in the kernel statement for the "root=" parameter. I don't know how it work but it is best to leave it alone. If the you run into trouble you can replace the UUID scheme with "root=/dev/sda6". I often do that too.

    (b) The beauty of placing Ubuntu in a single partition sda6 is that there is only one location for the root and kernel statement. I am confident if everything fails the following statement will boot Ubuntu in sda6
    Code:
    title Ubuntu, kernel 2.6.20-15-generic in partition sda6
    root (hd0,5)
    kernel /boot/vmlinuz-2.6.20-15-generic  root=/dev/sda6  ro quiet splash
    initrd /boot/initrd.img-2.6.20-15-generic
    As I have 4 versions of Ubuntu booted this way.

    (c) A Linux installer is possibly the best place to find bugs and an incorrect installation of the boot loader is common. It is not uncommon to restore Grub (or Lilo) again immediate after an installation. I would say if one installs 100 Linux there could 10% of them ending up with a faulty implementation.
    Last edited by saikee; 06-04-2007 at 10:53 AM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  7. #7
    Join Date
    May 2007
    Location
    Aurora, Illinois
    Posts
    2
    Thank you for the reply, Saikee. I am obviously very new to Linux... Debian was my first attempt to run Linux and it didn't work, no one to ask about it at that time and I went on to try fedora-6. This works very well for me but I'd still like to get debian working on another machine. Not sure how debian and ubuntu relate, actually never heard of ubuntu before last friday. I think I've confused the threads here and I appoligize. I just thought a grub boot error 17 would be the same in all. I'm still reading a lot of the forums, trying to learn more. The things you old hands take for granted are important to some of us newbies who don't have as much knowledge in the area. In the past two weeks since I started this box, I have learned much from reading here. Thank you again.

  8. #8
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    Darqstar,

    That is OK to hoop into the thread if you have a similar problem because the cure would be identical.

    Since you are new then I would explain the 4 items of information of why we need them and how you can get them to us.

    You can obtain all the requested information by boot up any Live CD.

    If you do in the terminal command "fdisk -l" the Linux will list every partition of every disk in you PC. With that we would know where is you Linux because many users relying on automatic partitioning will have no idea where the Linux resides. It save you a lot of hassle of explaining whethere it is Sata or Pata disk, primary or logical partition etc.

    The menu.lst is the configuration file of Grub residing in the /boot/grub directory of your installed Linux. If you know the partition reference say sda6 for example you can create a temporary directory in /mnt of the boot-up Live CD Linux and the the device sda8 on it. The command if you use a Debian like Ubuntu will be
    Code:
    sudo mkdir /mnt/any
    sudo mount /dev/sda8 /mnt/any
    You can then look at the directory of /mnt/any/boot/grub and list out its menu.lst by command
    Code:
    ls /mnt/any/boot/grub
    cat /mnt/any/boot/grub/menu.lst
    The menu.lst is the file that gives you the error 17.

    The file /boot/grub/device.map is a record of the disk order kept by Grub during installation. Grub does not call hard disks as sda or hdb but by the number they arranged in the bios. Thus if hdb were the first disk to be booted and sda the second the device.map will have entries like
    Code:
     (hd0) hdb
    (hd1) sda
    Many users try to be clever to change the Bios setting and thereby kill the booting process. If we know the orginal configuration we could diagnose the error. As a rule the disk order should never be changed once the systems have been installed.

    Lastly the file /etc/fstab contains a list of files that the kernel must mount when it is booted. Inside it will tell us the root "/" partition of the Linux. With that we can cross-check the information in the menu.lst.

    The information in menu.lst, device.map and fstab are ordinary text files a user can edit to overcome any booting problem.

    ------------------------------------------------------------

    Ubuntu is a branch of the Debian family. It is a well put together distro commanding a lot of respect and popularity. Debian itself favours stability and so lags behind in the implementation of new technology. Ubuntu family tries to have the security features of Debian but goes with newer kernels.

    I would say Ubuntu is probably one of the closest to Debian. Another big branch of Debian is of course the Knoppix family.
    Last edited by saikee; 06-03-2007 at 01:42 PM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  9. #9
    Join Date
    Jun 2007
    Posts
    3
    thanks saikee! that work perfectly.

    also, thanks to everyone else that helped me out!

  10. #10
    Join Date
    Jun 2007
    Location
    Derbyshire
    Posts
    4
    Yes, thanks to justlinux and saikee for all this grub information!
    I thought I would be clever because my bios can swap primary ide master/slave, and add a new hdd to my machine running ubuntu and install XP. Needless to say this didn't work as my grub config still thought it was on hda. After much pulling of hair and reading Saikee's information I managed to command line rebuild the menu.lst and get grub in the MBR of the XP disk and now all is well.
    Using the switch --verbose was a big help, but not as big as the work done here by saikee.

  11. #11
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    eddacker,

    A big welcome to JustLinux!

    Glad it works out for you guys.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

Posting Permissions

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