Announcement

Collapse
No announcement yet.

Grub Menu List - Inconsistent Drive Letter Naming (Solved)

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Grub Menu List - Inconsistent Drive Letter Naming (Solved)

    Why does my /boot/grub/menu.lst indicate that I have (hd0,0) type drives but if I type "fdisk -l" all drives are listed as sda or sdb. Why? Shouldn't they be the same? "hd0" refers to IDE drives where as "sda" refers to ATA or SCSI drives. I'm confused!

    Here is the output of fdisk -l

    evice Boot Start End Blocks Id System
    /dev/sda1 * 1 6135 49279356 7 HPFS/NTFS
    Partition 1 does not end on cylinder boundary.
    /dev/sda2 6136 9572 27607702+ 83 Linux
    Partition 2 does not end on cylinder boundary.
    /dev/sda3 9573 9726 1237005 5 Extended
    Partition 3 does not end on cylinder boundary.
    /dev/sda5 9573 9726 1236973+ 82 Linux swap / Solaris

    Disk /dev/sdb: 20.0 GB, 20020396032 bytes
    240 heads, 63 sectors/track, 2586 cylinders
    Units = cylinders of 15120 * 512 = 7741440 bytes
    Disk identifier: 0x0000675f

    Device Boot Start End Blocks Id System
    /dev/sdb1 * 1 1083 8187448+ 83 Linux
    /dev/sdb2 1084 2586 11362680 5 Extended
    /dev/sdb5 1084 1455 2812288+ 82 Linux swap / Solaris
    /dev/sdb6 1456 2586 8550328+ 83 Linux
    mrmsudawgs@closet:~$
    And here is my grub menu:

    # 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/.


    title Kubuntu 7.10, kernel 2.6.20-16-generic
    root (hd0,1)
    kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=2a1490dd-8026-4342-af25-61c8d59db830 ro quiet splash
    initrd /boot/initrd.img-2.6.20-16-generic
    quiet

    title Kubuntu 7.10, kernel 2.6.20-16-generic (recovery mode)
    root (hd0,1)
    kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=2a1490dd-8026-4342-af25-61c8d59db830 ro single
    initrd /boot/initrd.img-2.6.20-16-generic

    title Kubuntu 7.10, kernel 2.6.22-14-generic
    root (hd0,1)
    kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=2a1490dd-8026-4342-af25-61c8d59db830 ro quiet splash
    initrd /boot/initrd.img-2.6.22-14-generic
    quiet

    title Kubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
    root (hd0,1)
    kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=2a1490dd-8026-4342-af25-61c8d59db830 ro single
    initrd /boot/initrd.img-2.6.22-14-generic

    title Kubuntu 7.10, kernel 2.6.20-15-generic
    root (hd0,1)
    kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=2a1490dd-8026-4342-af25-61c8d59db830 ro quiet splash
    initrd /boot/initrd.img-2.6.20-15-generic
    quiet

    title Kubuntu 7.10, kernel 2.6.20-15-generic (recovery mode)
    root (hd0,1)
    kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=2a1490dd-8026-4342-af25-61c8d59db830 ro single
    initrd /boot/initrd.img-2.6.20-15-generic

    title Kubuntu 7.10, memtest86+
    root (hd0,1)
    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


    All help is greatly appreciated.

    Mike
    sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

    #2
    Re: Grub Menu List - Inconsistent Drive Letter Naming

    Starting with Gutsy, all drives are sdx (in Feisty, SATAs were sdx and IDEs were hdx).

    sda1 = (hd0,0)
    sda2 = (hd0,1)
    sda3 = (hd0,2)

    sdx is Linux notation; hdx is GRUB notation.

    The strange thing about your menu.lst is that your OSs on sdbx ( = (hd1,(x-1)) are not shown
    You are not using Automatix, are you?
    or, do you only have OSs on the sda (=hd0) drive?
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    Comment


      #3
      Re: Grub Menu List - Inconsistent Drive Letter Naming

      Device Boot Start End Blocks Id System
      /dev/sdb1 * 1 1083 8187448+ 83 Linux
      /dev/sdb2 1084 2586 11362680 5 Extended
      /dev/sdb5 1084 1455 2812288+ 82 Linux swap / Solaris
      /dev/sdb6 1456 2586 8550328+ 83 Linux

      So, in particular,
      sdb1 = (hd1,0) (is this an OS? or home?)
      sdb5 = (hd1,4) (swap)
      sdb6 = (hd1,5) (is this an OS? or home?)

      Your menu.lst shows nothing for (hd1,x), and that's OK, unless it is not OK with you.
      (Menu.lst should show all OSs that you wish to boot using the GRUB boot menu upon starting up the PC, after the POST.)
      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

      Comment


        #4
        Re: Grub Menu List - Inconsistent Drive Letter Naming

        Okay...this may muddy the water a bit so I hope I explain myself well enough.

        The history of this old, dual-hard drive computer that I am using is as follows.

        Initial OS = Win XP (sda1)
        Then I discovered Linux and Kubuntu (sda2)
        All was well and good and I used this dual boot configuration for months.
        Then I got brave
        and installed PCLinuxOS on sdb1 looking for a triple-boot system
        PCLOS created its own Grub/menu.lst on sdb1 which, by some means, took priority over the grub I initially used with Kubuntu. Because of this, my only boot options became PCLOS or WinXP. No Kubuntu. >
        But, with your help via a thread I started a few weeks ago, I was able to copy my inital grub menu from Kubuntu (sda1) and paste it to the grub menu that my PC was booting from on sdb1 which gave me back my beloved Kubuntu and WinXP (less beloved).

        Now I want to wipe sdb clean and reformat it for extra storage space but I can't because the grub menu that my PC boots from exists on sdb1 (via copy and paste) and I don't know how to reactivate my grub on sda1. Whew!

        So, I will paste the grub from sdb below for your review but in the end, it doesn't matter to me because as soon as I figure out how to reactivate grub on sda1 then everything on sdb is gone!

        Here is the grub from sdb

        timeout 10
        color black/cyan yellow/cyan
        gfxmenu (hd1,0)/usr/share/gfxboot/themes/pclinuxos/boot/message
        default 0

        title linux
        kernel (hd1,0)/boot/vmlinuz BOOT_IMAGE=linux root=/dev/hdb1 acpi=on resume=/dev/hdb5 splash=silent vga=788
        initrd (hd1,0)/boot/initrd.img

        title linux-nonfb
        kernel (hd1,0)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=/dev/hdb1 acpi=on resume=/dev/hdb5
        initrd (hd1,0)/boot/initrd.img

        title failsafe
        kernel (hd1,0)/boot/vmlinuz BOOT_IMAGE=failsafe root=/dev/hdb1 failsafe acpi=on resume=/dev/hdb5
        initrd (hd1,0)/boot/initrd.img

        title windows
        root (hd0,0)
        makeactive
        chainloader +1
        sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

        Comment


          #5
          Re: Grub Menu List - Inconsistent Drive Letter Naming

          “Now I want to wipe sdb clean and reformat it for extra storage space but I can't because the grub menu that my PC boots from exists on sdb1 (via copy and paste) and I don't know how to reactivate my grub on sda1. Whew!”

          You mean to say:
          “ ... I don't know how to reactivate my grub on sda2. Whew”
          (sda2, NOT sda1: sda1 = Windows; sda2 = Kubuntu)

          OK,

          Boot into your Kubuntu on sda2 = (hd0,1)
          Open K > System > Konsole terminal program
          Type
          sudo grub
          You get a GRUB prompt, grub>
          At the grub>, type these (pressing Enter after each):
          grub> root (hd0,1)
          grub> setup (hd0)
          grub> quit
          exit

          Now when you re-boot your PC, it will boot using the menu.lst (i.e., /boot/grub/menu.lst) that is located in Kubuntu on sda2 = (hd0,1).
          If you want to get back into PCLinuxOS on sdb1, when you see that boot menu (coming from Kubuntu on sda2), simply do this:
          Press the “c” key to get a grub>
          grub> configfile (hd1,0)/boot/grub/menu.lst
          and you will get the menu.lst from PCLinuxOS on sdb1, from which you can select PCLinuxOS.

          Note: space after root, space after setup, space after configfile.
          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

          Comment


            #6
            Re: Grub Menu List - Inconsistent Drive Letter Naming

            do you want me to hang around while you try that now?
            or tomorrow?

            EDIT: looks like you are gone -- I'll try to check back later; but unless I made a typo, or we got a device wrong, it should work.
            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

            Comment


              #7
              Re: Grub Menu List - Inconsistent Drive Letter Naming

              Thanks a ton Mike! That worked great! I actually tried that command but I nixed the drive letter. I tried (hd0,0) - duhh :P.

              Okay...all is back to where it needs to be. Thanks for helping and hanging around if you are still there.

              Bye Bye PCLOS.

              Mike
              sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

              Comment


                #8
                Re: Grub Menu List - Inconsistent Drive Letter Naming (Solved)

                Good job!
                Carry on ... !
                An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                Comment

                Working...
                X