[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Multiple live iso's on a single bootable flash drive?



On Thu 28 Apr 2016 at 22:26:33 +0300, Piyavkin wrote:

> On 28.04.2016 19:31, Curt wrote:
> >On 2016-04-28, Richard Owlett <rowlett@cloud85.net> wrote:
> >>I've some untried VAGUE ideas on how to accomplish.
> >Maybe this would work if I'm understanding you correctly:
> >
> >http://www.pendrivelinux.com/boot-multiple-iso-from-usb-via-grub2-using-linux/#more-5352
> >
> >>Two questions:
> >>Has this been done before?
> >>Any comments?
> 
> Yep, it can be done and pretty easy. I've done (been doing) it using some
> instructions from the pendrivelinux.com.
> 
> The idea is simple:
> 
> 1. Install grub2 on a USB-drive.

The drive should first be partitioned and the partitiion(s) formatted. I
use FAT16 and vfat. If it is an installer image which GRUB is booting
the fat and vfat modules are available from the start of the install.

> 2. Place there .iso image (in root of the drive or in some directory as you
> like).
> 
> 3. Use in the grub.cfg instructions like such:
> 
> menuentry "Xubuntu 14.04.1 Desktop i386 ISO" {
>  set isofile="/xubuntu-14.04.1-desktop-i386.iso"
>  loopback loop $isofile
>  linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noeject
> noprompt splash --
>  initrd (loop)/casper/initrd.lz
> }
> 
> 4. Profit!

It is worth stressing that 'boot=casper' is for Ubuntu-based live images
only. It will not work with a Debian live image. I think the same is
true of 'iso-scan/filename=...'.

> Images from Ubuntu family works fine. As to the Debian there was some
> weirdness (I don't know if it still persists in newer versions), but it is
> possible to dodge it. Simple way (from here

You have switched from talking about Debian live images to installer
images. GRUB's loopback facility cannot be used with them because the
iso-scan and load-iso packages are only included in the hd-media initrd.
It is a source of contention (and a number of bug reports) but it is by
design.

There should be no expectation of GRUB's loopback working to install
Debian using just d-i's initrd in the ISO.

> https://wiki.archlinux.org/index.php/Multiboot_USB_drive#Debian ) is:
> 
> 0. Do steps 1 and 2 from list above.
> 
> 1. Download proper initramfs (which matches your desirable Debian .iso
> image) from here:
> https://mirrors.kernel.org/debian/dists/stable/main/installer-amd64/current/images/hd-media/initrd.gz
> https://mirrors.kernel.org/debian/dists/stable/main/installer-i386/current/images/hd-media/initrd.gz
> http://mirrors.kernel.org/debian/dists/stable/main/installer-i386/current/images/netboot/debian-installer/i386/initrd.gz
> etc.
> 
> 2. Place it somewhere on the USB-drive (in /deb/hdd directory, for example).
> 
> 3. Use such instructions in grub.cfg:
> 
> menuentry "Debian 7.8.0 Desktop i386 Gnome CD ISO (CD Install;
> /deb/hdd/initrd.gz)" {
>  set isofile="/debian-7.8.0-i386-CD-1.iso"
>  set initrdfile='/deb/hdd/initrd.gz'
>  loopback loop0 $isofile
>  linux (loop0)/install.386/vmlinuz iso-scan/ask_second_pass=true
> iso-scan/filename=$isofile priority=low
> # initrd (loop0)/install.386/initrd.gz
>  initrd $initrdfile
> }
> 
> 4. Profit again!
> 
> Debian Live iso works without additional downloads (some kind of
> self-sufficient). It is possible to use fromiso param and to provide precise

The live ISO initrds contain sufficient to scan and find the ISO and
provide a loop device.

> path to your iso and address your USB-drive by UID like this (theoretically
> it should speed up the process):
> 
> menuentry "Debian 7.8.0 Desktop i386 Xfce ISO (LIVE from ISO)" {
>  set isofile="/debian-live-7.8.0-i386-xfce-desktop.iso"
>  loopback loop0 $isofile
>  linux (loop0)/live/vmlinuz1 boot=live
> fromiso=/dev/disk/by-uuid/19C5-2FB2$isofile live-media-path=/live config
>  initrd (loop0)/live/initrd1.img
> }

vmlinuz1 and initrd1.img are for booting live-586. Files in the isolinux
directory of the ISO should be consulted for other kernels and initrds
to use.

I'd suggest 'findiso=$isofile' as a possible replacement for the
'fromiso=...' directive.


Reply to: