LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 05-24-2007, 05:33 AM   #1
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu, Debian Buster Stable, Windoze 7
Posts: 684

Rep: Reputation: 56
boot from any .iso file on a USB pen drive


Hello

The problem is simple:
I have a box that has no CDRom drive, but that can boot from any USB pendrive.

I have seen some tutorials that tell you that you can put a .iso image of a CD on the stick and that it will boot from that (to install Ubuntu for example).

I got the pen drive booting, installed syslinux on it and it sucessfully loads the initrd and the kernel. But then the kernel hangs with the message "waiting for root system..."
(funny that it does not just give an kernel panic (unable to mount root fs))

after a while, it drops you into busybox... I am not really friends with pivot_root and have not gotten it to work once so far (resource or device is busy must be my "favorite" error message on Linux ;-)

The tutorials really don't elaborate exactly how this .iso image is mounted by the kernel.

Do you know any tutorial that explains how to be accomplish this, to be able to put ANY .iso image (with a predefined name) on the pen drive and be able to boot from that one? (I have seen many tutorials that copy the individual files (contained in the .iso) on the stick, but that is not what I want.)

cheers

Markus
 
Old 05-24-2007, 02:20 PM   #2
lozza1978
LQ Newbie
 
Registered: Feb 2005
Posts: 23

Rep: Reputation: 15
But how are you going to mount the .ISO file,? when theres no OS on the box!

You could extract the ISO image onto the usb pen and then change settings in the bios to boot from the pen at start up and install the OS that way?

I can think of another way right now.



Regards
Lozza1978
 
Old 05-24-2007, 08:27 PM   #3
Chomper
LQ Newbie
 
Registered: Jan 2005
Location: Columbus Ohio
Distribution: Slackware 11
Posts: 23

Rep: Reputation: 15
Greetings.

I'm not totally sure that I understood your question, but is this what you're looking for?

Code:
dd if=your_image.iso of=/dev/your_usb_device
I don't know the jargon to explain it well, but put simply: this will write all the data of the image file to the pen drive. You will be able to boot from it provided your computer supports usb booting and the image was bootable. It is analogous to burning an image to a cdr. You can check the man page for dd and perhaps this link: http://www.marcelgagne.com/cwl082005.html

Of course, this will wipe out everything on the pen drive, even the file system. So when you want to recover your pen drive for normal use you'll have to use /sbin/mke2fs to make a new one.

Hope this was at least mildly on target. Good luck!
 
Old 05-25-2007, 11:41 AM   #4
fitzov
Member
 
Registered: Dec 2003
Distribution: debian, knoppix
Posts: 80

Rep: Reputation: 15
think no

I don't think that is what he's looking for. The question is how to boot a kernel that is on an iso filesystem that is on a usb drive.

Lookup knoppix "cheatcodes" http://archive.cs.stedwards.edu/knop...cheatcodes.txt
There is an option bootfrom=/dev/hda1/KNX.iso

So, my guess is that the way to do it is to have syslinux installed on the device, and when you get to the knoppix (or whatever OS)prompt, enter bootfrom=/dev/sda1/yourimage.iso.
 
Old 05-29-2007, 03:37 AM   #5
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu, Debian Buster Stable, Windoze 7
Posts: 684

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by Chomper
Greetings.

I'm not totally sure that I understood your question, but is this what you're looking for?

Code:
dd if=your_image.iso of=/dev/your_usb_device
I don't know the jargon to explain it well, but put simply: this will write all the data of the image file to the pen drive. You will be able to boot from it provided your computer supports usb booting and the image was bootable. It is analogous to burning an image to a cdr. You can check the man page for dd and perhaps this link: http://www.marcelgagne.com/cwl082005.html
Ok, tried that. Does definitely not work. It does not even boot anymore. And I could boot from that stick before, so I guess putting a CDROM filesystem and boot mechanism on a usb pen drive does not work, since the HW (bios) "knows" that that is no CDROM.
Too bad, it would have been a start to work from.
 
Old 05-29-2007, 11:47 AM   #6
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
I think the road for the OP to walk on is going to be long.

First the syslinux boot loader is a Dos system based boot loader requiring to reside in a fat16 partition with a size no bigger than 2Gb if all the hard disk addresses can be reached. Any iso file can be bigger than 2Gb and most of them live in Ext2/3, Reiserfs etc partition. The success of the OP in using syslinux is due mainly there was no iso file but a number of files among which is the kernel. Both Puppy and DSL entertain installation this way.

Secondly most "any" iso Linux files are booted by isolinux which is based on a CD rom only which does not permit partitions, assuming the CD's El Torito standard is complied with.

It is true the isolinux can be replaced by Grub if the iso file is mounted on a loop back device to show its expanded directory system and so GRub can go inside to load the necessary files. However mounting an iso file on a loop back device requires the assisance of a boot-up kernel. ALternatively one can have the iso expanded and then copied into the pen drive, hoping the device is big enough.

The killer ultimately is the installer inside. About half of the iso files have been rigidly written to fetch files from the CDrom even if they are available in the pen drive or hard disk. It is just the way the installer has been written. So I would be surprised if all the above has been solved there is still about half of the iso files cannot be booted from a pen drive or a hard disk.

Things may get sorted in future but it can be anything between 3 to 8 years I would say. Mind you 8Gb pen drives aren't economically available in the open market untill quite recently. I would say 8Gb is about the size needed to hold "any" iso file, expanded or otherwise.

Last edited by saikee; 05-29-2007 at 11:50 AM.
 
Old 04-02-2008, 07:38 AM   #7
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu, Debian Buster Stable, Windoze 7
Posts: 684

Original Poster
Rep: Reputation: 56
Hmm, 3 to 8 years?

The problem is not thaaat complex now and more and more demand will be springing up to replace the old CD / DVD with something more flexible.
There will surely be a way to directly install Ubuntu on USB sticks or at least run the installer from there.
It just has to come, because it is the logical conclusion.

I just hope that it won't take that long as it takes the hardware manufacturers to come up with a way to make PCI express soundcards possible. Ever wondered why they are lagging behind?
Pretty soon there could be mobos without PCI support, but no PCI express soundcards yet. They say that it is very very difficult and that they have to redesign the whole thing. Well? then snap to it, that is what R&D is for and PCI E offers so many nice advantages, use them. Looks like they did not have to develop anything new in over 5 years so they shy away from it now.
 
Old 04-02-2008, 09:12 AM   #8
Duck2006
Member
 
Registered: Sep 2006
Distribution: Ubuntu 8.04 Hardy Heron LST
Posts: 346

Rep: Reputation: 33
This may help with installing ubuntu on to a usb stick, so you can install it to a system that don't have a cd drive.

https://help.ubuntu.com/community/In...n/FromUSBStick
 
Old 04-02-2008, 11:19 AM   #9
Duck2006
Member
 
Registered: Sep 2006
Distribution: Ubuntu 8.04 Hardy Heron LST
Posts: 346

Rep: Reputation: 33
This one may give you some clues as to how to get the usb device to boot.

http://partedmagic.com/wiki/PartedMa...eatingTheMedia
 
Old 04-02-2008, 02:27 PM   #10
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu, Debian Buster Stable, Windoze 7
Posts: 684

Original Poster
Rep: Reputation: 56
thanks for the pointer, that is something to start at.

Markus
 
Old 04-07-2008, 04:44 PM   #11
Duck2006
Member
 
Registered: Sep 2006
Distribution: Ubuntu 8.04 Hardy Heron LST
Posts: 346

Rep: Reputation: 33
This may be what your looking for.

http://www.pendrivelinux.com/
 
  


Reply



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
USB Pen Drive / Flash Drive Unmounted but the power is there teluguswan Linux - Hardware 11 10-04-2008 03:36 PM
Mounting usb pen drive file permssions problems linuxmandrake Debian 1 10-10-2005 07:21 PM
making usb thumb/pen drive to boot linux rohdimp_24 Linux - Software 2 07-11-2005 01:21 PM
DVD iso boot from USB External drive zbomb33 Fedora 2 07-07-2005 09:57 PM
Trouble Burning ISO image to USB pen drive madh@ter Linux - Hardware 1 08-30-2004 10:29 AM

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

All times are GMT -5. The time now is 07:57 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
Open Source Consulting | Domain Registration