NetBSD-Bugs archive

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

misc/57562: sun2 and sun3 live-image: unable to boot with replaced kernel



>Number:         57562
>Category:       misc
>Synopsis:       sun2 and sun3 live-image: unable to boot with replaced kernel
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 04 10:50:00 +0000 2023
>Originator:     Rin Okuyama
>Release:        10.99.7 (as well as old releases)
>Organization:
Internet Initiative Japan Inc.
>Environment:
NetBSD  10.99.7 NetBSD 10.99.7 (GENERIC) #4: Fri Aug  4 19:31:59 JST 2023  rin@latipes:/home/rin/repos/src/sys/arch/sun2/compile/obj.sun2-m68000/GENERIC sun2
>Description:
Sometimes sun[23] live-image does not boot with new kernel file,
replaced with pre-installed one:

----
...
ufsboot: netbsd: loadfile() failed.
filename? [netbsd]:
ufsboot: netbsd: loadfile() failed.
filename? [netbsd]:
...
----

This should be because firmware cannot load disk sectors beyond
1GB from its beginning, as noted in INSTALL for sun[23]:

> Note that the sun2 firmware cannot boot from a partition located
> more than 1 GB from the beginning of the disk, so the swap partition
> should be completely below the 1 GB boundary.

The default size of live-image is 2GB and a lot of files in it. As
a result, a part of newly installed kernel is highly probably located
beyond the limitation.

For sun3, we can drop some sets from SETS to fit within 1GB. However,
the REAL HAZARD is sun2; it does not support shared libraries, and
only base and etc are ~1.4GB.
>How-To-Repeat:
Try reinstalled kernels on live-images for sun[23] on TME.

Something like:

----
# vnconfig vnd0 NetBSD-10.99.7-sun2-live.img
# mount /dev/vnd0a /mnt
# cp /mnt/netbsd /mnt/netbsd2
# mv /mnt/netbsd2 /mnt/netbsd
# umount /mnt
----

is sufficient to make sun2 image unbootable.
>Fix:
For sun3, we can drop some sets to shrink live-image within 1GB.

Real fix may be to add support for multiple partitions for live-image,
e.g., sd0a for root, sd0d for usr. Then, we can safely restrict files in
root partition within 1GB from the beginning of image.



Home | Main Index | Thread Index | Old Index