Comments (4)
Fixed by d790fed thanks!
from pi-gen.
Fixed this with a pleasingly minimal change here at : pevsonic@2fe8d47
from pi-gen.
Thanks!
So I understand a bit better, could you please give an example output lines of 'mount' which demonstrate the situation where the problem would occur?
from pi-gen.
So I understand a bit better, could you please give an example output lines of 'mount' which demonstrate the situation where the problem would occur?
Sure!
So test scenario... on this machine, physical drive (bigssd) is mounted at /mnt/bigssd
. It has a top level split of directories that get bind-mounted to their actual locations :
/home
/opt
/tftpboot
/workdrive
...
For example, fstab contains :
#
# Bind-mounts
#
/mnt/bigssd/home /home auto defaults,bind 0 0
/mnt/bigssd/opt /opt auto defaults,bind 0 0
/mnt/bigssd/workdrive /workdrive auto defaults,bind 0 0
/mnt/bigssd/tftpboot /tftpboot auto defaults,bind 0 0
I create a new test project under /workdrive/projects
which is part of my usual workflow :
cd /workdrive/projects
git clone -b arm64 https://github.com/RPi-Distro/pi-gen.git
cd pi-gen
At the time of writing, git log --oneline | head -1
gives me :
64e2057 Merge branch 'master' into arm64
I then modify scripts/common
to add debug in :
unmount(){
if [ -z "$1" ]; then
DIR=$PWD
else
DIR=$1
fi
echo "-------------------------------------------------"
echo "Scenario C: existing unmount() logic :"
mount | grep "$DIR" | cut -f 3 -d ' ' | sort -r
echo "-------------------------------------------------"
echo "-------------------------------------------------"
echo "Scenario D: new unmount() logic :"
mount | grep " $DIR" | cut -f 3 -d ' ' | sort -r
echo "-------------------------------------------------"
while mount | grep -q "$DIR"; do
local LOCS
LOCS=$(mount | grep "$DIR" | cut -f 3 -d ' ' | sort -r)
for loc in $LOCS; do
umount "$loc"
done
done
}
And create a trivial config as per README.md
and attempt to build :
echo "IMG_NAME='raspios'" > config
touch ./stage3/SKIP ./stage4/SKIP ./stage5/SKIP
touch ./stage4/SKIP_IMAGES ./stage5/SKIP_IMAGES
sudo ./build.sh
This then crashes out with a failure containing the debug I added showing what's going on :
...
[16:08:36] End /workdrive/projects/pi-gen/stage0/02-firmware/01-packages
[16:08:36] Begin /workdrive/projects/pi-gen/stage0/02-firmware/02-run.sh
[16:08:36] End /workdrive/projects/pi-gen/stage0/02-firmware/02-run.sh
[16:08:36] End /workdrive/projects/pi-gen/stage0/02-firmware
[16:08:36] Begin /workdrive/projects/pi-gen/stage0/files
[16:08:36] End /workdrive/projects/pi-gen/stage0/files
-------------------------------------------------
Scenario C: existing unmount() logic :
/workdrive/projects/pi-gen/work/raspios/stage0/rootfs/tmp
/workdrive/projects/pi-gen/work/raspios/stage0/rootfs/sys
/workdrive/projects/pi-gen/work/raspios/stage0/rootfs/run
/workdrive/projects/pi-gen/work/raspios/stage0/rootfs/proc
/workdrive/projects/pi-gen/work/raspios/stage0/rootfs/dev/pts
/workdrive/projects/pi-gen/work/raspios/stage0/rootfs/dev
/mnt/bigssd/workdrive/projects/pi-gen/work/raspios/stage0/rootfs/tmp
/mnt/bigssd/workdrive/projects/pi-gen/work/raspios/stage0/rootfs/sys
/mnt/bigssd/workdrive/projects/pi-gen/work/raspios/stage0/rootfs/run
/mnt/bigssd/workdrive/projects/pi-gen/work/raspios/stage0/rootfs/proc
/mnt/bigssd/workdrive/projects/pi-gen/work/raspios/stage0/rootfs/dev/pts
/mnt/bigssd/workdrive/projects/pi-gen/work/raspios/stage0/rootfs/dev
-------------------------------------------------
-------------------------------------------------
Scenario D: new unmount() logic :
/workdrive/projects/pi-gen/work/raspios/stage0/rootfs/tmp
/workdrive/projects/pi-gen/work/raspios/stage0/rootfs/sys
/workdrive/projects/pi-gen/work/raspios/stage0/rootfs/run
/workdrive/projects/pi-gen/work/raspios/stage0/rootfs/proc
/workdrive/projects/pi-gen/work/raspios/stage0/rootfs/dev/pts
/workdrive/projects/pi-gen/work/raspios/stage0/rootfs/dev
-------------------------------------------------
umount: /mnt/bigssd/workdrive/projects/pi-gen/work/raspios/stage0/rootfs/tmp: not mounted.
pev@thinkpad:/workdrive/projects/pi-gen$
from pi-gen.
Related Issues (20)
- Cannot build 32-bit images (bullseye, bookworm) using standard build.sh on i686 Debian any more HOT 8
- Customization Using RPi Imager Cause Images to Fail on Boot HOT 7
- Use gpt and btrfs as root filesystem HOT 2
- Problems with `initramfs` not being generated HOT 4
- Removal of config.txt symlinks breaks postinst for fbturbo package HOT 1
- When building an image with zfs-dkms and DEBIAN_FRONTEND=noninteractive and still getting confirmation window HOT 3
- Custom raspberry OS image cannot boot up when boot partition size is 64MB or 128MB HOT 8
- MacOS + Docker: qemu-user-static check from #685 breaking build early HOT 5
- /usr/bin/raspi-config: 847: lxpanelctl: not found HOT 6
- The apt caching proxy we use currently is unreliable - let's replace it with nginx? HOT 1
- stage_list availability during build HOT 2
- ./build-docker.sh error "setarch: failed to set personality to linux32: Invalid argument" HOT 1
- adduser error when setting FIRST_USER_NAME in config HOT 2
- FR: Option to enable Real Time kernel HOT 1
- Integrating cusom kernel builds & packaging with pi-gen HOT 6
- Change docker to build in the host filesystem directly HOT 2
- debootstrap not empty during stage 0 HOT 18
- Add new one partition to image HOT 1
- Custom dtbo files during firstboot HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pi-gen.