Results 1 to 2 of 2

Thread: Grub grub2 grubby

  1. #1
    Join Date
    Jun 2011
    Beans
    86

    Grub grub2 grubby

    I installed ubuntu studio 1st. the installed centos6.3 on a different HD by removing the ubuntu drive, installing centos then adding the ubuntu drive back into h/w config.

    mounting centos drive and running grub-update does not register the centos OS as an option in the grub menu list.

    I found a command in centos "grubby" that appears to do the automatic addition to the centos grub menu but am not sure of correct syntax to use to specify in the string to add ubuntu studio to centos menu; anyone familar here know possibly? It has a probe option to use if a new image linuz file is added but I may be missing something on how to get it to search a different drive. Even with all drives mounted can't seem to get syntax correct.
    thanks

    SOLVED
    Last edited by Flaggmann; January 16th, 2013 at 01:19 AM. Reason: SOLVED

  2. #2
    Join Date
    Jun 2011
    Beans
    86

    Solved

    1. open terminal in centos and su to root

    2. mount the ubuntu drives

    3. find the following vmlinuz and initrd strings with those you get by reading the LNK properties for each of these items' icons when viewing them in file manager pointed at the mounted ubuntu drive

    4.enter the following command at the terminal root prompt:

    # grubby --grub --title Ubuntu_12.04LTS_Precise --add-kernel=/boot/vmlinuz-3.2.0-35-lowlatency-pae --initrd=/boot/initrd.img-3.2.0-35-lowlatency-pae --args=ro_root=UUID=87362eff-c3d3-42c5-8ef7-d8cf65abbf1a

    wait for it to return to the root prompt then open the grub conf file as root using gedit and add the line root(1,0) to the appropriate spot for the ubuntu drive. {in my case it was root(1,0) yours might be something else}.

    reboot and it should work for you as it has for me. The root=UUID=[whatever the identifier for this drive is in /media folder when mounted]

    good boot-skootin' bootin'

    /boot/grub/grub.conf [Centos conf should look similar to this]

    # 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,0)
    # kernel /boot/vmlinuz-version ro root=/dev/sdb1
    # initrd /boot/initrd-[generic-]version.img
    #boot=/dev/sdb
    default=1
    timeout=15
    splashimage=(hd0,0)/boot/grub/splash.xpm.gz
    #hiddenmenu
    title Ubuntu_12.04LTS_Precise
    root (hd1,0)
    kernel /boot/vmlinuz-3.2.0-35-lowlatency-pae ro root=UUID=87362eff-c3d3-42c5-8ef7-d8cf65abbf1a rd NO_LUKS rd_NO_LVM
    LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
    initrd /boot/initrd.img-3.2.0-35-lowlatency-pae
    title CentOS (2.6.32-279.19.1.el6.x86_64)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.32-279.19.1.el6.x86_64 ro root=UUID=3c1bb7eb-ec57-43ed-80e7-9999c2733b81 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
    initrd /boot/initramfs-2.6.32-279.19.1.el6.x86_64.img1. open terminal in centos and su to root

    2. mount the ubuntu drives

    3. find the following vmlinuz and initrd strings with those you get by reading the LNK properties for each of these items' icons when viewing them in file manager pointed at the mounted ubuntu drive

    4.enter the following command at the terminal root prompt:

    # grubby --grub --title Ubuntu_12.04LTS_Precise --add-kernel=/boot/vmlinuz-3.2.0-35-lowlatency-pae --initrd=/boot/initrd.img-3.2.0-35-lowlatency-pae --args=ro_root=UUID=87362eff-c3d3-42c5-8ef7-d8cf65abbf1a

    wait for it to return to the root prompt then open the grub conf file as root using gedit and add the line root(1,0) to the appropriate spot for the ubuntu drive. {in my case it was root(1,0) yours might be something else}.

    reboot and it should work for you as it has for me. The root=UUID=[whatever the identifier for this drive is in /media folder when mounted]

    good boot-skootin' bootin'

    /boot/grub/grub.conf [Centos conf should look similar to this]

    # 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,0)
    # kernel /boot/vmlinuz-version ro root=/dev/sdb1
    # initrd /boot/initrd-[generic-]version.img
    #boot=/dev/sdb
    default=1
    timeout=15
    splashimage=(hd0,0)/boot/grub/splash.xpm.gz
    #hiddenmenu
    title Ubuntu_12.04LTS_Precise
    root (hd1,0)
    kernel /boot/vmlinuz-3.2.0-35-lowlatency-pae ro root=UUID=87362eff-c3d3-42c5-8ef7-d8cf65abbf1a rd NO_LUKS rd_NO_LVM
    LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
    initrd /boot/initrd.img-3.2.0-35-lowlatency-pae
    title CentOS (2.6.32-279.19.1.el6.x86_64)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.32-279.19.1.el6.x86_64 ro root=UUID=3c1bb7eb-ec57-43ed-80e7-9999c2733b81 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
    initrd /boot/initramfs-2.6.32-279.19.1.el6.x86_64.img

Bookmarks

Posting Permissions

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