Current-Users archive

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

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



------- Original Message -------
On Sunday, July 10th, 2022 at 10:47 AM, RVP <rvp%SDF.ORG@localhost> wrote:

> Right. After ~10 hours of doing `build.sh release' I have a patch. However, I'm not at all certain that this script is meant to be used on the x86 arch. because: a) It only seems to be used by the evbarm and evbmips builds. b)` build live-image' already works (better!) than this script.
>
> c) it does very odd things:
> 1. writes a partition table and an MBR.
> 2. promptly over-writes it with the primary bootstrap (PBR) and the
> disklabel, so the system actually boots directly from the PBR.
>
> Still, here's the patch:
>
> ---
> diff -urN a/distrib/utils/embedded/mkimage b/distrib/utils/embedded/mkimage
> --- a/distrib/utils/embedded/mkimage 2021-09-25 08:54:30.000000000 +0000
> +++ b/distrib/utils/embedded/mkimage 2022-07-10 08:18:03.575853000 +0000
> @@ -255,7 +255,7 @@
> echo ${bar} Populating ffs filesystem ${bar}
> ${MAKEFS} -rx ${endian} -N ${release}/etc -t ffs \
> -O ${ffsoffset} \
> - -o d=4096,f=8192,b=65536 -b $((${extra}))m \
> + -o d=8192,f=2048,b=16384 -b $((${extra}))m \
> -F "$tmp/selected_sets" ${image} "${release}" "${mnt}"
> fi
>
> ---
>
> 1. Make sure you pass the `-r sd' or` -r wd' flags, otherwise, the script
> defaults to `ld' and builds an /etc/fstab with that baked in. 2. This doesn't produce a very good live image as a) there's hardly any free space left over, and b) it doesn't grow the root partition like` build.sh live-image' does.
>
> I'm don't know what this little oddball script is doing in the Guide...
>
> -RVP

I confirm that the image is bootable with your patch, thank you !!! As you said already, it lack the resize capability, which make the image somehow useless since it run out of space at first boot. I did try "resize_root=YES" in rc.conf without any luck.

I did end-up by using the live-image. The only missing piece for me was the "fstab_minwrites" (which is still relevant in 2022 seeing the price of CF card).
For the record: http://rich-tbp.blogspot.com/2013/03/netbsd-on-rpi-minimizing-disk-writes.html

br0nko


Home | Main Index | Thread Index | Old Index