help-grub
[Top][All Lists]
Advanced

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

Re: Grub 2 how boot .iso with memdisk?


From: John Lane
Subject: Re: Grub 2 how boot .iso with memdisk?
Date: Mon, 13 Feb 2017 11:19:07 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

On 02/11/15 12:05, Дмитрий Чепуровский wrote:
> I'm making usb multiusb pendrive.
> 
> 1. I want to understand what is memdisk.mod, how could I use it.
> 2. I want to boot iso (bootloader thart in iso file) from grub2
> 

Hi, I have done this and will try to help you.

Re point 1. It's irrelevant wrt booting isos on a Grub USB stick

Re point 2. Here is how I do it...

The following grub configuration examples assume the ISOs are placed in
an /iso subdirectory. Set up a reference to the device containing the
ISO images using either UUID:

    set imgdevpath='/dev/disk/by-uuid/deadbeef-cafe-babe-feed-cafe15bada55'

or disk label:

    set imgdevpath='/dev/disk/by-label/boot'

Then build menu items to boot the ISO images. Here are some examples:

menuentry 'archlinux i686' {
        set isofile='/iso/archlinux-2014.09.03-dual.iso'
        loopback loop $isofile
        linux (loop)/arch/boot/i686/vmlinuz archisolabel=ARCH_201409
img_dev=$imgdevpath img_loop=$isofile earlymodules=loop nomodeset
        initrd (loop)/arch/boot/i686/archiso.img
}

menuentry 'System Rescue CD' {
  set isofile="/iso/systemrescuecd-x86-4.4.1.iso"
  loopback loop $isofile
  linux (loop)/isolinux/rescue32 isoloop=$isofile nomodeset
  initrd (loop)/isolinux/initram.igz
}

menuentry 'Tails' {
  set isofile="/iso/tails-i386-1.2.1.iso"
  loopback loop $isofile
  linux (loop)/live/vmlinuz fromiso=$imgdevpath/$isofile boot=live
config noswap nopersistent nomodeset
  initrd (loop)/live/initrd.img
}

You'll need to craft your own for Ubuntu because I don't use it and I
don't know what it would need. But these examples should set you on your
way.

Hope it helps.

John







reply via email to

[Prev in Thread] Current Thread [Next in Thread]