Find the answer to your Linux question:
Results 1 to 6 of 6
I have two problems. I installed a RHEL variant (scientific linux) on an already dual boot system with ubuntu and vista. It replaced GRUB with (I think an older) GRUB ...
  1. #1
    Cue
    Cue is offline
    Just Joined!
    Join Date
    Jan 2008
    Posts
    23

    [SOLVED] GRUB of previously installed distro

    I have two problems. I installed a RHEL variant (scientific linux) on an already dual boot system with ubuntu and vista.

    It replaced GRUB with (I think an older) GRUB version and to add to that I cannot see my ubuntu ditro anymore. is there a way of reinstalling the GRUB that came with ubuntu then adding the RHEL distro to it?

    my second problem is that I cannot figure out how to enable wake on lan in scientific linux (RHEL). on ubuntu I would just write a small script and update all runlevels to run it at startup. what is the alternative on redhat?

    Thanks in advance.

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    I have two problems. I installed a RHEL variant (scientific linux) on an already dual boot system with ubuntu and vista.

    It replaced GRUB with (I think an older) GRUB version and to add to that I cannot see my ubuntu distro anymore. is there a way of reinstalling the GRUB that came with ubuntu then adding the RHEL distro to it?
    Its a problem in all RHEL based distros. Their installers do not detect other installed Linux distros. Strangely, ( or intentionally) there is no problem for Windows OSes.

    Two ways :

    * Boot up Scientific Linux, mount / partition of Ubuntu and copy title block ( title, root, kernel and initrd lines ) from its /boot/grub/menu.lst file. Paste title block in Scientific Linux's /boot/grub/grub.conf file.

    * Re-install Ubuntu GRUB using Ubuntu LiveCD. You have to add an entry of Scientific Linux in Ubuntu GRUB manually as I suggested above.

    If you are using GRUB2 in Ubuntu, things will be a lot easier. Just execute grub-update command, it will detect Scientific Linux and edit GRUB2 Menu.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Cue
    Cue is offline
    Just Joined!
    Join Date
    Jan 2008
    Posts
    23
    Quote Originally Posted by devils casper View Post
    If you are using GRUB2 in Ubuntu, things will be a lot easier. Just execute grub-update command, it will detect Scientific Linux and edit GRUB2 Menu.
    Hi devils casper thank you for helping out.

    I reinstalled GRUB2 from a ubuntu live DVD but it seems the the following commands don't find my RHEL distro automatically.

    Code:
    sha@COSMOS:~$ sudo update-grub
    
    Generating grub.cfg ...
    Found linux image: /boot/vmlinuz-2.6.31-16-generic
    Found initrd image: /boot/initrd.img-2.6.31-16-generic
    Found linux image: /boot/vmlinuz-2.6.28-17-generic
    Found initrd image: /boot/initrd.img-2.6.28-17-generic
    Found memtest86+ image: /boot/memtest86+.bin
    Found Windows Vista (loader) on /dev/sda1
    done
    
    sha@COSMOS:~$ sudo update-grub2
    
    Generating grub.cfg ...
    Found linux image: /boot/vmlinuz-2.6.31-16-generic
    Found initrd image: /boot/initrd.img-2.6.31-16-generic
    Found linux image: /boot/vmlinuz-2.6.28-17-generic
    Found initrd image: /boot/initrd.img-2.6.28-17-generic
    Found memtest86+ image: /boot/memtest86+.bin
    Found Windows Vista (loader) on /dev/sda1
    done
    I think this has something to do with how my drive has been partitioned. since in addtion to /boot (which contains the GRUB folder and the unbuntu images)
    I also have a
    /media/_boot (which seems to contain its own grub folder and all the scientific linux OS images)

    I know very little about partitioning a HDD well. this is a fairly fresh install so if you have any advice on how I should set up my partitions I would be grateful.

    This is how I currently have it.

  4. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    You have created LVM for Scientific Linux and /boot partition is necessary for that.
    You have to add an entry of Scientific Linux in Ubuntu's GRUB Menu manually.

    Boot up Ubuntu and execute this in Terminal
    Code:
    cd /media
    sudo mkdir sboot
    sudo mount -t ext3 /dev/sda3  /media/sboot
    less /media/sboot/grub/grub.conf
    Copy first title block (first kernel and initrd lines). You have to add those in Ubuntu's GRUB.

    Press Alt+F2 and type this
    Code:
    gksu gedit /etc/grub.d/40_os-prober
    This will open 40_os-prober file in Gedit with root privileges. Add this code at the end of the file.
    Code:
    menuentry "Scientific Linux" {
    set root=(hd0,3)
    <linux Line of SLinux>
    <initrd Line of SLinux>
    }
    Save file and execute sudo update-grub2 command.
    Last edited by devils casper; 01-04-2010 at 06:32 AM. Reason: typo
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  5. #5
    Cue
    Cue is offline
    Just Joined!
    Join Date
    Jan 2008
    Posts
    23
    it works!

    one thing for others who may have this problem. It seems as if the grub.conf file in that partition was still the old GRUB syntax so watch out for that.
    you have to change "kernel" into "linux" for GRUB2 to understand it.
    Also, GRUB 2 has a nice almost empty file for manually entering grub.conf entries. so I added the menuentry to that instead of 40_os-prober.

    Code:
    gksu gedit /etc/grub.d/30_custom
    thanks again devils casper, you have been a great help.

  6. #6
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Glad to help you !
    I am using GRUB2 for more than one year and it really works great. Regarding kernel keyword, you are right. Its linux instead of kernel. It was a typo.
    Also, GRUB 2 has a nice almost empty file for manually entering grub.conf entries. so I added the menuentry to that instead of 40_os-prober.
    You can create a lot of custom files to add manual entries for different distros.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Posting Permissions

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