LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 08-10-2009, 05:42 PM   #1
$ave
LQ Newbie
 
Registered: Aug 2005
Posts: 14

Rep: Reputation: 0
Question Boot ISO (or equivalent) from USB drive? Is it possible?


Hi All,
First of all, I'm sorry if this post is a duplicate or is in the wrong place. I know this isn't exactly a Linux question, but I have always found the community on this site to be very knowledgeable and helpful. So here goes;

I would like to boot ISO images from a USB drive. My ultimate goal would be a USB drive that could boot multiple CD images, so I could have a "swiss army USB drive."

Is it possible to a boot CD image, like an ISO from a USB drive? (preferably more than 1?)

And if so, how could it be done?

Or is this just a pipe dream?

I've tried all kinds of utilities and tricks and I still can't get it to work.
 
Old 08-10-2009, 05:55 PM   #2
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,415
Blog Entries: 33

Rep: Reputation: 222Reputation: 222Reputation: 222
check this out....

http://www.pendrivelinux.com/

Regards Glenn
 
Old 08-10-2009, 06:37 PM   #3
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
check this out
some of it's older
http://multidistro.proboards.com/ind...splay&thread=7

http://multidistro.com/


I have newer stuff now, and can tell you how to hook it all up if you wish

you using fat32/syslinux or grub on ext2 or ext3 usb?
 
Old 08-11-2009, 04:12 PM   #4
$ave
LQ Newbie
 
Registered: Aug 2005
Posts: 14

Original Poster
Rep: Reputation: 0
Thumbs up

Glen and Linus72,
Thank you both for the excellent suggestions, both of those sites are great resources and cool projects that I will definitely be using.

I found another resource that describes a method that may help me accomplish what I'm after as well, just figured I'd share since it looks quite interesting.

http://www.911cd.net/forums//index.php?showtopic=21524

Linus, I may take you up on the offer for assistance and I really appreciate it. Once again, great site / project, looks really useful. I hadn't settled on a filesystem yet, I am open to using any of the above, I mostly want something that "just works." I also want to boot multiple iso's and / or OS's, and I had considered using grub as the boot manager for multiple partitions, possibly with mixed filesystems. (As a side note, I'm using a 32 gb flash drive.) I'll update later as I make progress or run into snags.

Thanks again
 
Old 08-11-2009, 05:25 PM   #5
firewiz87
Member
 
Registered: Jan 2006
Distribution: OpenSUSE 11.2, OpenSUSE 11.3,Arch
Posts: 240

Rep: Reputation: 37
I am looking for a solution to the same problem.... booting an ISO from USB/external HDD

I have been downloading DVD images, burning them to DVDs and then installing them...I have so many DVDs lying around....
Plus,My old PC's DVD ROM is also giving problems because it cant read most of the DVDs that are burned... may be its a hardware problem or because the DVD burner is a new one....

Anyway, I am fed up burning DVDs for every other distribution release, just to install the distro once or twice until the next release....

I was wondering if i could use my External HDD, instead of burning DVDs to install linux....

I have already tried using SYSLINUX to boot the ISO.... It worked more or less.... but the success rate depended on the distribution.... it bsically involved the following steps:

1. Install SYSLINUX to mbr of Ext.HDD or USB (makes your USB drive bootable)
2. Extract the ISO to the root folder of the drive
3. Configure the syslinux.cfg file to boot from the Extracted ISO files

I suppose the process is automated by Unetbootin

This could not work with multiple ISO's, syslinux has problems accessing different partitions,as far as i understand and extracting ISOs is not something i want....

Not to mention the fact that distro installation from this didnt work even though i managed to get it to boot... the installer some how expects the installation media to be CD/DVD-ROM.... I suppose the problem can be rectified by using a "custom" initrd image (one that can be downloaded from net or can be built from source)

[I used OpenSUSE 11.1 DVD image]

Since i dont want to go about replacing initrd images for every ISO n since i am looking for a general solution.... i am back to research mode.

So after a little searching i found that GRUB2 could boot from ISOs directly
http://michael-prokop.at/blog/2009/0...iso-via-grub2/

I ll be trying that method in a few days time n post de results.

I am in no way a linux expert, i just shared what i found/understood... feel free to correct me....

Hope this is of some use to you....

Last edited by firewiz87; 08-11-2009 at 05:27 PM.
 
Old 08-20-2009, 02:49 AM   #6
MrNice
LQ Newbie
 
Registered: Aug 2009
Location: Ireland
Posts: 8

Rep: Reputation: 2
Hello there,

I am as well looking for a way to boot (any) ISO from USB key.
Did you succeeded?

So far I installed GRUB2 following http://www.panticz.de/MultiBootUSB tuto.
I can boot Ubuntu but I tried other .iso like
http://www-307.ibm.com/pc/support/si...cid=MIGR-39306
pcdd1780.iso. This is PC-Doctor for DOS program - CD ISO image version.
where I didn't succeeded.

ISO srtructure is:
psdd1780.iso
--[BOOT]
---------Bootable_2.88M.img
--DS201780.txt

Only 2 files


grub.cgf code I wrote is:
menuentry "PC-Doctor" {
loopback loop /boot/iso/pcdd1780.iso
linux (loop)/[BOOT]/Bootable_2.88M.img
}

I get the error: invalid magic number

Any idea

Where can I get the grub manual with details about grub.cfg commands?
Do you understand the commands? Can you explain?

Thanks for your help

Last edited by MrNice; 08-20-2009 at 02:56 AM. Reason: add iso info
 
Old 08-20-2009, 08:16 AM   #7
MrNice
LQ Newbie
 
Registered: Aug 2009
Location: Ireland
Posts: 8

Rep: Reputation: 2
Some further info:

Actually, I see the structure like in my previous post when I open the .iso file with 7-zip on Windows. When I look in the CD I burned there is only the .txt file even no hidden file. But the CD is working...

With Linux when I look the pcdd1780.iso file with Archive Manager there is only the .txt file.
pcdd1780.iso properties:
Archive sizs: 2.9 MB
Content size: 39.5 KB

When I look on the CD with Linux I can see only the .txt file, no hidden file.
Do you know how this is working?

Important rectification in me previous post ( sorry for the mistake):
The error I get is "file not found"


The error "invalid magic number" appeared with another .iso file, I 'll be back later.

Thanks
 
Old 08-20-2009, 09:26 AM   #8
$ave
LQ Newbie
 
Registered: Aug 2005
Posts: 14

Original Poster
Rep: Reputation: 0
Hey MrNice,
Thanks for the good info in your post, those links look really helpful as well.

To be honest with you man, I got stuck at installing Grub2. I found the project in the SVC (spelling?) repositories but I'm not quite sure how to download it or install it onto my USB drive. >_<

But I will keep trying and get back to you with some results.

With regard to your question, I wasn't aware that there was something other than just an iso (I have worked with img format before) but I thought the ISO on its own was the complete disk image, I was just going to point everything at that.

I'm sorry if that's a bit of a newbie reply, but I am definitely a newbie when it comes to all of this!
 
Old 08-20-2009, 11:25 AM   #9
firewiz87
Member
 
Registered: Jan 2006
Distribution: OpenSUSE 11.2, OpenSUSE 11.3,Arch
Posts: 240

Rep: Reputation: 37
You can dwnload grub from

ftp://alpha.gnu.org/gnu/grub/

Actually grub 1.xx is known as grub2 and grub 0.xx is grub legacy. Download the latest version of grub2 (1.96) and build it.... and install it using the following commands:

The correct way to install grub to a non-native device is by using the root-directory option as shown below:
Code:
grub-install --root-directory=/mnt/usbdevice /dev/sdb
where /mnt/usbdevice is the mount point of /dev/sdb1

/dev/sdb will be your USB device.... hope i am clear...
 
Old 08-20-2009, 11:53 AM   #10
firewiz87
Member
 
Registered: Jan 2006
Distribution: OpenSUSE 11.2, OpenSUSE 11.3,Arch
Posts: 240

Rep: Reputation: 37
Hello MrNice..
Well about my progress.... I have just managed to successfully insyall and boot grub from my external HDD.

Quote:
Originally Posted by MrNice View Post
I get the error: invalid magic number
I am stuck at the same error... even for ubuntu.... I have been looking for the reasons for such an error... but no luck yet...frustrating

Quote:
Originally Posted by MrNice View Post
I can boot Ubuntu
Thats quite an achievement if you ask me... It would be a great help if you can post the grub.cfg entry related to ubuntu....

Quote:
Originally Posted by MrNice View Post
Where can I get the grub manual with details about grub.cfg commands?
Well as we all know.... grub2 is relatively very new so its documentation is also very limited. I am posting a link to the Grub2 wiki:
http://grub.enbug.org/

Quote:
Originally Posted by MrNice View Post
Do you understand the commands? Can you explain?
menuentry-> It is the command similar to TITLE in grub-legacy. It displays options in the menu.

Code:
menuentry "<Title text>"
loopback -> It is the command that creates a loop device (similar to a virtual device) for the iso image specified. It basically loads a file as a device.

Code:
loopback <loop device name> file
linux-> This is similar to "kernel" command in grub-legacy. It is used to specify the linux kernel that is to be booted. For a non-linux kernel, the command "multiboot" is used in grub2

The explanations are in no way "official" or "proper". They are meant only to give you a basic understanding...
 
Old 08-21-2009, 02:29 PM   #11
ONEderer
Member
 
Registered: Jan 2004
Location: USA
Distribution: Mandrake, Knoppix
Posts: 51

Rep: Reputation: 15
Smile There is a program that's a substitute for a DVD/CDrom drive.

I don't know the name of it, but that program acts as a substitute for a CD/DVD drive, and will run directly any file that has a ???.iso image. It is a virtual cd/dvd drive.

As far as USB external drives, it can be used as if it was an internal drive, as long as the machine's bios supports booting of USB devices.

I didn't want a "live" version of an OS, because there is no persistence. Everything is lost once the machine is turned off. So, I therefore installed on a 32GB USB Flash Drive, PCLinuxOS. Grub is the boot manager, and if I leave the Flash Drive plugged in, Grub gives me the choice of booting up Linux on the external drive, or booting up Windows on the internal hard drive. If I unplug the Flash Drive, then Windows simply boots up normally, and Grub doesn't interfere with the hard drive's operation.

But if you want a system which you store ???.iso images on an external hard drive, and you don't want to burn the image into a cd or dvd, then you need to search for a virtual cd/dvd player program. You can place that program on the same external hard drive as the ???.iso files, and simply start that program, and tell it where to find the iso file that you want to run.

Good Luck!
 
Old 08-21-2009, 07:18 PM   #12
$ave
LQ Newbie
 
Registered: Aug 2005
Posts: 14

Original Poster
Rep: Reputation: 0
Thumbs up

ONEderer - it sounds like you're talking about Alcohol 120% (which I use all the time) but that's not quite what I'm trying to do.

Thanks firewiz87 for the great info on Grub2, I was wondering about those version numbers!! You rock!
I will see if I can find time to try that over the weekend and get back with results. Thanks again for the really helpful post!
 
Old 08-22-2009, 01:57 PM   #13
MrNice
LQ Newbie
 
Registered: Aug 2009
Location: Ireland
Posts: 8

Rep: Reputation: 2
Hi there,

I see we are all at the same level. Everybody can help everybody.

I did a lot of tests I would like to share:

I have 4 USB keys :
2 X Verbatim 2GB
1 AData 2GB
1 Kingston DataTraveler 2GB
and 4 differents computers
1 Desktop with Intel mobo Pentium 4 3GHz (6 years old)
1 Desktop with HP mobo Pentium 4 3GHz (6 years old)
1 laptop HP nc6000 (6 years old)
1 laptop HP nx7300 (2 years old)

I installed karmic-netbook-remix-i386.iso on 3 USB keys and tried to boot on the 4 computers.
For 3 hours I couldn't boot on the 2 Desktops despite different ways to install Karmic but it was ok in the laptops and suddently for some reason I can boot on the HP Desktop. I don't know why.
Conclusion: If you can't boot on one computer you can't say "my computer/USB key doesn't boot". You need as well to be lucky ;-)


That said, what exactly I did (from linux install):

First download Karmic to get grub2
http://cdimage.ubuntu.com/releases/karmic/alpha-4/
Below in the page: UNR live CD => clic on: PC (Intel x86) UNR live CD
file: karmic-netbook-remix-i386.iso

Download the files needed listed in below in the web page http://www.panticz.de/MultiBootUSB and record them in a directory in /home/iso/ of the linux computer you'll use to install. Change the mod
chmod 777 /home/iso/
or right-clic =>Properties => Permissions => create and delete file for all in the directory.

Run an text editor (ie gedit)
From the web page copy and paste the text from ....to:
menuentry "Ubuntu Live 9.04 i386" {
.....
.....
....
initrd (loop)/boot/tinycore.gz
}
Save this text to /home/iso/ directory with the name grub.cfg


Install Karmic in the first USB Key:
To install Karmic in the first USK key I used my Ubuntu Jaunty in HP mobo.
Install GParted and Unetbootin
Format the first key with GParter in FAT32 (not bootable)
Install Karmic with Unetbootin and karmic-netbook-remix-i386.iso
Eject, remove the USB key


Boot you PC with Karmic USB key (Be patient almost 2 minutes to get the working screen)
I used my nx7300 laptop the most recent.
Now you can install GRUB2 with the tuto http://www.panticz.de/MultiBootUSB

Insert another USB key
Go to Administration run Gparted

Select your USB key where you want to install grub (be carfull choose the good one)
With GParted, format the key with fat32 name MultiISO
You can write another name like MyUSB, this is the name of the device

Open one terminal and write all the commands to the key in this terminal, not in another
Write:
sudo fdisk -l
You'll get the devices in your PC
i.e.: sda1, sda2, sda3 should be you local HD
Disk /dev/sda:
/dev/sda1
/dev/sda2
your hard drive and partitions

Disk /dev/sdb:
/dev/sdb1
The first USB key with Karmic (Boot with *)

Disk /dev/sdc:
/dev/sdc1
The second USB key

If you have more than one physical HD the name will change

Let say we use sdc in this example but it could be diffrent in your case.

The value of DEVICE and VOLUME must be the same when you formated in GParted
write:
DEVICE=/dev/sdc
VOLUME=MultiISO

DEVICE and VOLUME are the name of the variables in the shell
Try write
echo ${VOLUME}
echo ${DEVICE}
you will get the value of the variable VOLUME and DEVICE

If you want to learn the syntax commands you can open a second terminal and write:
man mkfs.vfat you will have the manual
(use this terminal only to check or for info not to setup the key)

write if you use ubuntu
ls /media/
for another distro you should know where are the mounted medias
Usualy GParted mount the media after formating. You should get the name of your USB key
You can also write
mount -l
You should get
/dev/sdc on /mnt type vfat (............) [MultiISO]

If you don't get it run File Browser and clic on MultiISO


Now we can install grub
write
sudo grub-install --no-floppy --root-directory=/media/MultiISO ${DEVICE}

This create de directory /boot/grub in ths USB with all the file needed

Now you can run File Browser in Karmic
With the file browser, create a sub directory under /boot
You should have
/boot
/boot/grub
/boot/iso

Go to your HD where you created iso directory
Copy the iso file from /home/iso to MultiISO/boot/iso/
Copy /home/iso/grub.cfg to MultiISO/boot/grub/

Eject the USB key from File Browser
Remove the key and try to boot it.

On my 3 USB keys, Ubuntu, tinycore are working well, grml and XBMC boot but have error after. For me this is not the point.

If you succeeded you can open the grub.cfg and add at the end
menuentry "Reboot" {
reboot
}

That's all folks!

Now we have to work on our own iso. Personally for ISO with DOS.

I hope it'll help
 
Old 08-22-2009, 08:31 PM   #14
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,415
Blog Entries: 33

Rep: Reputation: 222Reputation: 222Reputation: 222
Thank you very much for your efforts above, MrNice!

I hope you'll copy it to your LQ blog and perhaps submit it to the howto's.

Cheers, and welcome aboard. Glenn
 
Old 08-23-2009, 01:13 AM   #15
firewiz87
Member
 
Registered: Jan 2006
Distribution: OpenSUSE 11.2, OpenSUSE 11.3,Arch
Posts: 240

Rep: Reputation: 37
It seems that the problem i had with booting the kernel was because i was using a DVD image..... It seems that the "loopback" command didnt handle DVD images very well which caused all the errors (invalid magic number and all)..... can anybody confirm this for me???
 
  


Reply

Tags
boot, grub2, usb


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to boot a .iso within windows with no CD burner or USB drive Infasoft Linux - Newbie 3 03-08-2009 07:31 PM
boot from any .iso file on a USB pen drive browny_amiga Linux - General 10 04-07-2008 04:44 PM
Installing an ISO (Such as DSL) with no usb/cd drive spudtheimpaler DamnSmallLinux 3 02-28-2007 04:15 AM
DVD iso boot from USB External drive zbomb33 Fedora 2 07-07-2005 09:57 PM
iso to USB flash drive shmude Linux - Hardware 7 09-27-2003 02:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:20 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