Re: Booting NetBSD from GPT/EFI

2016-06-14 Thread Jaap Boender
On Tuesday 07 June 2016 20:34:27 Michael van Elst wrote:
> ja...@kerguelen.org (Jaap Boender) writes:
> >Is this at all possible? I understand the bootloader has to go in the
> >existing EFI partition; can I overwrite that without bothering Windows?
> 
> EFI allows multiple bootloaders. This isn't the problem.
> 
> >Does the order of partitions matter (currently the NetBSD bits are
> >indexes 7 and 8)? Should I rather use Grub? Are there tutorials
> >available?
> 
> For a dual boot from a GPT disk, the only solution currently is
> to use grub as an EFI bootloader.
> 
> The alternative is to reformat everything as a 'legacy' MBR disk.
> 
> While there is a 'gptmbr.bin' bootloader for NetBSD that
> requires BIOS boot but then accesses a GPT instead of the MBR
> partitions, I doubt that such a disk is supported by Windows.

Just to document this, what I finally ended up doing was to install grub2 
through an Ubuntu Live USB stick (the NetBSD grub2 package doesn't install the 
x86_64-efi source directory, I may look at that at some point).

grub-install --target=x86_64-efi --efi-directory=XXX --bootloader-id=grub --
boot-directory=XXX --debug

(where XXX is whatever directory you've mounted your EFI partition on).

This allows you to get a grub prompt when rebooting, so you do the usual:
insmod ufs2
set root=(...) <- put in your NetBSD partition here; (hd0,gpt3) for example
knetbsd /netbsd --root=dk2 (substitute your own dk)
boot

Then mount your EFI partition under NetBSD and run the grub-mkconfig from 
there:

grub-mkconfig -o XXX/grub/grub.cfg

(if you do this under Ubuntu the resulting Grub doesn't work, my guess is it 
has something to do with video modes).

And it works. Thanks all for your help!

best,

  Jaap
-- 
"Then I'll tell the truth. We're allowed to do that in emergencies."


Re: Booting NetBSD from GPT/EFI

2016-06-09 Thread Hauke Fath
On Wed, 8 Jun 2016 15:23:59 +0200, Hauke Fath wrote:
> It also looks as if some notebooks (I have my hands o an HP 2170p here) 
> blindly assume UEFI when they find a gpt formatted disk, even when 
> advised to attempt a "legacy boot".

Ah well -- PR bin/51230

Cheerio,
hauke

-- 
 The ASCII Ribbon CampaignHauke Fath
() No HTML/RTF in emailInstitut für Nachrichtentechnik
/\ No Word docs in email TU Darmstadt
 Respect for open standards  Ruf +49-6151-16-21344


Re: Booting NetBSD from GPT/EFI

2016-06-08 Thread Hauke Fath
On Tue, 7 Jun 2016 20:34:27 + (UTC), Michael van Elst wrote:
> While there is a 'gptmbr.bin' bootloader for NetBSD that
> requires BIOS boot but then accesses a GPT instead of the MBR
> partitions, I doubt that such a disk is supported by Windows.

It also looks as if some notebooks (I have my hands o an HP 2170p here) 
blindly assume UEFI when they find a gpt formatted disk, even when 
advised to attempt a "legacy boot". After a bit of groping in the dark, 
and frantic hardware-swapping, I found that the HP will boot from a 
plain old mbr disk.

disklabel(8) partitioning is not ot much of a restriction on the 
2170p's 128GB SSD, but it might be soon enough...

Cheerio,
hauke

-- 
 The ASCII Ribbon CampaignHauke Fath
() No HTML/RTF in emailInstitut für Nachrichtentechnik
/\ No Word docs in email TU Darmstadt
 Respect for open standards  Ruf +49-6151-16-21344


Re: Booting NetBSD from GPT/EFI

2016-06-07 Thread Rhialto
On Tue 07 Jun 2016 at 17:05:09 +0100, Jaap Boender wrote:
> No, not all Radeons, my old laptop had a Radeon too and thast worked fine.

It turned out to be fine for me anyway. My previous kernel was 7.0
(which worked for me), and I wasn't sure if you were talking about a
regression, or if 7.0.1 was the first kernel you tried on that machine.

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- Wayland: Those who don't understand X
\X/ rhialto/at/xs4all.nl-- are condemned to reinvent it. Poorly.


signature.asc
Description: PGP signature


Re: Booting NetBSD from GPT/EFI

2016-06-07 Thread Michael van Elst
ja...@kerguelen.org (Jaap Boender) writes:

>Is this at all possible? I understand the bootloader has to go in the 
>existing EFI partition; can I overwrite that without bothering Windows? 

EFI allows multiple bootloaders. This isn't the problem.

>Does the order of partitions matter (currently the NetBSD bits are 
>indexes 7 and 8)? Should I rather use Grub? Are there tutorials 
>available?

For a dual boot from a GPT disk, the only solution currently is
to use grub as an EFI bootloader.

The alternative is to reformat everything as a 'legacy' MBR disk.

While there is a 'gptmbr.bin' bootloader for NetBSD that
requires BIOS boot but then accesses a GPT instead of the MBR
partitions, I doubt that such a disk is supported by Windows.


-- 
-- 
Michael van Elst
Internet: mlel...@serpens.de
"A potential Snark may lurk in every tree."


Re: Booting NetBSD from GPT/EFI

2016-06-07 Thread Jaap Boender

On 07/06/2016 17:03, Rhialto wrote:

On Tue 07 Jun 2016 at 15:09:31 +, co...@sdf.org wrote:

On Tue, Jun 07, 2016 at 02:50:31PM +0100, Jaap Boender wrote:

First off, 7.0.1 crashes during radeon initialisation (can't find the ROM
apparently), but a recent -current snapshot works fine, so that's easy.


It is possible this was fixed already in -7. I had the same problem in
my laptop, but this was not put in 7.0.1 (kern/49964).


Is that for all Radeon variants? I was just about to update my machine
with a Radeon card to 7.0.1, but if that won't work, I'll wait.


No, not all Radeons, my old laptop had a Radeon too and thast worked 
fine. And as coypu says, if you update to the the head of the netbsd-7 
branch (or current, which worked for me) things might work better as well.


best,

  Jaap

--
"Then I'll tell the truth. We're allowed to do that in emergencies."


Re: Booting NetBSD from GPT/EFI

2016-06-07 Thread Rhialto
On Tue 07 Jun 2016 at 15:09:31 +, co...@sdf.org wrote:
> On Tue, Jun 07, 2016 at 02:50:31PM +0100, Jaap Boender wrote:
> > First off, 7.0.1 crashes during radeon initialisation (can't find the ROM
> > apparently), but a recent -current snapshot works fine, so that's easy.
> 
> It is possible this was fixed already in -7. I had the same problem in
> my laptop, but this was not put in 7.0.1 (kern/49964).

Is that for all Radeon variants? I was just about to update my machine
with a Radeon card to 7.0.1, but if that won't work, I'll wait.

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- Wayland: Those who don't understand X
\X/ rhialto/at/xs4all.nl-- are condemned to reinvent it. Poorly.


signature.asc
Description: PGP signature


Re: Booting NetBSD from GPT/EFI

2016-06-07 Thread coypu
On Tue, Jun 07, 2016 at 02:50:31PM +0100, Jaap Boender wrote:
> First off, 7.0.1 crashes during radeon initialisation (can't find the ROM
> apparently), but a recent -current snapshot works fine, so that's easy.

It is possible this was fixed already in -7. I had the same problem in
my laptop, but this was not put in 7.0.1 (kern/49964).