Re: No uefi install in VM

2019-12-18 Thread Chavdar Ivanov
9.99.26 now indeed goes through the installation in GPT/EFI without
any problems. The only wiggle - at least when booting under VirtualBox
6.1 - was it did not boot from the bootx64.efi by default; I had to
manually select the file from the 'Manage Boot Environments'
interface.

On Mon, 16 Dec 2019 at 13:05, Emmanuel Dreyfus  wrote:
>
> On Mon, Dec 16, 2019 at 01:52:32PM +0100, Martin Husemann wrote:
> > Yes, but as a fallback it is good (and sometimes you have "serial console"
> > and working copy & paste - though with modern server management this seems
> > to be a lost property).
>
> As a fallback, you can boot hd0b:/netbsd
>
> The dev commands shows hd0b: in the device list, and as the default
> boot choice.
>
> --
> Emmanuel Dreyfus
> m...@netbsd.org



-- 



Re: No uefi install in VM

2019-12-16 Thread Emmanuel Dreyfus
On Mon, Dec 16, 2019 at 01:52:32PM +0100, Martin Husemann wrote:
> Yes, but as a fallback it is good (and sometimes you have "serial console"
> and working copy & paste - though with modern server management this seems
> to be a lost property).

As a fallback, you can boot hd0b:/netbsd

The dev commands shows hd0b: in the device list, and as the default
boot choice.

-- 
Emmanuel Dreyfus
m...@netbsd.org


Re: No uefi install in VM

2019-12-16 Thread Martin Husemann
On Mon, Dec 16, 2019 at 12:50:39PM +, Emmanuel Dreyfus wrote:
> I thought about it, but requiring the user to enter an UUID to boot 
> seems harsh.

Yes, but as a fallback it is good (and sometimes you have "serial console"
and working copy & paste - though with modern server management this seems
to be a lost property).

Martin


Re: No uefi install in VM

2019-12-16 Thread Emmanuel Dreyfus
On Mon, Dec 16, 2019 at 12:45:52PM +0100, Martin Husemann wrote:
> P.S.: sysinst offer naming the partitions (in the partitions detail menu),
> but it does not come up with names by itself. Could the boot code fall back
> to the guid if no name is available?

I thought about it, but requiring the user to enter an UUID to boot 
seems harsh.

-- 
Emmanuel Dreyfus
m...@netbsd.org


Re: No uefi install in VM

2019-12-16 Thread Martin Husemann
On Mon, Dec 16, 2019 at 08:52:29AM +, Emmanuel Dreyfus wrote:
> The attached patch fixes the bug by avoid using NAME= when there
> is no label. Once applied, rebuild src/sts/arch/i386/stand and
> install updated bootstrap.

This makes my old installation boot again!

Please commit + request pullup.

Thanks!

Martin
P.S.: sysinst offer naming the partitions (in the partitions detail menu),
but it does not come up with names by itself. Could the boot code fall back
to the guid if no name is available?


Re: No uefi install in VM

2019-12-16 Thread Emmanuel Dreyfus
On Thu, Dec 12, 2019 at 08:41:15AM +0100, Martin Husemann wrote:
> Yes, it is. I took a bootable UEFI installation (in VirtualBox) and replaced
> the efi/boot/*.efi files on the MSDOS/EFI partition with the ones from
> the latest netbsd-9 build and it stopped booting as you describe.

I have a fix for that. Sorry for the delay it took to investigate, 
but 9.0_RC1 EFI boot crashes in qemu for other reason  (panic in 
cpu_svs_init -> pagezero), so it was not easy to reproduce.

This bugs is caused by the lack of labels on GPT partitions created
by sysinst. The consequence is that bootstrap cannot make the 
difference between EFI and FFS partition, and it looks for the
kernel on the first partition that matches "NAME=", which is 
EFI. A workaround is to drop to boot prompt and run boot hd0b:

The attached patch fixes the bug by avoid using NAME= when there
is no label. Once applied, rebuild src/sts/arch/i386/stand and
install updated bootstrap.

-- 
Emmanuel Dreyfus
m...@netbsd.org
Index: sys/arch/i386/stand/efiboot/efidisk.c
===
RCS file: /cvsroot/src/sys/arch/i386/stand/efiboot/efidisk.c,v
retrieving revision 1.8
diff -U4 -r1.8 efidisk.c
--- sys/arch/i386/stand/efiboot/efidisk.c   18 Aug 2019 02:18:24 -  
1.8
+++ sys/arch/i386/stand/efiboot/efidisk.c   16 Dec 2019 08:49:24 -
@@ -252,9 +252,9 @@
if (first) {
printf(" ");
first = false;
}
-   if (part[i].part_name != NULL)
+   if (part[i].part_name && part[i].part_name[0])
printf(" NAME=%s(", part[i].part_name);
else
printf(" hd%d%c(", edi->dev & 0x7f, i + 'a');
if (part[i].guid != NULL)
@@ -307,9 +307,9 @@
if (first) {
printf(" ");
first = 0;
}
-   if (part[j].part_name != NULL)
+   if (part[j].part_name && part[j].part_name[0])
printf(" NAME=%s(", part[j].part_name);
else
printf(" raid%d%c(",
   raidframe[i].last_unit, j + 'a');
Index: sys/arch/i386/stand/lib/biosdisk.c
===
RCS file: /cvsroot/src/sys/arch/i386/stand/lib/biosdisk.c,v
retrieving revision 1.53
diff -U4 -r1.53 biosdisk.c
--- sys/arch/i386/stand/lib/biosdisk.c  10 Dec 2019 02:02:47 -  1.53
+++ sys/arch/i386/stand/lib/biosdisk.c  16 Dec 2019 08:49:24 -
@@ -907,9 +907,10 @@
printf(" ");
first = 0;
}
 #ifndef NO_GPT
-   if (d->part[part].part_name != NULL)
+   if (d->part[part].part_name &&
+   d->part[part].part_name[0])
printf(" NAME=%s(", d->part[part].part_name);
else
 #endif
printf(" hd%d%c(", d->ll.dev & 0x7f, part + 
'a');
@@ -986,9 +987,10 @@
printf(" ");
first = 0;
}
 #ifndef NO_GPT
-   if (d->part[part].part_name != NULL)
+   if (d->part[part].part_name &&
+   d->part[part].part_name[0])
printf(" NAME=%s(", d->part[part].part_name);
else
 #endif
printf(" raid%d%c(", raidframe[i].last_unit,
@@ -1094,9 +1096,11 @@
boot_part = 0;
 
*partition = boot_part;
 #ifndef NO_GPT
-   if (part_name && d->part[boot_part].part_name) {
+   if (part_name &&
+   d->part[boot_part].part_name &&
+   d->part[boot_part].part_name[0]) {
strlcpy(namebuf, d->part[boot_part].part_name,
BIOSDISK_PART_NAME_LEN);
*part_name = namebuf;
}


Re: No uefi install in VM

2019-12-13 Thread Martin Husemann
On Fri, Dec 13, 2019 at 03:26:07AM +0100, Emmanuel Dreyfus wrote:
> I still cannot reproduce it. I installed a VM from
> http://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-9/latest/images/NetBSD-9.0_RC1-a
> md64-uefi-install.img.gz
> 
> It does not suggests creating an EFI partition.

Did you boot it via EFI?

If you go to the shell you can check with

sysctl machdep.bootmethod

That is how sysinst knows it should create the EFI partition. I'll test
with -current localy, sounds like some things broke during the last month
while fixing things for other architectures.

Martin


Re: No uefi install in VM

2019-12-12 Thread Emmanuel Dreyfus
Martin Husemann  wrote:

> This one had been created manually and worked with old efiboot.
> Instructions would be: boot 9.0 RC1 installer uefi image, let sysinst
> install onto hard disk.

I still cannot reproduce it. I installed a VM from
http://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-9/latest/images/NetBSD-9.0_RC1-a
md64-uefi-install.img.gz

It does not suggests creating an EFI partition. I did it on my own and I
installed bootx64.efi from
ftp://ftp.fr.netbsd.org/pub/NetBSD-daily/HEAD/201912101800Z/amd64/binary/sets/ba
se.tar.xz


Here is the GPT:
   startsize  index  contents
   0   1 PMBR
   1   1 Pri GPT header
   2  32 Pri GPT table
  34  733117  1  GPT part - NetBSD FFSv1/FFSv2
 Type: ffs
 TypeID: 49f48d5a-b10e-11dc-b99b-0019d1879648
 GUID: 17993ec6-023c-4655-a2f3-b45b1a0294a9
 Size: 358 M
 Label:
 Attributes: biosboot
  733151   20480  2  GPT part - NetBSD swap
 Type: swap
 TypeID: 49f48d32-b10e-11dc-b99b-0019d1879648
 GUID: 7abf04af-2cff-450e-80c3-c8a54031b182
 Size: 10240 K
 Label:
 Attributes: None
  753631   65536  3  GPT part - EFI System
 Type: efi
 TypeID: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
 GUID: 8069df91-05be-4eca-8638-38cf5069fe64
 Size: 32768 K
 Label: efi
 Attributes: None
  819167  32 Sec GPT table
  819199   1 Sec GPT header  


The things passes botostrap, I just had to do to boot prompt at type consdev
com0,115200 (I use qemul -nographic) then I just typed boot. The kernel loads
and starts.

It crashes later, though. But that does not seems related to bootstrap (NB: qemu
croped lines over 80 characters):

[   1.000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 20,
[   1.000] 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, ,
[   1.000] 2018, 2019 The NetBSD Foundation, Inc.  All rights reserved.
[   1.000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.000] The Regents of the University of California.  All rights res.

[   1.000] NetBSD 9.0_RC1 (GENERIC) #0: Wed Dec 11 14:58:03 UTC 2019
[   1.000]  mkre...@mkrepro.netbsd.org:/usr/src/sys/arch/amd64/compile/GENEC
[   1.000] total memory = 252 MB
[   1.000] avail memory = 243 MB
[   1.000] rnd: seeded with 256 bits
[   1.000] running cgd selftest aes-xts-256 aes-xts-512 done
[   1.030] efi: systbl at pa fbee018
[   1.030] mainbus0 (root)
[   1.030] ACPI: RSDP 0x0FBFA014 24 (v02 BOCHS )
[   1.030] ACPI: XSDT 0x0FBF90E8 44 (v01 BOCHS  BXPCFACP 00)
[   1.030] ACPI: FACP 0x0FBF6000 74 (v01 BOCHS  BXPCFACP 00)
[   1.030] ACPI: DSDT 0x0FBF7000 00140B (v01 BOCHS  BXPCDSDT 00)
[   1.030] ACPI: FACS 0x0FBFD000 40
[   1.030] ACPI: APIC 0x0FBF5000 78 (v01 BOCHS  BXPCAPIC 00)
[   1.030] ACPI: HPET 0x0FBF4000 38 (v01 BOCHS  BXPCHPET 00)
[   1.030] ACPI: BGRT 0x0FBF3000 38 (v01 INTEL  EDK2 00)
[   1.030] ACPI: 1 ACPI AML tables successfully acquired and loaded
[   1.030] ioapic0 at mainbus0 apid 0
[   1.030] cpu0 at mainbus0 apid 0
[   1.030] uvm_fault(0x81585520, 0x8b4b21201000, 2) -> e
[   1.030] fatal page fault in supervisor mode
[   1.030] trap type 6 code 0x3 rip 0x802098ad cs 0x8 rflags 0x246 8
[   1.030] curlwp 0x8145ce20 pid 0.1 lowest kstack 0x818e420

db{0}> bt
pagezero() at netbsd:pagezero+0xd
cpu_svs_init() at netbsd:cpu_svs_init+0x30
cpu_attach() at netbsd:cpu_attach+0x1ac
config_attach_loc() at netbsd:config_attach_loc+0x199
config_found_sm_loc() at netbsd:config_found_sm_loc+0x48
mpacpi_config_cpu() at netbsd:mpacpi_config_cpu+0xb9
acpi_madt_walk() at netbsd:acpi_madt_walk+0x54
mpacpi_scan_apics() at netbsd:mpacpi_scan_apics+0x7c
mainbus_attach() at netbsd:mainbus_attach+0xd6
config_attach_loc() at netbsd:config_attach_loc+0x199
cpu_configure() at netbsd:cpu_configure+0x2b
main() at netbsd:main+0x2b8

Disabling ACPI with boot -2 does not fare better, it crashes at the same place
with a diffferent calling stacck:

pagezero() at netbsd:pagezero+0xd
cpu_svs_init() at netbsd:cpu_svs_init+0x30
cpu_attach() at netbsd:cpu_attach+0x1ac
config_attach_loc() at netbsd:config_attach_loc+0x199
config_found_sm_loc() at 

Re: No uefi install in VM

2019-12-12 Thread adr

Hello, there are problems with bootarm.efi also. The snapshot is
from yesterday. The kernel doesn't boot also with old bootarm.efi
or directly booting the ub version, I reported that to port-arm.

Regards,
adr.

===
U-Boot 2018.11nb4 (Dec 01 2019 - 17:38:21 +) Allwinner Technology

CPU:   Allwinner H3 (SUN8I 1680)
Model: Xunlong Orange Pi Lite
DRAM:  512 MiB
MMC:   SUNXI SD/MMC: 0
Loading Environment from FAT... *** Warning - bad CRC, using default 
environment


In:serial
Out:   serial
Err:   serial
Net:   No ethernet found.
starting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
USB2:   USB EHCI 1.00
USB3:   USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 2 for devices... 1 USB Device(s) found
   scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0 switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
201 bytes read in 3 ms (65.4 KiB/s)
## Executing script at 4310
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
27690 bytes read in 11 ms (2.4 MiB/s)
Found EFI removable media binary efi/boot/bootarm.efi
Scanning disks on usb...
Disk usb0 not ready
Disk usb1 not ready
Disk usb2 not ready
Disk usb3 not ready
Scanning disks on mmc...
MMC Device 1 not found
MMC Device 2 not found
MMC Device 3 not found
Found 3 disks
181376 bytes read in 13 ms (13.3 Mib/s)
## Starting EFI application at 4200 ...


Re: No uefi install in VM

2019-12-12 Thread Ron Georgia
I did install 9.0_RC1 on a bare metal machine accepting all the 
defaults, and it boots fine with UEFI.


On 12/12/19 5:00 AM, Chavdar Ivanov wrote:

I can confirm - in the case of yesterday's -current - that there is
nothing wrong with the efi/gpt installation procedure and the problem
is with the two .efi files. On VirtualBox I attached the new 'bad'
disk to the working EFI NetBSD instance, renamed the 'boot' folder in
the FAT partition to 'boot.bad'. created 'boot' folder and placed
there the working .efi files. This resulted in perfectly bootable new
NetBSD vm. For comparison:
...
./boot:
total 420
-r-xr-xr-x  1 root  wheel  217139 Dec 12 09:48 bootia32.efi
-r-xr-xr-x  1 root  wheel  205820 Dec 12 09:48 bootx64.efi

./boot.bad:
total 448
-r-xr-xr-x  1 root  wheel  234874 Dec 11 21:34 bootia32.efi
-r-xr-xr-x  1 root  wheel  220293 Dec 11 21:34 bootx64.efi

...

The 'bad' ones are a little bigger, created yesterday under -current
build. The good ones were from sometimes in July this year.

Chavdar


On Thu, 12 Dec 2019 at 08:33, Martin Husemann  wrote:

On Thu, Dec 12, 2019 at 09:10:57AM +0100, Emmanuel Dreyfus wrote:

Martin Husemann  wrote:


Emmanuel, could you please have a look?

I do not reproduce that one. Can you share the exact commands to build
the testbed?

This one had been created manually and worked with old efiboot.
Instructions would be: boot 9.0 RC1 installer uefi image, let sysinst
install onto hard disk.

But maybe the details below help you spot something.

Martin


# gpt show -a wd0
  start  size  index  contents
  0 1 PMBR
  1 1 Pri GPT header
  232 Pri GPT table
 3430 Unused
 64262144  1  GPT part - Windows basic data
  Type: windows
  TypeID: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
  GUID: e4c1b47a-0e33-4800-acd5-8755f42eeabd
  Size: 128 M
  Label:
  Attributes: None
 26220864 Unused
 262272  45875133  2  GPT part - NetBSD FFSv1/FFSv2
  Type: ffs
  TypeID: 49f48d5a-b10e-11dc-b99b-0019d1879648
  GUID: 7878519c-4b35-427a-9e89-7b68cfd96920
  Size: 22400 M
  Label:
  Attributes: biosboot, bootme
   46137405 3 Unused
   46137408  16777119  3  GPT part - NetBSD swap
  Type: swap
  TypeID: 49f48d32-b10e-11dc-b99b-0019d1879648
  GUID: 6173740a-d903-4c13-84a3-ad7b516bd5ce
  Size: 8192 M
  Label:
  Attributes: None
   6291452732 Sec GPT table
   62914559 1 Sec GPT header
# dkctl wd0 listwedges
/dev/rwd0: 3 wedges:
dk0: e4c1b47a-0e33-4800-acd5-8755f42eeabd, 262144 blocks at 64, type: ntfs
dk1: 7878519c-4b35-427a-9e89-7b68cfd96920, 45875133 blocks at 262272, type: ffs
dk2: 6173740a-d903-4c13-84a3-ad7b516bd5ce, 16777119 blocks at 46137408, type: 
swap
# moutnt /dev/dk1 /mnt
# ls -l /mnt/netbsd
-rwxr-xr-x  1 root  wheel  26214320 Jul 14 21:37 /mnt/netbsd




--
90% of my problems are due to ignorance, the other 10% is because I just don't 
know any better.



Re: No uefi install in VM

2019-12-12 Thread Chavdar Ivanov
I can confirm - in the case of yesterday's -current - that there is
nothing wrong with the efi/gpt installation procedure and the problem
is with the two .efi files. On VirtualBox I attached the new 'bad'
disk to the working EFI NetBSD instance, renamed the 'boot' folder in
the FAT partition to 'boot.bad'. created 'boot' folder and placed
there the working .efi files. This resulted in perfectly bootable new
NetBSD vm. For comparison:
...
./boot:
total 420
-r-xr-xr-x  1 root  wheel  217139 Dec 12 09:48 bootia32.efi
-r-xr-xr-x  1 root  wheel  205820 Dec 12 09:48 bootx64.efi

./boot.bad:
total 448
-r-xr-xr-x  1 root  wheel  234874 Dec 11 21:34 bootia32.efi
-r-xr-xr-x  1 root  wheel  220293 Dec 11 21:34 bootx64.efi

...

The 'bad' ones are a little bigger, created yesterday under -current
build. The good ones were from sometimes in July this year.

Chavdar


On Thu, 12 Dec 2019 at 08:33, Martin Husemann  wrote:
>
> On Thu, Dec 12, 2019 at 09:10:57AM +0100, Emmanuel Dreyfus wrote:
> > Martin Husemann  wrote:
> >
> > > Emmanuel, could you please have a look?
> >
> > I do not reproduce that one. Can you share the exact commands to build
> > the testbed?
>
> This one had been created manually and worked with old efiboot.
> Instructions would be: boot 9.0 RC1 installer uefi image, let sysinst
> install onto hard disk.
>
> But maybe the details below help you spot something.
>
> Martin
>
>
> # gpt show -a wd0
>  start  size  index  contents
>  0 1 PMBR
>  1 1 Pri GPT header
>  232 Pri GPT table
> 3430 Unused
> 64262144  1  GPT part - Windows basic data
>  Type: windows
>  TypeID: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
>  GUID: e4c1b47a-0e33-4800-acd5-8755f42eeabd
>  Size: 128 M
>  Label:
>  Attributes: None
> 26220864 Unused
> 262272  45875133  2  GPT part - NetBSD FFSv1/FFSv2
>  Type: ffs
>  TypeID: 49f48d5a-b10e-11dc-b99b-0019d1879648
>  GUID: 7878519c-4b35-427a-9e89-7b68cfd96920
>  Size: 22400 M
>  Label:
>  Attributes: biosboot, bootme
>   46137405 3 Unused
>   46137408  16777119  3  GPT part - NetBSD swap
>  Type: swap
>  TypeID: 49f48d32-b10e-11dc-b99b-0019d1879648
>  GUID: 6173740a-d903-4c13-84a3-ad7b516bd5ce
>  Size: 8192 M
>  Label:
>  Attributes: None
>   6291452732 Sec GPT table
>   62914559 1 Sec GPT header
> # dkctl wd0 listwedges
> /dev/rwd0: 3 wedges:
> dk0: e4c1b47a-0e33-4800-acd5-8755f42eeabd, 262144 blocks at 64, type: ntfs
> dk1: 7878519c-4b35-427a-9e89-7b68cfd96920, 45875133 blocks at 262272, type: 
> ffs
> dk2: 6173740a-d903-4c13-84a3-ad7b516bd5ce, 16777119 blocks at 46137408, type: 
> swap
> # moutnt /dev/dk1 /mnt
> # ls -l /mnt/netbsd
> -rwxr-xr-x  1 root  wheel  26214320 Jul 14 21:37 /mnt/netbsd
>


-- 



Re: No uefi install in VM

2019-12-12 Thread Martin Husemann
On Thu, Dec 12, 2019 at 09:10:57AM +0100, Emmanuel Dreyfus wrote:
> Martin Husemann  wrote:
> 
> > Emmanuel, could you please have a look?
> 
> I do not reproduce that one. Can you share the exact commands to build
> the testbed?

This one had been created manually and worked with old efiboot.
Instructions would be: boot 9.0 RC1 installer uefi image, let sysinst
install onto hard disk.

But maybe the details below help you spot something.

Martin


# gpt show -a wd0
 start  size  index  contents
 0 1 PMBR
 1 1 Pri GPT header
 232 Pri GPT table
3430 Unused
64262144  1  GPT part - Windows basic data
 Type: windows
 TypeID: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
 GUID: e4c1b47a-0e33-4800-acd5-8755f42eeabd
 Size: 128 M
 Label: 
 Attributes: None
26220864 Unused
262272  45875133  2  GPT part - NetBSD FFSv1/FFSv2
 Type: ffs
 TypeID: 49f48d5a-b10e-11dc-b99b-0019d1879648
 GUID: 7878519c-4b35-427a-9e89-7b68cfd96920
 Size: 22400 M
 Label: 
 Attributes: biosboot, bootme
  46137405 3 Unused
  46137408  16777119  3  GPT part - NetBSD swap
 Type: swap
 TypeID: 49f48d32-b10e-11dc-b99b-0019d1879648
 GUID: 6173740a-d903-4c13-84a3-ad7b516bd5ce
 Size: 8192 M
 Label: 
 Attributes: None
  6291452732 Sec GPT table
  62914559 1 Sec GPT header
# dkctl wd0 listwedges
/dev/rwd0: 3 wedges:
dk0: e4c1b47a-0e33-4800-acd5-8755f42eeabd, 262144 blocks at 64, type: ntfs
dk1: 7878519c-4b35-427a-9e89-7b68cfd96920, 45875133 blocks at 262272, type: ffs
dk2: 6173740a-d903-4c13-84a3-ad7b516bd5ce, 16777119 blocks at 46137408, type: 
swap
# moutnt /dev/dk1 /mnt
# ls -l /mnt/netbsd
-rwxr-xr-x  1 root  wheel  26214320 Jul 14 21:37 /mnt/netbsd



Re: No uefi install in VM

2019-12-12 Thread Emmanuel Dreyfus
Martin Husemann  wrote:

> Emmanuel, could you please have a look?

I do not reproduce that one. Can you share the exact commands to build
the testbed?



-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
m...@netbsd.org


Re: No uefi install in VM

2019-12-11 Thread Martin Husemann
On Thu, Dec 12, 2019 at 07:54:08AM +0100, Martin Husemann wrote:
> On Wed, Dec 11, 2019 at 10:30:44PM +, Chavdar Ivanov wrote:
> > in efi with gpt; it performs the installation lege artis, but then the
> > boot fails - the efi file tries and fails to find netbsd, nebsd.gz,
> > onetbsd etc...
> 
> That sounds like a regression in bootx64.efi, checking

Yes, it is. I took a bootable UEFI installation (in VirtualBox) and replaced
the efi/boot/*.efi files on the MSDOS/EFI partition with the ones from
the latest netbsd-9 build and it stopped booting as you describe.

Disk layout is GPT on wd0, three partitions (one EFI, one NetBSD FFS and one
NetBSD swap), /netbsd on the FFS one is supposed to be booted.

bootx64.efi starts and shows its countdown and then goes into a loop like:

booting NAME=:netbsd - starting in 0 seconds.
open netbsd: No such file or directory
[..]
booting NAME=:onetbsd - staring in 0 seconds.
open onetbsd: No such file or directory
[..]

Same failure with latest HEAD bootx64.efi.


Emmanuel, could you please have a look?




Re: No uefi install in VM

2019-12-11 Thread Martin Husemann
On Wed, Dec 11, 2019 at 10:30:44PM +, Chavdar Ivanov wrote:
> in efi with gpt; it performs the installation lege artis, but then the
> boot fails - the efi file tries and fails to find netbsd, nebsd.gz,
> onetbsd etc...

That sounds like a regression in bootx64.efi, checking

Martin


Re: No uefi install in VM

2019-12-11 Thread Chavdar Ivanov
Just to confirm the same. I still have a NetBSD EFI VirttualBox guest
working just fine, built around 9.99.10 or thereabouts, perhaps
following the manual installation procedure mentioned above. Upon
seeng this thread, I tried to test the installation of a fresh 9.99.21
in efi with gpt; it performs the installation lege artis, but then the
boot fails - the efi file tries and fails to find netbsd, nebsd.gz,
onetbsd etc...

I've kept the log and the generated .sh script, if they are of interest.

On Wed, 11 Dec 2019 at 18:36, Martin Husemann  wrote:
>
> On Wed, Dec 11, 2019 at 01:34:27PM -0500, Ron Georgia wrote:
> > Thanks for responding Martin. Actually I did both. Selecting GPT did set
> > things up but it does not boot.
>
> OK, it worked for me when I tried last (but that is a bit ago).
>
> Does the UEFI offer the installed drive as a bootable target?
> How far does the boot get?
>
> Martin



-- 



Re: No uefi install in VM

2019-12-11 Thread Martin Husemann
On Wed, Dec 11, 2019 at 01:34:27PM -0500, Ron Georgia wrote:
> Thanks for responding Martin. Actually I did both. Selecting GPT did set
> things up but it does not boot.

OK, it worked for me when I tried last (but that is a bit ago).

Does the UEFI offer the installed drive as a bootable target?
How far does the boot get?

Martin


Re: No uefi install in VM

2019-12-11 Thread Ron Georgia
Thanks for responding Martin. Actually I did both. Selecting GPT did set 
things up but it does not boot.


On 12/11/19 1:31 PM, Martin Husemann wrote:

On Wed, Dec 11, 2019 at 01:28:31PM -0500, Ron Georgia wrote:

I installed NetBSD 9.0_RC1 as a guest on VirtualBox 5.2.34 r133883 with
GhostBSD as a host. I enabled EFI and booted from the iso image. I did
follow the "instructions" on creating a gpt partition for efi

I guess you followed the wiki page for NetBSD 8?

With 9.0 you should not need to do anyhthing special, the installer knows
about EFI and GPT. If you boot the install system via UEFI it will
automatically create an EFI boot setup.


Martin


--
90% of my problems are due to ignorance, the other 10% is because I just don't 
know any better.



Re: No uefi install in VM

2019-12-11 Thread Martin Husemann
On Wed, Dec 11, 2019 at 01:28:31PM -0500, Ron Georgia wrote:
> I installed NetBSD 9.0_RC1 as a guest on VirtualBox 5.2.34 r133883 with
> GhostBSD as a host. I enabled EFI and booted from the iso image. I did
> follow the "instructions" on creating a gpt partition for efi

I guess you followed the wiki page for NetBSD 8?

With 9.0 you should not need to do anyhthing special, the installer knows
about EFI and GPT. If you boot the install system via UEFI it will 
automatically create an EFI boot setup.


Martin


No uefi install in VM

2019-12-11 Thread Ron Georgia
This feels like this question has been asked before, but I could not 
find what I was looking for in the mailing list archives.


I installed NetBSD 9.0_RC1 as a guest on VirtualBox 5.2.34 r133883 with 
GhostBSD as a host. I enabled EFI and booted from the iso image. I did 
follow the "instructions" on creating a gpt partition for efi; however, 
when I exit to the menu and point the install target to dk1 (labeled 
NetBSD) it just returns me to the menu.


I was able to install with mbr and legacy "bios."

If I install allowing the gpt option to create the EFI boot it fails to 
boot with:


mem[0x0 ... vbox> 0x11]


>> NetBSD/x86 EFI Boot (x64), Revision 1.1...

>> Memory: 640/3684184 k

Press return to boot now, any other key for boot menu

booting Name: netbsd - starting in 0 seconds.

open netbsd: No such file or directory

...

> ls

The ls command is not currently supported for dosfs

>

If I boot from the iso image again and exit to the prompt I see this:

# gpt show wd0

start size index contents

0 1 PMBR

1 1 Pri GPT header

2 32 Unused

64 262144 1 GPT part - Windows basic data

...

# dkctl wd0 listwedges

dk0: some-dashed-number, 262144 blocks at 64, type: ntfs

dk1: some-dashed-number, blah, type: ffs

dk2: some-dashed-number, blah, type: swap

I am sure I am doing something wrong or am not understanding something 
correctly. Perhaps a friendly pointer, or a link to help me on my way?


--
90% of my problems are due to ignorance, the other 10% is because I just don't 
know any better.