NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: install/56132: build.sh target install-image fails in update-mode
The following reply was made to PR install/56132; it has been noted by GNATS.
From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
To: paul%whooppee.com@localhost
Cc: gnats-bugs%netbsd.org@localhost, tsutsui%ceres.dti.ne.jp@localhost
Subject: Re: install/56132: build.sh target install-image fails in update-mode
Date: Thu, 29 Apr 2021 04:28:06 +0900
> > Could you show output of 'ls -l' in your $OBJDIR of
> > src/distrib/amd64/uefi-installimage?
>
> There is no uefi-installimage (only install-image)...
Ah, I looked at netbsd-9 src tree..
> Here's what we get when building with too-small size...
:
> $ ls -l /build/netbsd-local/src/distrib/amd64/installimage/
> total 2444
> drwxrwxr-x 2 paul staff 512 Apr 27 16:12 CVS
> -rw-r--r-- 1 paul staff 1340 Apr 26 07:08 Makefile
> -rw-rw-r-- 1 paul staff 337 Apr 27 20:45 boot.cfg
> -rw-r--r-- 1 paul staff 347 Apr 24 2019 boot.cfg.in
> -rw-r--r-- 1 paul staff 2225 Feb 26 2020 etc.rc
> -rw-r--r-- 1 paul staff 208 Jan 28 2019 etc.ttys
> -rw-r--r-- 1 paul staff 3082 Jan 28 2019 install.sh
> -rw-r--r-- 1 paul staff 684 Jan 28 2019 spec.inst
> drwxr-xr-x 18 paul staff 512 Apr 27 20:45 work
> -rw-rw-r-- 1 paul staff 87 Apr 27 20:45 work.fstab
> -rw-rw-r-- 1 paul staff 1677721600 Apr 27 20:45 work.mbr
> -rw-rw-r-- 1 paul staff 1048576 Apr 27 20:45 work.mbr.truncated
> -rw-rw-r-- 1 paul staff 545 Apr 27 20:45 work.rc.conf
> -rw-rw-r-- 1 paul staff 1188141 Apr 27 20:45 work.spec
> $
>
> And here is where we retry with a big-enough value for INSTIMAGEMB
> (_and_ adding -u to the build.sh command line)...
:
> /build/netbsd-local/tools/x86_64/amd64/bin/nbgpt work.img biosboot -i 2 -c /build/netbsd-local/src/distrib/amd64/installimage/work/usr/mdec/gptmbr.bin
> nbgpt: work.img: No secondary GPT header; run recover
> *** Failed target: NetBSD-9.99.82-amd64-install.img
> *** Failed command: /build/netbsd-local/tools/x86_64/amd64/bin/nbgpt work.img biosboot -i 2 -c /build/netbsd-local/src/distrib/amd64/installimage/work/usr/mdec/gptmbr.bin
> *** Error code 1
> ...
> ERROR: Failed to make install-image
> *** BUILD ABORTED ***
> $ ls -l /build/netbsd-local/src/distrib/amd64/installimage/
> total 3353136
> drwxrwxr-x 2 paul staff 512 Apr 27 16:12 CVS
> -rw-r--r-- 1 paul staff 1340 Apr 26 07:08 Makefile
> -rw-rw-r-- 1 paul staff 337 Apr 27 20:52 boot.cfg
> -rw-r--r-- 1 paul staff 347 Apr 24 2019 boot.cfg.in
> -rw-r--r-- 1 paul staff 2225 Feb 26 2020 etc.rc
> -rw-r--r-- 1 paul staff 208 Jan 28 2019 etc.ttys
> -rw-rw-r-- 1 paul staff 1646264320 Apr 27 20:52 imgroot.fs
> -rw-r--r-- 1 paul staff 3082 Jan 28 2019 install.sh
> -rw-r--r-- 1 paul staff 684 Jan 28 2019 spec.inst
> drwxr-xr-x 18 paul staff 512 Apr 27 20:52 work
> -rw-r--r-- 1 paul staff 134217728 Apr 27 20:52 work.efi
> drwxrwxr-x 3 paul staff 512 Apr 27 20:52 work.efidir
> -rw-rw-r-- 1 paul staff 87 Apr 27 20:45 work.fstab
> -rw-rw-r-- 1 paul staff 0 Apr 27 20:52 work.gpt
> -rw-rw-r-- 1 paul staff 1781530624 Apr 27 20:52 work.img
> -rw-rw-r-- 1 paul staff 1677721600 Apr 27 20:45 work.mbr
> -rw-rw-r-- 1 paul staff 1048576 Apr 27 20:45 work.mbr.truncated
> -rw-rw-r-- 1 paul staff 545 Apr 27 20:52 work.rc.conf
> -rw-rw-r-- 1 paul staff 1188141 Apr 27 20:52 work.spec
Ok, I see. ${WORKMBR} depends on ${IMAGESECTORS} and also includes
GPT info that depends on the image size (the secondary GPT "header"
is located at the end of the disk), so ${WORKMBR} should be recreated
if ${IMAGEMB} is changed, but there is no explicit dependecy
lines for it in src/distrib/common/bootimage/Makefile.bootimage.
For workaround, it would work to make ${WORKMBR} depend on ${TARGETFS}
(i.e. create ${WORKMBR} after ${TARGETFS} by ${TOOL_MAKEFS} is complete).
How about this change? (untested)
Index: distrib/common/bootimage/Makefile.bootimage
===================================================================
RCS file: /cvsroot/src/distrib/common/bootimage/Makefile.bootimage,v
retrieving revision 1.26
diff -u -p -d -r1.26 Makefile.bootimage
--- distrib/common/bootimage/Makefile.bootimage 5 Aug 2020 01:35:18 -0000 1.26
+++ distrib/common/bootimage/Makefile.bootimage 28 Apr 2021 19:16:04 -0000
@@ -499,7 +499,7 @@ ${WORKFAT}: ${TARGETFS} ${FATFILES}
${FATMAKEFSOPTIONS} \
${WORKFAT} ${WORKFATDIR}
-${WORKMBR}:
+${WORKMBR}: ${TARGETFS}
.if ${USE_GPT} != "no"
@echo creating GPT header and partition entries...
${RM} -f ${WORKMBR}
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index