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.
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.)
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!
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.