You are not logged in.

#1 2013-04-25 20:48:08

arathorn2nd
Member
Registered: 2013-04-25
Posts: 2

[Solved]Booting ISO inside multi-boot USB using GRUB

Hello guys, I'm a newcomer to the forum with a probably unsupported idea.

I have installed GRUB in a FAT32 formatted USB drive and have been putting ISOs there to make a multi-boot device.
I have successfully been running Ubuntu and decided to give a try at Arch Linux.

During the boot, it fails to find the ISO because it's not the same root as the GRUB bootloader.
When it falls back to the shell I can manually mount the usb partition to /mnt and the iso to /run/archiso/bootmnt and it finishes booting perfectly.
My question is if there are options to be passed to the kernel to make these mounts automatically.
Can anyone help me?

My setup is the following:
* USB key at /dev/sdb with one vfat partition at /dev/sdb1
* /boot/grub contains grub installation
* /boot/iso contains ISO files

Here's /boot/grub/grub.cfg

# Config for GNU GRand Unified Bootloader (GRUB)
# /boot/grub/grub.cfg

# Timeout for menu
#set timeout=30

# Default boot entry
#set default=0

# Menu Colours
set menu_color_normal=white/black
set menu_color_highlight=white/green

# Boot ISOs

menuentry "Arch Linux x86_64 13.04" {
    set iso="/boot/iso/archlinux-2013.04.01-dual.iso"
    loopback loop $iso
    set root=(loop)
    linux /arch/boot/x86_64/vmlinuz
    initrd /arch/boot/x86_64/archiso.img archisobasedir=arch archisodevice=$iso
}

menuentry "Xubuntu 13.04 i386 - Raring Ringtail" {
    set iso="/boot/iso/xubuntu-13.04-desktop-i386.iso"
    loopback loop $iso
    linux (loop)/casper/vmlinuz  file=/cdrom/preseed/xubuntu.seed boot=casper iso-scan/filename=$iso quiet splash --
    initrd (loop)/casper/initrd.lz
}

menuentry "Kubuntu 13.04 amd64 - Raring Ringtail" {
    set iso="/boot/iso/kubuntu-13.04-desktop-amd64.iso"
    loopback loop $iso
    linux (loop)/casper/vmlinuz  file=/cdrom/preseed/kubuntu.seed boot=casper iso-scan/filename=$iso quiet splash --
    initrd (loop)/casper/initrd.lz
}

Last edited by arathorn2nd (2013-04-26 13:17:29)

Offline

#2 2013-04-25 21:12:13

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [Solved]Booting ISO inside multi-boot USB using GRUB

Maybe this will help: https://wiki.archlinux.org/index.php/GR … From_GRUB2

From what I can see, you only have:

loopback loop $iso

Instead of:

loopback loop (hd0,6)$isofile

And you're also missing an "archisolabel=" parameter, so that's why it probably can't find it. But I'm not sure, since this is my favourite method for booting ISO files. Couple that with a nice menu (link) and you're golden. Have fun and don't forget to mark the topic as solved (by editing the first post) so that other people (including yourself sometimes) may find useful.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#3 2013-04-25 21:24:21

arathorn2nd
Member
Registered: 2013-04-25
Posts: 2

Re: [Solved]Booting ISO inside multi-boot USB using GRUB

DSpider wrote:

Thanks for the link, that was pretty much what I was looking for. Now working perfectly!
Here's the menuentry for Arch in grub.cfg

menuentry "Arch Linux x86_64 13.04" {
    set iso="/boot/iso/archlinux-2013.04.01-dual.iso"
    loopback loop $iso
    set root=(loop)
    linux /arch/boot/x86_64/vmlinuz archisolabel=ARCH_201304 img_dev=/dev/disk/by-label/multi img_loop=$iso earlymodules=loop
    initrd /arch/boot/x86_64/archiso.img
}
DSpider wrote:

From what I can see, you only have:

loopback loop $iso

Instead of:

loopback loop (hd0,6)$isofile

I don't think that's needed, as GRUB is able to loopback the iso and boot vmlinuz/archiso.img correctly.

DSpider wrote:

And you're also missing an "archisolabel=" parameter, so that's why it probably can't find it.

I had it set to archisolabel as it's in the ISO syslinux, but the device does not exist at kernel boot, just the usb is available.

DSpider wrote:

But I'm not sure, since this is my favourite method for booting ISO files. Couple that with a nice menu (link) and you're golden. Have fun and don't forget to mark the topic as solved (by editing the first post) so that other people (including yourself sometimes) may find useful.

That would conflict with my current grub setup unless I'm able to chainload. Not sure if it's possible.

Last edited by arathorn2nd (2013-04-26 13:16:50)

Offline

Board footer

Powered by FluxBB