Re: GRUB setup for multi-boot ISO from memory stick
On Sat 01 Dec 2012 at 22:53:27 -0500, Intense Red wrote:
> I've been trying to set up Testing/Wheezy's DVD ISO to boot from a memory
> card/USB thumb drive, as outlined at http://www.pendrivelinux.com/boot-
> multiple-iso-from-usb-via-grub2-using-linux/
You'll have a FAT16/32 filesystem on the drive, then. That's of some
importance; it will save you some work. I use FAT16 and keep the ISOs in
/boot/isos.
> I have the *.iso file renamed "debian.iso" and put in the root directory of
> the USB drive/memory card. GRUB is installed on the card just fine and it boots
> and acts like it should.
>
> My problem is configuring GRUB to boot the Debian ISO file. My GRUB menu.cfg
> entry is:
>
> menuentry "Debian ISO" {
> loopback loop /debian.iso
> linux (loop)/install.386/vmlinuz boot=install.386 iso-
> scan/filename=/debian.iso noeject noprompt splash --
> initrd (loop)/install.386/initrd.gz
> }
This works for me:
menuentry "debian-wheezy-beta4" {
loopback loop0 /boot/isos/debian-wheezy-DI-b4-i386-netinst.iso
linux (loop0)/install.386/vmlinuz priority=low
initrd (loop0)/install.386/initrd.gz
}
I'm fairly sure boot= and iso-scan/filename= are not needed. In fact, I
have doubts whether iso-scan/filename is even used by any Debian images.
> This boots the ISO file and starts the Debian installation. The installation
> goes along just fine until the install program asks me where the CD-ROM is. The
> computer doesn't have CD-ROM and I want the installer to read the debian.iso
> file as the "first" (and only) CD-ROM. But I can't seem to "see" the *.iso file
> from the booted kernel even though the kernel is booted from the debian.iso
> file.
>
> Does anyone know how to properly configure the grub.cfg entry so that it
> will both boot from the *.iso file and so I can tell the installer to use the
> same *.iso file as the "CD-ROM"?
Your GRUB stanza is basically ok. You used loopback to get the installer
going. Now it is looking around for an ISO to mount, also in loopback
mode. One problem is that kernel provides only one loop device at this
stage - /dev/loop0, and GRUB has got its hands on it. You will have to
come to the rescue and help D-I out by detecting and mounting the ISO
for it.
You need a kernel loop module which matches the running kernel. For the
Wheezy beta-4 it can be found in
loop-modules-3.2.0-4-486-di_3.2.32-1_i386.udeb
Extract loop.ko and put it on your memory card/USB thumb drive. Boot and
do the detecting of the CD-ROM. Ok, we know this will not work but it
gets the directory /cdrom created. We may as well make the installer
work for its living.
Now get a console with ALT F2 and do
mount -tvfat /dev/sdX(n) /mnt
/dev/sdX(n) is the device you booted from. 'ls -l /dev/sd*' might help
you to identify it. Now
cp /mnt/loop.ko /lib/modules/3.2.0-4-486/kernel/drivers/block/
and do
depmod
followed by
modprobe loop
if the last command didn't get any complaints you are on your way to a
successful install.
Almost finally:
mount -o loop /mnt/debian-wheezy-DI-b4-i386-netinst.iso /cdrom
Finally: load the installer components.
Are you sure you want to do this? It is easier to get the installer
installing without using GRUB's loopback facility.
Reply to: