Comment 7 for bug 1824407

Colin Ian King (colin-king) wrote :

Hi Dimitri,

while debugging this I found the following in setup_unionfs() in scripts/casper:

    # move the first mount; no head in busybox-initramfs
    for d in $(mount -t squashfs | cut -d\ -f 3); do
        mkdir -p "${rootmnt}/rofs"
        if [ "${UNIONFS}" = unionfs-fuse ]; then
            mount -o bind "${d}" "${rootmnt}/rofs"
            mount -o move "${d}" "${rootmnt}/rofs"

and looking at the debug /run/initramfs/initramfs.debug log for the above stanza I see:

+ cut '-d ' -f 3
+ mount -t squashfs
+ mkdir -p /root/rofs
+ '[' overlay '=' unionfs-fuse ]
+ mount -o move /filesystem.squashfs /root/rofs
+ break

however, when I cannot reproduce this mount -o move operation by hand as I get the mount error:

mount: /root/rofs: /filesystem.squashfs is not a block device.

It appears to me that the scripts/casper mount seems to silently ignore this failure. Should the mount be a bind mount instead?