daily CVS update output

2022-07-08 Thread NetBSD source update


Updating src tree:
P src/distrib/sets/lists/man/mi
P src/share/man/man4/Makefile
P src/share/man/man4/radio.4
U src/share/man/man4/slurm.4
U src/share/man/man4/uintuos.4
P src/share/man/man4/usb.4
P src/sys/arch/hpcmips/vr/com_vrip.c
P src/sys/dev/marvell/mvxpsec.c
P src/sys/dev/pci/nvme_pci.c
P src/sys/kern/vfs_mount.c
P src/sys/kern/vfs_trans.c
P src/sys/lib/libsa/ip.c
P src/sys/miscfs/deadfs/dead_vfsops.c
P src/sys/miscfs/genfs/genfs_vfsops.c
P src/sys/miscfs/overlay/overlay_vfsops.c
P src/sys/net/if.c
P src/tests/usr.bin/xlint/lint1/queries.c
P src/usr.bin/crunch/crunchide/exec_elf32.c
P src/usr.bin/telnet/commands.c
P src/usr.bin/xlint/common/inittyp.c
P src/usr.bin/xlint/lint1/README.md
P src/usr.bin/xlint/lint1/tree.c

Updating xsrc tree:


Killing core files:


Updating tar files:
src/top-level: collecting... replacing... done
src/bin: collecting... replacing... done
src/common: collecting... replacing... done
src/compat: collecting... replacing... done
src/crypto: collecting... replacing... done
src/dist: collecting... replacing... done
src/distrib: collecting... replacing... done
src/doc: collecting... replacing... done
src/etc: collecting... replacing... done
src/external: collecting... replacing... done
src/extsrc: collecting... replacing... done
src/games: collecting... replacing... done
src/include: collecting... replacing... done
src/lib: collecting... replacing... done
src/libexec: collecting... replacing... done
src/regress: collecting... replacing... done
src/rescue: collecting... replacing... done
src/sbin: collecting... replacing... done
src/share: collecting... replacing... done
src/sys: collecting... replacing... done
src/tests: collecting... replacing... done
src/tools: collecting... replacing... done
src/usr.bin: collecting... replacing... done
src/usr.sbin: collecting... replacing... done
src/config: collecting... replacing... done
src: collecting... replacing... done
xsrc/top-level: collecting... replacing... done
xsrc/external: collecting... replacing... done
xsrc/local: collecting... replacing... done
xsrc: collecting... replacing... done



Updating release-8 src tree (netbsd-8):

Updating release-8 xsrc tree (netbsd-8):


Updating release-8 tar files:
src/top-level: collecting... replacing... done
src/bin: collecting... replacing... done
src/common: collecting... replacing... done
src/compat: collecting... replacing... done
src/crypto: collecting... replacing... done
src/dist: collecting... replacing... done
src/distrib: collecting... replacing... done
src/doc: collecting... replacing... done
src/etc: collecting... replacing... done
src/external: collecting... replacing... done
src/extsrc: collecting... replacing... done
src/games: collecting... replacing... done
src/include: collecting... replacing... done
src/lib: collecting... replacing... done
src/libexec: collecting... replacing... done
src/regress: collecting... replacing... done
src/rescue: collecting... replacing... done
src/sbin: collecting... replacing... done
src/share: collecting... replacing... done
src/sys: collecting... replacing... done
src/tests: collecting... replacing... done
src/tools: collecting... replacing... done
src/usr.bin: collecting... replacing... done
src/usr.sbin: collecting... replacing... done
src/config: collecting... replacing... done
src: collecting... replacing... done
xsrc/top-level: collecting... replacing... done
xsrc/external: collecting... replacing... done
xsrc/local: collecting... replacing... done
xsrc: collecting... replacing... done



Updating release-9 src tree (netbsd-9):

Updating release-9 xsrc tree (netbsd-9):


Updating release-9 tar files:
src/top-level: collecting... replacing... done
src/bin: collecting... replacing... done
src/common: collecting... replacing... done
src/compat: collecting... replacing... done
src/crypto: collecting... replacing... done
src/dist: collecting... replacing... done
src/distrib: collecting... replacing... done
src/doc: collecting... replacing... done
src/etc: collecting... replacing... done
src/external: collecting... replacing... done
src/extsrc: collecting... replacing... done
src/games: collecting... replacing... done
src/include: collecting... replacing... done
src/lib: collecting... replacing... done
src/libexec: collecting... replacing... done
src/regress: collecting... replacing... done
src/rescue: collecting... replacing... done
src/sbin: collecting... replacing... done
src/share: collecting... replacing... done
src/sys: collecting... replacing... done
src/tests: collecting... replacing... done
src/tools: collecting... replacing... done
src/usr.bin: collecting... replacing... done
src/usr.sbin: collecting... replacing... done
src/config: collecting... replacing... done
src: collecting... replacing... done
xsrc/top-level: collecting... replacing... done
xsrc/external: collecting... replacing... done
xsrc/local: collecting... replacing... done
xsrc: collecting... replacing... done




Updating file list:
-rw-rw-r--  1 srcmastr  

Re: i386/amd64 image generated trough mkimage stuck on primary bootsrap at boot

2022-07-08 Thread Lloyd Parkes




On 8/07/22 21:01, RVP wrote:

On Fri, 8 Jul 2022, br0nko wrote:


8 partitions:
#    size    offset fstype [fsize bsize cpg/sgs]
a:   2369473    63 4.2BSD  0 0 0  # (Cyl.  
0*-   1156)
c:   2312129    63 unused  0 0    # (Cyl.  
0*-   1128)
d:   2369536 0 unused  0 0    # (Cyl.  0 
-   1156)




This doesn't look right, does it? Offset is 63 instead of 64,


63 is a popular offset because the BIOS field for track length can only 
hold values 0-63.


Cheers,
Lloyd


Re: i386/amd64 image generated trough mkimage stuck on primary bootsrap at boot

2022-07-08 Thread Lloyd Parkes




On 8/07/22 19:57, br0nko wrote:

On Thursday, July 7th, 2022 at 11:25 PM, Mike Pumford 
 wrote:


On 07/07/2022 15:40, br0nko wrote:


Hi,

0: NetBSD (sysid 169)
start 63, size 1568384 (766 MB, Cyls 0/1/1-97/160/62), Active
beg: cylinder 0, head 1, sector 1
end: cylinder 97, head 160, sector 62
Information from PBR:
Not bootable: All bytes are identical (0x00)
Not bootable: Bad magic number (0x)


No MBR boot code in the partition table.

fdisk -i /dev/rvnd0

should resolve that I think.


I did give a try, using an amd64 mkimage image build from current tree 
(9.99.98/amd64):


Note that, in general, NetBSD fdisk, installboot and disklabel can be 
run directly against the image itself without needing to use vnconfig. 
Sometimes you might need a flag to tell the command that it is being 
given a disk image instead of a real disk, but that's about it.


Cheers,
Lloyd


Re: i386/amd64 image generated trough mkimage stuck on primary bootsrap at boot

2022-07-08 Thread RVP

On Fri, 8 Jul 2022, br0nko wrote:


8 partitions:
#sizeoffset fstype [fsize bsize cpg/sgs]
a:   236947363 4.2BSD  0 0 0  # (Cyl.  0*-   1156)
c:   231212963 unused  0 0# (Cyl.  0*-   1128)
d:   2369536 0 unused  0 0# (Cyl.  0 -   1156)



This doesn't look right, does it? Offset is 63 instead of 64, and the
NetBSD slice `c' is smaller than the root `a' partition. I'll do some
tests later in the evening...

-RVP



Re: i386/amd64 image generated trough mkimage stuck on primary bootsrap at boot

2022-07-08 Thread br0nko
On Friday, July 8th, 2022 at 12:31 AM, RVP  wrote:

> On Thu, 7 Jul 2022, br0nko wrote:
>
> > bash-5.1# vndconfig vnd0 /home/phil/alix-netbsd.9.2.img
> > bash-5.1# fdisk -vv /dev/rvnd0
> > installboot -v -o timeout=5 /dev/rsd0a /usr/mdec/bootxx_ffsv1
>
>
> Is rsd0a where you copied /usr/mdec/boot, and dies rsd0a start at the
> same sector as rsd0c (the NetBSD slice)? A disklabel output would
> be useful...
>
> -RVP

The mkimage script is taking care of copying the mdec/boot I think, here's from 
an image build from current tree:

bash-5.1# vndconfig vnd0 example-amd64-image.img
bash-5.1# fdisk -vv /dev/rvnd0
Disk: /dev/rvnd0
NetBSD disklabel disk geometry:
cylinders: 1157, heads: 64, sectors/track: 32 (2048 sectors/cylinder)
total sectors: 2369536, bytes/sector: 512

BIOS disk geometry:
cylinders: 148, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 2369536

Partitions aligned to 2048 sector boundaries, offset 63

Partition table:
0: NetBSD (sysid 169)
start 63, size 2312129 (1129 MB, Cyls 0/1/1-143/236/29), Active
beg: cylinder0, head   1, sector  1
end: cylinder  143, head 236, sector 29
Information from PBR:
Not bootable: All bytes are identical (0x00)
Not bootable: Bad magic number (0x)
1:  (sysid 0)
start 0, size 0
beg: cylinder0, head   0, sector  0
end: cylinder0, head   0, sector  0
2:  (sysid 0)
start 0, size 0
beg: cylinder0, head   0, sector  0
end: cylinder0, head   0, sector  0
3:  (sysid 0)
start 0, size 0
beg: cylinder0, head   0, sector  0
end: cylinder0, head   0, sector  0
First active partition: 0
Drive serial number: 0 (0x)

bash-5.1# disklabel  /dev/rvnd0
# /dev/rvnd0:
type: SCSI
disk: STORAGE DEVICE
label: fictitious
flags: removable
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 1157
total sectors: 2369536
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0   # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

8 partitions:
#sizeoffset fstype [fsize bsize cpg/sgs]
 a:   236947363 4.2BSD  0 0 0  # (Cyl.  0*-   1156)
 c:   231212963 unused  0 0# (Cyl.  0*-   1128)
 d:   2369536 0 unused  0 0# (Cyl.  0 -   1156)

bash-5.1# mount /dev/vnd0a /mnt
bash-5.1# ls /mnt
.cshrc   altroot  boot dev  lib  libexec  netbsd   rescue   sbin
 tmp  var
.profile bin  boot.cfg etc  libdata  mnt  proc root stand   
 usr

bash-5.1# md5 /mnt/boot
MD5 (/mnt/boot) = 9d721d7c85264b66deff2d8472370870
bash-5.1# md5 /usr/mdec/boot
MD5 (/usr/mdec/boot) = 9d721d7c85264b66deff2d8472370870

bash-5.1# cat /mnt/boot.cfg
menu=Boot normally:rndseed /var/db/entropy-file;boot
menu=Boot single user:rndseed /var/db/entropy-file;boot -s
menu=Drop to boot prompt:prompt
default=1
timeout=5
clear=1

bash-5.1# head /mnt/etc/release
NetBSD 9.99.98/amd64

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
2018, 2019, 2020, 2021, 2022
The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California.  All rights reserved.

br0nko


Re: i386/amd64 image generated trough mkimage stuck on primary bootsrap at boot

2022-07-08 Thread br0nko
On Thursday, July 7th, 2022 at 11:25 PM, Mike Pumford 
 wrote:

> On 07/07/2022 15:40, br0nko wrote:
>
> > Hi,
> >
> > 0: NetBSD (sysid 169)
> > start 63, size 1568384 (766 MB, Cyls 0/1/1-97/160/62), Active
> > beg: cylinder 0, head 1, sector 1
> > end: cylinder 97, head 160, sector 62
> > Information from PBR:
> > Not bootable: All bytes are identical (0x00)
> > Not bootable: Bad magic number (0x)
>
> No MBR boot code in the partition table.
>
> fdisk -i /dev/rvnd0
>
> should resolve that I think.

I did give a try, using an amd64 mkimage image build from current tree 
(9.99.98/amd64):

=
bash-5.1# vndconfig vnd0 example-amd64-image.img
bash-5.1# fdisk -vv /dev/rvnd0
Disk: /dev/rvnd0
NetBSD disklabel disk geometry:
cylinders: 1157, heads: 64, sectors/track: 32 (2048 sectors/cylinder)
total sectors: 2369536, bytes/sector: 512

BIOS disk geometry:
cylinders: 148, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 2369536

Partitions aligned to 2048 sector boundaries, offset 63

Partition table:
0: NetBSD (sysid 169)
start 63, size 2312129 (1129 MB, Cyls 0/1/1-143/236/29), Active
beg: cylinder0, head   1, sector  1
end: cylinder  143, head 236, sector 29
Information from PBR:
Not bootable: All bytes are identical (0x00)
Not bootable: Bad magic number (0x)
1:  (sysid 0)
start 0, size 0
beg: cylinder0, head   0, sector  0
end: cylinder0, head   0, sector  0
2:  (sysid 0)
start 0, size 0
beg: cylinder0, head   0, sector  0
end: cylinder0, head   0, sector  0
3:  (sysid 0)
start 0, size 0
beg: cylinder0, head   0, sector  0
end: cylinder0, head   0, sector  0
First active partition: 0
Drive serial number: 0 (0x)

bash-5.1# disklabel  /dev/rvnd0
# /dev/rvnd0:
type: SCSI
disk: STORAGE DEVICE
label: fictitious
flags: removable
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 1157
total sectors: 2369536
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0   # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

8 partitions:
#sizeoffset fstype [fsize bsize cpg/sgs]
 a:   236947363 4.2BSD  0 0 0  # (Cyl.  0*-   1156)
 c:   231212963 unused  0 0# (Cyl.  0*-   1128)
 d:   2369536 0 unused  0 0# (Cyl.  0 -   1156)


bash-5.1# fdisk -i /dev/rvnd0
Update the bootcode from /usr/mdec/mbr? [n] y

We haven't written the MBR back to disk yet.  This is your last chance.
Should we write new partition table? [n] y

=

Testing in qemu, I get "NetBSD MBR boot / Error No operating system"

fdisk look the same:


=
bash-5.1# fdisk -vv /dev/rvnd0
Disk: /dev/rvnd0
NetBSD disklabel disk geometry:
cylinders: 1157, heads: 64, sectors/track: 32 (2048 sectors/cylinder)
total sectors: 2369536, bytes/sector: 512

BIOS disk geometry:
cylinders: 148, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 2369536

Partitions aligned to 2048 sector boundaries, offset 63

Partition table:
0: NetBSD (sysid 169)
start 63, size 2312129 (1129 MB, Cyls 0/1/1-143/236/29), Active
beg: cylinder0, head   1, sector  1
end: cylinder  143, head 236, sector 29
Information from PBR:
Not bootable: All bytes are identical (0x00)
Not bootable: Bad magic number (0x)
1:  (sysid 0)
start 0, size 0
beg: cylinder0, head   0, sector  0
end: cylinder0, head   0, sector  0
2:  (sysid 0)
start 0, size 0
beg: cylinder0, head   0, sector  0
end: cylinder0, head   0, sector  0
3:  (sysid 0)
start 0, size 0
beg: cylinder0, head   0, sector  0
end: cylinder0, head   0, sector  0
Bootselector disabled.
First active partition: 0
Drive serial number: 0 (0x)
=

Reinstalling primary bootstrap show a better fdisk output:

=
bash-5.1# installboot -v -o timeout=5 /dev/rvnd0a /usr/mdec/bootxx_ffsv1
File system: /dev/rvnd0a
Primary bootstrap:   /usr/mdec/bootxx_ffsv1
Ignoring PBR with invalid magic in sector 0 of `/dev/rvnd0a'
Boot options:timeout 5, flags 0, speed 9600, ioaddr 0, console pc

Disk: /dev/rvnd0
NetBSD disklabel disk geometry:
cylinders: 1157, heads: 64, sectors/track: 32 (2048 sectors/cylinder)
total sectors: 2369536, bytes/sector: 512

BIOS disk geometry:
cylinders: 148, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 2369536

Partitions aligned to 2048 sector boundaries, offset 63