1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 06:31:02 +00:00

Merge pull request #135608 from hyperfekt/loopback_copytoram

stage-1: fix copytoram option for loopback.cfg boot
This commit is contained in:
Lassulus 2021-08-26 09:53:05 +02:00 committed by GitHub
commit 612a8fa189
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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