Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Thanks. The links you provide are some of the best references I have found to learn how to create a bootable and multi-boot flash drive. I discovered them on one of my first searches for info on booting and multi-booting flash drives over a year ago. However, they do not address my particular question here. Neither does the plethora of information on grub, grub2, grub4dos, lilo, etc. I have spent no small amount of time reading syslinux and grub documentation at their respective sites. Having learned how to create a bootable and multi-boot flash drive, these documents, which address the parameters required to move the booting process along successfully, should be educational and beneficial. Unfortunately, I do not understand the parameters for the various boot loaders. Thus my inquiry of the more learned here.
I had these two iso files: linuxmint-201403-mate-dvd-32bit.iso which is Mint Debian with Mate Desktop, debian-live-6.0.7-i386-gnome-desktop.iso
I used gparted to create two equal partitions formatted ext2 on a 4GB flash. I then booted debian from a flash drive and installed Grub2 to the mbr of the 4GB flash drive pointing to the first partition with the Grub boot files.
Booted a Linux system and loop mounted the debian iso file and copied all its files to the first partition of the 4GB flash. I then copied the LMDE-Mate iso directly to the second partition and put the entries below in a manually created grub.cfg file. Used blkid to get the correct UUID for the second partition for the Mint entry.
menuentry "Debian 6.0" {
set root='(hd0,msdos1)'
linux /live/vmlinuz boot=live config quiet
initrd /live/initrd.img
}
menuentry "LMDE" {
loopback loop (hd0,2)/linuxmint-201403-mate-dvd-32bit.iso
linux (loop)/live/vmlinuz isofrom=/dev/disk/by-uuid/cf8cc016-c746-47f2-9f9b-796ebf310371/linuxmint-201403-mate-dvd-32bit.iso boot=live live-config live-media-path=/live
initrd (loop)/live/initrd.img
}
Tested on two machines, both booted on both systems to Desktop.
Easy2boot looks like some really useful software. Glad you got it working.
My question is if the "fromiso=<uuid>" parameter will cause confusion (which I suspected to be the reason for the failure in my case; and I could not get a handle on the proper use of these parameters, particularly between grub and syslinux).
Quote:
Originally Posted by yancek
Easy2boot looks like some really useful software. Glad you got it working.
It is amazing software to me, but then so is your success with this. Thanks again!
###################
Edit: I was re-reading your post and realized that you are using a 4GB drive containing 2 2GB partitions. I saw one thing and heard another. Story of my life!
Last edited by passinthru; 08-01-2014 at 01:04 PM.
Reason: oversight
So if I am understanding you, you could place another iso or two on hd0,2 with the required menuentries in grub.cfg on hd0,1 and boot them as well?
Yes, maybe. The LMDE entry I posted above has a uuid in the menuentry. I found this about a year ago, I think on the Mint forums and modified it to suit the current release. Grub2 is capable of booting an iso directly in this manner but the iso or distribution itself must be capable of BEING booted in that manner. Most are not. You should be able to boot any Linux from Grub or Grub2 if you loop mount and then copy the extracted files to the / of the flash partition. One thing which will cause problems if you are doing this with Grub Legacy or Syslinux is if you have 2 systems with the same directories/files in the / of the system. You can see this if you loop mount LMDE and Debian as they both have a 'live' directory which contains the kernel, initrd and filesystem.squashfs. If they are on the same partition, only one will boot, always the same one. You indicated earlier that you had booted Ubuntu derivatives from iso. Below is the output of the ls command on the second partition of a flash drive I have booting iso files directly. The first partition has a number of different systems booting with Grub Legacy and has a chainload entry to the /boot/grub directory on the second partition:
There is only one directory, the boot directory which contains the grub directory and the usual grub2 files including grub.cfg. The boot directory and the iso files are the only contents of the partition. I've booted them in VBox and on several different machines. They all boot. Note one important similarity, they are all Ubuntu derivatives. Below is a sample grub.cfg menuentry from the grub.cfg file. This entry should work for pretty much any Ubuntu (at least the major ones) by simply replacing the iso name below with the actual iso name you are using. Note that the entry below is different from the LMDE entry I posted earlier, no uuid needed.
Quote:
menuentry "Linux Mint 14" {
loopback loop /linuxmint-14-kde-dvd-32bit.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/linuxmint-14-kde-dvd-32bit.iso quiet splash --
initrd (loop)/casper/initrd.lz
}
Quote:
My question is if the "fromiso=<uuid>" parameter will cause confusion (which I suspected to be the reason for the failure in my case; and I could not get a handle on the proper use of these parameters, particularly between grub and syslinux).
I would not expect an entry like the one I posted earlier to work with Syslinux or Grub Legacy but haven't tried it. As you can see in the Mint KDE entry above, it isn't used or needed. I'll see if I can get solydx downloaded and give it a try. I would expect that multiple systems could be booted thus as the iso name is different but don't know.
I downloaded "solydx32_201407.iso" and copied it to the same partition on which I had LMDE on the flash drive. Had to first resize the partition as it wasn't big enough for both. Both LMDE and SolydX booted with no problems, menuentry for solydx below:
I downloaded "solydx32_201407.iso" and copied it to the same partition on which I had LMDE on the flash drive. Had to first resize the partition as it wasn't big enough for both. Both LMDE and SolydX booted with no problems, menuentry for solydx below:
I too got it to work. The key from the start was the "fromiso" parameter in the grub menuentry (of which darethehair first made me aware).
So far as I have found, there is no list of these command line parameters for either grub or syslinux. I see parameters all over the web for both which I can not find in the official grub or syslinux documentation. I knew what was preventing the second Debian iso from booting, but I could not find how to tell it to read its own filesystem.
If there is and anyone knows of the syslinux equivalent to "fromiso", I would like to know what it is.
If there is and anyone knows of the syslinux equivalent to "fromiso", I would like to know what it is.
I don't think that works with syslinux or Grub Legacy, booting an iso directly. It might be that developers of different distributions have made modifications to enable this behavior in Grub2, I don't really know.
You can boot multiple systems from the same partition with Grub Legacy if you loop mount them and copy the directories/files to the partition. Most of them require the files to be in the / of the partition on a hard drive The problem you will have is that if you are using Debian and derivatives, they have the compressed filesystem file as well as the kernel and initrd file in the same location (live directory) and they all have the same name. This is true with Ubuntu, the casper directory contains the compressed filesystem file as well as the kernel and initrd files. You could do this by putting each on a separate partition.
Some systems can boot from a directory. For example, I created a puppy directory in the / of a partition, put all of its files/directories inside this puppy directory and was able to boot it. Tried this with several other distributions. Some would boot, others would not.
I came to learn and have learned that two Debian isos can be booted on one usb device. My thanks to all here for yet another beneficial conversation.
--------
08/07/2014 - What I learned is that almost anything that can be booted can be booted with grub for dos (which is proven by easy2boot). So far as I am concerned, grub for dos is the boot loader for multi-boot usb devices.
Last edited by passinthru; 08-07-2014 at 11:37 AM.
Reason: addendum
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.