summaryrefslogtreecommitdiff
path: root/archiso/initcpio
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2016-05-24 12:02:42 +0200
committerGerardo Exequiel Pozzi <vmlinuz386@gmail.com>2016-05-24 21:31:37 -0300
commitca85896bfcc281df871a93d3dd9e136a244a9703 (patch)
tree523bfcfe2369774a1aba9e90ccd3d3ca3a6095c6 /archiso/initcpio
parent091e40e3c92879d93df75c86c593f764a985b8e9 (diff)
downloadarchiso32-ca85896bfcc281df871a93d3dd9e136a244a9703.tar.xz
fix NBD boot without copy-to-ram
Signed-off-by: Christian Hesse <mail@eworm.de>
Diffstat (limited to 'archiso/initcpio')
-rw-r--r--archiso/initcpio/hooks/archiso_pxe_nbd11
1 files changed, 7 insertions, 4 deletions
diff --git a/archiso/initcpio/hooks/archiso_pxe_nbd b/archiso/initcpio/hooks/archiso_pxe_nbd
index d9bc6d8..fdb2c2b 100644
--- a/archiso/initcpio/hooks/archiso_pxe_nbd
+++ b/archiso/initcpio/hooks/archiso_pxe_nbd
@@ -25,16 +25,19 @@ archiso_pxe_nbd_mount_handler () {
done
msg ":: Setup NBD from ${archiso_nbd_srv} at /dev/nbd0"
- nbd-client ${archiso_nbd_srv} -N ${archiso_nbd_name} /dev/nbd0
-
if [[ "${copytoram}" != "n" ]]; then
+ nbd-client ${archiso_nbd_srv} -N ${archiso_nbd_name} /dev/nbd0
copytoram="y"
+ else
+ nbd-client ${archiso_nbd_srv} -N ${archiso_nbd_name} -systemd-mark -persist /dev/nbd0
fi
archisodevice=/dev/nbd0
archiso_mount_handler ${newroot}
- msg ":: Disconnect NBD from ${archiso_nbd_srv} at /dev/nbd0"
- nbd-client -d /dev/nbd0
+ if [[ "${copytoram}" == "y" ]]; then
+ msg ":: Disconnect NBD from ${archiso_nbd_srv} at /dev/nbd0"
+ nbd-client -d /dev/nbd0
+ fi
}