LinuxQuestions.org
Review your favorite Linux distribution.
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 08-19-2008, 01:18 PM   #1
belbono
LQ Newbie
 
Registered: Feb 2004
Posts: 15

Rep: Reputation: 0
HowTo use USB pen drive as Loader for iso distros on HDD


Hi,

i want to have a bootable usb pen drive which is able to mount an iso image of a distro install CD. I'm tired of burning them on CD's..

For this problem I found this thread, but I think its not quite what I'm looking for.

I thought of something like this:
  • booting from usb
  • load kernel from image using (maybe by kexec or something like that)

The problem should be changing the running kernel.

So this is what I think so far:
The first thing I need, would be a booting usb drive with some kind of general purpose 'system'. What could that be?

Next I have to extract the image on my HD, I think.
In the thread I mentioned above that's done by creating a own partition for this. I don't understand why this is necessary (why missing files?).. Shouldn't extracting into an single directory also work?

My favorite would be avoiding the image extraction...

On the other hand: Is it possible to add an grub entry for the extracted image?

This is a bit confusing, but I think you can understand what I want to do...
 
Old 08-19-2008, 03:43 PM   #2
keratos
Member
 
Registered: May 2007
Location: London, UK.
Distribution: Major:FC8. Others:Debian;Zenwalk; Arch; Slack; RHEL.
Posts: 544

Rep: Reputation: 30
this is well documented all over the net

google is your friend.

"linux pendrive howto"

check out the first hit
 
Old 08-20-2008, 04:03 AM   #3
shaojf2001
LQ Newbie
 
Registered: Aug 2008
Posts: 3

Rep: Reputation: 0
Try to use GRUB for DOS.
It let you can boot from USB and run GRUB command, so you can choose vmlinuz and initrd.gz file to start .
You can easy to add or edit the GRUB menu.

Sorry for my poor english.
 
Old 08-21-2008, 03:13 AM   #4
belbono
LQ Newbie
 
Registered: Feb 2004
Posts: 15

Original Poster
Rep: Reputation: 0
UPDATE:

My first attempt was creating a empty partition. Then I copied the iso content to the partition by
Code:

Quote:
dd if=archlinux.iso of=/dev/sda7
I finished the preperations by adding a new entry of my existing grub.conf where I copied the first entry from the menu.1st found on the archlinux.iso

This attempt failed because grub couldn't recognize the filesystem type of my partition. Should be something like the cdrom filesystem. Does anyone know how grub can handle this anyway?

Last edited by belbono; 08-22-2008 at 05:35 AM. Reason: upadte
 
Old 08-22-2008, 05:42 AM   #5
belbono
LQ Newbie
 
Registered: Feb 2004
Posts: 15

Original Poster
Rep: Reputation: 0
OK next try was formatting the partition to an ext2 filesystem, mounting the iso image and copying the whole content to the partition.

This time grub bootet the arch kernel (however it would be fine to avoid the copying..) but I get a kernel panic, when the arch installation explicitly wants to mount a /dev/cdrom like device for the installation.

Can anyone tell me how the installation can be told to use the data on the partition instead of failing with cdrom-mount attempts?
Is there maybe a grub command for this?

Also I believe you'll encounter this problem when you try to install arch from a usb pen drive, which was my first intention - but my 128mb are just not enough..

Furthermore I read a bit about Syslinux, but I don't know if that might help because I'm already able to boot..
 
Old 08-22-2008, 07:17 AM   #6
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
I don't know if you can do this in a generic fashion due to the differences in distro installers. Debian, for example, has a kernel + initrd image which will run Debian installer *.iso images and you've already seen the DSL example.

To get this working with several distros, you will need to download the *iso for all those installers and unpack the initrd and read carefully through the scripts to see what script you can jump to within the *iso image to begin the installation but skip the attempt to mount the cdrom. Your own customized kernel + initrd must then identify the distro somehow then invoke the appropriate script.

There is one inescapable drawback: installers are usually packaged with one or two kernel versions which are very similar to the kernel versions which can be installed. This is to ensure that all the tools work together and that an initrd image can be successfully built. For example, if you boot with kernel 2.4 or, say, 2.6.8, but installed a 2.6.21 kernel, the various tool versions and initrd generation scripts which work with 2.4 and 2.6.8 may not be able to build a suitable initrd for 2.6.21.
 
  


Reply

Tags
boot, image, usb



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
Burning .Iso image on pen drive? linuxlover.chaitanya Linux - Software 14 09-01-2008 03:56 AM
boot from any .iso file on a USB pen drive browny_amiga Linux - General 10 04-07-2008 04:44 PM
Install directly to HDD from iso on HDD/USB, with out burning cd vivinuthappa DamnSmallLinux 7 11-16-2004 10:03 AM
Trouble Burning ISO image to USB pen drive madh@ter Linux - Hardware 1 08-30-2004 10:29 AM
howto mount usb pen drive? name_in_use450 Linux - Hardware 2 08-24-2004 07:23 AM

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

All times are GMT -5. The time now is 09:59 AM.

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