From d35d87f252caa97b716ce819ded9972e7c6609e4 Mon Sep 17 00:00:00 2001 From: Adam Purkrt Date: Sun, 30 Aug 2015 00:39:41 +0200 Subject: cleaner boot from loopmounted iso file Currently, when booting loopmounted iso file, it is necessary to specify not only img_dev and img_loop (which should be sufficient), but also archisolabel or archisodevice. With this patch, archisodevice is directly populated with the correct loop device, and it is not necessary to specify the label when booting from loopmounted iso, which makes for leaner and cleaner grub.cfg. --- archiso/initcpio/hooks/archiso_loop_mnt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'archiso/initcpio/hooks') diff --git a/archiso/initcpio/hooks/archiso_loop_mnt b/archiso/initcpio/hooks/archiso_loop_mnt index 46338e5..f95a47d 100644 --- a/archiso/initcpio/hooks/archiso_loop_mnt +++ b/archiso/initcpio/hooks/archiso_loop_mnt @@ -18,7 +18,9 @@ archiso_loop_mount_handler () { echo $(readlink -f ${img_dev}) >> /run/archiso/used_block_devices fi - if ! _dev_loop=$(losetup --find --show --read-only "/run/archiso/img_dev/${img_loop}"); then + if _dev_loop=$(losetup --find --show --read-only "/run/archiso/img_dev/${img_loop}"); then + archisodevice="${_dev_loop}" + else echo "ERROR: Setting loopback device for file '/run/archiso/img_dev/${img_loop}'" launch_interactive_shell fi -- cgit v1.2.3-70-g09d2