Lenny general freeze ahead
On 06/06/2008, Jordi Pujol <jordipujolp at gmail.com> wrote:
> Hello,
>
> looking at the changes in live-initramfs v1.132.1
>
> there is the following change:
>
> @@ -979,7 +965,7 @@
> rofslist="${image} ${rofslist}"
> elif [ -f "${image}" ]
> then
> - backdev=$(get_backing_device "${image}")
> + backdev=$(get_backing_device "${image}" "-r")
> fstype=$(get_fstype "${backdev}")
>
> if [ "${fstype}" = "unknown" ]
> then
> panic "Unknown file system type on ${backdev} (${image})"
> fi
>
> mkdir -p "${croot}/${imagename}"
> echo "debug: Mounting backdev \"${backdev}\" (image = ${image}) on
> croot/imagename \"${croot}/${imagename}\""
> mount -t "${fstype}" -o ro,noatime "${backdev}" "${croot}/${imagename}" ||
> panic "Can not mount ${backdev} (${image}) on ${croot}/${imagename}" &&
> rofsstring="${croot}/${imagename}=${roopt}:${rofsstring}" &&
> rofslist="${croot}/${imagename} ${rofslist}"
> fi
>
> considering that the mount command also is done with the readonly option, What
> is the finality of invoking losetup with the option -r ?
It's pretty much irrelevant but it is still cleaner to set up the
device readonly.
> Also consider that if the invoked losetup command is the Busybox internal
> command, the booting process will fail with an error for unknown option,
The whole reason for this change was to make the script work wit
losetup that ships with the loop-aes. It is recommended so it is
installed and stuff breaks because of it.
It is fine with me if the change is reverted and live-initramfs
conflicts with loop-aes-utils.
Still the inability to set up readonly devices is a deficiency of
BusyBox. Similarily it fails to understand -f and -n mount options
which would break stuff if busybox mount was used.
Thanks
Michal
Reply to: