Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 21
Like Tree1Likes
Hi I am new to Linux and I am trying to create a multi boot system. My drive is divided as under PRIMARY PARTITIONS --> sda1 - GRUB 0.97, installed ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2013
    Posts
    15

    Getting grub error 17 after installing multiple OSes please help!


    Hi
    I am new to Linux and I am trying to create a multi boot system.

    My drive is divided as under

    PRIMARY PARTITIONS -->
    • sda1 - GRUB 0.97, installed booting fine
    • sda2 - Win8 Bootloader, Installed with windows
    • sda3 - Extended
    • sda4 - TempBoot, will delete this once everything boots up properly

    EXTENDED PARTITIONS -->
    • sda5 - Windows 8, installed, able to boot with grub
    • sda6 - Probably for Windows XP sometime later
    • sda7 - Fedora, installed, boot drive copied in boot folder of root partition
    • sda8 - Ubuntu, installed, boot drive copied in boot folder of root partition
    • sda9 - Bodhi, same as above
    • sda10 - Arch linux planning to install sometime later


    Starting from an empty hard drive -

    I first Installed Windows 8.

    Then I started installing Linux. I set each distro to be installed in a different partition on my drive, and the bootloader to a different mount point, but I did not install the bootloaders which get installed to the entire hard drive in fear of losing my Windows bootloader. Then I copied all the boot files to the root directory of each linux using the following commands

    $sudo mount /dev/sda4 boot
    $sudo mount /dev/sda7 linux
    $sudo cp -afrv boot/* linux/boot

    That was for Fedora, I did the same for all others.

    Then I installed GRUB, and tried to boot Windows 8. After lots of mishaps, I was able to boot into Windows 8 without any error messages.
    Then I added entries for the Linux Distros

    After that I updated my etc/fstab file with the proper UUID for the linux distros, same for root and boot in my case.
    I removed the entry for SWAP, after that created swap space using GParted.
    Then I updated grub

    Now I am able to boot Windows 8 just fine but whenever I try to boot a linux distro I am getting error 17 cannot mount selected partition for fedora & ubuntu and error 15 for bodhi linux. I have tried to set root as (hd0,0) which is the grub boot loader as well as (hdx,y) for the partition but the same message pops up all the time.

    Combinations which I have tried for Grub's menu.lst entries are as under

    title XYZ distro
    root (hd0,0)
    kernel (hdx,y)/boot/vmlinuz root=/dev/sdaX
    initrd (hdx,y)/boot/initrd.img
    title XYZ distro
    root (hdx,y)
    kernel (hdx,y)/boot/vmlinuz root=/dev/sdaX
    initrd (hdx,y)/boot/initrd.img
    title XYZ distro
    root (hd0,0)
    kernel (hdx,y)/boot/vmlinuz root=uuid
    initrd (hdx,y)/boot/initrd.img
    title XYZ distro
    root (hdx,y)
    kernel (hdx,y)/boot/vmlinuz root=uuid
    initrd (hdx,y)/boot/initrd.img
    Please help!!
    Last edited by Grubber; 07-30-2013 at 10:25 PM. Reason: more info

  2. #2
    Just Joined!
    Join Date
    Jul 2013
    Posts
    15
    Another question which I want to ask is whether the root in menu.lst is Grub's root or is it the distro's root or is it the root for the grub inside the distro's boot folder?
    Last edited by Grubber; 07-30-2013 at 11:01 PM.

  3. #3
    Just Joined!
    Join Date
    Jul 2013
    Posts
    15
    Here is my current menu.lst

    Code:
    # BOOTLOADER FILE !!
    #
    #Grub menu
    color white/blue black/red
    title You are now booting from sda GRUB
    boot
    
    # Boot automatically after a minute
    timeout 60
    
    # By default, boot the first entry.
    default 0
    
    # Fallback to the second entry.
    fallback 1
    
    title		FEDORA @ sda7
    root		(hd0,6)
    kernel		(hd0,6)/vmlinuz                root=dev/sda7
    initrd		(hd0,6)/initrd.img
    
    title 		FEDORA 3.8.0.12 generic @ sda7
    root		(hd0,6)
    kernel		(hd0,6)/boot/vmlinuz-3.8.0-12-generic				root=/dev/sda7
    initrd		(hd0,6)/boot/initrd.img-3.8.0-12-generic
    
    title 		UBUNTU @ sda8
    root		(hd0,7)
    kernel 		(hd0,7)/vmlinuz								root=/dev/sda8
    initrd 		(hd0,7)initrd.img
    
    
    title 		UBUNTU 2.6.31-14-generic @ sda8
    root		(hd0,7)
    kernel		(hd0,7)/boot/vmlinuz-2.6.31-14-generic 					root=/dev/sda8
    initrd		(hd0,7)/boot/initrd.img-2.6.31-14-generic
    
    title 		MS Windows 8
    hide		(hd0,6)
    hide		(hd0,7)
    hide		(hd0,8)
    unhide		(hd0,1)
    unhide		(hd0,4)
    rootnoverify	(hd0,1)
    makeactive
    chainloader +1
    
    #title 		Bodhi Linux @ sda9
    #root		(hd0,8)
    #kernel		(hd0,8)/vmlinuz 							root=/dev/sda9
    #initrd		(hd0,8)/initrd.img
    
    #title 		Bodhi Linux 3.8.0-12-generic @ sda9
    #root		(hd0,8)
    #kernel		(hd0,8)/boot/vmlinuz-3.8.0-12-generic 					root=/dev/sda9
    #initrd		(hd0,8)/boot/initrd.img-3.8.0-12-generic
    
    
    #sda1 is the partition containing GRUB Legacy used to boot all the Operating Systems right now
    #sda2 is the Windows BOOT Partition
    
    #sda4 is the extended partition
    
    #sda15 is the common swap partition for all linux
    Last edited by Grubber; 07-30-2013 at 11:06 PM.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    Where did you get the Grub Legacy you have installed? The most recent releases of Fedora, Ubuntu and Bodhi all use Grub2 and their menu is totally different and does not have a menu.lst file but rather a grub.cfg file. Are you using older releases of these distributions? I would not expect the entries you have to work for any of the systems. If you actually have Grub Legacy installed, you should try one of the following options to boot:

    title Ubuntu-12.04
    root (hd0,7)
    kernel /boot/grub/core.img
    #savedefault
    ##boot

    title Fedora
    root (hd0,6)
    chainloader +1
    The root line in the menu.lst file is referring to the partition on which the filesystem exists, so for Fedora it would be (hd0,6) which is equivalent to sda7.

    Normally what one does with multiple systems is to install the bootloader for all except one system to the partition on which you have installed the root of the filesystem. Then select one system which you install the Grub bootloader to the mbr. If you have windows 8 installed, do you have secure boot disabled?

    $sudo mount /dev/sda4 boot
    $sudo cp -afrv boot/* linux/boot
    The mount command above is incorrect and won't do anything. If you have a separate /boot partition then you would mount it with: sudo mount /dev/sda4 /boot.
    The copy command is also wrong as you are not copying it anywhere. You need to precede boot with a /, and you need to have a directory /linux in the / of one of the filesystems and it needs to be preceded with the forward slash '/'.

    I don't know where you got your advice, I'm also curious as to why you are using Grub Legacy when all the distributions you are using use Grub2 by default.

    The Grub errors you are reporting for Grub Legacy, Error 17 is unable to mount the partition. Could be pointed at the wrong partition or it could be a Linux ext4 partition which probably won't work with the entries you have but may work with the core.img or chainloader entries. They both work for me booting Linux on ext4. Error 15 is file not found so it is not finding the kernel or initrd file.

  6. #5
    Just Joined!
    Join Date
    Jul 2013
    Posts
    15
    Thanks for answering, I used grub legacy because I wanted to learn it from the start and it is easier than grub2 and a tutorial at dedoimedo.com/computers/grub.html or somewhere around it says that Grub can boot anything, and it explicitly mentions that one should not start with grub2.. Correct me if that is not the case.. I think it is because it is able to boot Windows 8 perfectly, and was able to boot the linux distros at times before I reformatted the drive...

    What I thought was to install grub , then let the boot-loader of each distribution do it's work, in other words, grub boots ubuntu 13's grub 2 bootloader or fedora 19's grub2. Am I on the right track?
    Last edited by Grubber; 07-31-2013 at 11:15 AM.

  7. #6
    Just Joined!
    Join Date
    Jul 2013
    Posts
    15
    I was able to make directory, mount and copy everything just fine... I even checked the dir using ls.. Let me tell you that I am an experienced Windows & DOS user, and know the basic conversions of the MS-DOS commands to linux commands and some basic linux commands, like ls, df, grub, grub-install, cp, rm, mv, cd, mkdir, startx, fsck, and some software like vi, leafpad, geany, gparted but have not used chmod or grub-update, or package install etc. I know when & how to sudo or not sudo on different types of linux distributions. You can say that I know things about my current job of installing multiple linux(es?), but I am missing something , is it the fact that it there is grub on my sda1 and first sector of hd0 and not grub2?? Or is it the fact that I have not installed the bootloader during the installation of each distro on sda in fear of ruining windows bootloader? Or something else? Or both?? Im quite confused. But now I know how to boot Windows 8 using grub so that can be solved, but won't the bootloader I load during the installation of a linux distro get corrupt after I install grub on sda1 or vice versa ?
    If you could tell me how to copy the bootloader from a partition to another partition, things could get better..
    I will try Grub 2 now while waiting for your reply. Thanks again!

  8. #7
    Just Joined!
    Join Date
    Jul 2013
    Posts
    15
    Another question, can I boot a grub unix with grub 2 ?? what about android x86? If so I will straightaway switch to GRUB 2.. What about DAS U-Boot & Chameleon??

  9. #8
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    If I am reading your post correctly, you have a separate /boot partition with Grub Legacy on sda1. Generally, what one would do is when installing an operating system, put the Grub bootloader on the / (root filesystem) partition. In your case, select to install the bootloader for Fedora on sda7 during the installation, select to install the bootloader for Ubuntu on sda8 and for Bodhi on sda9. You have this option during the install. Actually, I'm not sure about Fedora as they changed their installer and you may no be able to do it.

    During the installation, you can select which partition to use for install and the filesystem types are shown for partitions. If it is ntfs, it is windows so don't use that partition and you will not interfere with windows.

    but won't the bootloader I load during the installation of a linux distro get corrupt after I install grub on sda1 or vice versa ?
    As I said above, you install Grub to the partition you are using for that distribution, not to the master boot record, not on a windows partition. The option should be available during the install and if not, you should be able to do it later.

    My understanding is that Grub Legacy has a problem with ext4 filesystems and so chainloading to the distributions is the method used. You need Grub files from each distribution on their root partition in order to do this and the examples above work for me booting the system with Grub Legacy to ext4 filesystems which have distributions with Grub2.

    If you could tell me how to copy the bootloader from a partition to another partition, things could get better..
    The link below explains different method using Ubuntu (should also work for Bodhi). Fedora is different, just google 'reinstall grub2 on Fedora'. Should be easier than copying the files. Use the CD for Ubuntu for Ubuntu, Bodhi for Bodhi, etc.

    https://help.ubuntu.com/community/Grub2/Installing

    I'm posting the links to the Grub Legacy and Grub2 manuals below:

    GNU GRUB Manual 0.97
    GNU GRUB Manual 2.00~rc1

    The tutorial you refer to is good but very basic. The manuals give you much more detail, probably much more than you need.

    If you continue to have problems, you might google 'bootinfoscript' and go to the site, read the instructions, download and run the script and post the output (a results.txt file) here as it will give a lot of detailed information on your boot files, drives, partitions, etc.

    Just added info, Grub Legacy is no longer being developed. Grub2 is able to do things Grub Legacy could not and rather than trying to change Grub Legacy, the developers decided to do Grub2. Although Grub Legacy continues to be used and will be used by both home/business users for years to come, the fact remains that it is not being developed any longer.
    Last edited by yancek; 07-31-2013 at 01:45 PM. Reason: add pertinent info
    rokytnji likes this.

  10. #9
    Just Joined!
    Join Date
    Jul 2013
    Posts
    15
    Ok, so it means that I have to install grub 2 in my boot sda1 and in each distribution separately, so whenever I click for instance, Fedora, I will be presented with the bootloader for fedora, and can select fedora main, rescue, memtest etc ?? So in total there are several bootloaders and one main one, sounds cool, I will try it..

    can i chainload the grub2 bootloader for any and all distros which require it using grub legacy in the boot sda1 partition??

  11. #10
    Just Joined!
    Join Date
    Jul 2013
    Posts
    15
    Also, do I need to have separate partitions for the boot? as right now I have separate partitions for the distros . On the other side, can I have one partition for all the linux distros ? maybe a separate boot partition ?

Page 1 of 3 1 2 3 LastLast

Posting Permissions

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