InstallingOrBootingUsingIsoFile
Why this method?
Because I have a thin laptop that can't boot from my PCMCIA CD drive (I even tried SmartBootManager which is supposed to support this PCMCIA CD booting). Obviously, I can boot the laptop via net as I explained on EdubuntuViaNetBoot
If you need to install any developing version of Ubuntu or flavours, usually Developers do not recommend to use APT for such purposes. Then, net booting is a good idea or even this howto.
To sum up, this howto is good for you if:
You want to test a LiveCd but you can't boot from CD drive.
- You want to install a distro but you can't boot from CD drive.
- All the above alternatives but you don't want to burn a CD.
Table Of Contents
Contents
- Why this method?
- Using a distro ISO file to boot/install via GRUB
- Hardware used
- Software used
-
The Procedure. Few steps
- Get the iso file from the distro you want.
- Create and/or Check you have 2 partitions.
- Create a couple dirs so we can mount what we'll need.
- Mount the distro.iso file [Alternative 01]
- Mount the distro CD in the CD-Drive [Alternative 02]
- Mount target partition and copy all files and dirs to it.
- Edit GRUB file (menu.lst)
- Reboot and enjoy
- If you want to run the distro installer
- Comments? Observations?
Using a distro ISO file to boot/install via GRUB
Yes, it is possible. I have found people stating it is not possible and others stating it is possible.
So, I had to give it a try.
The idea is very simple:
Short quick version
Get an distro.ISO file into your /home or wherever
Get a free partition
Mount the free partition
Mount the distro.ISO
Copy all files and dirs from distro.ISO (already mounted) to the mounted free partition
Set GRUB to be able to boot from ex-free partition
- Boot and enjoy
Hardware used
- Fujitsu Lifebook B2175
- Celeron 500 MHz
- 256 MB of Ram
- 20 GB of HD
a free partition 1 (I recommend 1 GB so we can copy all the iso file to it)
a free partition 2 (at least 2.6 GB depending on the requirements of the distro of your choice)
Software used
- Ubuntu/Edubuntu system
- GRUB (default)
Elive_0.4.2.iso (we could use any distro.iso file)
The Procedure. Few steps
Get the iso file from the distro you want.
In my case, I used Elive_0.4.2.iso just to give e17 a try and because I know DanieleFavara (aka, nomed at #dsslive and #xubuntu) and Thanatermesis (from #elive) have worked very closely and hard to offer this very cool metadistro.
Create and/or Check you have 2 partitions.
You can use fdisk -l to see your current partitions and harddisks available, and use tools like cfdisk to create/delete/resize partitions.
Please, accept my apologies for not including information on how to use cfdisk or similar tools, but this howto is intended to solve a very specific need, and I am very sure you will find info about paritioning in this very wiki or at Google.
What I used is 2 partitions:
/dev/hda7 --> 2.8 GB (I will install Elive here once I am convinced I like its performance)
/dev/hda8 --> 1 GB
So, for the rest of this howto, just replace the partition numbers for the ones you are actually using
Create a couple dirs so we can mount what we'll need.
For this howto, I have chosen /mnt/IsoFile and /mnt/Target
$ sudo mkdir /mnt/IsoFile $ sudo mkdir /mnt/IsoGrub
Mount the distro.iso file [Alternative 01]
We need to mount the iso file to a directory we can read and use
$ sudo mount -o loop Elive_0.4.2.iso /mnt/IsoFile
Mount the distro CD in the CD-Drive [Alternative 02]
$ sudo mkdir /cdrom $ sudo mount /dev/sr0 /cdrom
Elive 0.4.2 does not do automounting, and my PCMCIA CD-Drive is recgnized as sr0
Mount target partition and copy all files and dirs to it.
Remember that later on, we will tell GRUB to read files in a partition and boot from it.
$ sudo mount /dev/hda8 /mnt/IsoGrub $ cd /mnt/IsoFile $ cp -a * /mnt/IsoGrub
Edit GRUB file (menu.lst)
This step is very simple but you have to keep in mind that you need to replace the info according to your own settings.
$ nano /boot/grub/menu.lst
yeah, you could use a different editor
Add lines like these...
### END DEBIAN AUTOMAGIC KERNELS LIST title Elive 0.4.2 LiveCd kernel (hd0,7)/boot/vmlinuz root=/dev/hda8 BOOTMEDIA=cd initrd (hd0,7)/boot/miniroot.gz boot
remember that hd0,7 corresponds to 1st master IDE Harddisk and to partition #8 (yeah, 0 is #1)
Usually, for initrd we would use a file like initrd.img but in the case of Elive, I found none under a similar name but miniroot.gz.
After editing and saving (don't forget to save!), you need to update GRUB...
$ sudo update-grub
Reboot and enjoy
If you did not get any errors, then we're done to reboot and enjoy!. Obviously, when rebooting, press Esc key as soon as you see the grub message/line and select Elive 0.4.2 LiveCd (or whatever you wrote in menu.lst).
If you want to run the distro installer
In case you are also trying a LiveCD distro that lets you install from it onto a partition, then you can specify /dev/hda7 for such purpose.
Of course, if you are trying an install CD (like the one shipped by Canonical), when rebooting, you will run the standard installation procedure, just like booting from CD.
Comments? Observations?
Send an email to mhz AT ubuntu DOT com or just add it to this last section.
I tried Xubunt Dapper
title Xubuntu Dapper LiveCD kernel (hd0,7)/casper/vmlinuz root=/dev/hda8 BOOTMEDIA=cd initrd (hd0,7)/casper/initrd.gz boot
it did boot ok BUT I only got to a Busy Box (ash)
-- MauricioHernandez 2006-07-03 01:47:20
InstallingOrBootingUsingIsoFile (last edited 2008-08-06 16:20:55 by localhost)