LinuxQuestions.org
Visit Jeremy's Blog.
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 06-09-2008, 10:24 PM   #1
DAChristen29
Member
 
Registered: Dec 2002
Location: Johnstown, Co
Distribution: Mint (debian edition)
Posts: 541

Rep: Reputation: 30
install an ISO from usb disk


I'm wondering if it's possible to boot a live linux cd and install a distro via an ISO from a 1GB USB stick. I don't want to spend time burning CDs anymore and thought this would be a more efficient way. I can't boot from USB, so what I thought what I could do is boot via a live cd and mount the iso image and start installing from there.

How would I go about doing this?
 
Old 06-09-2008, 11:18 PM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Try reading through the Debian Install Manual. There is a section dedicated to various methods of installing. This includes making a bootable installer using a USB memory stick. I think the later version of installers also have the option of installing files from a mounted *.iso file, so in principle you just need that bootable USB stick (or USB HD) and an *.iso image on it.

Similar tricks can be done to install any other distribution you want, and many distributions probably have some files already prepared like Debian. Even if they didn't, you can make up your own - if you know what you're doing.
 
Old 06-09-2008, 11:44 PM   #3
DAChristen29
Member
 
Registered: Dec 2002
Location: Johnstown, Co
Distribution: Mint (debian edition)
Posts: 541

Original Poster
Rep: Reputation: 30
I forgot to point out that my computer does not boot from USB media, which is why I'm trying to figure this out the hard way.
 
Old 06-10-2008, 12:50 AM   #4
milindlokde
Member
 
Registered: Apr 2007
Location: Mumbai, India
Distribution: Fedora, ubuntu
Posts: 121

Rep: Reputation: 21
Quote:
Originally Posted by DAChristen29 View Post
I don't want to spend time burning CDs anymore and thought this would be a more efficient way.
It can be done in two easy ways:
1) Install a Virtual Machine Software like Vmware, Microsoft Virtual PC, etc. on your existing Linux or Windows OS.
Boot the iso in the Virtual Machine and install it on a virtual drive.
This method is harmless.

2) Install a Virtual Machine Software like Vmware, Microsoft Virtual PC, etc. on your existing Linux or Windows OS.

Boot the iso in the Virtual Machine and install it on your actual physical disk on a seperate partition.

Restart your machine and you will find your Linux actually installed on your disk.

This method is very harmful. Any problems with your virtual machine/Installation/partition table will make your disk unusable.


3) Third method is by mounting the iso in Linux using the following command:
mount -o loop /usbdisk/linux.iso
Copy the contents of the disk on either your PenDrive or your harddisk.
Create a Linux Startup disk and provide the path of the installation folder to it (where you copied the contents of the disk.)
 
Old 06-10-2008, 01:15 AM   #5
DAChristen29
Member
 
Registered: Dec 2002
Location: Johnstown, Co
Distribution: Mint (debian edition)
Posts: 541

Original Poster
Rep: Reputation: 30
Sounds like burning a CD would be the easiest and quickest option still. Creating a linux startup disk would mean burning another cd as I have no floppy drive. I have no problems with burning cds, I just figured there was another way that might save some time in the future.
 
Old 06-10-2008, 06:35 AM   #6
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
"I just figured there was another way that might save some time in the future."

I think the CDs are very convenient; I keep a CD with all my installed software just in case I need to rebuild a system, and I keep a LiveCD for those rare bad days when I need to be able to boot and use good tools to fix some problems.
 
Old 06-10-2008, 03:00 PM   #7
Duck2006
Member
 
Registered: Sep 2006
Distribution: Ubuntu 8.04 Hardy Heron LST
Posts: 346

Rep: Reputation: 33
http://www.pendrivelinux.com/
 
Old 06-10-2008, 08:38 PM   #8
DAChristen29
Member
 
Registered: Dec 2002
Location: Johnstown, Co
Distribution: Mint (debian edition)
Posts: 541

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Duck2006 View Post
now THAT is what I needed. I always thought that was another linux distro though, one that ran from a USB device.
 
Old 06-11-2008, 06:41 AM   #9
milindlokde
Member
 
Registered: Apr 2007
Location: Mumbai, India
Distribution: Fedora, ubuntu
Posts: 121

Rep: Reputation: 21
The first two options I mentioned do not require you to burn any CDs, though it requires you to have working knowledge of virtual machine softwares.

I have used the first option a lot of times to test newer linux distributions without burning any CDs at all. Just give it a try and you will find answers to a lot of your problems.

But nice to know you got your solution.
 
Old 06-11-2008, 08:09 AM   #10
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
I thought pendrivelinux did boot from a USB stick (and you can't boot from USB)?

Going back to your idea of booting from a Live CD and starting an installer, you can play around with the iso image on a Linux machine.

1. mount the iso:
mount mydistro.iso /mnt -o loop
2. find out what 'initrd' is booted at install time - for example, I go to /mnt/isolinux and find a file 'isolinux.cfg' which has lines like this:
kernel /install/2.6/vmlinuz
append DEBCONF_PRIORITY=low vga=normal initrd=/install/2.6/initrd.gz ...
3. unpack the initrd - in this case it ends in .gz so I assume it is a genuine initrd and not a cpio archive:
cp ../install/2.6/initrd.gz ~/.
cd
gunzip initrd.gz
mkdir tmp
mount initrd tmp -o loop

4. See what steps are taken after the initrd is mounted. It's pretty safe to bet that sbin/init is a bash script rather than an executable binary:
less tmp/sbin/init

And sure enough it is ... but I just peeked at that file and it really didn't do much other than invoke 'busybox' as 'init'. So ... when busybox acts as 'init' it must look at etc/inittab:
# /etc/inittab
# busybox init configuration for debian-installer

# main rc script
::sysinit:/sbin/debian-installer-startup

# main setup program
::respawn:/sbin/debian-installer

# convenience shell
vc/2::askfirst:/bin/sh

# logging
vc/3::respawn:/usr/bin/tail -f /var/log/messages
vc/4::respawn:/usr/bin/tail -f /var/log/syslog

# Stuff to do before rebooting
::ctrlaltdel:/sbin/shutdown > /dev/null 2>&1

OK - so there are all the dirty secrets. What now?
Well, you need to go through most of those motions after booting the Live CD -
unpack the initrd somewhere, mount it, 'chroot' to it, then invoke the installer script(s).

Nice and simple, eh?
 
Old 06-11-2008, 08:37 PM   #11
DAChristen29
Member
 
Registered: Dec 2002
Location: Johnstown, Co
Distribution: Mint (debian edition)
Posts: 541

Original Poster
Rep: Reputation: 30
I was thinking about writing a simple script that people can run to install apps much like I'm looking to do. Only problem is I don't like to be dependent on the pendrive linux files. There's a step in the guide that tells you to wget some files from the pendrivelinux site, which I don't like. I'd like it to be self-contained. I may have to host files myself.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using a floppy disk to boot an iso from a usb device? Toxyn Linux - General 3 05-03-2007 01:47 PM
burning image to USB disk. SEX.iso byteframe Linux - Hardware 2 12-30-2006 01:51 PM
how can i install SUSE 9.3 PRO via hard disk ISO file desun SUSE / openSUSE 3 04-17-2005 02:53 AM
Install from hard disk with ISO JermJHart Mandriva 1 11-24-2004 12:50 AM
making a bootable install disk from a downloaded iso Draylath Linux - Newbie 7 08-14-2004 03:54 PM

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

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