Re: NetBSD 9.3 UEFI installation help

2022-12-01 Thread RVP

On Thu, 1 Dec 2022, Mayuresh wrote:


Something like this boots:
set root=(hd0,gpt1)
knetbsd /netbsd --root=dk5
boot

But it says

error: no suitable video mode found
Booting in blind mode



I don't usually boot NetBSD via grub, but, this worked:

---
$ cat /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 'NetBSD-HEAD' --class netbsd --class bsd --class os --id 'netbsd' {
gfxmode 1366x768
insmod part_gpt
insmod efi_gop
insmod gfxterm
set gfxpayload=keep
insmod ufs2
set root=(hd0,gpt10)
knetbsd /netbsd
boot
}
$ sudo update-grub
---

You may have load a different module for VESA, and change the resolution.

-RVP


Re: NetBSD 9.3 UEFI installation help

2022-12-01 Thread Mayuresh
On Thu, Dec 01, 2022 at 11:26:09PM +0530, Mayuresh wrote:

Some more details of what various installation options lead to:


1. By choosing Available disks as "wd0" -> Use existing GPT partitions

This leads to error

/sbin/mount -tmsdos /dev/dk1 /targetrootSYSTEM
mount: realpath `/targetrootSYSTEM': No such file or directory


If I try mounting /dev/dk1 (EFI partition) using shell prompt
mount: cannot open `dev/dk1': Operation not supported by device


2. By choosing Extended partitioning:

wd0
dk0 on SYSTEM (MSDOS) (unused) UNCHANGED
...
dk5 on /  (FFSv2) (unused) 444G
sd0
dk9 on / (FFS) (unused) 1420M

This leads to installation being written to the installation medium itself
(/dev/dk9)

I am not sure what the mount point has to be. I think can't be the same
for /dev/dk5 and /dev/dk9.


3. By choosing the target partition by UUID:

The installer just ends without any message.

The uuids do not always appear. Sometimes they appear sometimes they
don't.

-- 
Mayuresh


Re: NetBSD 9.3 UEFI installation help

2022-12-01 Thread Mayuresh
On Thu, Dec 01, 2022 at 06:50:41PM +0100, Martin Husemann wrote:
> On Thu, Dec 01, 2022 at 11:13:07PM +0530, Mayuresh wrote:
> > But it says
> > 
> > error: no suitable video mode found
> > Booting in blind mode
> 
> That is a message from grub, not from any part of NetBSD.

Yes, but nothing appears on the screen after that. Not sure how to boot.

-- 
Mayuresh


Re: NetBSD 9.3 UEFI installation help

2022-12-01 Thread Martin Husemann
On Thu, Dec 01, 2022 at 11:13:07PM +0530, Mayuresh wrote:
> But it says
> 
> error: no suitable video mode found
> Booting in blind mode

That is a message from grub, not from any part of NetBSD.

Martin


Re: NetBSD 9.3 UEFI installation help

2022-12-01 Thread Mayuresh
On Thu, Dec 01, 2022 at 11:00:24PM +0530, Mayuresh wrote:
> Any pointers would be of great help.

Something like this boots:
set root=(hd0,gpt1)
knetbsd /netbsd --root=dk5
boot

But it says

error: no suitable video mode found
Booting in blind mode

Please advise.
-- 
Mayuresh


Re: NetBSD 9.3 UEFI installation help

2022-12-01 Thread Mayuresh
On Thu, Dec 01, 2022 at 03:25:25PM +0100, Martin Husemann wrote:
> Better use a 9.3_STABLE version from
> https://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-9/latest/

I am trying:
https://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-9/202211301400Z/images/NetBSD-9.3_STABLE-amd64-install.img.gz

The installation went past the errors I was facing.

Now to make a grub entry I am using update-grub on Linux, but it is not
finding NetBSD though it is able to find Windows. I can make an entry
manually, but could not find a documentation of how to do it with grub2
for netbsd. (Documentation mostly seems to be available for grub 1 ).

Any pointers would be of great help.

-- 
Mayuresh


Re: NetBSD 9.3 UEFI installation help

2022-12-01 Thread Martin Husemann
On Thu, Dec 01, 2022 at 07:31:21PM +0530, Mayuresh wrote:
> How about using sysinst installer from current and installing sets from
> 9.3 distribution? Is this something workable?

Better use a 9.3_STABLE version from
https://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-9/latest/

This has all the fixes done so far to the installer. The version
in -current has additional changes that do not work with a netbsd-9
userland (e.g. extended attribute related filesystem format changes).

Martin


Re: NetBSD 9.3 UEFI installation help

2022-12-01 Thread Mayuresh
On Wed, Nov 30, 2022 at 09:42:40PM +0530, Mayuresh wrote:
> On installation image I also notice /sysinst.core. So may be the installer
> did not do some things.

How about using sysinst installer from current and installing sets from
9.3 distribution? Is this something workable?

-- 
Mayuresh


Re: NetBSD 9.3 UEFI installation help

2022-11-30 Thread Mayuresh
On Wed, Nov 30, 2022 at 09:38:48PM +0530, Mayuresh wrote:
> Since there are 3 OSes and the paths are not indicative I wonder which one
> is which and is one of them installed by NetBSD.

On NetBSD installation image I see this file with size 223912. So above
files (mentioned in my last post) were possibly of Windows and Linux.

On installation image I also notice /sysinst.core. So may be the installer
did not do some things.

-- 
Mayuresh


Re: NetBSD 9.3 UEFI installation help

2022-11-30 Thread Mayuresh
On Wed, Nov 30, 2022 at 04:52:05PM +0100, Martin Husemann wrote:
> The NetBSD bootloader (bootx64.efi) should have been copied to
> EFI/BOOT/ in the ESP, but no UEFI variables will be created.

I can see 2 files by that name:

/EFI/Boot/BOOTX64.EFI of size 546446
/EFI/EFI/BOOT/BOOTX64.EFI of size 5516546

Since there are 3 OSes and the paths are not indicative I wonder which one
is which and is one of them installed by NetBSD.

> If you use grub or something like that, you may have to add it to the
> menu configuration.

I can boot Linux using grub, but I could not find grub2 commands for
NetBSD. E.g. kernel --type=netbsd etc does not work on grub2.

-- 
Mayuresh


Re: NetBSD 9.3 UEFI installation help

2022-11-30 Thread Martin Husemann
On Wed, Nov 30, 2022 at 09:17:22PM +0530, Mayuresh wrote:
> /dev/sda1 is EFI partition. There is Windows on /dev/sda3 and Linux on
> /dev/sda6.
> 
> NetBSD is on what appears as /dev/sda8 here (ignore its type above, above
> is a snapshot before NetBSD was installed). It appeared as /dev/dk7 with
> some UUID on NetBSD. When retrying installation I am selecting it using
> the UUID.

How do you boot this? Any bootselector or via the UEFI boot menu?

The NetBSD bootloader (bootx64.efi) should have been copied to
EFI/BOOT/ in the ESP, but no UEFI variables will be created.

If you use grub or something like that, you may have to add it to the
menu configuration.

Martin


Re: NetBSD 9.3 UEFI installation help

2022-11-30 Thread Mayuresh
On Wed, Nov 30, 2022 at 04:36:19PM +0100, Martin Husemann wrote:
> Do you have other partitions on that disk or did you select a full disk for
> NetBSD type of installation?

This is taken from Linux:


Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: TOSHIBA MQ04ABF1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt 
Disk identifier: A100F8AB-A255-4EDF-99DD-F26E1788A3A2

Device  StartEnd   Sectors   Size Type
/dev/sda12048 534527532480   260M EFI System
/dev/sda2  534528 567295 3276816M Microsoft reserved
/dev/sda3  567296  102968718 102401423  48.8G Microsoft basic data
/dev/sda4  1951475712 1953114111   1638400   800M Windows recovery 
environment
/dev/sda5  1953114112 1953523711409600   200M Windows recovery 
environment
/dev/sda6   102968719 1004089343 901120625 429.7G Linux filesystem
/dev/sda7  1004089344 1020473343  16384000   7.8G Linux swap
/dev/sda8  1020473344 1951475711 931002368 443.9G Linux filesystem

Partition table entries are not in disk order.

/dev/sda1 is EFI partition. There is Windows on /dev/sda3 and Linux on
/dev/sda6.

NetBSD is on what appears as /dev/sda8 here (ignore its type above, above
is a snapshot before NetBSD was installed). It appeared as /dev/dk7 with
some UUID on NetBSD. When retrying installation I am selecting it using
the UUID.

-- 
Mayuresh



Re: NetBSD 9.3 UEFI installation help

2022-11-30 Thread Martin Husemann
On Wed, Nov 30, 2022 at 08:59:36PM +0530, Mayuresh wrote:
> I don't find uefi image for NetBSD 9.3 amd64 I assume the release image is
> already the integrated one.

Yes, there is a common image now that should work on all "newer" machines
in either BIOS or UEFI boot mode.

> I did the installation on a partition on a laptop, but did not notice
> anything copied to the efi partition or any menu appearing for netbsd.

I don't understand what you mean here, please give more details.
Normally this results in a bootable disk with ESP boot partition and the
bootloader in it.

Do you have other partitions on that disk or did you select a full disk for
NetBSD type of installation?

Martin