Boot LMDE.iso from bootable USB Stick with Grub2

Archived topics about LMDE 1 and LMDE 2
Locked
black_screen

Boot LMDE.iso from bootable USB Stick with Grub2

Post by black_screen »

Hi guys,
I recently download LMDE and test it, in personally reason i decide to use live it from my multiboot USB Stick that grub2 installed to it.
with this script http://www.panticz.de/MultiBootUSB i booted many iso file, directly from usb stick, but for LMDE i don`t know any true kernel option/cheatcodes for use as menuentry in grub.cfg file.
i try several cheatcodes but all of them failed.
if you look at the isolinux.cfg on iso file, find that kernel option might "live-media-path=/casper" to find location of this file : filesystem.squashfs (see the below structure)
i discuse this issue on irc #linuxmint-debian , #debian-live and #grub, but so far i have not recived any true response.

for ex: grub.cfg

Code: Select all

menuentry "LMDE" {
	loopbak loop /LMDE.iso
	linux (loop)/casper/vmlinuz boot=live live-media-path=/casper
	initrd (loop)/casper/initrd.lz
}
and it`s a LMDE iso structure:

Code: Select all

ISO STRUCTURE
+
+casper
	|filesystem.manifest
	|filesystem.manifest-desktop
	|filesystem.squashfs
	|initrd.lz
	|vmlinuz
+isolinux
	|boot.cat
	|isolinux.bin
	|isolinux.cfg
	|memtest
	|splash.jpg
	|vesamenu.c32
+md5sum.txt
that seems kernel option not support isofrom=DEVICE , fromiso= or findiso=

and finally how to determin iso file to boot directly as same as this code?
code:

Code: Select all

menuentry "Linux Mint 9.0 Gnome" {

 loopback loop /linuxmint_9.iso
 linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/linuxmint.iso noeject noprompt --
 initrd (loop)/casper/initrd.lz
}
and this is simple USB srtick structure:

Code: Select all

/
+boot <directroy that grub 2 install to it>
+LMDE.iso
+linuxmint_9.iso
also i can do extract 3 file {initrd.lz,vmlinuz,filesystemsquashfs} from iso file and boot it from usb , but i wanna use iso directly.
addition to you can see http://pastebin.com/HTVfwue8 and http://pastebin.com/Ln4d6mXz to compare live and casper file from initrd.lz/scripts/
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Oscar799
Level 20
Level 20
Posts: 10398
Joined: Tue Aug 11, 2009 9:21 am
Location: United Kingdom

Re: Boot LMDE.iso from bootable USB Stick with Grub2

Post by Oscar799 »

I moved this here.
Seems like a better home for it
oscar799
Forum Admin
Image
User avatar
darethehair
Level 4
Level 4
Posts: 239
Joined: Sun Mar 08, 2009 2:22 pm
Location: Morden Manitoba Canada
Contact:

Re: Boot LMDE.iso from bootable USB Stick with Grub2

Post by darethehair »

Ouch! I just got hit by this same problem yesterday -- I was going to demonstrate Linux Mint Debian to a friend of mine on my grub2 'multi-boot' USB stick, and it failed to boot! I was a bit embarrassed, since I had just assumed that it would work like the other distros (including Mint Gnome and LXDE) on the stick. Here is my grub.cfg entry:

Code: Select all

menuentry "Mint Gnome Debian" {
    set isofile="/boot/isos/linuxmint-debian-201009-gnome-dvd-i386.iso"
 
    loopback loop $isofile 
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash noprompt --
    initrd (loop)/casper/initrd.lz
}
The message that I end up getting when I try to boot is:

Code: Select all

Loading.  please wait...
/init: .: line 215: can't open '/scripts/casper'
[    5.28909] Kernel panic - not syncing: Attempted to kill init!
Since 'Mint Debian' is the distro that I am going to offer my friends as '1st choice' from now on, it would sure be nice to have this grub2 direct ISO boot ability!

EDIT: Looks like this problem has been reported here as well: https://bugs.launchpad.net/linuxmint/+bug/636798
There is nothing more dangerous than a bored cat.
User avatar
darethehair
Level 4
Level 4
Posts: 239
Joined: Sun Mar 08, 2009 2:22 pm
Location: Morden Manitoba Canada
Contact:

Re: Boot LMDE.iso from bootable USB Stick with Grub2

Post by darethehair »

Hmmm...I just tried this again with the brand-new LMDE '201012' ISO, and the problem appears to still be present :(

Anybody have any more success in the meantime?
There is nothing more dangerous than a bored cat.
wimac

Re: Boot LMDE.iso from bootable USB Stick with Grub2

Post by wimac »

I was able to get it to work but not with the ISO I just mounted the iso and copied the contents to the usbdrive and this as my grub2 entry:

Code: Select all

menuentry "Linux Mint Debian Gnome" {

linux /casper/vmlinuz boot=live noeject noprompt --
initrd /casper/initrd.lz
}
Last edited by wimac on Sat Mar 26, 2011 1:22 pm, edited 1 time in total.
User avatar
darethehair
Level 4
Level 4
Posts: 239
Joined: Sun Mar 08, 2009 2:22 pm
Location: Morden Manitoba Canada
Contact:

Re: Boot LMDE.iso from bootable USB Stick with Grub2

Post by darethehair »

wimac wrote:I was able to get it to work but not with the ISO I just mounted the iso and copied the contents to the usbdrive and this as my grub2 entry:

Code: Select all

menuentry "Linux Mint Debian Gnome" {

linux /casper/vmlinuz boot=casper noeject noprompt --
initrd /casper/initrd.lz
}
Yes, that would probably be how 'unetbootin' does it i.e. opening up the ISO file and copying the pieces to the USB stick. Personally, I want to be able to use *just* the ISO file itself -- so that I can have multiple on the single USB stick, as well as very easy replacement when new versions come out. My impression is that something is 'missing' from LMDE that currently makes direct USB booting of the ISO impossible -- but I would love to be proved wrong :)
There is nothing more dangerous than a bored cat.
wimac

Re: Boot LMDE.iso from bootable USB Stick with Grub2

Post by wimac »

darethehair wrote:
wimac wrote:
Yes, that would probably be how 'unetbootin' does it i.e. opening up the ISO file and copying the pieces to the USB stick. Personally, I want to be able to use *just* the ISO file itself -- so that I can have multiple on the single USB stick, as well as very easy replacement when new versions come out. My impression is that something is 'missing' from LMDE that currently makes direct USB booting of the ISO impossible -- but I would love to be proved wrong :)

You can just have different entries in the grub.cfg for the other iso's just can't do it for this one.
thermionix

Re: Boot LMDE.iso from bootable USB Stick with Grub2

Post by thermionix »

Got the current LMDE iso booting, will do a little more digging to see if I can avoid having to specify the device for it to search (it may be coming up in a future version)

NOTE - change disk uuid to suit device, use blkid to attain disk uuid

Code: Select all

menuentry "Linux Mint 201109-gnome-dvd-64bit live" {
    loopback loop /boot/linuxmint-201109-gnome-dvd-64bit.iso
    linux (loop)/casper/vmlinuz fromiso=/dev/disk/by-uuid/C1BC-D1C3/boot/linuxmint-201109-gnome-dvd-64bit.iso boot=live config live-media-path=/casper quiet splash noeject --
    initrd (loop)/casper/initrd.lz
}
User avatar
darethehair
Level 4
Level 4
Posts: 239
Joined: Sun Mar 08, 2009 2:22 pm
Location: Morden Manitoba Canada
Contact:

Re: Boot LMDE.iso from bootable USB Stick with Grub2

Post by darethehair »

thermionix wrote:Got the current LMDE iso booting, will do a little more digging to see if I can avoid having to specify the device for it to search (it may be coming up in a future version)

NOTE - change disk uuid to suit device, use blkid to attain disk uuid

Code: Select all

menuentry "Linux Mint 201109-gnome-dvd-64bit live" {
    loopback loop /boot/linuxmint-201109-gnome-dvd-64bit.iso
    linux (loop)/casper/vmlinuz fromiso=/dev/disk/by-uuid/C1BC-D1C3/boot/linuxmint-201109-gnome-dvd-64bit.iso boot=live config live-media-path=/casper quiet splash noeject --
    initrd (loop)/casper/initrd.lz
}
I wonder if (or why) the 'isoscan' syntax would work in this case? It did not way back in my earlier attempts, but isn't that what it is for i.e. not needing to specify the exact name/location of the ISO? Anyways, thanks for plugging away at this problem :)
There is nothing more dangerous than a bored cat.
anmys

Re: Boot LMDE.iso from bootable USB Stick with Grub2

Post by anmys »

Thanks thermionix. This has really helped me to put the iso on a key drive and carry it around.

Regards,

sridhar
User avatar
darethehair
Level 4
Level 4
Posts: 239
Joined: Sun Mar 08, 2009 2:22 pm
Location: Morden Manitoba Canada
Contact:

Re: Boot LMDE.iso from bootable USB Stick with Grub2

Post by darethehair »

For anyone still following this old thread, here is what (finally) is a working solution for me, using the latest LMDE as an example:

Code: Select all

menuentry "Mint Debian Edition" {
    set isofile="/boot/isos/lmde-201204-mate-cinnamon-dvd-32bit.iso"

    loopback loop $isofile
    linux (loop)/casper/vmlinuz fromiso=/dev/disk/by-label/darelinux/$isofile boot=live config live-media-path=/casper noeject --
    initrd (loop)/casper/initrd.lz
}
This solution came out of this newer thread:

http://forums.linuxmint.com/viewtopic.php?f=46&t=103062

Yes, the 'uuid' method mentioned on this thread also worked, but -- unless I am missing something -- only works on a *specific* PC for that particular UUID (?), so that is not an option for me.
There is nothing more dangerous than a bored cat.
breaker

Re: Boot LMDE.iso from bootable USB Stick with Grub2

Post by breaker »

darethehair wrote: Yes, the 'uuid' method mentioned on this thread also worked, but -- unless I am missing something -- only works on a *specific* PC for that particular UUID (?), so that is not an option for me.
:) Hello again! I prefer the label method, but the uuid is going to be the uuid of the parition on the usb flash drive. I don't think it would change unless you repartitioned or maybe reformatted the drive. But, yes, labels are so much more human friendly. You can also use labels to mount your partitions from a working system; http://debian-resources.org/node/9/

BTW, you can use

Code: Select all

sudo blkid
to get the uuid of your partitions. Personally, I modify fstab to mount my partitions by label because I always seem to change things around.

cheers...
User avatar
darethehair
Level 4
Level 4
Posts: 239
Joined: Sun Mar 08, 2009 2:22 pm
Location: Morden Manitoba Canada
Contact:

Re: Boot LMDE.iso from bootable USB Stick with Grub2

Post by darethehair »

breaker wrote:
darethehair wrote: :) Hello again! I prefer the label method, but the uuid is going to be the uuid of the parition on the usb flash drive. I don't think it would change unless you repartitioned or maybe reformatted the drive
For max portability, am I not correct that the UUID *only* works for the machine that the particular UUID was generated for? That is my experience i.e. the UUID of my USB stick is *different* on my desktop PC than the one assigned on my netbook, so I cannot boot the ISO on the netbook that way (?).
There is nothing more dangerous than a bored cat.
breaker

Re: Boot LMDE.iso from bootable USB Stick with Grub2

Post by breaker »

No, I tried it on my desktop, then on my laptop and it worked in both places. I'm not sure how or where it is obtained on FAT32 or ext2/3/4 partitions. But, yeah, label is better. :D
HisDudeness

Re: Boot LMDE.iso from bootable USB Stick with Grub2

Post by HisDudeness »

Sorry if I'm necroing an old post, but I'm basically trying to boot LMDE live on a USB stick via Grub2, so I felt this was the right place. Here's my situation and reasons for doing that:

I wanna create an emergency pen drive, containing all utilities which may come in handy, like GParted, Clonezilla, qt4 and a complete and persistent live distro of Linux. For this last task I've chosen Mint Debian as it's my main Operating System, the one I use for everything, so I'm in pretty good relation with it. The problem is, to permanently install it on my hard drive, I unetbooted it, and unetbooting uses isolinux as bootloader, if I don't go wrong. I'd like to use one unique bootloader for my whole emergency USB, in particular grub2 with direct boot, without any chainloading whatsoever. I'd prefer to have the files directly on my drive just like unetbootin does, rather than booting the entire archived ISO file.

I tried a lot in the past to no avail, but I currently don't remember exactly the ways I did try and the failures I achieved. I resumed the project right now, here's what I did (as root).
  • I created an ext2 partition on my USB for the system files of my live distro to go (label="live"), planning to shrink it as little as possible when it worked, in order to make space for the persistent partition. Used GParted on my LMDE system.
  • I mounted my LMDE live ISO file

    Code: Select all

    mount -o loop (path to cd image)/linuxmint-201303-cinnamon-dvd-64bit-rc.iso /mnt
  • I copied all its files on the pendrive, mounted on the default directory by nemo

    Code: Select all

    cp -r /mnt/* /media/dude/live/
  • I installed grub2 on the drive

    Code: Select all

    grub-install --force --no-floppy --boot-directory=/media/dude/live/boot /dev/sdb
  • I created the cfg file inside the boot/grub directory as empty and basic as possible (I downloaded it from pendrivelinux and added the live option exactly as thermionix did). Here's its exact content:
    set timeout=10
    set default=0

    menuentry "Linux Mint Debian Edition 201303 Live [Cinnamon]" {
    linux /casper/vmlinuz boot=casper noeject noprompt --
    initrd /casper/initrd.lz
    }
At boot, after it successfully load the resources (at least six seconds of verbose outputs are displayed) it constantly and irremediably gets a kernel panic. What am I doing wrong? What did I miss?

P.S. Is there a way to paste the entire boot log? Or can I do that only via dmesg if the boot correctly happens?
wayne128

Re: Boot LMDE.iso from bootable USB Stick with Grub2

Post by wayne128 »

HisDudeness wrote:
I wanna create an emergency pen drive, containing all utilities which may come in handy, like GParted, Clonezilla, qt4 and a complete and persistent live distro of Linux.

I used Easy2Boot, Made using Win7, on a 8G USB flash, and had 10 iso multiboot, such as:

Debian Wheezy
partedmagic ( within it there are gparted, qt4-fsarchiver, testdisk, clonezilla, etc...)
RIPlinux ( used for me to boot any partition when grub boot loader took holiday and does not boot, so RIPLinux can be run on USB and boot any partition, as long as that partition is bootable, windows can be booted too).
netrunner
stella (Centos+repos)
PCLinuxOS
etc
etc

I know it can be made persistent, I have not yet tried since I do not need to.
The tutorial on Easy2Boot have covered the method.

The developer also make a statement on this thread
http://forums.linuxmint.com/viewtopic.php?f=47&t=145590&hilit=+multiboot+usb
that this can be made using Linux OS too, also I have not tried.

I have been using it for many computers, I brought it with me to shops, test run some old comps and bought recently a few used computers, cheap and fast for me to play and use.

You may like to read up Easy2Boot.
HisDudeness

Re: Boot LMDE.iso from bootable USB Stick with Grub2

Post by HisDudeness »

Wow, thanks for signaling that, it looks like a really outstanding piece of software. I'll definitely look into it and play some time with the thing. Can you just give me some anticipations?
  • Does it work with compressed archives containing all the nécessaire to be booted (I mean zips, rars, tar.gzs and such), or must them be archived with ISO extension for E2B to recognize and handle them?
  • Has it its own bootmenu as a personalized port of grub, or does it simply set up a plain grub for you with everything you tell him to?
wayne128

Re: Boot LMDE.iso from bootable USB Stick with Grub2

Post by wayne128 »

HisDudeness wrote: Does it work with compressed archives containing all the nécessaire to be booted (I mean zips, rars, tar.gzs and such), or must them be archived with ISO extension for E2B to recognize and handle them?
Please read this from tutorial 72a of easy2boot website

PLEASE NOTE: With Easy2Boot I talk about 'payload files' because E2B can boot other files besides .iso files. Payload files are bootable files that E2B recognises and can boot from. So in many cases, a 'payload file' is an ISO file. However, a 'payload file' can also be a .BIN file (e.g. memtest86.bin) or a .IMA file (e.g. a DOS floppy disk 1.44MB image file), or a .IMG file (a bootable disk image) or a .VHD file (a virtual hard disk image), etc. etc.
[*]Has it its own bootmenu as a personalized port of grub, or does it simply set up a plain grub for you with everything you tell him to?[/list]
it sets up grub4dos onto your USB flash, this is covered in his tutorial 72a in great details

it takes a while to read and understand

the boot menu looks like this image
https://78462f86-a-abe4fd04-s-sites.goo ... edirects=0
thermionix

Re: Boot LMDE.iso from bootable USB Stick with Grub2

Post by thermionix »

Code: Select all

menuentry “linuxmint-201303-mate-dvd-32bit.iso″ {
	set drive_label=multipass01
	set iso_path="/iso/linuxmint-201303-mate-dvd-32bit.iso"
	loopback loop $iso_path
	linux (loop)/casper/vmlinuz fromiso=/dev/disk/by-partlabel/$drive_label$iso_path boot=live config live-media-path=/casper quiet splash noeject –
	initrd (loop)/casper/initrd.lz
}
https://github.com/Thermionix/multipass-usb
User avatar
dman
Level 3
Level 3
Posts: 100
Joined: Sat May 05, 2012 9:28 am
Location: Wiesbaden, Germany
Contact:

Re: Boot LMDE.iso from bootable USB Stick with Grub2

Post by dman »

I want to boot the LMDE ISO from grub2 on my hard drive. The ideas on this page helped, but didn't quite do it. I did find a way. Here it is:

Code: Select all

menuentry 'Linux Mint Debian Edition (64-bit) from ISO' {
            # change next line to match your partition containing the ISO
            set root=(hd0,msdos3)
            # change next line's path and name to match your scenario
            set isofile='/iso/linuxmint-201303-mate-dvd-64bit.iso'

            loopback loop ($root)$isofile
            linux (loop)/casper/vmlinuz fromiso=($root)$isofile boot=live     \
                  live-config live-media-path=/casper findiso=$isofile edd=on \
                  ocs_live_run=\"ocs-live-general\" ocs_live_extra_param=\"\" \
                  ocs_live_batch=\"no\" ocs_lang=\"\" ip=frommedia relatime   \
                  nolocales nosplash toram=filesystem.squashfs
            initrd (loop)/casper/initrd.lz
            }
Probably there are some things there that are not necessary or not optimal. I wouldn't mind knowing what they are. In any case, I have found that booting from ISOs can be a tricky business and full of trial and error.

The "toram=" stuffs the whole ISO in RAM. If you don't have lots of RAM, leave that one out.

/d
Locked

Return to “LMDE Archive”