Re: snapshot 1st aarcch64 boot got devd error message: "sh: /usr/libexec/hyperv/hyperv_vfattach: not found"

2022-12-25 Thread Mark Millard



On Dec 25, 2022, at 15:55, Warner Losh  wrote:

> Most likely MK_HYPERV is defaulting to no for aarch64? Or there is a bogus if 
> MACHINE_ARCH == "amd64" somewhere.

Well, seems more is missing for aarch64 if devd hyperv is to be enabled:

# grep -r MK_HYPERV /usr/main-src/ | more
/usr/main-src/sbin/devd/Makefile:.if ${MK_HYPERV} != "no"
/usr/main-src/libexec/Makefile.i386:.if ${MK_HYPERV} != "no"
/usr/main-src/libexec/Makefile.amd64:.if ${MK_HYPERV} != "no"
/usr/main-src/usr.sbin/Makefile.amd64:.if ${MK_HYPERV} != "no"
/usr/main-src/usr.sbin/Makefile.i386:.if ${MK_HYPERV} != "no"
/usr/main-src/lib/libc/x86/sys/Makefile.inc:.if ${MACHINE_CPUARCH} == "amd64" 
&& ${MK_HYPERV} != "no"
/usr/main-src/tools/build/mk/OptionalObsoleteFiles.inc:.if ${MK_HYPERV} == no

(The below is based on cgit.freebsd.org  in case my 
source tree
vintage is problematical.)

There is no libexec/Makefile.aarch64 or libexec/Makefile.arm64 .

For reference, libexec/Makefile.amd64 example:

# $FreeBSD$

.if ${MK_HYPERV} != "no"
SUBDIR+= hyperv
.endif


There is a usr.sbin/Makefile.aarch64 but it makes no
mention of hyperv:

# $FreeBSD$

.if ${MK_ACPI} != "no"
SUBDIR+= acpi
.endif
SUBDIR+= ofwdump


By contrast usr.sbin/Makefile.amd64 (for example) contains:

. . .
.if ${MK_HYPERV} != "no"
SUBDIR+= hyperv
.endif
. . .

I do not find an aarch64 equivalent of
lib/libc/x86/sys/Makefile.inc 's:

. . .
.if ${MACHINE_CPUARCH} == "amd64" && ${MK_HYPERV} != "no"
CFLAGS+= -DWANT_HYPERV
.endif
. . .


> Warner
> 
> On Sun, Dec 25, 2022, 4:28 PM Mark Millard  wrote:
> From the Dec 24 main [so: 14] snaphot for an aarch64 RPi*
> system:
> 
> . . .
> Starting devd.
> genet0: link state changed to UP
> sh: /usr/libexec/hyperv/hyperv_vfattach: not found
> Starting dhclient.
> . . .
> 
> This seems to be from /etc/devd/hyperv.conf :
> 
> notify 10 {
> match "system"  "ETHERNET";
> match "type""IFATTACH";
> action "/usr/libexec/hyperv/hyperv_vfattach $subsystem 0";
> };
> 
> For reference:
> 
> # ls -Tla /usr/libexec/hyperv/
> total 8
> drwxr-xr-x   2 root  wheel   512 Dec 24 06:30:06 2022 .
> drwxr-xr-x  10 root  wheel  1536 Dec 24 06:49:40 2022 ..
> 
> I do not know if the error might have lead to skipping some
> other activities or not.
> 
> Note:
> 
> This is from a test where I'd 1st side stepped a syntax problem
> in /etc/rc.d/growfs in the snapshot to try to see if the growfs
> otherwise worked.
> 
> # uname -apKU  # long output line split for reability
> FreeBSD generic 14.0-CURRENT FreeBSD 14.0-CURRENT #0
> main-n259842-c89209c674f2: Sat Dec 24 05:52:28 UTC 2022
> r...@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC
> arm64 aarch64 1400076 1400076
> 


===
Mark Millard
marklmi at yahoo.com




Re: snapshot 1st aarcch64 boot got devd error message: "sh: /usr/libexec/hyperv/hyperv_vfattach: not found"

2022-12-25 Thread Warner Losh
Most likely MK_HYPERV is defaulting to no for aarch64? Or there is a bogus
if MACHINE_ARCH == "amd64" somewhere.

Warner

On Sun, Dec 25, 2022, 4:28 PM Mark Millard  wrote:

> From the Dec 24 main [so: 14] snaphot for an aarch64 RPi*
> system:
>
> . . .
> Starting devd.
> genet0: link state changed to UP
> sh: /usr/libexec/hyperv/hyperv_vfattach: not found
> Starting dhclient.
> . . .
>
> This seems to be from /etc/devd/hyperv.conf :
>
> notify 10 {
> match "system"  "ETHERNET";
> match "type""IFATTACH";
> action "/usr/libexec/hyperv/hyperv_vfattach $subsystem 0";
> };
>
> For reference:
>
> # ls -Tla /usr/libexec/hyperv/
> total 8
> drwxr-xr-x   2 root  wheel   512 Dec 24 06:30:06 2022 .
> drwxr-xr-x  10 root  wheel  1536 Dec 24 06:49:40 2022 ..
>
> I do not know if the error might have lead to skipping some
> other activities or not.
>
> Note:
>
> This is from a test where I'd 1st side stepped a syntax problem
> in /etc/rc.d/growfs in the snapshot to try to see if the growfs
> otherwise worked.
>
> # uname -apKU  # long output line split for reability
> FreeBSD generic 14.0-CURRENT FreeBSD 14.0-CURRENT #0
> main-n259842-c89209c674f2: Sat Dec 24 05:52:28 UTC 2022
> r...@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC
> arm64 aarch64 1400076 1400076
>
> ===
> Mark Millard
> marklmi at yahoo.com
>
>
>


snapshot 1st aarcch64 boot got devd error message: "sh: /usr/libexec/hyperv/hyperv_vfattach: not found"

2022-12-25 Thread Mark Millard
From the Dec 24 main [so: 14] snaphot for an aarch64 RPi*
system:

. . .
Starting devd.
genet0: link state changed to UP
sh: /usr/libexec/hyperv/hyperv_vfattach: not found
Starting dhclient.
. . .

This seems to be from /etc/devd/hyperv.conf :

notify 10 {
match "system"  "ETHERNET";
match "type""IFATTACH";
action "/usr/libexec/hyperv/hyperv_vfattach $subsystem 0";
};

For reference:

# ls -Tla /usr/libexec/hyperv/
total 8
drwxr-xr-x   2 root  wheel   512 Dec 24 06:30:06 2022 .
drwxr-xr-x  10 root  wheel  1536 Dec 24 06:49:40 2022 ..

I do not know if the error might have lead to skipping some
other activities or not.

Note:

This is from a test where I'd 1st side stepped a syntax problem
in /etc/rc.d/growfs in the snapshot to try to see if the growfs
otherwise worked.

# uname -apKU  # long output line split for reability
FreeBSD generic 14.0-CURRENT FreeBSD 14.0-CURRENT #0
main-n259842-c89209c674f2: Sat Dec 24 05:52:28 UTC 2022
r...@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC
arm64 aarch64 1400076 1400076

===
Mark Millard
marklmi at yahoo.com




Re: Disk partitions disappear when mounting others

2022-12-25 Thread Warner Losh
On Sun, Dec 25, 2022, 1:02 AM Alexey Dokuchaev  wrote:

> Hi there,
>
> I'm in the process of moving my data from a dying HDD, and just noticed
> something weird.  It's an MBR partitioned drive, and there is a FreeBSD
> slice and Fedora LVM in EBR, accessible as
> /dev/linux_lvm/fedora-{swap,home,root}.
>
> The problem is that once I mount my old FreeBSD partition, e.g.
> /dev/ada0s2a, those LVM nodes are gone, logging this:
>
>   GEOM_LINUX_LVM: disk pv0 already initialised in fedora
>   GEOM_LINUX_LVM: Disk diskid/DISK-XXX1s4+0001 removed from pv0.
>   GEOM_LINUX_LVM: Device linux_lvm/fedora-swap removed.
>   GEOM_LINUX_LVM: Device linux_lvm/fedora-home removed.
>   GEOM_LINUX_LVM: Device linux_lvm/fedora-root removed.
>
> If I unmount /dev/ada0s2a and mount any Fedora's partition, then I can
> longer access other slices as there's only /dev/ada0 remains; ``gpart
> show''
> also does not list them, but only those under diskid/DISK-XXX1.
>
> Why is this happening?  What should I fix to stop my partitions from
> disappearing and reappearing?


Something has them open. My guess is the Linux lvm geom provider opens too
many things. It's been standard geom behavior to remove the other device
aliases in /dev when one is open.

Though the problem may be in tasting during open since gpart list shows
them gone.

Warner

Thanks,
>
> ./danfe
>
>


Disk partitions disappear when mounting others

2022-12-25 Thread Alexey Dokuchaev
Hi there,

I'm in the process of moving my data from a dying HDD, and just noticed
something weird.  It's an MBR partitioned drive, and there is a FreeBSD
slice and Fedora LVM in EBR, accessible as 
/dev/linux_lvm/fedora-{swap,home,root}.

The problem is that once I mount my old FreeBSD partition, e.g.
/dev/ada0s2a, those LVM nodes are gone, logging this:

  GEOM_LINUX_LVM: disk pv0 already initialised in fedora
  GEOM_LINUX_LVM: Disk diskid/DISK-XXX1s4+0001 removed from pv0.
  GEOM_LINUX_LVM: Device linux_lvm/fedora-swap removed.
  GEOM_LINUX_LVM: Device linux_lvm/fedora-home removed.
  GEOM_LINUX_LVM: Device linux_lvm/fedora-root removed.

If I unmount /dev/ada0s2a and mount any Fedora's partition, then I can
longer access other slices as there's only /dev/ada0 remains; ``gpart show''
also does not list them, but only those under diskid/DISK-XXX1.

Why is this happening?  What should I fix to stop my partitions from
disappearing and reappearing?  Thanks,

./danfe