PDA

View Full Version : Fedora 25 Install has no mention of dual boot



rhb100
27th October 2017, 07:47 PM
I have been unable to find any mention of dual boot in the Fedora 25 Installation Guide at https://docs-old.fedoraproject.org/en-US/Fedora/25/html/Installation_Guide/index.html . It has been my experience that in versions after the change to GRUB2, you don't get a dual boot splash screen as you did when what is now called GRUB legacy was being used. And the file you now get grub2.cfg has the message, "DO NOT EDIT THIS FILE". It was much better when Grub legacy was being used.

If I have overlooked a thorough and complete explanation of dual boot in the Fedora 25 Installation Guide, then it should be more heavily emphasized and made more conspicuous in the table of contents. There does not appear to be sufficient improvements to justify upgrading for a person who plans to use dual boot unless assurance can be provided that the installation will provide dual boot capability.

sidebrnz
27th October 2017, 10:47 PM
In my experience, Anaconda will show you all systems that you can boot into and ask which one should be the default. I know that there's a program, os-prober, that you can use to find your other system, but I've never had to use it.

donatom
28th October 2017, 06:14 PM
Here is the Fedora wiki on grub2 which mentions other OSes:
https://fedoraproject.org/wiki/GRUB_2#Updating_GRUB_2_configuration_on_BIOS_syste ms

Try running "sudo grub2-mkconfig -o /boot/grub2/grub.cfg" for bios boot or "sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg" on an EFI boot machine. Hopefully updating grub will solve your problem.

I have a dual boot Fedora/Archlinux and some times after a new kernel install (although Arch is on the grub menu) Arch won't boot properly because Fedora somehow gets the wrong UUID for Arch (or places two different UUIDs in grub.cfg) so I have to modify the grub.cfg file (which of course could be over-written the next time I or dnf update grub).

rhb100
31st October 2017, 07:42 PM
Thank you for your response. I tried using the sudo command. The response to the command is shown below. I rebooted the computer. It booted into Windows 10. What do I need to do to get a choice of Windows 10 or Fedora Core with a default boot into Windows 10 after a 5 second delay preferably with a splash screen?

[rhb100@localhost ~]$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.14.27-100.fc19.x86_64
Found initrd image: /boot/initramfs-3.14.27-100.fc19.x86_64.img
Found linux image: /boot/vmlinuz-3.9.5-301.fc19.x86_64
Found initrd image: /boot/initramfs-3.9.5-301.fc19.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-f818137001c746098e07efef1d160c05
Found initrd image: /boot/initramfs-0-rescue-f818137001c746098e07efef1d160c05.img
ERROR: unsupported sector size 4096 on /dev/sdh.
ERROR: unsupported sector size 4096 on /dev/sdh.
ERROR: unsupported sector size 4096 on /dev/sdh.
ERROR: unsupported sector size 4096 on /dev/sdh.
ERROR: unsupported sector size 4096 on /dev/sdh.
ERROR: unsupported sector size 4096 on /dev/sdh.
ERROR: unsupported sector size 4096 on /dev/sdh.
Found Windows Recovery Environment (loader) on /dev/mapper/pdc_cjggccgegj1
Found Windows Recovery Environment (loader) on /dev/mapper/pdc_cjggccgegj2
done
[rhb100@localhost ~]$

donatom
1st November 2017, 04:19 PM
ERROR: unsupported sector size 4096 on /dev/sdh.

What kind of a drive are you installing to? According to the quote above, the drive is the eighth drive on your system. I assume it is an external drive. The fact that you have so many drives and the fact that it probably is an external drive could very well complicate an install.

Is the drive (if it is a usb drive) connected to a usb port that is directly on your motherboard or is it attached to a port that is attached to a pci card, etc (like a port on the front of your box)? Unless your drive is attached to a port from the motherboard your install quite likely will fail.

You should remove the other external drives and attach your install drive to the back of your box (original usb port -- not an add-on usb port).

As far as a grub splash is concerned (at least on bios boot systems), Fedora installs always show all bootable OSes on your system. If it doesn't then there is something wrong with the install (and the type of drive and where it is connected to could certainly cause problems)

What version of Windows do you have installed? I believe it would have to be Windows 7 (or XP) since Windows 8 and 10 require UEFI boot which you are not using.

rhb100
1st November 2017, 09:41 PM
Thank you for your response. Just before signing in to this Fedora Forum, I disconnected both of my two USB drives and tried the sudo command again. I have Windows 10 on my first internal hard drive and Fedora Core on the second internal hard drive. The results of using the sudo grub2-mkconfig again are shown below. It finds Fedora Core but does not appear to find the Windows 10 installation.

[rhb100@localhost ~]$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.14.27-100.fc19.x86_64
Found initrd image: /boot/initramfs-3.14.27-100.fc19.x86_64.img
Found linux image: /boot/vmlinuz-3.9.5-301.fc19.x86_64
Found initrd image: /boot/initramfs-3.9.5-301.fc19.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-f818137001c746098e07efef1d160c05
Found initrd image: /boot/initramfs-0-rescue-f818137001c746098e07efef1d160c05.img
Found Windows Recovery Environment (loader) on /dev/mapper/pdc_cjggccgegj1
Found Windows Recovery Environment (loader) on /dev/mapper/pdc_cjggccgegj2
done
[rhb100@localhost ~]$

donatom
1st November 2017, 10:19 PM
It could be that since you are using bios boot instead of uefi boot, grub is unable to find windows. I would imagine that if you installed fedora with grub-efi and placed grub in the windows efi partition, it would find windows as well, but I am only experienced with adding fedora using efi on the windows efi partition on the same drive on which windows is installed. By the way, in order to boot a non efi OS (Fedora for example) on your system you will have to enable legacy boot on your motherboard -- so try that first. You should then hit an F key (F2 or F9 for example). On my HP triple booting (windows, arch and fedora) I have to press the escape at the beginning of the boot, otherwise windows will boot up. Then it boots to a grub menu with OSes listed (windows may not be included but I'm sure there is a way to get a grub menu with windows and Linux; I'm just too lazy to do that).

A work-around might be to install fedora on a portable usb drive with bios boot and only attach it when you want to use fedora. On that drive, by the way, you could install various Linux OSes and you would be able to boot each and every one (but only install grub on fedora; leave out grub on the other installs otherwise each distro will take over booting which can become problematical).

donatom
1st November 2017, 10:58 PM
If you choose to install Fedora in uefi mode, here are two good websites:

https://www.linuxbabe.com/command-line/how-to-use-linux-efibootmgr-examples

https://forums.fedoraforum.org/showthread.php?t=314781

I have found that on my grub menu the first listed OS is "OS Boot Manager". If I click on that Windows 10 starts up. To get to this grub menu as I said, I have to press on the escape key just as it starts to boot and then I press on the F9 key. This menu includes OS Boot Manager (windows), Archlinux and Fedora.

Now your system will probably be different so google how to get to grub menu for your system. Instead of the escape key (according to the second web page listed above) you should be able to disable "fast boot" in your BIOS. Then you would press the appropriate F key to see the booting options.

amiga
1st November 2017, 11:02 PM
And the file you now get grub2.cfg has the message, "DO NOT EDIT THIS FILE".

It is not necessary to edit this file to add content. There are two ways to add your own content and menu entries to grub.cfg (/etc/grub.d/40_custom and custom.cfg). Also you can control the generated content through variables in /etc/default/grub.



If I have overlooked a thorough and complete explanation of dual boot in the Fedora 25 Installation Guide, then it should be more heavily emphasized and made more conspicuous in the table of contents. There does not appear to be sufficient improvements to justify upgrading for a person who plans to use dual boot unless assurance can be provided that the installation will provide dual boot capability.

It is not the purpose of an installation guide for a particular OS to provide a tutorial for all OS related knowledge as the manual would be huge. This information is available in other places such as the grub2 manual.


I know that there's a program, os-prober, that you can use to find your other system, but I've never had to use it.

Technically you've been using this every time you run grub2-mkconfig as os-prober is run by grub by default unless explicitly disabled.


Found Windows Recovery Environment (loader) on /dev/mapper/pdc_cjggccgegj1
Found Windows Recovery Environment (loader) on /dev/mapper/pdc_cjggccgegj2

It appears you are using FakeRAID firmware RAID for your Windows installation. The pdc would suggest that it is a Promise controller on your MB. This is probably why grub2 can't autogenerate a Windows entry.


I have Windows 10 on my first internal hard drive and Fedora Core on the second internal hard drive.

First of all its not Fedora Core anymore just Fedora. Fedora 7, codenamed Moonshine, was released on May 31, 2007. It's been over a decade with just Fedora.

If you only have one drive with Windows then why are you using fakeRAID ? At this point you should post the output of fdisk -l.


What version of Windows do you have installed? I believe it would have to be Windows 7 (or XP) since Windows 8 and 10 require UEFI boot which you are not using.

The OP already stated that they are using Windows 10. UEFI is only required for new installations of Windows 8 & 10. If you upgrade online from a Windows 7 BIOS/MBR system you can use legacy BIOS. You are saying that the OP can't possibly have Windows 10 which they are using as you don't understand how they installed it.

amiga
1st November 2017, 11:23 PM
It could be that since you are using bios boot instead of uefi boot, grub is unable to find windows. I would imagine that if you installed fedora with grub-efi and placed grub in the windows efi partition, it would find windows as well,

This makes no sense as if they manage to boot Windows 10 in BIOS mode in post #4 then both Windows and Fedora are installed in legacy BIOS mode. They don't have a windows efi partition as Windows is installed in BIOS mode. It all comes down to the fact that you don't understand that Windows 10 could be used with legacy BIOS.


By the way, in order to boot a non efi OS (Fedora for example) on your system you will have to enable legacy boot on your motherboard -- so try that first.

They have already done this as they are able to boot into Fedora. Their MB has been in legacy mode the whole time. If their MB was in EFI mode then Anaconda would have installed Fedora in EFI mode.


[rhb100@localhost ~]$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.14.27-100.fc19.x86_64
Found initrd image: /boot/initramfs-3.14.27-100.fc19.x86_64.img
....
Found Windows Recovery Environment (loader) on /dev/mapper/pdc_cjggccgegj1
Found Windows Recovery Environment (loader) on /dev/mapper/pdc_cjggccgegj2
done
[rhb100@localhost ~]$

os-prober found the Windows loader on a Promise fakeRAID array.

rhb100
2nd November 2017, 12:35 AM
Here is the response to fdisk -l /dev/sda & fdisk -l /dev/sdb commands as requested by Amiga.

[root@localhost rhb100]# fdisk -l /dev/sda

Disk /dev/sda: 640.1 GB, 640135028736 bytes, 1250263728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x401de083

Device Boot Start End Blocks Id System
/dev/sda1 2048 39847935 19922944 27 Hidden NTFS WinRE
/dev/sda2 * 39847936 40052735 102400 7 HPFS/NTFS/exFAT
/dev/sda3 40052736 1249206271 604576768 7 HPFS/NTFS/exFAT
/dev/sda4 1249206272 1250127871 460800 27 Hidden NTFS WinRE
[root@localhost rhb100]# fdisk -l /dev/sdb

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000b6d91

Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 1026047 512000 83 Linux
/dev/sdb2 1026048 8660991 3817472 82 Linux swap / Solaris
/dev/sdb3 8660992 113518591 52428800 83 Linux
/dev/sdb4 113518592 1953525167 920003288 5 Extended
/dev/sdb5 113520640 1953523711 920001536 83 Linux
[root@localhost rhb100]

amiga
2nd November 2017, 05:54 PM
The partitions look fairly normal except for the two hidden NTFS. However it is unexplained how grub found two Promise FastTrack RAID arrays.

Please post the output of the following commands.


sudo dmraid -r
ls -l /dev/mapper/*
lspci | grep -i sata

Also for future posts please post all command output inside code blocks. Select the text to be put into a block and select the # symbol in advanced mode.

rhb100
2nd November 2017, 07:49 PM
Here is the response to the requested commands:


#
# sudo dmraid -r
/dev/sda: pdc, "pdc_cjggccgegj", stripe, ok, 1250132608 sectors, data@ 0
[rhb100@localhost ~]$ ls -l /dev/mapper/*
crw-------. 1 root root 10, 236 Nov 2 11:31 /dev/mapper/control
brw-rw----. 1 root disk 253, 0 Nov 2 11:31 /dev/mapper/pdc_cjggccgegj
lrwxrwxrwx. 1 root root 7 Nov 2 11:31 /dev/mapper/pdc_cjggccgegj1 -> ../dm-1
lrwxrwxrwx. 1 root root 7 Nov 2 11:31 /dev/mapper/pdc_cjggccgegj2 -> ../dm-2
lrwxrwxrwx. 1 root root 7 Nov 2 11:31 /dev/mapper/pdc_cjggccgegj3 -> ../dm-3
lrwxrwxrwx. 1 root root 7 Nov 2 11:31 /dev/mapper/pdc_cjggccgegj4 -> ../dm-4
[rhb100@localhost ~]$ lspci | grep -i sata
00:11.0 RAID bus controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 SATA Controller [Non-RAID5 mode] (rev 40)
[rhb100@localhost ~]$

amiga
2nd November 2017, 11:34 PM
This explains everything. Your Windows was installed with the controller in RAID mode instead of AHCI even though there is only one drive. Grub2's os-prober is detecting the installations inside these RAID partitions but can't generate entries to access them in this manner.

There are several options. The first is that you simply change the controller mode back to AHCI as with one drive you don't need RAID. This could affect Windows booting so you may have to use Windows safe mode. Once RAID is turned off grub will see the Windows installation on regular partitions and should generate a menu entry to chain-load Windows. If not you can easily create a custom menu entry to chain-load Windows.

Another option is simply to create a custom menu entry to try to chain-load Windows inside the regular sda2 partition without changing the controller mode. Since Windows is on its own drive sda with its own bootloader you could simply use drivemap to switch the root drive.


menuentry "Windows 10" {
insmod part_msdos
set root='(hd1)'
drivemap -s hd0 hd1
chainloader (hd1,2)+1
}


A third option since you can boot Windows is to use EasyBCD to chainload grub2 on sdb from the Windows bootloader.

rhb100
3rd November 2017, 08:23 PM
Thank you Amiga for your diagnosis and suggestions. I tried using the Integrated Peripherals section of my BIOS to try to change from RAID to AHCI but I had a problem logging into Windows 10. This change from RAID to AHCI may require a change to the Windows registry which I did not do thereby resulting in the problem.

I then downloaded and installed EasyBCD2.3. it worked well for booting into Windows 10 but I couldn't get it to boot into Fedora.

Where should this menuentry code be put? Into Grub2?

amiga
4th November 2017, 07:24 PM
Where should this menuentry code be put? Into Grub2?

You would put the custom menuentry code into the file /etc/grub.d/40_custom as I mentioned in my first post #9.


menuentry "Windows 10" {
insmod part_msdos
set root='(hd1)'
drivemap -s hd0 hd1
chainloader (hd1,2)+1
}

You would then regenerate the grub.cfg with grub2-mkconfig -o /boot/grub2/grub.cfg. This will include everything in the /etc/grub.d/40_custom file.

rhb100
6th November 2017, 09:57 PM
I have edited the /etc/grub.d/40_custom file by adding the menuentry you developed so that it now reads



[root@localhost rhb100]# more /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Windows 10" {
insmod part_msdos
set root='(hd1)'
drivemap -s hd0 hd1
chainloader (hd1)+2
}

[root@localhost rhb100]


I have an EASYBCD2.3 bootloader set to boot into Windows 10. My understanding is that when I perform the command

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

it will do nothing that will in any way modify my EASYBCD2.3 bootloader into Windows 10 but will instead only modify the grub.cfg file.

IS THAT CORRECT?

amiga
6th November 2017, 11:33 PM
I have edited the /etc/grub.d/40_custom file by adding the menuentry you developed so that it now reads


I made a correction to my earlier post and in my earlier message. For the chainloader line you should use either


chainloader (hd1,2)+1
This form attempts to access the second partition where W10 is installed.
or

chainloader (hd1)+1

This second simpler form simply accesses the Windows bootloader in the sda MBR.
I don't know which form is best.


I have an EASYBCD2.3 bootloader set to boot into Windows 10. My understanding is that when I perform the command
Code:

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

it will do nothing that will in any way modify my EASYBCD2.3 bootloader into Windows 10 but will instead only modify the grub.cfg file.

IS THAT CORRECT?


Very true. However if this menuentry works you won't need EasyBCD. In post #14 I mentioned three different alternatives for solving your problem. Creating a menuentry such as this was suggestion #2 and using EasyBCD was suggestion #3. You don't need both.

You need to set your BIOS to boot from your Linux drive sdb. If this menuentry works you will be able to chainload Windows 10 on sda. You won't need easyBCD at all.

rhb100
7th November 2017, 07:51 PM
Here is the response I got to using the mkconfig command



[root@localhost /]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.14.27-100.fc19.x86_64
Found initrd image: /boot/initramfs-3.14.27-100.fc19.x86_64.img
Found linux image: /boot/vmlinuz-3.9.5-301.fc19.x86_64
Found initrd image: /boot/initramfs-3.9.5-301.fc19.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-f818137001c746098e07efef1d160c05
Found initrd image: /boot/initramfs-0-rescue-f818137001c746098e07efef1d160c05.img
ERROR: unsupported sector size 4096 on /dev/sdh.
ERROR: unsupported sector size 4096 on /dev/sdh.
ERROR: unsupported sector size 4096 on /dev/sdh.
ERROR: unsupported sector size 4096 on /dev/sdh.
ERROR: unsupported sector size 4096 on /dev/sdh.
ERROR: unsupported sector size 4096 on /dev/sdh.
ERROR: unsupported sector size 4096 on /dev/sdh.
Found Windows Recovery Environment (loader) on /dev/mapper/pdc_cjggccgegj1
Found Windows Recovery Environment (loader) on /dev/mapper/pdc_cjggccgegj2
done
[root@localhost /]#


I changed the contents of etc/grub.d/40_custom by putting in the default statement, adding comments and making the change to your chainloader command. The new comments are listed below.



[root@localhost /]# more etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Windows 10" {
insmod part_msdos
default=Windows 10
set root='(hd1)'
# kernel is hd1 i.e. sdb
drivemap -s hd0 hd1
# call sda hd1, call sdb hd0
chainloader (hd1)+1
# boot into sda MBR
}

[root@localhost /]#

amiga
8th November 2017, 11:38 PM
The default should not be inside a menu entry. It should be placed in the file /etc/default/grub with the line
GRUB_DEFAULT="Windows 10"

Your latest post is incomplete. It is good that you added this menu entry but you never mentioned if it worked. After adding this entry and then updating the grub config you need to boot from this disk and select this menu entry to test it. The whole point of adding this entry is to use it.