This message describes the motivation for the "debian-iso-loopmount.diff" patch, which is reproduced above. It was originally posted here:
http://lists.debian.org/debian-boot/2013/09/msg00509.html Begin forwarded message: Date: Sat, 28 Sep 2013 03:08:48 -0700 From: <ian_br...@fastmail.net> To: debian-b...@lists.debian.org Subject: PATCH: specify pathname for ISO loop-mount This patch introduces a boot parameter, "loopmount=", which allows the specification of a full pathname (relative to the root directory of some block device) of an ISO image file which should be loop-mounted as the Debian installer root filesystem. The main purpose of this feature is to facilitate the creation of USB flashdrives which can contain multiple Linux live distributions, selectable at boot time via a Syslinux menu. http://sourceforge.net/projects/multibootusb/ The current method of creating a Debian installer flashdrive overwrites the existing partition table and filesystem: *Warning* The procedures described in this section will destroy anything already on the device! http://www.debian.org/releases/stable/amd64/ch04s03.html.en This is unnecessarily destructive, and makes it hard to install multiple distributions on the same flashdrive, or to use it for other purposes. The smallest flashdrive you can currently buy is 8GB; it makes no sense that you would have to have a different one for every live ISO you might want to use. The effect of this patch is that you can just copy the Debian installer ISO into the existing filesystem on the flashdrive, and boot it with GRUB or Syslinux, using the "loopmount=" boot parameter to specify the ISO pathname. It will be apparent from reading the patch that if this parameter is not specified, everything functions EXACTLY as before; the new code will not be run. The changes amount to no more than forty lines of new code, in one file. I suppose that this patch applies to the "cdrom-detect" udeb, although I just patched the initrd directly. A dependency on "loop-modules" will need to be added, to make sure that the "loop.ko" kernel module gets copied into the initrd. One issue that probably should be addressed is what to do if the specified ISO is not actually present; the boot process should fail gracefully, but I'm not sure how best to accomplish that. Minor changes (see the "LOOPFS" variable) would be needed to make it work for FreeBSD and Hurd; I've only tried it with Linux. Comments are welcome, but apart from the above, I don't think there's much wrong with this patch; testing shows that it seems to work perfectly. -- Ian Bruce -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org