solved (was: Re: UEFI dual-boot with Windows)
On Thu, 30 Dec 2021, Pedro Pinho wrote: Not adding anything here but, this is something users ask everynow and then on different forums. It would be awesome if the wiki contained a guide on how to set-up a dualboot, Windows/NetBSD and Linux/NetBSD. Including seting up rEFInd would be the icing on the cake. As an update to my initial post, I now made this work. The trick was to use a bootx64.efi from NetBSD-current, which looks much improved from the one shipped in -9. Notably, the kernel boots with a low-resolution graphical console and switches to the proper console font and resolution a bit later. This how the setup works: My root partition on the second SSD is a GPT part named "shiso-root" (shiso is the host name). I installed rEFInd according to the "Installing from Windows" section in its docs. Then, I copied /usr/mdec/bootx64.efi from an extracted base.tgz to \EFI\NetBSD\bootx64.efi on the EFI system partition. In the root directory of that partition, I placed the kernel (which ended up not being necessary) and a boot.cfg file. The sequence of commands to boot is root NAME=shiso-root boot NAME=shiso-root:/netbsd The rEFInd boot menu is graphical and nicer than manually hitting the key for selecting the boot device at the right point :) -- Benny
Re: UEFI dual-boot with Windows
Not adding anything here but, this is something users ask everynow and then on different forums. It would be awesome if the wiki contained a guide on how to set-up a dualboot, Windows/NetBSD and Linux/NetBSD. Including seting up rEFInd would be the icing on the cake. Happy new year. Den ons 29 dec. 2021 21:28Todd Gruhn skrev: > My system wa built a year ago. I boot NetBSD from one HD. > I boot Windoze from another HD. > It also allows me to boot either of 2 CD/DVDs. > > The 2 CDs come in handy when upgrading NetBSD. > > I can choose which device to boot when UEFI comes up. > > On Wed, Dec 29, 2021 at 6:19 PM Chavdar Ivanov wrote: > > > > I boot my netbsd-current system in uefi mode from the second disk by > selecting its .efi file; I lost my default rEFInd setup when I downgraded > the first disk from W11 to W10 and haven’t tried to recover it yet, it also > can be started by selecting its .efi file. I have never copied the system > kernel on the efi partition; there are three systems on the second disk > with their own efi partitions. This is on an HP envy 17 laptop, 5 years old. > > > > On Wed, 29 Dec 2021 at 17:19, Tobias Nygren wrote: > >> > >> On Wed, 29 Dec 2021 17:05:08 + (UTC) > >> Benny Siegert wrote: > >> > >> > Hi! > >> > > >> > I re-installed Windows 10 on my machine, and it insisted on UEFI boot, > >> > which killed my previous dual-booting setup with GRUB and legacy boot. > >> > > >> > NetBSD is on the second NVMe drive, while the first one is all > Windows. > >> > > >> > After installing Windows, I manually installed rEFInd into the EFI > >> > partition. For NetBSD, I copied bootx64.efi to /EFI/NetBSD (so as not > to > >> > overwrite the existing /EFI/Boot/bootx64.efi, which I assume is from > >> > Windows). I also copied a GENERIC NetBSD-9.2 kernel to /netbsd.gz on > the > >> > EFI partition. > >> > > >> > After selecting NetBSD in rEFInd (which it auto-detects), I see the > >> > NetBSD/x86 EFI boot (x64) banner. It proceeds to load a kernel from > >> > "NAME=EFI system partition:netbsd.gz (howto 0x2)". > >> > > >> > Unfortunately, after the initial loader line with the sizes, the boot > >> > seems to hang with no further output. > >> > > >> > Any ideas, hints or tips? > >> > >> I have a similar problem when I have a 4k sector NVMe drive installed. > >> I suspect in my case it is a Dell firmware bug but not sure. > >> It hangs for me when tearing down UEFI stuff before jumping to kernel. > >> > >> To rule out issues with the EFI system partition itself you could > >> install a /EFI/NetBSD/boot.cfg to instruct bootx64.efi to load the > >> kernel from hd1a:netbsd or whatever your FFS partition is named. > >> > >> -Tobias > > > > -- > > >
Re: UEFI dual-boot with Windows
My system wa built a year ago. I boot NetBSD from one HD. I boot Windoze from another HD. It also allows me to boot either of 2 CD/DVDs. The 2 CDs come in handy when upgrading NetBSD. I can choose which device to boot when UEFI comes up. On Wed, Dec 29, 2021 at 6:19 PM Chavdar Ivanov wrote: > > I boot my netbsd-current system in uefi mode from the second disk by > selecting its .efi file; I lost my default rEFInd setup when I downgraded the > first disk from W11 to W10 and haven’t tried to recover it yet, it also can > be started by selecting its .efi file. I have never copied the system kernel > on the efi partition; there are three systems on the second disk with their > own efi partitions. This is on an HP envy 17 laptop, 5 years old. > > On Wed, 29 Dec 2021 at 17:19, Tobias Nygren wrote: >> >> On Wed, 29 Dec 2021 17:05:08 + (UTC) >> Benny Siegert wrote: >> >> > Hi! >> > >> > I re-installed Windows 10 on my machine, and it insisted on UEFI boot, >> > which killed my previous dual-booting setup with GRUB and legacy boot. >> > >> > NetBSD is on the second NVMe drive, while the first one is all Windows. >> > >> > After installing Windows, I manually installed rEFInd into the EFI >> > partition. For NetBSD, I copied bootx64.efi to /EFI/NetBSD (so as not to >> > overwrite the existing /EFI/Boot/bootx64.efi, which I assume is from >> > Windows). I also copied a GENERIC NetBSD-9.2 kernel to /netbsd.gz on the >> > EFI partition. >> > >> > After selecting NetBSD in rEFInd (which it auto-detects), I see the >> > NetBSD/x86 EFI boot (x64) banner. It proceeds to load a kernel from >> > "NAME=EFI system partition:netbsd.gz (howto 0x2)". >> > >> > Unfortunately, after the initial loader line with the sizes, the boot >> > seems to hang with no further output. >> > >> > Any ideas, hints or tips? >> >> I have a similar problem when I have a 4k sector NVMe drive installed. >> I suspect in my case it is a Dell firmware bug but not sure. >> It hangs for me when tearing down UEFI stuff before jumping to kernel. >> >> To rule out issues with the EFI system partition itself you could >> install a /EFI/NetBSD/boot.cfg to instruct bootx64.efi to load the >> kernel from hd1a:netbsd or whatever your FFS partition is named. >> >> -Tobias > > -- >
Re: UEFI dual-boot with Windows
I boot my netbsd-current system in uefi mode from the second disk by selecting its .efi file; I lost my default rEFInd setup when I downgraded the first disk from W11 to W10 and haven’t tried to recover it yet, it also can be started by selecting its .efi file. I have never copied the system kernel on the efi partition; there are three systems on the second disk with their own efi partitions. This is on an HP envy 17 laptop, 5 years old. On Wed, 29 Dec 2021 at 17:19, Tobias Nygren wrote: > On Wed, 29 Dec 2021 17:05:08 + (UTC) > Benny Siegert wrote: > > > Hi! > > > > I re-installed Windows 10 on my machine, and it insisted on UEFI boot, > > which killed my previous dual-booting setup with GRUB and legacy boot. > > > > NetBSD is on the second NVMe drive, while the first one is all Windows. > > > > After installing Windows, I manually installed rEFInd into the EFI > > partition. For NetBSD, I copied bootx64.efi to /EFI/NetBSD (so as not to > > overwrite the existing /EFI/Boot/bootx64.efi, which I assume is from > > Windows). I also copied a GENERIC NetBSD-9.2 kernel to /netbsd.gz on > the > > EFI partition. > > > > After selecting NetBSD in rEFInd (which it auto-detects), I see the > > NetBSD/x86 EFI boot (x64) banner. It proceeds to load a kernel from > > "NAME=EFI system partition:netbsd.gz (howto 0x2)". > > > > Unfortunately, after the initial loader line with the sizes, the boot > > seems to hang with no further output. > > > > Any ideas, hints or tips? > > I have a similar problem when I have a 4k sector NVMe drive installed. > I suspect in my case it is a Dell firmware bug but not sure. > It hangs for me when tearing down UEFI stuff before jumping to kernel. > > To rule out issues with the EFI system partition itself you could > install a /EFI/NetBSD/boot.cfg to instruct bootx64.efi to load the > kernel from hd1a:netbsd or whatever your FFS partition is named. > > -Tobias > --
Re: UEFI dual-boot with Windows
On Wed, 29 Dec 2021 17:05:08 + (UTC) Benny Siegert wrote: > Hi! > > I re-installed Windows 10 on my machine, and it insisted on UEFI boot, > which killed my previous dual-booting setup with GRUB and legacy boot. > > NetBSD is on the second NVMe drive, while the first one is all Windows. > > After installing Windows, I manually installed rEFInd into the EFI > partition. For NetBSD, I copied bootx64.efi to /EFI/NetBSD (so as not to > overwrite the existing /EFI/Boot/bootx64.efi, which I assume is from > Windows). I also copied a GENERIC NetBSD-9.2 kernel to /netbsd.gz on the > EFI partition. > > After selecting NetBSD in rEFInd (which it auto-detects), I see the > NetBSD/x86 EFI boot (x64) banner. It proceeds to load a kernel from > "NAME=EFI system partition:netbsd.gz (howto 0x2)". > > Unfortunately, after the initial loader line with the sizes, the boot > seems to hang with no further output. > > Any ideas, hints or tips? I have a similar problem when I have a 4k sector NVMe drive installed. I suspect in my case it is a Dell firmware bug but not sure. It hangs for me when tearing down UEFI stuff before jumping to kernel. To rule out issues with the EFI system partition itself you could install a /EFI/NetBSD/boot.cfg to instruct bootx64.efi to load the kernel from hd1a:netbsd or whatever your FFS partition is named. -Tobias
UEFI dual-boot with Windows
Hi! I re-installed Windows 10 on my machine, and it insisted on UEFI boot, which killed my previous dual-booting setup with GRUB and legacy boot. NetBSD is on the second NVMe drive, while the first one is all Windows. After installing Windows, I manually installed rEFInd into the EFI partition. For NetBSD, I copied bootx64.efi to /EFI/NetBSD (so as not to overwrite the existing /EFI/Boot/bootx64.efi, which I assume is from Windows). I also copied a GENERIC NetBSD-9.2 kernel to /netbsd.gz on the EFI partition. After selecting NetBSD in rEFInd (which it auto-detects), I see the NetBSD/x86 EFI boot (x64) banner. It proceeds to load a kernel from "NAME=EFI system partition:netbsd.gz (howto 0x2)". Unfortunately, after the initial loader line with the sizes, the boot seems to hang with no further output. Any ideas, hints or tips? -- Benny