Find the answer to your Linux question:
Results 1 to 9 of 9
Hello guys, I'm a member at various linux distro forums, but decided I was wasting my time, as I switch distros quite often, I am thinking that this is the ...
  1. #1
    Just Joined!
    Join Date
    Jan 2011
    Posts
    3

    Adding Debian to Grub.conf Rediculously hard...

    Hello guys, I'm a member at various linux distro forums, but decided I was wasting my time, as I switch distros quite often, I am thinking that this is the place to be.

    Here's my issue,

    Recently I decided to start using Debian. I created a debian install disk, via USB, with the boot.img.gz, and cp'ed the amd64 netinst.iso on the flash drive. The installation went great, no issues, or errors. I chose NOT to install grub, as I already have it installed on my fedora 13 partition (stupidly). I have read that Red Hat distros will not detect any other Linux distro in GrUB. I know I should totally just make a partition dedicated to GRUB, but thats for a later time.

    Right now I am booting Fedora 13, Win7, & now Debian.


    Here is the text from my Grub.conf/menu.lst file in /boot/grub/ located in fedora.
    Code:
    #boot=/dev/sda
    default=0
    timeout=5
    splashimage=(hd0,2)/boot/grub/splash.xpm.gz
    hiddenmenu
    title Fedora (2.6.34.7-66.fc13.x86_64)
    	root (hd0,2)
    	kernel /boot/vmlinuz-2.6.34.7-66.fc13.x86_64 ro root=UUID=03ac1fe9-80af-4ee4-b493-7759dc4f6d58 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet nouveau.modeset=0 rdblacklist=nouveau
    	initrd /boot/initramfs-2.6.34.7-66.fc13.x86_64.img
    title Fedora (2.6.33.3-85.fc13.x86_64)
    	root (hd0,2)
    	kernel /boot/vmlinuz-2.6.33.3-85.fc13.x86_64 ro root=UUID=03ac1fe9-80af-4ee4-b493-7759dc4f6d58 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet
    	initrd /boot/initramfs-2.6.33.3-85.fc13.x86_64.img
    title Windows 7
    	rootnoverify (hd0,0)
    	chainloader +1
    title debian
    	root (hd1,0)
    	kernel  /boot/debian/vmlinuz-2.6.26-2-amd65root=/dev/sda3   		
            UUID	     UUID=bc1b22f8-71d2-46c6-bf08-3c95cff8b3d3 ro
    	initrd   /boot/initrd.img-2.6.26-2-amd64
    As you may see I added in debian myself. This is how debian is set up as of now in the grub.conf, but I have tried multiple different configurations with no success yet. One issue I think may be why I cant get it to load is I am not totally sure what the (hd1,0) really should be... Nor do I know how to find it via terminal. I cant even find anything that shows I even use hda, everywhere I look shows sda only. I do have two hard drives, and the debian partition is on the second hard drive using only 11gb while the rest of the 239gb are dedicated to storage, and the rest of the OS's are all partitioned on the first hard drive.

    here is what i get from "fdisk -l" in the terminal
    Code:
    [rootATlocalhost USER]# fdisk -l
    
    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0xe57f17fc
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1       21594   173453773+   7  HPFS/NTFS
    /dev/sda2           32393       60802   228190208+   f  W95 Ext'd (LBA)
    /dev/sda3           21595       31011    75641521+  83  Linux
    /dev/sda4           31012       32392    11092882+  83  Linux
    /dev/sda5           32393       60802   228190208    7  HPFS/NTFS
    
    Partition table entries are not in disk order
    *As you can see, Windows 7 is the first partition /dev/sda1
    */dev/sda2 according to gparted is where my storage drive (device) /dev/sda5 I use in Windows, as I made it unreadable to linux by adding the partition for debian for some reason.
    */dev/sda3 is the location of Fedora 13
    */dev/sda4 is where Debian is now installed.



    So whats been happening, is when I try to boot up debian, I got an Error 17 in grub. That was before I found and added the UUID for the debian partition. Which some site about grub errors said could be the problem if the UUID is missing. Another reason for 17 error could be incorrect (hd0,0) cofiguration. Does anyone know how I can find the exact numbers to enter there to point to my Debian partition?

    Also, after I added the UUID, and changed the hd(0),0 to (1) for the debian config in grub.conf (did that because since its my second harddrive I know the number cant be 0...) I rebooted, went to grub tried booting Debian and got an Error 15.

    Error 15 : File not found
    This error is returned if the specified file name cannot be found, but everything else (like the disk/partition info) is OK.

    According to that site, error 15 can be caused by mislabelled vmlinuz file(kernel) or mislabelled initrd file. I have quadruple checked and it checks out. There right.

    Another cause for 15 (example using intrepid ibex and later ubuntu) that the newer version of grub uses the UUID in place of the root (hd0,0) line to point to the partition (or vise-versa). The site say's there MAY be a fix by installing grub into the boot sector of the operating system(Debian) and adding a chainloading command to grub.conf (in fedora).

    /\ /\ /\ Should I do that? If so how? just plug my USB drive back in> boot > go to rescue> install grub. ??? then mount the /dev/sda4 in fedora access the grub.conf on Debian's /boot/grub/ directory, copy the text, add it to fedora's grub.conf and add a chain loader command? If yes, what will the command be?

    Here is a screenshot of GParted if this will help at all. Remember Debian is /dev/sda4 even though I never labelled so.
    Nevermind sorry but I cant post to another site until I get 15 posts... so I attached it at the bottom, see below.

    whew... that was a lot, And I am SOOOO sorry for unloading ALL of this. just trying to be detailed as possible. I have been tinkering for about 18 hours now and still cant get it. I know there has to be some GRUB guru on here (like Herman, from Ubuntu forums) who can help me or point me in the right direction. This is probably simple and im just making it complicated by having a lack of knowledge in a simple thing that is affecting it. But im desperate, I want me some Debian!

    Thanks Linux Dudes! I love the big Linux family!
    Attached Images Attached Images

  2. #2
    Just Joined!
    Join Date
    Mar 2010
    Posts
    79
    Take the entries for Fedora as a blueprint and copy and paste the relevant/different info of Debian. Somehow like this:
    Code:
    title debian
    root (hd0,3)
    kernel /boot/vmlinuz-2.6.26-2-amd64  root=UUID=bc1b22f8-71d2-46c6-bf08-3c95cff8b3d3 ro quiet
    initrd   /boot/initrd.img-2.6.26-2-amd64
    Useful commands (assuming you mounted Debian at /media/disk)
    Code:
    ls /media/disk/boot | grep vmlinuz
    ls /media/disk/boot | grep initrd
    blkid
    or:
    ls -l /media/disk/dev/disk/by-uuid
    hd0,3: 0 is the disk, 3 is the partition, but grub starts to count at 0 (the usual way, so to speak)
    `fdisk -l` says ext3 is on sda (hd0):
    sda3( hd0,2) and sda4 (hd0,3).

    Or mount /dev/sda3 and look in Debians /boot/grub/menu.lst how it looks like
    (in case you got grub installed there at all).

    Hope it works.

  3. #3
    Linux User
    Join Date
    Dec 2007
    Location
    Idaho USA
    Posts
    351
    I do have two hard drives, and the debian partition is on the second hard drive
    Remember Debian is /dev/sda4 even though I never labelled so.
    ??? fdisk-l only shows one hdd and the first and second quote do not match.

  4. #4
    Just Joined!
    Join Date
    Apr 2005
    Location
    Clinton Township, MI
    Posts
    84

    Cool Is Debian on sda4 or sdb1?

    Get that straight, and your problems should be resolved. In GRUB Legacy (the original GRUB), sda4 is (hd0,3) and sdb1 is (hd1,0). In GRUB 2, these would be set root='(hd0,msdos4)' and set root="(hd1,msdos1)'.

    Hope that helps. Oh yes, if you boot into Debian, you can run update-grub and it will find the other systems, and then you can set up Debian to control the Master Boot Record (MBR). If Fedora is handing it now, is the Fedora release still using the classic GRUB Legacy? If so, then it is fairly easy to interactively find the Debian system.

    You can run grub interactively as root from the command line on a booted system, and you can enter either edit or command mode to modify existing entries. So you can fix the bogus Debian entry on the fly, then edit the configuration file when you find the right combination. The command e allows you to edit with GRUB Legacy and c allows you to run GRUB commands of your own making interactively.

  5. #5
    Just Joined!
    Join Date
    Jan 2011
    Posts
    3
    Wow.... I am such a fool. I purchased this Laptop from ebay brand new, and the person I bought it from was a Mac fanboy and normally didn't use windows I guess. It came to me with two 250gb partitions, so he must of automatically assumed there was 2 hard drives. But I just opened up my laptop for the first time and GLADLY seen there is only ONE hard drive. Which means I can get another 500gb IDE in there!! Woo Hoo. I am really happy. Lol thanks for proving me wrong on that.

    But anyway on a serious note, I think Tornow's suggestion may have worked. But I am still getting a messed up situation. I am not totally sure if it is GRUB's fault though, I think it just may be a corrupted installation of Debian in the first place. I will write what output I recieved when I tried booting Debian.

    Code:
    booting the kernel
    Loading Please Wait....
    PCI could not load MMCONFIG
    Gave up waiting for root device. Common Problems
    -Boot args (cat /proc/cmdline)
    - Check rootdelay= (did system wait long enough?)
    - Check root= (did the system wait for the right device?)
    -Missing modules (cat /proc/modules;  ls /dev)
    ALERT! /dev/disk/by-uuid/bc1b22f8-71d2-46c6- does not exist. Dropping to shell! 
    !
    
    BusyBox v1.10.2 (Debian 1:1.10.2-2) Built-in Shell (Ash)
    Enter 'help' for a list of built-in commands.
    
    /bin/sh/ can't access tty; job control turned off 
    (initramfs) _
    Tell me what you guys may think of that. I looked parts of it up and came across some solutions saying to change the 'rootdelay' to 90 in grub, and add pci=nommconf. The latter changing the MMCONFIG problem but the rootdelay command didnt seem to do its job. Many people also said that they typed 'exit' as "initramfs" after the loading and it would load straight to the desktop. I tried the exit command and It gave a readout basically the same as above. I will attach a pic of screen with iphone. See what anyone can make of it. I can't tell if It is the installation or grub still pointing to wrong directory.
    Attached Images Attached Images

  6. #6
    Just Joined!
    Join Date
    Jan 2011
    Posts
    3
    Quote Originally Posted by masinick View Post
    You can run grub interactively as root from the command line on a booted system, and you can enter either edit or command mode to modify existing entries. So you can fix the bogus Debian entry on the fly, then edit the configuration file when you find the right combination. The command e allows you to edit with GRUB Legacy and c allows you to run GRUB commands of your own making interactively.
    What type of commands would I want to run? any that I can find the kernal and vmlinuz file for grub? Good suggestion.

  7. #7
    Just Joined!
    Join Date
    Mar 2010
    Posts
    79
    I would check that error message first of all:
    Code:
    ALERT! /dev/disk/by-uuid/bc1b22f8-71d2-46c6- does not exist. Dropping to shell!
    (for the reason that i don'T understand the other ones

    You can do so with the commands from above, for example blkid.
    Might it be that your entry for UUID=<long-string> is not correct.
    If it is correct check the /etc/fstab of Debian.

    Perhaps post your menu.lst.

  8. #8
    Just Joined!
    Join Date
    Mar 2010
    Posts
    79
    I think what masinick means is this:
    You power on the PC, once the grub-menu occurs you scroll to the Debian-entry and hit the "e" key.
    You will be able to edit the entry for Debian. Shortcuts are listed on the screen.
    After editing try to boot (migh be with b, its a while i used grub-legacy).
    If that doesn't work change the entry again. And so on.
    It is more easy then to reboot again and again.
    Once you have figured out the correct entry you can edit menu.lst to make it permanent.

  9. #9
    Linux User
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    260
    The section of your grub configuration file (as you have it):
    Code:
    title debian
        root (hd1,0)
        kernel  /boot/debian/vmlinuz-2.6.26-2-amd65root=/dev/sda3           
            UUID         UUID=bc1b22f8-71d2-46c6-bf08-3c95cff8b3d3 ro
        initrd   /boot/initrd.img-2.6.26-2-amd64
    Should be:
    Code:
    title debian
         root (hd1,0)
         kernel  /boot/debian/vmlinuz-2.6.26-2-amd64 root=UUID=bc1b22f8-71d2-46c6-bf08-3c95cff8b3d3 ro
         initrd   /boot/initrd.img-2.6.26-2-amd64
    Quote Originally Posted by ThirdEye420 View Post
    Hello guys, I'm a member at various linux distro forums, but decided I was wasting my time, as I switch distros quite often, I am thinking that this is the place to be.

    Here's my issue,

    Recently I decided to start using Debian. I created a debian install disk, via USB, with the boot.img.gz, and cp'ed the amd64 netinst.iso on the flash drive. The installation went great, no issues, or errors. I chose NOT to install grub, as I already have it installed on my fedora 13 partition (stupidly). I have read that Red Hat distros will not detect any other Linux distro in GrUB. I know I should totally just make a partition dedicated to GRUB, but thats for a later time.

    Right now I am booting Fedora 13, Win7, & now Debian.


    Here is the text from my Grub.conf/menu.lst file in /boot/grub/ located in fedora.
    Code:
    #boot=/dev/sda
    default=0
    timeout=5
    splashimage=(hd0,2)/boot/grub/splash.xpm.gz
    hiddenmenu
    title Fedora (2.6.34.7-66.fc13.x86_64)
        root (hd0,2)
        kernel /boot/vmlinuz-2.6.34.7-66.fc13.x86_64 ro root=UUID=03ac1fe9-80af-4ee4-b493-7759dc4f6d58 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet nouveau.modeset=0 rdblacklist=nouveau
        initrd /boot/initramfs-2.6.34.7-66.fc13.x86_64.img
    title Fedora (2.6.33.3-85.fc13.x86_64)
        root (hd0,2)
        kernel /boot/vmlinuz-2.6.33.3-85.fc13.x86_64 ro root=UUID=03ac1fe9-80af-4ee4-b493-7759dc4f6d58 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet
        initrd /boot/initramfs-2.6.33.3-85.fc13.x86_64.img
    title Windows 7
        rootnoverify (hd0,0)
        chainloader +1
    title debian
        root (hd1,0)
        kernel  /boot/debian/vmlinuz-2.6.26-2-amd65root=/dev/sda3           
            UUID         UUID=bc1b22f8-71d2-46c6-bf08-3c95cff8b3d3 ro
        initrd   /boot/initrd.img-2.6.26-2-amd64
    As you may see I added in debian myself. This is how debian is set up as of now in the grub.conf, but I have tried multiple different configurations with no success yet. One issue I think may be why I cant get it to load is I am not totally sure what the (hd1,0) really should be... Nor do I know how to find it via terminal. I cant even find anything that shows I even use hda, everywhere I look shows sda only. I do have two hard drives, and the debian partition is on the second hard drive using only 11gb while the rest of the 239gb are dedicated to storage, and the rest of the OS's are all partitioned on the first hard drive.

    here is what i get from "fdisk -l" in the terminal
    Code:
    [rootATlocalhost USER]# fdisk -l
    
    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0xe57f17fc
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1       21594   173453773+   7  HPFS/NTFS
    /dev/sda2           32393       60802   228190208+   f  W95 Ext'd (LBA)
    /dev/sda3           21595       31011    75641521+  83  Linux
    /dev/sda4           31012       32392    11092882+  83  Linux
    /dev/sda5           32393       60802   228190208    7  HPFS/NTFS
    
    Partition table entries are not in disk order
    *As you can see, Windows 7 is the first partition /dev/sda1
    */dev/sda2 according to gparted is where my storage drive (device) /dev/sda5 I use in Windows, as I made it unreadable to linux by adding the partition for debian for some reason.
    */dev/sda3 is the location of Fedora 13
    */dev/sda4 is where Debian is now installed.



    So whats been happening, is when I try to boot up debian, I got an Error 17 in grub. That was before I found and added the UUID for the debian partition. Which some site about grub errors said could be the problem if the UUID is missing. Another reason for 17 error could be incorrect (hd0,0) cofiguration. Does anyone know how I can find the exact numbers to enter there to point to my Debian partition?

    Also, after I added the UUID, and changed the hd(0),0 to (1) for the debian config in grub.conf (did that because since its my second harddrive I know the number cant be 0...) I rebooted, went to grub tried booting Debian and got an Error 15.

    Error 15 : File not found
    This error is returned if the specified file name cannot be found, but everything else (like the disk/partition info) is OK.

    According to that site, error 15 can be caused by mislabelled vmlinuz file(kernel) or mislabelled initrd file. I have quadruple checked and it checks out. There right.

    Another cause for 15 (example using intrepid ibex and later ubuntu) that the newer version of grub uses the UUID in place of the root (hd0,0) line to point to the partition (or vise-versa). The site say's there MAY be a fix by installing grub into the boot sector of the operating system(Debian) and adding a chainloading command to grub.conf (in fedora).

    /\ /\ /\ Should I do that? If so how? just plug my USB drive back in> boot > go to rescue> install grub. ??? then mount the /dev/sda4 in fedora access the grub.conf on Debian's /boot/grub/ directory, copy the text, add it to fedora's grub.conf and add a chain loader command? If yes, what will the command be?

    Here is a screenshot of GParted if this will help at all. Remember Debian is /dev/sda4 even though I never labelled so.
    Nevermind sorry but I cant post to another site until I get 15 posts... so I attached it at the bottom, see below.

    whew... that was a lot, And I am SOOOO sorry for unloading ALL of this. just trying to be detailed as possible. I have been tinkering for about 18 hours now and still cant get it. I know there has to be some GRUB guru on here (like Herman, from Ubuntu forums) who can help me or point me in the right direction. This is probably simple and im just making it complicated by having a lack of knowledge in a simple thing that is affecting it. But im desperate, I want me some Debian!

    Thanks Linux Dudes! I love the big Linux family!

Posting Permissions

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