Date: Sun, 07 Jan 2024 20:19:13 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 276174] mkuzip creates images with an invalid startup script Message-ID: <bug-276174-227-xiFnzCDqxH@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-276174-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276174 --- Comment #2 from Bill Blake <billblake2018@gmail.com> --- These are the commands and the resulting script that is put at the start of each out.img file: > mkuzip -A zstd -o out.img in.img #!/bin/sh #Z4.0 Format (kldstat -qm g_uzip||kldload geom_uzip)>&-&&mount_cd9660 /dev/`mdconfig -af $0`.uzip $1 exit $? > mkuzip -A lzma -o out.img in.img #!/bin/sh #L3.0 n=uncompress m=geom_$n (kldstat -m $m 2>&-||kldload $m)>&-&&mount_cd9660 /dev/`mdconfig -af $0`.$n $1 exit $? > mkuzip -A zlib -o out.img in.img #!/bin/sh #V2.0 Format (kldstat -qm g_uzip||kldload geom_uzip)>&-&&mount_cd9660 /dev/`mdconfig -af $0`.uzip $1 exit $? I can't speak to the kldstat/kldload stuff since I didn't actually run these scripts. However, look at the second example, which uses lzma. It tries to mount /dev/md*.uncompress. However, the mdconfig creates /dev/md*.uzip, so the mount fails. (I did the commands manually to confirm that this sequence doesn't work.) The other two correctly use the .uzip device. But in all three cases, the mount is mount_cd9660, which won't work since the file systems actually created are ufs file systems. They need "mount -o ro" instead. (Again, manually confirmed.) Also, a nitpick: The mdconfig calls should have an option "-o ro". Where it matters is when the config'd image is on a read-only file system; mdconfig will generate an error message without the read-only option, though it still configs the file. -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-276174-227-xiFnzCDqxH>
