Re: NetBSD install experiences

2020-05-14 Thread Greg Troxel
Martin Husemann  writes:

> On Thu, May 14, 2020 at 06:04:48AM +, Jan Icetrov wrote:
>> Autoconfigure is also strange with wired connections. It doesn't let you
>> choose hostname or disable ipv6, which in turn makes pkgin install
>> impossible if you have ipv6 on your LAN but ipv4 only uplink.
>
> That sounds more like a bug in pkgin to me. How does it fail? Can you
> file a PR?

Agreed this sounds like a bug, or at least failure to cope gracefully
with a strange situation.

@janicetr: In the bug report, be very clear about what "have ipv6 on
your LAN" means.  I think it's irregular to have global IPv6 addresses
configured and in particular RAs if connectivity does not work.

However, there is enough broken routing in the internet that all
programs need to either 1) try each address in sequence, moving on the
next on fialure or 2) do full-blown happy eyeballs.


Re: NetBSD install experiences

2020-05-14 Thread Martin Husemann
On Thu, May 14, 2020 at 10:00:14AM +, Thomas Mueller wrote:
> It seems that setting up a wireless connection with ifconfig and
> wpa_supplicant is much simpler in FreeBSD than in NetBSD; not sure
> about Linux.

I would say there is no difference, but I'd like to avoid needing the
shell here at all.

Martin


Re: NetBSD install experiences

2020-05-14 Thread Thomas Mueller
> On Wed, May 13, 2020 at 01:23:59PM -0700, Salil Wadnerkar wrote:
> > I also want to raise one issue about the install.
> > When we try to configure networking, it lets us choose the interface and
> > when we select wireless interface, asks us to choose autoconfigure, or
> > configure everything manually. In autoconfigure, it doesn't even ask which
> > wireless network I want to connect to, and what's the WPA passphrase.

> Yes, wireless network setup is not existent in the installer, it needs
> to be done by escaping to the shell and preparing things manualy before
> returning to sysinst.

> It is on the TODO list...

> Martin

My experience with sysinst was that the shell was a very limited, rudimentary 
version of sh.

You would pretty much need to know all the things you need to do to configure 
the wireless interface before going into a sysinst install.

It seems that setting up a wireless connection with ifconfig and wpa_supplicant 
is much simpler in FreeBSD than in NetBSD; not sure about Linux.

Tom



Re: NetBSD install experiences

2020-05-14 Thread Martin Husemann
On Thu, May 14, 2020 at 06:04:48AM +, Jan Icetrov wrote:
> Autoconfigure is also strange with wired connections. It doesn't let you
> choose hostname or disable ipv6, which in turn makes pkgin install
> impossible if you have ipv6 on your LAN but ipv4 only uplink.

That sounds more like a bug in pkgin to me. How does it fail? Can you
file a PR?

Martin


Re: NetBSD install experiences

2020-05-14 Thread Jan Icetrov
Autoconfigure is also strange with wired connections. It doesn't let you 
choose hostname or disable ipv6, which in turn makes pkgin install 
impossible if you have ipv6 on your LAN but ipv4 only uplink.


Best regards:

Jan.

-- Original Message --
From: "Salil Wadnerkar" 
To: "Martin Husemann" 
Cc: "Rhialto" ; "Robert Nestor" ; 
"NetBSD Users" 

Sent: 2020. 05. 13. 22:23:59
Subject: Re: NetBSD install experiences

I also want to raise one issue about the install.
When we try to configure networking, it lets us choose the interface and 
when we select wireless interface, asks us to choose autoconfigure, or 
configure everything manually. In autoconfigure, it doesn't even ask 
which wireless network I want to connect to, and what's the WPA 
passphrase. I would expect it to let me select this, and ask me whether 
to use DHCP or not, and if not DHCP, ask me to manually configure 
gateway ip address, etc.

If I don't select autoconfigure, I have to specify all the details.

On Wed, May 13, 2020, 12:17 PM Martin Husemann  
wrote:

On Wed, May 13, 2020 at 08:59:44PM +0200, Rhialto wrote:
> On the other hand, when you're doing an update, I had to guess 
whether I
> should select the GPT partition that was my root partition, or the 
whole
> disk. I guessed the root partition and apparently that was correct 
:-)


I think both work typically - it extracts /etc/fstab from that 
partition

and uses the mounts in there.

You also can select "currently running system" now to do an in-place
update (especially when you are on a release branch, to be used with
extreme care when in -current).

Martin

Re: NetBSD install experiences

2020-05-13 Thread Martin Husemann
On Wed, May 13, 2020 at 01:23:59PM -0700, Salil Wadnerkar wrote:
> I also want to raise one issue about the install.
> When we try to configure networking, it lets us choose the interface and
> when we select wireless interface, asks us to choose autoconfigure, or
> configure everything manually. In autoconfigure, it doesn't even ask which
> wireless network I want to connect to, and what's the WPA passphrase.

Yes, wireless network setup is not existent in the installer, it needs
to be done by escaping to the shell and preparing things manualy before
returning to sysinst.

It is on the TODO list...

Martin


Re: NetBSD install experiences

2020-05-13 Thread Clay Daniels
My biggest issue with installing NetBSD, or any other BSD, has been with my
own understanding (or misunderstanding) of partition tables, and MBR vs
GPT. The second biggest issue is the BIOS & the age of the computer.

UEFI uses the GPT partition table and is the so called "modern way", mainly
because it will address disk drives larger than 2TB. My entry into anything
beyond Microsoft Windows was learning how to dual boot with Linux. Linux is
very sly and uses GRUB to piggy-back on Windows EFI partition. In my
dual-booting I migrated to using Rod Smith's rEFInd boot manager, which
installs, like GRUB, in among other places, the MS Windows EFI partition.
When I got bored with Linux, I moved on to BSD. BSD has deeper roots, and
can use MBR or GPT, but each disk must only have one partition table. You
can't have a GPT partition on a MBR drive, you have to decide on the
partition table before you can apply individual partitions.

With my older 2014 HP Pavilion, dual-booting meant using a single disk, so
I stuck with UEFI & GPT. However, I built me a nice Ryzen7 3700X machine
from parts I ordered at Newegg last September 2019. I have a 2TB spinning
disk, and a nice little 951GB M2 SSD (twice the size of my old 2014
machine). So now I have a lot more choices.

The first BSD I got to successfully run was FreeBSD. I've been doing that
since the middle of last summer, first on older machine, then on the new.
FreeBSD works well with GPT, and that keeps me busy running FreeBSD 13.0
Current with a new snapshot installed most every Thursday. But with all the
extra space I started working on NetBSD & OpenBSD. I have really been
impressed with NetBSD 9.0. I have it running on a MBR install on the entire
disk of the older machine. Works great. I have tried putting it on the M2
SSD of the newer machine, and it works there but I'm unable to load X
windows with MBR, and I can't seem to get the installer to install it as
GPT.

There is something I found out only recently. Not sure why it took me so
long:
MBR writes a partition table at the beginning of the drive, but GPT writes
a partition table to the beginning AND the end of the drive. So if you just
clear the first 512 bytes of a GPT drive and then write a MBR partition
table, the old GPT backup table at the end of the drive is still there,
unless you deliberately delete it.

All in all I've been enjoying this thread, and continue to learn from it.

Clay


Re: NetBSD install experiences

2020-05-13 Thread Salil Wadnerkar
I also want to raise one issue about the install.
When we try to configure networking, it lets us choose the interface and
when we select wireless interface, asks us to choose autoconfigure, or
configure everything manually. In autoconfigure, it doesn't even ask which
wireless network I want to connect to, and what's the WPA passphrase. I
would expect it to let me select this, and ask me whether to use DHCP or
not, and if not DHCP, ask me to manually configure gateway ip address, etc.
If I don't select autoconfigure, I have to specify all the details.

On Wed, May 13, 2020, 12:17 PM Martin Husemann  wrote:

> On Wed, May 13, 2020 at 08:59:44PM +0200, Rhialto wrote:
> > On the other hand, when you're doing an update, I had to guess whether I
> > should select the GPT partition that was my root partition, or the whole
> > disk. I guessed the root partition and apparently that was correct :-)
>
> I think both work typically - it extracts /etc/fstab from that partition
> and uses the mounts in there.
>
> You also can select "currently running system" now to do an in-place
> update (especially when you are on a release branch, to be used with
> extreme care when in -current).
>
> Martin
>


Re: NetBSD install experiences

2020-05-13 Thread Riccardo Mottola
Hi,


Torbjörn Granlund wrote:
> Please consider working on the NetBSD install experience!  Now even I,
> who is far from a newbie and have tons of patience, consider giving up.
> If this had been my first experience with NetBSD, I would have given up
> long before I had arrived to ISSUE 5, I'm afraid.

I just did a fresh install of NetBSD 9.0 release on a Sun Netra and an
amd64 laptop as well as an upgrade on several i386 laptops and
SPARCStations.

All-in all, I found, if there are no hardware support issues, the
install experience quite fine and "upgrade" even more.
Upgrading my i386 laptop was a piece of cake. CD, network cable in,
upgrade, reboot run pkgin and upgrade everything. Wow!

Install on the amd64 laptop was similar: I did easy partitioning (whole
disk) and it went out smooth.
On the Sun Netra server, almost the same experience, install and
partition was smooth, only bninary packges failed because pkgin is not
available (but all other packages I needed yes, so isntaleld them
manually with pkg_add)

Only on some SPARCstations I had issues with the partitioning, because
the disks were already partitioned... I was unable to overwrite them,
changing them was difficult and even got a segfault of the partitioner.
Not being interested in data, i dd'ed to zero the first blocks and redid
from scratch, then it  worked.

So, yes... that is the delicate part... (but is almost for every OS I tried)

Riccardo


Re: NetBSD install experiences

2020-05-13 Thread Martin Husemann
On Wed, May 13, 2020 at 08:59:44PM +0200, Rhialto wrote:
> On the other hand, when you're doing an update, I had to guess whether I
> should select the GPT partition that was my root partition, or the whole
> disk. I guessed the root partition and apparently that was correct :-)

I think both work typically - it extracts /etc/fstab from that partition
and uses the mounts in there.

You also can select "currently running system" now to do an in-place
update (especially when you are on a release branch, to be used with
extreme care when in -current).

Martin


Re: NetBSD install experiences

2020-05-13 Thread Rhialto
On Wed 13 May 2020 at 07:03:41 +0200, Martin Husemann wrote:
> You actually *can* install to some existing GPT partition, e.g. dk0 or dk1,
> and it should just work (but you can not sub-partition dk* devices). The
> installer handles this special case.
> 
> But you also can select "wd0" as the target and add additional NetBSD GPT
> partitions there (if space is available) and then install into those.

On the other hand, when you're doing an update, I had to guess whether I
should select the GPT partition that was my root partition, or the whole
disk. I guessed the root partition and apparently that was correct :-)

> Martin
-Olaf.
-- 
Olaf 'Rhialto' Seibert -- rhialto at falu dot nl
___  Anyone who is capable of getting themselves made President should on
\X/  no account be allowed to do the job.   --Douglas Adams, "THGTTG"


signature.asc
Description: PGP signature


Re: NetBSD install experiences

2020-05-13 Thread Greg A. Woods
At Wed, 13 May 2020 07:03:41 +0200, Martin Husemann  wrote:
Subject: Re: NetBSD install experiences
>
> That means in a very minimal setup where you boot from an UEFI install
> image on USB and you have a target SATA disk that already has some GPT
> partitions you would get devices like:
>
>  sd0  the USB stick you booted from
>  wd0  the SATA disk
>  dk0  some GPT partition on wd0
>  dk1  another GPT partition on wd0
>  dk2  the EFI boot partition on the USB boot medium
>  dk3  the boot/root partition on the USB boot medium (not offered
>   by the installer)
>
> in mostly random order.
>[[]]
> I'm thinking about making that list of potential target devices more like
> a tree so the selection becomes more obvious.

Ah!  Yes, a tree-like view of the devices would be immensely useful!

(especially since by that point getting a look at the dmesg output again
is, well, painful)

--
Greg A. Woods 

Kelowna, BC +1 250 762-7675   RoboHack 
Planix, Inc.  Avoncote Farms 


pgpWWygdbHDbg.pgp
Description: OpenPGP Digital Signature


Re: NetBSD install experiences

2020-05-13 Thread Martin Husemann
On Wed, May 13, 2020 at 07:41:45AM -0400, Greg Troxel wrote:
> I realize this is a major change, but I wonder about the installer
> having an option to zeroize the disk, so that if someone is trying to
> do an install getting rid of everything, they can, and then not have
> these issues.

Yes, I planned to do that (but was not sure where to best hide it
most obviously and also not break automatic Anita installations).

We have something similar in the extended partitioning menu where we
can scrub a whole disk (but that is a lot more than what is needed here).

I'll probably just add it to the Utility menu as "Remove all partitions
from a disk", which then would zero start and end of the disk.

Martin


Re: NetBSD install experiences

2020-05-13 Thread Greg Troxel
Martin Husemann  writes:

> That means in a very minimal setup where you boot from an UEFI install
> image on USB and you have a target SATA disk that already has some GPT
> partitions you would get devices like:
>
>  sd0  the USB stick you booted from
>  wd0  the SATA disk
>  dk0  some GPT partition on wd0
>  dk1  another GPT partition on wd0
>  dk2  the EFI boot partition on the USB boot medium
>  dk3  the boot/root partition on the USB boot medium (not offered
>   by the installer)
>
> in mostly random order.

I realize this is a major change, but I wonder about the installer
having an option to zeroize the disk, so that if someone is trying to
do an install getting rid of everything, they can, and then not have
these issues.

I tend to do this manually, and did so in the process of wiping an old
macos 10.11 install and trying to install 9.0_RELEASE, on a 2010ish
MacBook Pro.


Re: NetBSD install experiences

2020-05-12 Thread Martin Husemann
On Tue, May 12, 2020 at 12:14:52PM -0500, Robert Nestor wrote:
> With GPT, at least on a disk that already has some GPT wedges,
> it seems one selects GPT wedges to ?partition?, not the disk.
> At least it seemed to me that all the existing GPT wedges were
> displayed and I don?t recall seeing an option that allowed me to
> select the raw disk and define or redefine the GPT
> partitions on it.

I understand where this confusion comes from, and it makes the whole process
a bit more complicated.

The problem is that the default kernels all do "auto discovery" for GPT
partitions and (helpfully) create wedge devices (dk0 ... dk$N) for the
partitions. This is quite nice later, as it allows you to attach a USB
disk and just use the partitions.

However, for the installer these are additional disk devices, so it lists
them as potential targets for installation (unless they are used as the
current root filesystem or similar).

That means in a very minimal setup where you boot from an UEFI install
image on USB and you have a target SATA disk that already has some GPT
partitions you would get devices like:

 sd0the USB stick you booted from
 wd0the SATA disk
 dk0some GPT partition on wd0
 dk1another GPT partition on wd0
 dk2the EFI boot partition on the USB boot medium
 dk3the boot/root partition on the USB boot medium (not offered
by the installer)

in mostly random order.

You actually *can* install to some existing GPT partition, e.g. dk0 or dk1,
and it should just work (but you can not sub-partition dk* devices). The
installer handles this special case.

But you also can select "wd0" as the target and add additional NetBSD GPT
partitions there (if space is available) and then install into those.

I'm thinking about making that list of potential target devices more like
a tree so the selection becomes more obvious.

Martin


Re: NetBSD install experiences

2020-05-12 Thread Robert Nestor
Not knocking the tremendous work Martin has done maintaining and extending the 
Installer, but the GPT handling in 9.x/-current did seem a bit confusing to me. 
 It could be just me and my understanding, but the last time I tried it there 
seemed to be a disconnect between the way an MBR disk is set up and the way 
it’s done with GPT.  Being used to the MBR setup I was looking for a similar 
setup with GPT.

What I thought I saw was that with MBR partitioning one selected the disk, then 
defined or redefined the partitions.  This seemed to be true regardless of what 
type of previous MBR partitioning was done on the disk.  (Although a previous 
MBR setup for a non-NetBSD system on the disk sometimes caused problems.)  With 
GPT, at least on a disk that already has some GPT wedges, it seems one selects 
GPT wedges to “partition”, not the disk.  At least it seemed to me that all the 
existing GPT wedges were displayed and I don’t recall seeing an option that 
allowed me to select the raw disk and define or redefine the GPT partitions on 
it.

Not sure about the UEFI or BIOS booting as I do that manually on my installs, 
but I know Martin did fix some issues that I was originally having with that.

Re: NetBSD install experiences

2020-05-12 Thread Martin Husemann
On Tue, May 12, 2020 at 02:07:18PM -0400, MLH wrote:
> Thanks. Maybe my bios is just too old. It doesn't boot efi correctly
> and maybe it doesn't quite handle gpt partitions quite correctly
> either. Might be why I had so much trouble with that.  I still
> haven't found a way to have the biosboot boot a specified gpt root
> partition without using boot -a.

With biosboot the BIOS just boots the bootloader on the disk, it does not
need any idea of what partitions are there. However, some BIOSes seem to
be helpful and double check you have "valid partitions" - whatever that
means.

But in general it just works (modulo bugs with booting RAID setups, but those
bugs are somewhere in our bootloader).

Martin


Re: NetBSD install experiences

2020-05-12 Thread MLH
Martin Husemann wrote:
> On Tue, May 12, 2020 at 12:10:21PM -0400, MLH wrote:
> > Hmm. I tried the -current installer and though it appeared to
> > indicate it could, I couldn't determine how to without manually
> > creating the gpt partitions.
> 
> See the top part about 9.0 here:
> 
>   http://wiki.netbsd.org/Installation_on_UEFI_systems/
> 
> The difference to non-UEFI systems is minimal (if the installer has been
> booted via BIOS it will do a BIOS install, if by UEFI it will setup an
> EFI boot). Whether you choose MBR or GPT doesn't matter in either case.
> 
> But this assumes the disk is not partitioned yet (neither MBR nor GPT 
> present).

Thanks. Maybe my bios is just too old. It doesn't boot efi correctly
and maybe it doesn't quite handle gpt partitions quite correctly
either. Might be why I had so much trouble with that.  I still
haven't found a way to have the biosboot boot a specified gpt root
partition without using boot -a.



Re: NetBSD install experiences

2020-05-12 Thread Chavdar Ivanov
On Tue, 12 May 2020 at 18:38, Martin Husemann  wrote:
>
> On Tue, May 12, 2020 at 12:10:21PM -0400, MLH wrote:
> > Hmm. I tried the -current installer and though it appeared to
> > indicate it could, I couldn't determine how to without manually
> > creating the gpt partitions.

In case it might be interesting to someone,
http://ci4ic4.tx0.org/n0.webm is a recording I just did of an
installation of yesterday's -current on a EFI VirtualBox guest using
GPT partitioning. It also connects to my local pkgin server and
configures it for further work. The VM was setup initially with LSI
SCSI controller, the installation went without a hitch, but then I
found out that VirtualBox EFI code cannot boot from a SCSI disk, so I
had to move the installed virtual disk onto a SATA controller; this,
of course, went also fine further, as the fstab file records the names
of the GPT slices to mount.

http://ci4ic4.tx0.org/n1.webm shows the first boot and the
installation of a few packages; this mostly works with the exception
of the bits around readline and ncursesw - I was caught by the bump in
the yesterday's -current of /usr/lib/libterminfo.so.2 - the packages
require /usr/lib/libterminfo.so.1. zsh also refuses to install - for
some reason - at the same time as ncursesw; I have to manually 'pkgin
install ncursesw'  first and then zsh; still no idea why  (obviously,
this is not that relevant to the original question).

In my view the NetBSD isntallation experience is not so bad at all
with the latest changes to the installer. As there are way too many
options in case the target disk already has some structure, it is
perhaps prudent to leave it to the person installing - to decide to
clean the disk etc.

>
> See the top part about 9.0 here:
>
> http://wiki.netbsd.org/Installation_on_UEFI_systems/

I followed that quite a long time ago on my main laptop, EFI-speaking
HP Envy 17; the second disk, also GPT formatted, stores some W10 data,
two Linux distributions and a constantly upgraded NetBSD-current. The
latter boots straight from its .efi file, whereas I have to boot the
Linux distributions from rEFInd; W10 of course boots from the primary
disk as usual. The only gripe i have with HP is that the latest
security updates to the EFI removed the option of having a specific
.efi file as a default boot location and I have to break in the boot
process and navigate manually to the required .efi files...

>
> The difference to non-UEFI systems is minimal (if the installer has been
> booted via BIOS it will do a BIOS install, if by UEFI it will setup an
> EFI boot). Whether you choose MBR or GPT doesn't matter in either case.
>
> But this assumes the disk is not partitioned yet (neither MBR nor GPT 
> present).
>
> Martin



-- 



Re: NetBSD install experiences

2020-05-12 Thread Martin Husemann
On Tue, May 12, 2020 at 12:10:21PM -0400, MLH wrote:
> Hmm. I tried the -current installer and though it appeared to
> indicate it could, I couldn't determine how to without manually
> creating the gpt partitions.

See the top part about 9.0 here:

http://wiki.netbsd.org/Installation_on_UEFI_systems/

The difference to non-UEFI systems is minimal (if the installer has been
booted via BIOS it will do a BIOS install, if by UEFI it will setup an
EFI boot). Whether you choose MBR or GPT doesn't matter in either case.

But this assumes the disk is not partitioned yet (neither MBR nor GPT present).

Martin


Re: NetBSD install experiences

2020-05-12 Thread MLH
Martin Husemann wrote:
> On Tue, May 12, 2020 at 10:51:41AM -0400, MLH wrote:
> > One thing I would like to see is to have the installer be able to
> > use gpt to parition and install on large disks when mbr can't be
> > used, both for efi and ffs biosbooting. 
> 
> It can do that (with 9.0 or newer).

Hmm. I tried the -current installer and though it appeared to
indicate it could, I couldn't determine how to without manually
creating the gpt partitions.



Re: NetBSD install experiences

2020-05-12 Thread Martin Husemann
On Tue, May 12, 2020 at 10:51:41AM -0400, MLH wrote:
> One thing I would like to see is to have the installer be able to
> use gpt to parition and install on large disks when mbr can't be
> used, both for efi and ffs biosbooting. 

It can do that (with 9.0 or newer).

Martin


RE: NetBSD install experiences

2020-05-12 Thread MLH
One thing I would like to see is to have the installer be able to
use gpt to parition and install on large disks when mbr can't be
used, both for efi and ffs biosbooting. 


Re: NetBSD install experiences

2020-05-12 Thread Vincent DEFERT
Thanks for your explanations, Robert, I now better understand some 
issues I recently ran into.


As for the packaging system, it is certainly the greatest weakness of 
the whole BSD family, not only NetBSD.


Am 11/05/2020 um 21:56 schrieb Robert Nestor:

I’m not sure if this is still true, but it was in the past.

The NetBSD installer used to get confused about partitioning if one was trying 
to install a new NetBSD system on a disk that had previously contained an 
installation of some other system like OpenBSD, FreeBSD or Linux.  This was on 
MBR partitioned disks the last time I ran into it.  The simple solution was to 
zero out the first 1000 blocks of the disk before attempting the NetBSD 
installation at which point everything worked smoothly.

If this is still an issue it may be even more difficult with a disk that was 
set up using GPT as it takes more than just zeroing out the first few blocks on 
the disk to totally wipe out the GPT setup.  It might be nice to have an option 
in the Installer to “reset” a disk to an acceptable state for a NetBSD 
installation.

As for the packaging system, it has generally gotten more difficult to do a 
simple installation of packages on a new NetBSD system now that the package 
system supports so many other systems.  In the old days packages were built and 
maintained for a particular NetBSD release.  Now the package builds are in 
quarterly archives designed for building and installation on multiple systems.  
That’s nice because it greatly expands the number of people working on 
packages, but the downside is that the quarterly archives are not all built 
from source on a regular schedule so the package inter-dependencies can get all 
messed up.  An update in one package may cause installation issues for other 
packages that depend on it and haven’t been rebuilt in the archive.  I guess 
there are multiple solutions: 1) doing a regular rebuild of everything in an 
archive, 2)having some utility that would check for packages that are no longer 
installable from the archive, 3)building packages yourself which takes time and 
computer resources.

Pkg_comp is a nice utility for doing the third option.  I have updated 
documentation on how this can be done such that a user need only build the 
packages they’re interested in installing on their system  I contributed that 
documentation to the WiKi some time ago, but I’m not sure it was ever accepted 
and posted.





RE: NetBSD install experiences

2020-05-11 Thread Robert Nestor
I’m not sure if this is still true, but it was in the past.

The NetBSD installer used to get confused about partitioning if one was trying 
to install a new NetBSD system on a disk that had previously contained an 
installation of some other system like OpenBSD, FreeBSD or Linux.  This was on 
MBR partitioned disks the last time I ran into it.  The simple solution was to 
zero out the first 1000 blocks of the disk before attempting the NetBSD 
installation at which point everything worked smoothly.

If this is still an issue it may be even more difficult with a disk that was 
set up using GPT as it takes more than just zeroing out the first few blocks on 
the disk to totally wipe out the GPT setup.  It might be nice to have an option 
in the Installer to “reset” a disk to an acceptable state for a NetBSD 
installation.

As for the packaging system, it has generally gotten more difficult to do a 
simple installation of packages on a new NetBSD system now that the package 
system supports so many other systems.  In the old days packages were built and 
maintained for a particular NetBSD release.  Now the package builds are in 
quarterly archives designed for building and installation on multiple systems.  
That’s nice because it greatly expands the number of people working on 
packages, but the downside is that the quarterly archives are not all built 
from source on a regular schedule so the package inter-dependencies can get all 
messed up.  An update in one package may cause installation issues for other 
packages that depend on it and haven’t been rebuilt in the archive.  I guess 
there are multiple solutions: 1) doing a regular rebuild of everything in an 
archive, 2)having some utility that would check for packages that are no longer 
installable from the archive, 3)building packages yourself which takes time and 
computer resources.

Pkg_comp is a nice utility for doing the third option.  I have updated 
documentation on how this can be done such that a user need only build the 
packages they’re interested in installing on their system  I contributed that 
documentation to the WiKi some time ago, but I’m not sure it was ever accepted 
and posted.

Re: NetBSD install experiences

2020-05-11 Thread Martin Husemann
On Mon, May 11, 2020 at 09:55:28AM -0700, Salil Wadnerkar wrote:
> 1. I had OpenBSD and NetBSD installed on it (NetBSD, because I wanted to
> dual boot, but I could not get the dual boot working. So, I decided to just
> go with NetBSD). NetBSD installer mounted these partitions (or slices in
> BSD world I guess), and therefore, when I asked it to erase everything, it
> could not. So, I dropped into shell, and unmounted these partitions
> manually, and ran the installer again. But, it again segfaulted.

Sorry, I don't understand what you did - the terms are confusing, so we
need to get the description straight.

What do you mean with "NetBSD installer mounted these partitions" ?
It certainly will not use the mount command on any partitions before the
partitioning stage is done.

How did you ask it to "to erase everything"?

Sorry if this sounds like nitpicking, but espacially installation is tricky
to reproduce, as all target environments differ vastly.

Additional standard hint: don't user 9.0, but the improved 9.0 STABLE
from : https://nycdn.NetBSD.org/pub/NetBSD-daily/netbsd-9/latest/

Martin


Re: NetBSD install experiences

2020-05-11 Thread Salil Wadnerkar
I also just tried installing NetBSD 9.0 stable UEFI version yesterday on my
laptop, and gave up after it segfaulted on me a couple of times.
Two issues I faced:
1. I had OpenBSD and NetBSD installed on it (NetBSD, because I wanted to
dual boot, but I could not get the dual boot working. So, I decided to just
go with NetBSD). NetBSD installer mounted these partitions (or slices in
BSD world I guess), and therefore, when I asked it to erase everything, it
could not. So, I dropped into shell, and unmounted these partitions
manually, and ran the installer again. But, it again segfaulted.
2. When I selected - use the whole disk, it did not count OpenBSD/NetBSD
partitions as free space. Even after deleting all these disk slices
manually (and it was not clear that to delete a slice, I have to press
enter on the slice - there was no delete all slices/partitions. And despite
all this, it again segfaulted.

I think installer is the most important piece for users to form impression
about correctness and work-ability of a new OS. And it was a disappointing
experience. If I could contribute, I would be happy to do so.

Best,
Salil

On Mon, May 11, 2020 at 4:16 AM Torbjörn Granlund  wrote:

> What is the best way of keeping current users and welcoming new users?
>
> I believe with a well-working install program, including package
> install.  Or, negating that, poorly a working install program is a god
> way of turning people away.
>
> I assume everyone agrees thus far.
>
> I have installed NetBSD hundreds of times, and even used it as a main
> platform in production.  I moved my Xen virtual machines from NetBSD a
> few years ago after serious stability issues.  (There are some traces of
> those in some NetBSD mailing list, I am sure.)
>
> So, no I am no beginner who does not know his way around NetBSD or its
> installer.
>
> For unimportant reasons, I today wanted to install amd64 and i386
> virtual guest of NetBSD versions 7.2, 8.2, and 9,0.  Six installs in
> total.
>
> With a completely naive default-everything install, all installs except
> 9.0-amd64 will misalign the root file system.  It will start at sector
> 63.  But 9.0-amd64 actually makes it start at sector 64!
>
> (OK, if one used GPT for NetBSD 9.0, things are better aligned also for
> i386.  Yes, GPT is perhaps the default for 9.0, so I lied a little bit
> above.)
>
> ISSUE 1: Poor partition alignment.
> ISSUE 2: Inconsistency even within a release.
>
> It must be easy to fix this alignment issue?  Well, not that easy as it
> turns out.
>
> The offset can be changed in the summary view, but only the actual file
> systems' offset can be changed there.  The NetBSD partition itself will
> not allow itself to be changed.  If one (oh so naively!) edits what can
> in fact be edited here, the result is a non-bootable image.  :o(
>
> One needs to instead edit the MBR when the installer suggests that.
> Here the funny things start.  Depending on NetBSD release and on i386 vs
> amd64, the default measurement is sectors or "Megabytes".  Is Mega =
> 10^6 or 2^20?  Not specified.
>
> If I didn't make a mistake in my notes, NetBSD up to 8.2 will use
> Megabytes is the sense of 2^20.  Se selecting that for partition
> alignment works fine.
>
> But 9.0 is completely wild.  One gets crazy values if one selects
> Megabytes as input measurement, and not the same for amd64 and i386!  I
> asked for NetBSD partition start of 1MB and got something greater than
> both MB and Mibytes, with alignment of just 2^9.
>
> ISSUE 3: Megabytes/MB is not fully defined in the installer (please use
>  MiB for clarity of as it is surely what one expects)
>
> ISSUE 4: 9.0 is really inconsistent wrt its interpretations of MB.
>
> I solved this by using sectors as measurement (but only after redoing
> the install; it didn't help that in install program segfaults in the
> partitioner dialogue a little too often)
>
>
> I less important issue: Why does the NetBSD install program explicitly
> discourage the install NetBSD?  Twice during the process does it suggest
> that one really should not install NetBSD, and if one does not change
> the pre-selected alternative, the install is unceremoniously terminated.
>
> Another less important issue: Do we really need to be bothered by "disk
> geometry" in 2020?  Having that appear in the install flow is not
> helpful.  (Yes, I know NetBSD tries to be "real Unix" and thus sticks to
> tradtions.)
>
>
> After too many attempts, I finally got all 6 images done with proper
> alignment.  Now one just needs to manually edit fstab to have ",log" for
> the root file system (why is that not on by default, don't you want
> NetBSD to have the best possible disk write performance?).
>
>
> But we're far from done.  We want some packages!  We could compile them
> ourselves, but pkg_add/pkgin is more convenient.  Or is it...?
>
> Well, only one system got through our measly little list of desired
> packages (devel/gmake shells/bash shells/zsh net/rsync 

Re: NetBSD install experiences

2020-05-11 Thread Sad Clouds
On Mon, 11 May 2020 12:00:12 +0200
t...@gmplib.org (Torbjörn Granlund) wrote:

> Please consider working on the NetBSD install experience!  Now even I,
> who is far from a newbie and have tons of patience, consider giving
> up. If this had been my first experience with NetBSD, I would have
> given up long before I had arrived to ISSUE 5, I'm afraid.

I'm not a NetBSD developer so not sure what the current priorities are.
I'm sure you raise valid points, I recently went through a similar
experience when trying to install NetBSD-9.0 on ARM SBC. The install
itself was OK, but there was no good documentation on how to make the
install image bootable. Yes the magic command sequence was buried
somewhere in the man page and I got help on the mailing list, but the
lack of clear instructions on the wiki pages make the first user
experience somewhat underwhelming.

I don't think this is unique to NetBSD and I've seen similar issues
with other open source and commercial software projects. The truth is
there is a lot more to good quality software, which people often tend to
overlook - robust design, complete unit and integration testing, concise
documentation, code reliability and scalability, etc. None of these are
particularly exciting, so open source developers tend to focus on those
tasks that they find interesting and the boring stuff never gets done.

This is also a big problem with commercial software. You have big
multi-billion dollar companies that are mainly focused on generating
profits. Sometimes there is no effort to invest into a highly skilled
team that understand software engineering and can develop bespoke
solutions. The approach seems to be - lets get some open source code
that maybe could do the job, because it's free, and lets outsource all
development to some place where the labour is cheap.

NetBSD occasionally sponsor various projects and pay developers to
deliver specific features. Maybe one of those features will be a new
installer or package manager, depending on how much money they can
raise via donations.


Re: NetBSD install experiences

2020-05-11 Thread Vincent DEFERT
I also had tons of package installation problems of the same kind for 
weeks... Until I tried and use the German mirror and everything worked fine.


This means that between Feb. 14th and Apr. 25th, I've been unable to 
install NetBSD 9.0, and I've finally succeeded just by chance.


I'm happy I've insisted because I like what I've finally seen, but IMO, 
very few people are as patient as I am.


On 11/05/2020 12:00, Torbjörn Granlund wrote:

What is the best way of keeping current users and welcoming new users?

I believe with a well-working install program, including package
install.  Or, negating that, poorly a working install program is a god
way of turning people away.

I assume everyone agrees thus far.

I have installed NetBSD hundreds of times, and even used it as a main
platform in production.  I moved my Xen virtual machines from NetBSD a
few years ago after serious stability issues.  (There are some traces of
those in some NetBSD mailing list, I am sure.)

So, no I am no beginner who does not know his way around NetBSD or its
installer.

For unimportant reasons, I today wanted to install amd64 and i386
virtual guest of NetBSD versions 7.2, 8.2, and 9,0.  Six installs in
total.

With a completely naive default-everything install, all installs except
9.0-amd64 will misalign the root file system.  It will start at sector
63.  But 9.0-amd64 actually makes it start at sector 64!

(OK, if one used GPT for NetBSD 9.0, things are better aligned also for
i386.  Yes, GPT is perhaps the default for 9.0, so I lied a little bit
above.)

ISSUE 1: Poor partition alignment.
ISSUE 2: Inconsistency even within a release.

It must be easy to fix this alignment issue?  Well, not that easy as it
turns out.

The offset can be changed in the summary view, but only the actual file
systems' offset can be changed there.  The NetBSD partition itself will
not allow itself to be changed.  If one (oh so naively!) edits what can
in fact be edited here, the result is a non-bootable image.  :o(

One needs to instead edit the MBR when the installer suggests that.
Here the funny things start.  Depending on NetBSD release and on i386 vs
amd64, the default measurement is sectors or "Megabytes".  Is Mega =
10^6 or 2^20?  Not specified.

If I didn't make a mistake in my notes, NetBSD up to 8.2 will use
Megabytes is the sense of 2^20.  Se selecting that for partition
alignment works fine.

But 9.0 is completely wild.  One gets crazy values if one selects
Megabytes as input measurement, and not the same for amd64 and i386!  I
asked for NetBSD partition start of 1MB and got something greater than
both MB and Mibytes, with alignment of just 2^9.

ISSUE 3: Megabytes/MB is not fully defined in the installer (please use
  MiB for clarity of as it is surely what one expects)

ISSUE 4: 9.0 is really inconsistent wrt its interpretations of MB.

I solved this by using sectors as measurement (but only after redoing
the install; it didn't help that in install program segfaults in the
partitioner dialogue a little too often)


I less important issue: Why does the NetBSD install program explicitly
discourage the install NetBSD?  Twice during the process does it suggest
that one really should not install NetBSD, and if one does not change
the pre-selected alternative, the install is unceremoniously terminated.

Another less important issue: Do we really need to be bothered by "disk
geometry" in 2020?  Having that appear in the install flow is not
helpful.  (Yes, I know NetBSD tries to be "real Unix" and thus sticks to
tradtions.)


After too many attempts, I finally got all 6 images done with proper
alignment.  Now one just needs to manually edit fstab to have ",log" for
the root file system (why is that not on by default, don't you want
NetBSD to have the best possible disk write performance?).


But we're far from done.  We want some packages!  We could compile them
ourselves, but pkg_add/pkgin is more convenient.  Or is it...?

Well, only one system got through our measly little list of desired
packages (devel/gmake shells/bash shells/zsh net/rsync archivers/zstd).
The lucky system is 9.0-i386.  All but zsh installed fine on 9.0-amd64.

The error for 9.0-amd64 was this:

 datan# pkgin install zsh
 calculating dependencies...done.

 1 package to install:
   zsh-5.7.1nb1

 0 to refresh, 0 to upgrade, 1 to install
 3059K to download, 9815K to install

 proceed ? [Y/n] Y
 download error:
 
https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/9.0/All/zsh-5.7.1nb1.tgz
 Not Found
 proceed ? [y/N]

For 8.2 and 7.2 things are worse, while pkgin installs fine (with
pkg_add) pkgin then behaves like this:

 bt1nbsd64v82# pkgin -V install bash
 SSL support disabled
 SSL support disabled
 SSL support disabled
 pkgin: Could not fetch
 
https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/8.0/All/pkg_summary.gz

There is no mention of SSL in the pkgin manual, in an Internet search

Re: NetBSD install experiences

2020-05-11 Thread Martin Husemann
On Mon, May 11, 2020 at 12:00:12PM +0200, Torbjörn Granlund wrote:
> But 9.0 is completely wild.  One gets crazy values if one selects
> Megabytes as input measurement, and not the same for amd64 and i386!  I
> asked for NetBSD partition start of 1MB and got something greater than
> both MB and Mibytes, with alignment of just 2^9.

If you have logs or concrete steps to reproduce this issue, please file
individual PRs for each issue, so we can properly track it.

1 MB in the installer of course is 1 * 1024 * 1024 byte.

Apparently you hit some bugs, but from your wavy description it is impossible
to reproduce those. The behaviour depends on various things, starting with
disk size and geometry, port specific defaults (though i386 and amd64 do
not differ in that regard).

If you give a walk-through (with displayed values + your input) plus maybe
dmesg excerpts showing the relevant disks it should be easy to reproduce
and debug this.

I'll hapilly fix everything I can localy reproduce ASAP (but no pullups for
the installer in netbsd-8 or older, it is vastly different internally).

Martin