FedoraForum.org - Fedora Support Forums and Community
Results 1 to 13 of 13
  1. #1
    Join Date
    Feb 2013
    Location
    US
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Dual boot setup picking wrong OS to boot (GRUB)

    Hello,

    I did a disk-to-disk copy using clonezilla to migrate to a higher capacity hard disk. All went well. But upon booting it picks the wrong OS to boot.

    Details:

    I have RH and Fedora on 2 different partitions. I want Fedora to boot as I use this as my base OS with VMs inside. However, it boots RH.

    I tried many things including grub2-config , while it seems to show me that its recognizing Fedora19 install, it does not give me the option to boot Fedora.

    This is a GRUB problem. RH uses GRUB, while Fedora uses GRUB2 in my install.

    Please help.

    - GV

  2. #2
    Join Date
    Mar 2006
    Posts
    2,206
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Dual boot setup picking wrong OS to boot (GRUB)

    Which boot loader do you want to use, RH grub or F19 grub2? Need your partition layout. Do you have or can you make a F19 install disk so you can access the F19 system in rescue mode?
    jbkt23
    Thinkpads Depends on era T23 - X2xx
    AMD & Intel Boxes

  3. #3
    Join Date
    Jan 2006
    Posts
    237
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Dual boot setup picking wrong OS to boot (GRUB)

    With Ranish partition manager you can alternate between RH and Fedora see Ranish and Grub2

  4. #4
    Join Date
    Feb 2013
    Location
    US
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dual boot setup picking wrong OS to boot (GRUB)

    @jbkt123

    I would like to use Fedora Grub2, but currently the new HDD copy is booting with RH Grub as you mentioned.
    I do have a USB stick with F20 live and used this in rescue mode to do whatever I can.

    # fdisk -l| grep dev
    Disk /dev/sda: 640.1 GB, 640135028736 bytes, 1250263728 sectors
    /dev/sda1 878577664 1222641663 172032000 8e Linux LVM
    /dev/sda2 346097664 858097663 256000000 8e Linux LVM
    /dev/sda3 * 858097664 878577663 10240000 83 Linux
    /dev/sda4 2048 10487807 5242880 8e Linux LVM
    Disk /dev/mapper/fedora_gvfedora-root: 15.7 GB, 15728640000 bytes, 30720000 sectors
    Disk /dev/mapper/fedora_gvfedora-vminstall: 104.9 GB, 104857600000 bytes, 204800000 sectors
    Disk /dev/mapper/fedora_gvfedora-share: 41.9 GB, 41943040000 bytes, 81920000 sectors
    Disk /dev/mapper/fedora_gvfedora-tmp: 8388 MB, 8388608000 bytes, 16384000 sectors
    Disk /dev/mapper/fedora_gvfedora-home: 5234 MB, 5234491392 bytes, 10223616 sectors
    Disk /dev/mapper/vminstall: 104.9 GB, 104855502848 bytes, 204795904 sectors:

    Disk /dev/mapper/redhat_gvlinux6-LogVol02: 10.5 GB, 10485760000 bytes, 20480000 sectors
    Disk /dev/mapper/redhat_gvlinux6-LogVol05: 5242 MB, 5242880000 bytes, 10240000 sectors
    Disk /dev/mapper/redhat_gvlinux6-LogVol01: 8388 MB, 8388608000 bytes, 16384000 sectors
    Disk /dev/mapper/redhat_gvlinux6-LogVol00: 5242 MB, 5242880000 bytes, 10240000 sectors
    Disk /dev/mapper/redhat_gvlinux6-LogVol03: 209.7 GB, 209715200000 bytes, 409600000 sectors

    Disk /dev/mapper/sharetoall-lvsstoall: 4294 MB, 4294967296 bytes, 8388608 sectors

    /dev/sda1 has a LVM for redhat
    and /dev/sda2 has a LVM for Fedora



    @krister

    I have not heard of Ranish, I will check it out.

    Thanks for both your help in trying to get this resolved.

    -gv

  5. #5
    Join Date
    Mar 2006
    Posts
    2,206
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Dual boot setup picking wrong OS to boot (GRUB)

    I don't know LVM but assuming that grub2 does the right thing here is what I do.
    Use the F20 image to access the F19 system on sda2. You want to follow the prompts on screen to to mount the sysimage rw and chroot into that system.
    Once your chrooted in you want to check if /boot/grub2/grub.cfg exists and contains the boot parameters for RH. You can do this with the command [less].
    # less /boot/grub2/grub.cfg
    and scroll through the menu entries. Assuming that RH is still listed then all you need to do is:

    # grub2-install /dev/sda

    Now if grub.cfg does not exist or does not contain a listing for RH then before you issue the above command you need to issue this first.

    # grub2-mkconfig -o /boot/grub2/grub.cfg

    Hope this is all it takes.
    jbkt23
    Thinkpads Depends on era T23 - X2xx
    AMD & Intel Boxes

  6. #6
    Join Date
    Aug 2011
    Posts
    899
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dual boot setup picking wrong OS to boot (GRUB)

    To reinstall GRUB2 from a Live CD you'll have to chroot to the fedora installation and you'll need to follow these instructions: http://fedoraproject.org/wiki/Featur..._with_Anaconda

    I've never used LVM so I don't know how to mount logical volumes..

  7. #7
    Join Date
    Feb 2013
    Location
    US
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dual boot setup picking wrong OS to boot (GRUB)

    I tried you suggestion.

    I am still not able to get it working.

    All the LVM are online.

    lvscan, lvdisplay etc checks out

    I'm still not sure why it's picking the wrong OS kernel to boot from.

    -GV

  8. #8
    Join Date
    Aug 2011
    Posts
    899
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dual boot setup picking wrong OS to boot (GRUB)

    Did you mount the relevant partitions and reinstall grub as per the instructions at: http://fedoraproject.org/wiki/Featur..._with_Anaconda ?

  9. #9
    Join Date
    Feb 2013
    Location
    US
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dual boot setup picking wrong OS to boot (GRUB)

    I tried but not sure how to exactly do the steps as I am getting erros on LVMs.

    Here is my setup

    /dev/sda1 and /dev/sda2 are 2 LVMs with RH and Fedora19 installed respectively

    /dev/sda3 is boot partition, I have couple more but those are not important.

    RH uses GRUB and Fed19 uses GRub2

    When I boot for whatever reason, it boots RH (GRUB), I want to change to boot FED19 (GRUB2).

    I checked my lvms (pvs, lvs, lvdisplay etc comes ok no errors).

    In grub command line, when I do root (hd0, (TAB> it corretly says "3" is extfs and unknown for other 3
    I mean

    0,1,4 are unknown - understandable cos they are LVMs
    3 - it is is extfs which is correct as this is the boot partition (not LVM managed).

    But I am not sure how to get brug2 to load and fedora to start...

    Any help appreciated.

    -GV

  10. #10
    Join Date
    Feb 2013
    Location
    US
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dual boot setup picking wrong OS to boot (GRUB)

    Thanks to all. The issue is resolved.

    http://www.av8n.com/computer/htm/grub-reinstall.htm

    This helped solve my issue. Steps 5,6,7.


    GV

  11. #11
    Join Date
    Aug 2011
    Posts
    899
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dual boot setup picking wrong OS to boot (GRUB)

    Quote Originally Posted by gvfedora18
    Thanks to all. The issue is resolved.

    http://www.av8n.com/computer/htm/grub-reinstall.htm

    This helped solve my issue. Steps 5,6,7.


    GV
    This does look very interesting; so using 'grub2-install --root-directory=' from a Fedora live CD would work too, no need to 'mount --bind /dev' and co.

    And it's not a problem with the content of the wiki page I linked either, because that wiki page isn't exactly talking about restoring grub2, but actually about testing installing it from scratch, i.e. it's the feature page from back in the day when Fedora was switching from grub1 to grub2.

    Thanks for sharing.

    Edit: of course the Live CD should ideally be the same release as the installation you're trying to fix so that the two versions of grub2 (in the Live CD session and the installed system on HDD respectively) are the same or as close as possible.
    Last edited by Ahmad Samir; 21st January 2014 at 05:43 AM.

  12. #12
    Join Date
    Nov 2004
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dual boot setup picking wrong OS to boot (GRUB)

    This problem comes up and up again. Particulary, for me some days ago it come, too
    And there is no utility to repair it automatically?!
    Still!?

  13. #13
    Join Date
    Oct 2011
    Posts
    1,917
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dual boot setup picking wrong OS to boot (GRUB)

    What problem do you have and what have you tried?

    Grub 2 have multiple options of defining default entries including last booted entry.

    https://fedoraproject.org/wiki/GRUB_..._default_entry

Similar Threads

  1. [SOLVED] Dual Boot: Installer from F13 LiveCD doesn't detect other OS, so grub conf is wrong
    By auryx in forum Installation, Upgrades and Live Media
    Replies: 12
    Last Post: 16th October 2010, 10:56 PM
  2. dual boot with xp issue - grub can't boot into windows
    By JohnRock in forum Installation, Upgrades and Live Media
    Replies: 7
    Last Post: 10th January 2010, 03:26 AM
  3. Boot Failure w Grub installed to non-MBR partition w/Windows 7 dual boot
    By kamikazepipes in forum Installation, Upgrades and Live Media
    Replies: 14
    Last Post: 3rd January 2010, 01:19 AM
  4. Dual boot gone wrong... Need help soon.
    By gundam1965 in forum Linux Chat
    Replies: 21
    Last Post: 30th March 2009, 12:16 AM
  5. what is wrong with my grub.conf for dual boot?
    By evilinux in forum Using Fedora
    Replies: 33
    Last Post: 14th March 2007, 04:20 PM

Tags for this Thread

Posting Permissions

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