[Bug 276174] mkuzip creates images with an invalid startup script
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 276174] mkuzip creates images with an invalid startup script"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 07 Jan 2024 20:19:13 UTC
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.