LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-30-2009, 05:12 PM   #1
climberpete
LQ Newbie
 
Registered: Mar 2009
Posts: 2

Rep: Reputation: 0
Boot iso from a thumb drive


I currently do some tech work and carry around a stack of bootable cd's for various tests. If possible I would like to find a bootloader that can recognize a bunch of iso files on a USB partition and boot from them. Essentially I would like to reduce all my bootable CDs to a bunch of isos on a usb thumb drive. I know I could make a bunch of partitions on my thumb drive and put each one in it's own partition but I would like to have the ease of just changing an iso file. (Also windows doesn't recognize more than the first partition on a thumb drive without a hack, so any changes would need to be made through linux which isn't always convenient for me.)

I found an old thread (2005) where someone asked the same thing, no one knew of a solution then, is there one now?

I found a few people saying it could be done using Gujin, but the documentation there isn't very linux noob friendly.

I used unetbootin to make my thumb drive bootable to gujin, and I put memtest86.iso, KNOPPIX_V6.0.1CD-2009-02-08-EN.iso, INSERT-1.3.9b_en.iso, NimbleX-2008.iso all on the first partition. Gujin didn't recognize any of them.

Has anyone been able to boot from an iso file on a usb thumb drive?
 
Old 03-30-2009, 10:48 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
My understanding has always been that there is simply no way to boot unmodified .ISO images without burning them to a physical disc (or at least extracting the whole thing); due to limitations in the way BIOS actually works. There are several tricks to boot system images from USB devices, but none of them let you just throw some ISOs on a flash drive and select them from a menu.

The Gujin one you are referring to requires you to write out each ISO to a partition on a USB HDD. Others have you remove the kernel and initrd from the ISO, and then mount the ISO as a loopback.

Actually, the Gujin method is essentially the same thing. The only difference is that Gujin is able to automatically scan a filesystem for kernels and compressed images, so it takes out the manual work of having to find them. But Gujin doesn't support reading from ISOs directly, so you need to write the image out to the drive first.

If that isn't a problem there is a guide on the Ubuntu forums that should get you started.
 
Old 03-31-2009, 07:36 AM   #3
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,614

Rep: Reputation: 440Reputation: 440Reputation: 440Reputation: 440Reputation: 440
climberpete:

1)
===I currently do some tech work and carry around a stack of bootable cd's for various tests. If possible I would like to find a bootloader that can recognize a bunch of iso files on a USB partition and boot from them.===

Answer:

If you mean bootloader: so far GNU/Grub is capable of booting a "bunch" of kernel systems, up to more than a hundred in a single well partitioned disk. But you have to install the kernel first to each partition proper to it. If it is windows based grub can chainload microsoft boatloaders too.

If you mean iso files: That's another story. To boot an iso image the image has to be bootable first, i.e. "el torito'ed" and "looped" back to be seen as an independent device: this presupposes a running mini system to do the trick, not just a bootloader (although, if you are a developer you can write it yourself); moreover, in that manner, it must handle the booting from its very initial sectors. This requires ubiquitous work.

2)
===Essentially I would like to reduce all my bootable CDs to a bunch of isos on a usb thumb drive. I know I could make a bunch of partitions on my thumb drive and put each one in it's own partition but I would like to have the ease of just changing an iso file===

Answer:

Usb thumb is capable of accommodating several partitions yes. But jumping from one iso to another is not as easy as that. Remember you are dealing with systems that must "run" after jumping to it, not just with dumb text files.

3)
===(Also windows doesn't recognize more than the first partition on a thumb drive without a hack, so any changes would need to be made through linux which isn't always convenient for me.)===

Answer:

Windows is very poorly <if not selfishly> implemented. Yes you are correct, it cannot recognize other partition formats. GNU/Linux or Unix formats may be able to handle the job through GNU/Grub bootloader. So you are getting near the solution; and you have to learn linux to make it convenient.

SUGGESTION:

If those iso images containing different operating systems are not so many, say less than 15 of them, you can well install each into one bootable thumb stick; providing each the proper formats including Windows systems. Install grub into one of the linux systems and MBR and configure it to load either of the "bunch" of systems you preinstalled into the volume.

HOW:

1. Make partition plan of different systems. Slice your usb volume as needed.

2. Install each system according as planned. Use your physical CD's to do it individually. Take note where each system kernel is located: this is indispensable to the method.

3. Finally, install GNU/Grub bootloader into one of the linux system (regardless which partition it is located); next, install grub into the master boot; then, configure the /boot/grub/menu.lst in order to keep record and point to every kernel found in your usb stick. In this manner you can have "a bunch" of choices where to boot to at the grub prompt during boot time.

You only need install grub into one linux system and the MBR and it is enough to load all the kernels that can be found ONE AT A TIME.

In my system I run linuxes and Xp, but I only installed grub once in gnu/Linux/Mint, other linuxes I installed without bootloader: this Slackware I am using to write this post was booted by a grub borrowed/seated from LinuxMint: no grub in my slack /boot, neither lilo. As long as grub rules on the MBR it doesn't care if the system hosting it is seated far away in the last slice of the logical drive, and it can trigger to chainload ntloader wherever that redmond duck hides. That's how good and flexible GNU/Grub is.

WHAT YOU GAIN:

If you want to change system you only need to reboot and make your choices of kernels available in your stick. This means you don't have to carry a bagfull of cd's which I believe this is what you want to attain.

Goodluck.

Hope this can be of help to you.

Caveat: I do not pretend to be a guru. My suggestion may not be the best, as there could still be better solutions around. All that I say: my suggestion is not speculative, it is taken from my experience with grub and linux, and all that I want is to help you.

Last edited by malekmustaq; 03-31-2009 at 10:09 AM.
 
Old 03-31-2009, 12:43 PM   #4
drummingpariah
LQ Newbie
 
Registered: Oct 2005
Location: Berkeley, CA
Distribution: Debian-based everything
Posts: 9

Rep: Reputation: 1
This is actually something I'm working on right now. If you're at all familiar with Linux, you should be able to use 'mk-boot-usb' to partition your flash drive to whatever sizes your ISOs require, and (hopefully) just extract those ISOs into the partitions then edit the flash drive's new Grub menu.lst file.

Malekmustaq seems to know a fair bit more about the theory behind this, but I'll let you know how my bashing on the problem turns out. The bottom line is: look into mk-boot-usb. Go from there, and let me know how it turns out.
 
Old 04-03-2009, 04:34 PM   #5
climberpete
LQ Newbie
 
Registered: Mar 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks everyone

I got it working with the responses posted above. I just wanted to share what I did.

I tried using mk-boot-usb script, but I had some trouble running it from SUSE. SUSE is the only linux distro I have to work with right now. I looked in the forums and found that others have had problems with the script in SUSE.

So I did the partitioning by hand in YAST. I ended up making the first partition FAT and leaving it open for files or anything else, no OS there. I made two more primary partitions and 6 more extended of varying sizes.

I then used the cat command described here to place each iso in it's own partition.

cat filename.iso > /dev/sda3

At first I thought I had done something wrong because the cat command took a long time to come back, but it finally did.

I then used unetbootin to put gujin on the stick. I ran it from windows so it put it in the first partition. I may go back at some time are try to move that somewhere else. I plan to use that partition for diagnostic executables and log files and such. I don't want to accidentally delete the gujin files as I move things around.

The nice thing about gujin is it auto-detects everything out in those partitions. I don't have to edit any config files or anything. And if later I want to replace a distro I just overwrite that partition and gujin will find it. Not quite as easy as swaping out an iso file. But it works for now. Gujin also detects the internal hard drive of the machine too and if there is something bootable there, windows or linux it lists it in the boot menu.

My next task is to make a bootable gujin CD for those machines that won't boot from a USB.

I know this probably isn't the most elegant solution. But this was the best solution for my skill level and my needs. Thanks to all for the ideas posted above and let me know if there are other things I could do to make this a little better.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to boot ISO/Ubuntu off thumb drive? penguinHugger Linux - General 4 12-18-2008 11:23 AM
Installing to thumb drive boot from CD android6011 Linux - General 1 07-06-2006 03:06 AM
Boot Linux iso from thumb drive gerry7995 Linux - Newbie 5 08-28-2005 12:52 PM
I need a cd that will boot my usb thumb drive Javahulk Linux - General 4 03-23-2005 01:20 PM
can i boot this off of a thumb drive? shapdaddy DamnSmallLinux 1 05-05-2004 09:12 AM


All times are GMT -5. The time now is 08:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration