Results 1 to 7 of 7

Thread: Need Help From A Grub Guru

  1. #1
    Join Date
    Oct 2008
    Location
    Birmingham. AL
    Posts
    858

    Default Need Help From A Grub Guru

    ... which I am obviously not. I thought I understood Grub well enough to make a menu.lst, but here goes.

    I have long had Opensuse 11.1 on this machine at home. It has an older PATA 160GB drive with an 80GB SATA drive. Suse is on the PATA. Windows XP is on the SATA, and I had room on the SATA to install CentOS 5.3, which we use at work. I wanted a copy to play with at home.

    The install went fine, but CentOS's Grub menu never even appeared when I rebooted. I went back into their installer and selected "swap drive orders" and it started working. I can boot into Windows or CentOS ... but NOT Opensuse. I get "error 2: Bad file or directory type."

    The only way I can get into Opensuse is with my supergrub boot CD (which is a wonderful thing, believe me!).

    I'm going to post all the specs, starting with my partition info (purpose/usage of the partition is in parentheses):

    Code:
    Disk /dev/sda: 80.0 GB, 80026361856 bytes
    255 heads, 63 sectors/track, 9729 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x0007a0f4
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1        3338    26804452    7  HPFS/NTFS (Windows XP)
    /dev/sda2   *        3339        4512     9430155   83  Linux (CentOS /)
    /dev/sda3            4513        9489    39977752+  83  Linux (CentOS /home)
    /dev/sda4            9490        9729     1927800    5  Extended
    /dev/sda5            9490        9729     1927768+  82  Linux swap / Solaris (swap)
    
    Disk /dev/sdb: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x23d423d3
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *           2        2611    20964825   83  Linux (Opensuse /)
    /dev/sdb2            2612       13054    83883397+  83  Linux (Opensuse /home)
    /dev/sdb3           13055       19457    51432097+   c  W95 FAT32 (LBA) (Windows drive "D")
    Here's the original Opensuse menu.lst.

    Code:
    # Modified by YaST2. Last modification on Sun Jul 19 13:10:46 CDT 2009
    default 0
    timeout 8
    gfxmenu (hd1,0)/boot/message
    
    ###Don't change this comment - YaST2 identifier: Original name: linux###
    title openSUSE 11.1 - 2.6.27.23-0.1
        root (hd1,0)
        kernel /boot/vmlinuz-2.6.27.23-0.1-pae root=/dev/disk/by-id/ata-WDC_WD1600JB-00REA0_WD-WMANM3539733-part1 resume=/dev/disk/by-id/ata-WDC_WD800JD-60LSA5_WD-WMAM9LW04495-part3 splash=silent showopts vga=0x348
        initrd /boot/initrd-2.6.27.23-0.1-pae
    
    ###Don't change this comment - YaST2 identifier: Original name: failsafe###
    title Failsafe -- openSUSE 11.1 - 2.6.27.23-0.1
        root (hd1,0)
        kernel /boot/vmlinuz-2.6.27.23-0.1-pae root=/dev/disk/by-id/ata-WDC_WD1600JB-00REA0_WD-WMANM3539733-part1 showopts ide=nodma apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe vga=0x348
        initrd /boot/initrd-2.6.27.23-0.1-pae
    
    ###Don't change this comment - YaST2 identifier: Original name: windows###
    title Windows
        rootnoverify (hd0,0)
        chainloader +1
    Here's the CentOS menu.lst.

    Code:
    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE:  You do not have a /boot partition.  This means that
    #          all kernel and initrd paths are relative to /, eg.
    #          root (hd0,1)
    #          kernel /boot/vmlinuz-version ro root=/dev/sda2
    #          initrd /boot/initrd-version.img
    #boot=/dev/sda
    default=0
    timeout=5
    splashimage=(hd0,1)/boot/grub/splash.xpm.gz
    hiddenmenu
    title CentOS (2.6.18-128.2.1.el5)
    	root (hd0,1)
    	kernel /boot/vmlinuz-2.6.18-128.2.1.el5 ro root=LABEL=/ rhgb quiet
    	initrd /boot/initrd-2.6.18-128.2.1.el5.img
    title CentOS (2.6.18-128.el5)
    	root (hd0,1)
    	kernel /boot/vmlinuz-2.6.18-128.el5 ro root=LABEL=/ rhgb quiet
    	initrd /boot/initrd-2.6.18-128.el5.img
    title OpenSuse 11.1
    	root (hd1,0)
    	kernel /boot/vmlinuz-2.6.27.23-0.1-pae root=/dev/disk/by-id/ata-WDC_WD1600JB-00REA0_WD-WMANM3539733-part1 resume=/dev/disk/by-id/ata-WDC_WD800JD-60LSA5_WD-WMAM9LW04495-part3 splash=silent showopts vga=0x348
    	initrd /boot/initrd-2.6.27.23-0.1-pae
    title Windows XP
    	rootnoverify (hd0,0)
    	chainloader +1
    Here's the clue: Opensuse and CentOS have different device maps. In fact, I don't think Cent understands "device by ID."

    Code:
    Opensuse device.map:
    
    (hd0)	/dev/disk/by-id/ata-WDC_WD800JD-60LSA5_WD-WMAM9LW04495
    (hd1)	/dev/disk/by-id/ata-WDC_WD1600JB-00REA0_WD-WMANM3539733
    
    CentOS device map:
    
    # this device map was generated by anaconda
    (hd1)     /dev/hda
    (hd0)     /dev/sda
    However, they look the same -- in both cases, hd0 is the 80G SATA and hd1 is the 160G PATA.

    Any ideas?

  2. #2
    Join Date
    Jun 2008
    Location
    The English Lake District. UK - GMT/BST
    Posts
    36,734
    Blog Entries
    20

    Default Re: Need Help From A Grub Guru

    Consider first. Don't you actually want to use suse's grub if this is your main OS?
    Make a backup of the suse /boot/grub/menu.lst
    as the original will be over written.
    If you put the HD boot order in BIOS to what it was and re-install the suse bootloader from the dvd
    You should be able to boot suse and then if necessary add back the windows part to menu.lst

    Then we can work on the CentOS

    We would need a fdisk -l once you have suse back
    You can use Yast bootloader to add CentOS, but this week I was sandboxing F11 and suse was mucking about, in the end I had to manually edit.

    HowTo Boot into openSUSE when it won't Boot from the Grub Code on the Hard Drive
    Leap 15.1_KDE
    My Articles Was I any help? If yes: Click the star below

  3. #3
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Need Help From A Grub Guru

    The CentOS GRUB may be not sufficiently recent enough to handle the 256-byte inodes ext3 filesystems that openSUSE installs by default. So you will have to use the openSUSE GRUB which has no problems with older 128-byte inodes.

  4. #4
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,728
    Blog Entries
    2

    Default Re: Need Help From A Grub Guru

    So, if you follow caf4926 & ken_yap's advices, the easiest thing to do would be to boot off of the supergrub disk and use yast to reinstall the openSUSE bootloader. Then you should have windows OK from that bootloader and just have to add centos (or perhaps the reinstall of the openSUSE loader will include centos -- likely). Here's how to reinstall opensuse's loader from Yast: First put the bios boot order back the original way then do this
    ......go to Yast --> System --> Boot Loader. The Grub configuration screen comes up with the Tab "Section Management" activated. In the lower right is a drop-down selector labelled "Other". Select from "Other" the option "Propose New Configuration" and then wait for Grub to analyse your partitions and display a new configuration. This may take a while. Important: When that finishes, activate the tab labelled "Boot Loader Installation" and select to "Boot from the Master Boot Record". [Yast will often default to booting from the root or boot partition rather than from the MBR but that's for experts only -- always choose the MBR.] Then click Finish to save the changes and install the reconfigured Grub into the hard drive's MBR. If you get a message that "The bootloader boot sector will be written to a floppy disk ......... don't bother with the floppy -- just click OK to proceed and install to the MBR. Reboot........
    The quote above is from here
    Leap 42.3 & 15.1 &KDE
    FYIs from the days of yore

  5. #5
    Join Date
    Oct 2008
    Location
    Birmingham. AL
    Posts
    858

    Default Re: Need Help From A Grub Guru

    Quote Originally Posted by ken_yap View Post
    The CentOS GRUB may be not sufficiently recent enough to handle the 256-byte inodes ext3 filesystems that openSUSE installs by default. So you will have to use the openSUSE GRUB which has no problems with older 128-byte inodes.
    Thanks for all the replies. I tried to keep the original post short (heh), plus, I was falling asleep at the keyboard, so I probably left out the most important thing:

    Absolutely, I tried Suse's bootloader first. I went into Yast, added CentOS, and then rebooted. But when I selected Cent in the Grub menu, I got a kernel panic. A Web search showed that the problem was that the CentOS kernel apparently swapped the order of the drives between vmlinuz and initrd. It couldn't find initrd. Even worse, Windows would no longer boot. It would just sit there with a dark screen. (Still can't explain that one.)

    I then tried manually editing Opensuse's menu.lst, entering root(hd0,1) and the vmlinuz/initrd specs shown above. Still no luck.

    That's why I tried Cent's bootloader and made it the active one. When I got Windows to boot, I figured, "I'm on the right track!"

    Where I'm at right now: I do plan to switch back to Opensuse's boot loader when I get home from work this afternoon. What I'm hoping is that someone here can confirm for me the correct parameters for *Opensuse's* boot loader to add CentOS to Suse's Grub menu.lst. Yast doesn't seem to find CentOS on its own.

    Whether I do it by manually editing the file, or by using Yast, isn't important to me. I can fly either way.

    Thanks again for the help.

    By the way ... CentOS has a lot of strengths. Like I said, we use it at work. It's rock-solid and stable. But I still have to give Suse snaps for one big difference: YAST. Boy, I miss Yast in Cent. Badly. I added Webmin to our servers at work to make it a little easier, but there are still times when I wish I could just type "yast" in a SSH prompt and get busy .. .. ..

  6. #6
    Join Date
    Oct 2008
    Location
    Birmingham. AL
    Posts
    858

    Default Re: Need Help From A Grub Guru

    Well, let me try Swerdna's trick. I didn't see the "other" tab when I tried it before (further proof that I was tired!), and this time, I think Yast may have found CentOS.

    I'll pass along what happens ...

  7. #7
    Join Date
    Oct 2008
    Location
    Birmingham. AL
    Posts
    858

    Default Re: Need Help From A Grub Guru

    HAH! Swerdna, you win one (1) free Internet!

    That worked. I'm typing this in CentOS. Now I've got to jump in the shower and head to work ...

    I do wonder why the Yast help is so pitiful on the boot loader? I guess it's just not a high priority with them. (Most people don't change things that often, I know.) The Help button is no help at all -- most of the selections are blank.

    For those who might hit this thread in a search later on: what Swerdna said. (I knew I should have checked his Linux pages first ... grumble, mutter ...)

Posting Permissions

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