NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Regression in 10.x installer



On 2023-08-14 16:11, RVP wrote:
On Mon, 14 Aug 2023, salquest%duck.com@localhost wrote:

Previous output was for the NetBSD 10.0 beta installer. This is for the HEAD installer, whose behavior is the same.


I made some notes last year which should help you install NetBSD+UEFI with
pre-existing partitions on the disk. The procedure is pretty easy:


1. Very important: In main "EFI System" partition, move the \EFI\Boot\ dir.
   out of the way.

sysinst _will_ overwrite the BOOT*.EFI files in there. (I've got some
   local patches which fix this, but that's on my home machine.)

2. Create partitions for NetBSD using gpt(8).

Typically 3: a new EFI partition (any kind of FAT filesystem will do) to hold the NetBSD BOOT*.EFI files; a FFS partition for "/"; and finally a
   NetBSD swap partition.

In `sysinst` now:

3. First, jump into the "Utility menu" and turn-on both "Logging" and "Scripting". This creates 2 files: /tmp/sysinst.log and /tmp/sysinst.sh which you can look
   at for debugging issues.


Thanks a lot. This was very helpful.
It looks like for UEFI installation, it executes “gpt -rq header <disk>” command. I did not find logs of any other command both when I selected the whole disk, and when I selected a particular wedge.

So, when I select the whole disk, it was:
“gpt -rq header wd0”
And when I selected dk1 wedge, it was:
“gpt -rq header dk1"


4. In the "NetBSD-10.0_BETA Install System" main-menu, select
   a: Install NetBSD to hard disk.

5. In the "Available disks" menu, select the _ whole disk_ device: wd0, sd1,
   ld0, etc. Ie. _do not_ choose any `Preconfigured "wedges"'.


I think this bug no longer exists in the sysinst where selecting preselected wedge fails. However, there is another bug. With NetBSD 10.x installer, when we select the whole disk, say wd0, it removes all wedges except the EFI system partition from the output of “dkctl wd0 listwedges”. I see these errors logs scroll on the screen - removing dk2, etc. And from that point onwards, the installer is practically unusable, because “dkctl wd0 listwedges” shows only EFI partition, and the installer offers only the system EFI partition as an option to install NetBSD.

6. After choosing the disk to install onto, select:
   a: Use existing GPT partitions

7. Now you'll get a list of the existing GPT partitions on the disk.
This list is slightly confusing the first time you do this (and sysinst doesn't make things easier by marking multiple FFS partitions as "/"), but
   go through it one by one and

   a) remove the "install" and "mount" flags, and
   b) set the "mount point" to "none"

for each of the partitions which sysinst got "wrong". Then, for the NetBSD FFS partitions(s) you want sysinst to work on, set the "install", "newfs" (if you want that done) and "mount" flags to "yes" and also set the "mount
   point" ("/", "/usr", etc.)

8. Choose "Partition sizes OK" when done.


Again, this bug no longer exists where we needed to manually configure these flags. But, there is other issue now. It either does not select any partition, or selects the NetBSD partition with only ‘install’ flag with mount-point “/". It also selects the EFI system partition as EFI. However, when I configure the NetBSD partition with “newfs” and “boot”, and “okay” the partition changes, it shows me the same install menu again asking me to choose the disk to install NetBSD on. Even when I accept the default partition setting, the behavior is the same.

Utility menu’s sysinst logs offers a hint though. I think it does "gpt -rq header dk1” when we select a preselected wedge dk1. The output of this command is “GPT header not found”, which makes sense because it’s a wedge and not a disk. So, I think the installer treats this as an error, and gives up trying to install NetBSD on that wedge.


Do the rest of the install as usual. After the install is finished, move the sysinst-written \EFI\Boot\BOOT*.EFI files from the System EFI partition to a) the NetBSD EFI partition, or b) a different dir. on the System EFI partn. Then tell your BIOS where the NetBSD *.EFI files are to get a boot menu.

Do we need to create a separate EFI partition for NetBSD? Can we get away by using the EFI system partition? If sysinst is copying BOOTx64.EFI to the EFI system partition, it is correctly recognizing the partition, right?


HTH,
-RVP


Home | Main Index | Thread Index | Old Index