Problems installing onto computer with ld0 as boot drive

2018-07-13 Thread jmitchel

Hello,

I'm trying to install NetBSD-8 Beta onto a Liva Mini-PC using a USB 
drive. Here's a link in case anyone's interested in what a Liva mini-pc 
is:


https://www.ebay.com/itm/ECS-Elitegroup-Liva-Mini-1-0-Desktop-Discontinued-by-Manufacturer/232805133129?hash=item3634446b49%3Ag%3AvbkAAOSwWsxbIYUE&_sop=15&_nkw=Liva&_from=R40=nc

(NOTE: I picked this link because it's ridiculously overpriced. I got 
mine for <$50. I figured it's price would mean it would stick around for 
awhile.)


The problem seems to be that:

a) The device requires UEFI
b) The USB drive's wedges show up first.

The fact that the USB drive's wedges show up causes all sorts of 
problems when the installer tries to create dk0, dk1, & dk2 because dk0 
and dk1 already exist and are mounted (they're on sd0 -- the USB drive). 
The error messages I see go away if I yank the USB drive right before 
partitioning, but, of course, this causes the install to die right after 
creating the wedges. And I'm not 100% sure the wedges are already 
created.


So, I guess I wanted to let people know about this, especially if it 
isn't just a problem with a machine with an ld0 boot drive. Also, I'm 
wondering if a later beta will fix this or if I should try installing 
from CD or DVD. Or doing something else that I haven't thought of. 
(Someone did post instructions onto how to create wedges manually -- I 
could boot from DVD/CD and follow them. Assuming the CD image is UEFI 
compliant (is that a thing?)


Unfortunately, if someone wants to see what actually happens, I'll have 
to take pictures as the device doesn't have a serial port that I can 
find. FreeBSD installs and shows uart0, but I can't find a 10 pin header 
anywhere on the board. I assume that it's part of the chipset and that 
the pins aren't brought out.


Please let me know your thoughts and thanks for reading.

Jason M.




Re: Problems installing onto computer with ld0 as boot drive

2018-07-13 Thread jmitchel
Sorry, brain fade. I meant NetBSD-8.0 rc1. I just verified that that was 
what I imaged. Apologies.


On 2018-07-13 15:21, jmitchel wrote:

Hello,

I'm trying to install NetBSD-8 Beta onto a Liva Mini-PC using a USB
drive. Here's a link in case anyone's interested in what a Liva
mini-pc is:

https://www.ebay.com/itm/ECS-Elitegroup-Liva-Mini-1-0-Desktop-Discontinued-by-Manufacturer/232805133129?hash=item3634446b49%3Ag%3AvbkAAOSwWsxbIYUE&_sop=15&_nkw=Liva&_from=R40=nc

(NOTE: I picked this link because it's ridiculously overpriced. I got
mine for <$50. I figured it's price would mean it would stick around
for awhile.)

The problem seems to be that:

a) The device requires UEFI
b) The USB drive's wedges show up first.

The fact that the USB drive's wedges show up causes all sorts of
problems when the installer tries to create dk0, dk1, & dk2 because
dk0 and dk1 already exist and are mounted (they're on sd0 -- the USB
drive). The error messages I see go away if I yank the USB drive right
before partitioning, but, of course, this causes the install to die
right after creating the wedges. And I'm not 100% sure the wedges are
already created.

So, I guess I wanted to let people know about this, especially if it
isn't just a problem with a machine with an ld0 boot drive. Also, I'm
wondering if a later beta will fix this or if I should try installing
from CD or DVD. Or doing something else that I haven't thought of.
(Someone did post instructions onto how to create wedges manually -- I
could boot from DVD/CD and follow them. Assuming the CD image is UEFI
compliant (is that a thing?)

Unfortunately, if someone wants to see what actually happens, I'll
have to take pictures as the device doesn't have a serial port that I
can find. FreeBSD installs and shows uart0, but I can't find a 10 pin
header anywhere on the board. I assume that it's part of the chipset
and that the pins aren't brought out.

Please let me know your thoughts and thanks for reading.

Jason M.


Re: Gah... How usable is www/firefox on NetBSD?

2018-07-13 Thread David Brownlee
On 12 July 2018 at 15:43, John D. Baker  wrote:
> On Tue, 1 May 2018, John D. Baker wrote:
>
>> I use firefox52 (so I can have working gtk2 instead of broken gtk3) with
>> little problem on NetBSD/amd64-8.0_RC1.
>>
>> It only occasionally dumps core and quits, usually only after some
>> web site gets sideways or I try something odd.
>
> About two weeks after I wrote the above, I started getting the:
>
>   Gah...Your tab just crashed!
>
> on the foreground tab at startup.  Only rarely will clicking "Restore
> this tab." work.  While in this state, switching to any other tab will
> cause it to crash as well.
>
> Quitting firefox in this state leaves a small (for firefox) core file.
> On subsequent launches, the problem may not appear or when it does
> "Restore..." may eventually work.  If not, explicitly opening a new tab
> and having it load the URL of the crashed tab will usually work.  Move
> the new tab ahead of the crashed tab and close the crashed tab.
>
> I most often encounter the problem when starting firefox after completing
> a 'cvs update' run on my file server.  Applications opening files on
> 'amd'-managed NFS mounts while a 'cvs update' is in progress on the file
> server may cause the NFS client to hang, so I always quit firefox before
> updating.
>
> It seems to take a while for amd-managed NFS clients to recover after
> the CVS update.  Clients operating on explicit NFS mounts are not
> affected.
>
> File server and client are both up-to-date NetBSD/amd64-8.0_RC2 and the
> client is running "www/firefox52".

As a somewhat related datapoint

Since ryoon adjusted www/firefox to disable multiprocess windows
(2018-05-18), I've found it pretty usable - it crashes every few hours
under heavy usage, but doesn't trash the session so it can reopen with
the same window set. This is under 8.0_RC2 amd64

David


FQDNs for netbooted hosts via DHCP?

2018-07-13 Thread John D. Baker
I have historically used dhcpd.conf "host" entries like:

  option domain-name "example.com";

  option domain-name-servers M.N.O.P, W.X.Y.Z;

  host foo {
hardware ethernet xx:xx:xx:xx:xx:xx;
fixed-address A.B.C.D;
option next-server P.Q.R.S;
option root-path "/path/to/foo";
  }

  group bar {
option host-name "bar";
option next-server P.Q.R.S;
option root-path "/path/to/bar";

host bar-if0 {
  hardware ethernet 01:23:45:67:89:AB;
  fixed-address F.I.D.O;
}

host bar-if1 {
  hardware ethernet 01:23:45:67:89:CD;
  fixed-address F.I.D.O;
}
  } # group bar

When hosts "foo" or "bar" boot from local disk and configure their
network interfaces via DHCP ('dhcpcd'), they get an FQDN: "foo.example.com"
or "bar.example.com", respectively.  (No "hostname=..." in "/etc/rc.conf".)

When either host netboots, the in-kernel DHCP client gets hostname "foo"
or "bar" and domain "example.com", but the machines' names are only the
short "foo" or "bar" and not the FQDN.

At least on netbooted i386/amd64 machines it is possible to configure
the interface again using 'dhcpcd'.  In such case, the machines' names
remain the short "foo" or "bar" and not the FQDN.

I ran into this issue while taking early steps at configuring local
PostFix as a null client when "relayhost = $mydomain" didn't work since
the machine was netbooted and had only its short name.

So far, I can only get an FQDN for netbooted machines if I make the
"host" entries:

  host foo.example.com {
...
  }

  group bar {
option host-name "bar.example.com";
...
  }

which is a lot of duplication for all the potential netbooted hosts I
may have.

Grovelling the "dhcpd.conf" and "dhcp-options" manual pages, it seems
that all the options related to "host{,-}name" and "domain-name" and
"fqdn" are all about the client telling the server what its name should
be instead of the other way around (which is what I want).

Any tips on getting netbooted hosts an FQDN with just the short name
in a "host" entry or "option host-name" statement in "dhcpcd.conf"?

Thanks.

-- 
|/"\ John D. Baker, KN5UKS   NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]comOpenBSDFreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645



Re: booting from gpt/raid?

2018-07-13 Thread Hauke Fath

On 07/11/18 21:58, MLH wrote:

Unfortunately, gpt-on-raid1-on-gpt is not bootable, as opposed to
disklabel-on-RAID1-on-disklabel (which has size limitations).

The mbr boot code is able to account for disklabel-on-raid1, but not for
gpt-on-raid1, see e.g. install/44982.

>

I'm not quite sure I am understanding your nomenclature here.


I don't blame you.

Think of it as an onion.

You start by putting gpts / disklabels on two empty disks, then create a 
partition designated as type raid on each. You configure the raid1, 
which sets up its own header at the beginning of the partition, and then 
create another ("inner") gpt / disklabel on the resulting raid device.


Now, the MBR boot sector code knows how to parse the outer gpt / 
disklabel for a partition marked 'bootable', then load and execute its 
first block (the PBR). The PBR code knows how to recognize a BSD 
disklabel raid partition and skip the fixed-size raid header[1], which 
requires a disklabel right at the start of the raid.


But as it is, the PBR code does not know how to find the inner gpt in 
presence of a raid header. ISTR this was because of variable size of 
on-disk structures, but my memory is hazy.


Cheerio,
hauke

[1] see comment at the beginning of 
, 
and 
.


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


Running NetBSD as VirtualBox VM using GPT slices

2018-07-13 Thread Chavdar Ivanov
Hi,

The following probably won't be of much use, but perhaps is worth
mentioning.

I have an HP laptop with a main nvme disk running Windows 10 and
VirtualBox. There is also a GPT-partitioned second 750GB disk, holding some
data plus several EFI-booting systems, one of which is NetBSD-current. I
boot it only from time to time to build -current for various architectures
plus for pkgsrc upgrades - I haven't been able to get Xorg work in any way
on this machine (Intel 530 + NVidia GeForce 950M; FreeBSD 12 works fine, I
can provide info and testing in case someone has time to add support for
this more than two years old laptop). I run several NetBSD VMs under
VirtualBox Windows setup and it came to my mind that I should be able to
run my bare-metal system under VirtualBox. This turned out to be trivial,
as follows:
- Find out the physical disk in use - #1 here
C:\temp> wmic diskdrive list brief
CaptionDeviceIDModel
Partitions  Size
SDXC Card  \\.\PHYSICALDRIVE2  SDXC Card
1   62536803840
WDC WD7500BPKX-00HPJT0 \\.\PHYSICALDRIVE1  WDC WD7500BPKX-00HPJT0
 11  750153761280
SanDisk SD7SN6S-512G-1006  \\.\PHYSICALDRIVE0  SanDisk SD7SN6S-512G-1006
4   512105932800
"
# Check the partitions - 9,10 and 11 are those used by NetBSD, 9 being the
EFI partition
C:\temp> vboxmanage internalcommands listpartitions -rawdisk
\\.\PhysicalDrive1
Number  Type   StartCHS   EndCHS  Size (MiB)  Start (Sect)
1   0x00  0   /0  /0   0   /0  /0  61440 2048
2   0x00  0   /0  /0   0   /0  /0   8192125831168
3   0x00  0   /0  /0   0   /0  /0 102400142608384
4   0x00  0   /0  /0   0   /0  /0512352323584
5   0x00  0   /0  /0   0   /0  /0 30353372160
6   0x00  0   /0  /0   0   /0  /0200967772160
7   0x00  0   /0  /0   0   /0  /0   1024968181760
8   0x00  0   /0  /0   0   /0  /0 130887970278912
9   0x00  0   /0  /0   0   /0  /0128   1238335488
10  0x00  0   /0  /0   0   /0  /0 102400   1238597632
11  0x00  0   /0  /0   0   /0  /0   8220   1448312832
# Create a vmdk containing only the three interesting for us partitions
C:\temp> VBoxManage internalcommands createrawvmdk -filename
 c:\temp\a.vmdk -rawdisk \\.\PhysicalDrive1 -partitions 9,10,11

The last command will create a.vmdk and a-pt.vmdk. After that one creates a
usual NetBSD-amd64 VM with the VirtuaBox interface, using the new vmdk as
the system disk (a.vmdk, not a-pt.vmdk). Of course, as the system is EFI,
ine will have to enable the EFI boot for the VM.

One only has to reconfigure the networking after reboot. I'll try to figure
out how to use different network configurations depending on whether the
boot is physical or virtual.

And I can run Xorg when I boot the VM, which might be useful for some
pkgsrc development...

(I've stolen the method from
https://stackoverflow.com/questions/34371180/virtualbox-fail-to-bootup-guest-from-gpt-physical-partition#
and
applied it to NetBSD in EFI mode, no need to install any boot loaders).

Chavdar