stage-1: fix copytoram option for loopback.cfg boot
Uses an alternative method to find the size of the ISO when it is a file and not a block device for creating the tmpfs its contents are copied to.
This commit is contained in:
parent
a674bfbff4
commit
d5b9aefa43
@ -542,7 +542,7 @@ while read -u 3 mountPoint; do
|
||||
# If copytoram is enabled: skip mounting the ISO and copy its content to a tmpfs.
|
||||
if [ -n "$copytoram" ] && [ "$device" = /dev/root ] && [ "$mountPoint" = /iso ]; then
|
||||
fsType=$(blkid -o value -s TYPE "$device")
|
||||
fsSize=$(blockdev --getsize64 "$device")
|
||||
fsSize=$(blockdev --getsize64 "$device" || stat -Lc '%s' "$device")
|
||||
|
||||
mkdir -p /tmp-iso
|
||||
mount -t "$fsType" /dev/root /tmp-iso
|
||||
|
Loading…
Reference in New Issue
Block a user