Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dual Boot recommendations - Windows 10 and Gentoo
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 449
Location: Wales, UK

PostPosted: Tue Jun 09, 2020 8:33 pm    Post subject: Dual Boot recommendations - Windows 10 and Gentoo Reply with quote

I have purchased the components for a new system for my home office. I have planned to install Windows 10 on a 1Tb SSD drive, and Gentoo on a second 1Tb SSD drive. What is the current best practice for the installation process? Windows first, then Gentoo, or vice versa? UEFI and GPT partition tables?

I recently installed gentoo on a Udoo Bolt, so I am familiar with the current practice for the Gentoo installation. I am just looking for some pointers about the best sequence for the dual boot build, and any pitfalls I need to be aware of.

Many thanks!
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4996
Location: Dallas area

PostPosted: Tue Jun 09, 2020 8:39 pm    Post subject: Reply with quote

It's been recommended for years to install windows first.

As far the rest, can't go wrong with gpt and uefi (windows expects to have them together anyway)
_________________
PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie & modified) amd64-no-multilib, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3541

PostPosted: Tue Jun 09, 2020 9:05 pm    Post subject: Reply with quote

Installation sequence doesn't matter.
MS stuff can be installed later. Give it at least 100MB unformatted space and take care the ESP has the boot, esp flags correctly set.
Back to top
View user's profile Send private message
etnull
Guru
Guru


Joined: 26 Mar 2019
Posts: 460
Location: Russia

PostPosted: Tue Jun 09, 2020 9:11 pm    Post subject: Reply with quote

If you have two drives it doesn't matter because you would have two seperate bootloaders, or you are planing to install grub on Windows drive and boot from that both systems? In this case obviously Gentoo should be last, because Windows doesn't care about Linux and overrides everything, or at least it did so many years ago.
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 449
Location: Wales, UK

PostPosted: Tue Jun 09, 2020 9:34 pm    Post subject: Reply with quote

etnull wrote:
If you have two drives it doesn't matter because you would have two seperate bootloaders, or you are planing to install grub on Windows drive and boot from that both systems? In this case obviously Gentoo should be last, because Windows doesn't care about Linux and overrides everything, or at least it did so many years ago.


I agree with the comment about windows from years ago - that was the case when I last installed a dual boot system (pre 2000 - gentoo only since then!).

Regarding the two bootloaders - I assume grub2 for Gentoo, and the normal windows bootloader the windows side. Do you then prioritise the grub partition, and have an entry to chain the windows bootloader? If I do nothing, then it should boot into linux.

edit: added query about bootloader
Back to top
View user's profile Send private message
saboya
Guru
Guru


Joined: 28 Nov 2006
Posts: 541
Location: Brazil

PostPosted: Tue Jun 09, 2020 10:43 pm    Post subject: Reply with quote

Strongly recommend installing Windows first, it will try to mess up with your partitions. Install Windows 10, size the EFI partition appropriately (Windows usually creats it with 100mb) and then setup Linux / your EFI bootloader.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7779
Location: Saint Amant, Acadiana

PostPosted: Wed Jun 10, 2020 1:14 am    Post subject: Reply with quote

I assume Windows install is not configurable? Haven't used it for 17 years now. Anyhow, Gentoo install is fully configurable. So if I had such a task I'd install Windows, let it create ESP partition and then I'd drop Gentoo boot image to the same ESP partition, be it EFI stub kernel or some bootloader as Grub. I assume Windows won't remove stuff from ESP even if it does not belong to it?
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 516
Location: Hawaii

PostPosted: Wed Jun 10, 2020 7:34 am    Post subject: Reply with quote

I ended up installing Windows first, with its own ESP, then Gentoo on a separate drive with another ESP. I use rEFInd, which automagically found the Windows bootloader on the frist drive and I was set to go once I added rEFIind to the EFI boot list. From my UEFI, I can select the Windows bootloader or rEFInd, which then allows me to select one of a few efistub kernels, or chainload the Windows bootloader.
_________________
Asrock X470 Taichi
Ryzen 2700x
32Gb Samsung B-die (16GB dual rank x2) DDR4
Geforce GTX 1060 6GB
Samsung Evo 840 500Gb +Seagate 1TB HDD
Etc....
Back to top
View user's profile Send private message
Irre
Guru
Guru


Joined: 09 Nov 2013
Posts: 356
Location: Stockholm

PostPosted: Wed Jun 10, 2020 2:03 pm    Post subject: Reply with quote

Test grub2win https://sourceforge.net/projects/grub2win/

I have tested it under VM. Worked very well.

You install it in Windows!

No need for grub2 in linux after that! :D
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 4273
Location: Illinois, USA

PostPosted: Wed Jun 10, 2020 2:09 pm    Post subject: Reply with quote

bammbamm808 wrote:
I use rEFInd, which automagically found the Windows bootloader on the frist drive and I was set to go once I added rEFIind to the EFI boot list.

This was a standard rEFInd install? No changes to the .conf files?
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 4273
Location: Illinois, USA

PostPosted: Wed Jun 10, 2020 2:28 pm    Post subject: Reply with quote

Irre wrote:
Test grub2win https://sourceforge.net/projects/grub2win/ ...

On older windows there is a facility intended to present a boot choice for DOS or Win95/98/ME

Code:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect /usepmtimer /pae /NoExecute=OptIn
C:\BOOTSECT.LNX="Linux"
C:\32bitprt.lnx="IGNORE THIS FOR NOW 32 bit Linux"

BOOTSECT.LNX (or really any name you want) is a copy of the Linux boot sector. The 2000/XP process would just lobotomize itself and load the bootsector into memory and run it. This is how I dual boot although you can also use grub chainloading. I figure it's best to use the means that Windows provided lest you upset Windows.

I have NO IDEA whether this still works in Windows 7,8 or 10, but Redmond usyally leaves obsolete cruft in their code. It's gotten so big and complex and MS deliberately doesn't want many to understand it all that it's become an untamed beast. That's why so many "fixes" screw it up more and you need constant "updates". because it is hacked, not designed.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7779
Location: Saint Amant, Acadiana

PostPosted: Wed Jun 10, 2020 5:42 pm    Post subject: Reply with quote

Look how simple is EFI boot compared to this. All you need is a valid EFI executable in standard location and voila. There is even no need to run any install programs or scripts, bare cp by hand will do just fine.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 4273
Location: Illinois, USA

PostPosted: Wed Jun 10, 2020 6:43 pm    Post subject: Reply with quote

Jaglover, but will it dual boot with a menu?
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7779
Location: Saint Amant, Acadiana

PostPosted: Wed Jun 10, 2020 7:04 pm    Post subject: Reply with quote

You mean if Linux EFI sub kernel is copied next to Windows EFI bootloader in Windows ESP partition? I'm sure it will boot, one has to use built-in EFI firmware boot menu, this will be the only menu available in this case. The only thing I'm not sure of is whether Windows will leave this "foreign" item alone or it will do something about it.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 449
Location: Wales, UK

PostPosted: Wed Jun 10, 2020 10:19 pm    Post subject: Reply with quote

Thanks for the comments everyone! The system is now built, and windows installed. I am just getting all my work stuff synced up, and then tomorrow (if this current stuff is finished), I will start with the Gentoo installation. I'll pop some feedback here when it's done, in case it is useful for others.
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 516
Location: Hawaii

PostPosted: Wed Jun 10, 2020 10:46 pm    Post subject: Reply with quote

Tony0945 wrote:
bammbamm808 wrote:
I use rEFInd, which automagically found the Windows bootloader on the frist drive and I was set to go once I added rEFIind to the EFI boot list.

This was a standard rEFInd install? No changes to the .conf files?

No changes pertaining to the windows install, its efisp or the windows bootloader. I think my refind config changes are just theming and "use_graphics_with linux".
_________________
Asrock X470 Taichi
Ryzen 2700x
32Gb Samsung B-die (16GB dual rank x2) DDR4
Geforce GTX 1060 6GB
Samsung Evo 840 500Gb +Seagate 1TB HDD
Etc....
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 449
Location: Wales, UK

PostPosted: Fri Jun 12, 2020 1:22 pm    Post subject: Reply with quote

Ok - so it's done, and now I have a blisteringly fast desktop with dual boot capability!

Here are some of the key points regarding dual booting worth noting from my experience:
  • There can only be one EFI system partition per drive. This was not an issue in my case, but it if you have a single drive and partition it for windows and linux, this will be an issue. It doesn't mean that you can't dual boot - you will have to store the linux and windows EFI information on the same partition.
  • I used grub2. You can of course use one of the other options - I stayed with what I know! grub2 should find the windows installation and incorporate it into the boot menu. However, in my case, this didn't work.
  • To get it working, I choose to go down the route of installing os-prober. This works in conjunction with grub2. However, it didn't work from the chroot environment as configured in the gentoo handbook. To get it working, I had to exit from the chroot environment, and issue the following:
    Code:
    root #mkdir -p /mnt/gentoo/run/udev
    root #mount -o bind /run/udev /mnt/gentoo/run/udev
    root #mount --make-rslave /mnt/gentoo/run/udev

    This gives access to the host udev information. After this, grub2 found the windows installation, and created a boot menu item for it.
  • Finally, go into the BIOS configuration and ensure the grub EFI is first in the boot priority.
Everything should then work as expected.
Configuring the kernel was straight forward. If anyone is interested in the .config for 5.7.2, let me know and I'll post is somewhere.

My next task: see how I can use this power to compile packages for my core i5 (7th gen) laptop. To give you an idea of the speed difference, qtwebkit took 18 minutes on the new system, and 1.5 hours on my laptop (with 16Gb memory and an nvme drive).
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3541

PostPosted: Fri Jun 12, 2020 2:37 pm    Post subject: Reply with quote

paulj wrote:
  • There can only be one EFI system partition per drive. ...

Would it have been helpful for you if this was pointed out on the wiki?
And may I ask where finally you have the Gentoo kernel located? Is it in the ESP or somewhere else?
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 449
Location: Wales, UK

PostPosted: Sat Jun 13, 2020 9:33 am    Post subject: Reply with quote

charles17 wrote:
paulj wrote:
  • There can only be one EFI system partition per drive. ...

Would it have been helpful for you if this was pointed out on the wiki?
And may I ask where finally you have the Gentoo kernel located? Is it in the ESP or somewhere else?


When I go through the documentation, I have a feeling that it has grown over the years and has many options and sub options to achieve different outcomes. It works to be everything to everyone. I think there is an opportunity to refactor the information, and perhaps split out the issues relating to dual booting to a different page. Of course, I understand I can also contribute to this, and I shouldn't expect "someone else" to fix the documentation. I will have a look at how it can be improved from my point of view, and make some proposals. Perhaps as someone who installs a Gentoo system every few years on average, and often on some different hardware (eg Beaglebone black, Udoo Bolt), perhaps I have a different perception compared with the regular team carrying out the updating.

Regarding your specific questions:
  • I think a general explanation of EFI operation would be beneficial - either in the documentation, or with a link. I guess there has to be a judgement call as to what prior assumed knowledge is expected.
  • I have created the disk partition layout in accordance with the handbook. The EFI system partition, which I mount in /boot/efi for the purposes of installing grub (something else which is not that clear in the documentation), a /boot directory with the grub configuration and the kernel, a swap partition, and a root partition. The only thing I did different was to make the /boot partition bigger, to avoid the "no space left..." when installing a new kernel. I guess this will make me slightly more lazy about clearing out older kernel images...! On a 1Tb disk, I can afford to be more generous with the space allocation

Finally - I don't want to give the impression I am negative about the documentation - it is good, but there are opportunities to make it better! I really appreciate all the effort put into maintaining the documentation and portage - I know from my own experience that this takes time to do, and more time to keep up to date. Thanks to all those who are involved in these activities.

edit: fixed spelling
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3541

PostPosted: Sat Jun 13, 2020 11:48 am    Post subject: Reply with quote

So you have your Gentoo kernel outside the EFI structure, similar to this https://wiki.gentoo.org/wiki/Dell_Latitude_E6430_%28CYRTRY1%29#EFI_Boot_Stub_quick.27n_dirty?
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 449
Location: Wales, UK

PostPosted: Sat Jun 13, 2020 11:49 am    Post subject: Reply with quote

charles17 wrote:
So you have your Gentoo kernel outside the EFI structure, similar to this https://wiki.gentoo.org/wiki/Dell_Latitude_E6430_%28CYRTRY1%29#EFI_Boot_Stub_quick.27n_dirty?


edit - Actually like this:

Code:

/boot
├── config-5.7.2-gentoo
├── efi
│   └── EFI
│       └── gentoo
│           └── grubx64.efi
├── grub
├── lost+found
├── System.map-5.7.2-gentoo
└── vmlinuz-5.7.2-gentoo


I have removed all of the stuff under the grub subdirectory.

I think this is what you end up with when following the handbook?


Last edited by paulj on Sat Jun 13, 2020 11:57 am; edited 1 time in total
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4996
Location: Dallas area

PostPosted: Sat Jun 13, 2020 11:56 am    Post subject: Reply with quote

When I put my new system together I opted for straight uefi, so I only laid down the ESP partition.
I don't dual boot, the system is up 24x7 and I opted to run win7 under a qemu vm.
_________________
PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie & modified) amd64-no-multilib, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 449
Location: Wales, UK

PostPosted: Sat Jun 13, 2020 12:01 pm    Post subject: Reply with quote

Anon-E-moose wrote:
When I put my new system together I opted for straight uefi, so I only laid down the ESP partition.
I don't dual boot, the system is up 24x7 and I opted to run win7 under a qemu vm.


I wanted the option to dual boot into windows directly. I may also try to run windows in vitualbox (or qemu) to see if everything works as expected, but since the windows stuff is for work, the last thing I wanted to have is issues related to running in a vm which wouldn't be there otherwise. Also, I am not sure how well games run in a vm?
Regarding dual booting, I understand I could have also put the gentoo EFI stuff on the same ESP as windows, and then would have the option to boot off either (I assume the BIOS puts up a menu?). I didn't try this though.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 16202

PostPosted: Sat Jun 13, 2020 3:25 pm    Post subject: Reply with quote

Some games run well in a VM, but generally the older the game, the better the support. For newer games, I find Wine to be a better choice than Windows in a virtual machine. Conversely, work programs often are not demanding of special features like advanced GL support, but do need details of Windows that Wine does not do well, so, for me, work programs are often easier to do with Windows in a virtual machine than with Wine.
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4996
Location: Dallas area

PostPosted: Sat Jun 13, 2020 4:12 pm    Post subject: Reply with quote

Hu wrote:
Some games run well in a VM, but generally the older the game, the better the support. For newer games, I find Wine to be a better choice than Windows in a virtual machine. Conversely, work programs often are not demanding of special features like advanced GL support, but do need details of Windows that Wine does not do well, so, for me, work programs are often easier to do with Windows in a virtual machine than with Wine.


I had specifically put a second video card in the machine, just for passing through, windows has it's own vid card and games work near native speed and abilities. Having said that, it was hard to find a mb with just the right amount of usable pci slots, as I also pass through a pcie usb 3.2 card and a network adapter, I also put windows on it's own disk (whole disk passthrough), so windows really thinks it has it's own machine.

My use of wine is getting dated as the last time I used it was before the different wine-??? split.
But on the other hand once I got rid of wine, I also got rid of the whole abi*32 multilib mess.
_________________
PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie & modified) amd64-no-multilib, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum