Nov 09 2009 08:01 pm
It’s quiet long time ago, for having and idea of directly booting an ISO file (CD/ DVD image) of a instaler CD or LiveCD, like Ubuntu CD, instead burn it to the disc or extract the content into UFD (USB flash disk) or hardisk. Now, we can do it using GNU GRUB (“GRUB” for short) as a boot loader package from the GNU Project (http://en.wikipedia.org/wiki/GNU_GRUB).
Main Files: Kernel, RAM disk, ISO file
We will use the files from Linux installer, it’s kernel and it’s initial root filesystem (RAM disk or intrd image). This initrd image contains a lot of executables and drivers for mounting the real root filesystem. When real real root filesystem is mountet, the initrd is unounted, then the memory is freed. Both files are named differently in different distros. Find it it Table 1 for the names.
|Table 1: Names of kernel and RAM disk images in some popular distros|
|Distro||Kernel path in CD||RAM disk path in CD|
Now, here we are, preparing our UFD for booting from ISO file, and make it from Windows. In this case we will use kernel and initrd image from Ubuntu 9.04, and try to boot Ubuntu.
So, we can use:
- Grub installer.
There are some tools to make it under Windows to make a UFD to be Grub bootable, e.g. grub4dos (https://sourceforge.net/projects/grub4dos, https://gna.org/projects/grub4dos/ or http://sarovar.org/projects/grub4dos/), including WinGrub and grubinst in it.
But, I prefer to use WinSetupFromUSB (http://www.msfn.org/board/install-usb-winsetupfromusb-gui-t120444.html). For advance usage, we even can use this to install multiple boot of several Windows and Linux.
- Ubuntu ISO, you can download from any repository you like, e.g.
- Kernel and initrd image files from Ubuntu CD ISO (ubuntu-9.04-desktop-i386.iso)
You can open ISO file with WinRAR.
Now, we can start the steps:
- Prepare the UFD
If necessary, we can format it first. It’s recommended we use FAT32 format.
For advance user, there is a nice tools to do that. Find it in:
- Make UFD bootable (with Grub)
It will be easier if we use WinSetupFromUSB, but you can try another applications.
Don’t touch enything, unless “USB Disk Selection”, “Copy setup boot files only”, and “Test in QEMU”.
After finished, the UFD will be “Grub-bootable”, and has these files:
Save it into your UFD (e.g. J:\), enter file name with
menu.lst, and don’t forget to change “Save as type” into “All Files”Type these lines into
color white/black yellow/black
default /default title Ubuntu
find --set-root --ignore-floppies /ubuntu/vmlinuz
kernel /ubuntu/vmlinuz iso-scan/filename=/ubuntu/ubuntu-9.04-desktop-i386.iso quiet splash boot=casper persistent --
That code means that Grub will make a boot menu, with 5 seconds of timeout before boot into first menu (with “Ubuntu” title). In the “Ubuntu” title, Grub will try to find
/ubuntu/vmlinuzas root, run
ubuntu-9.04-desktop-i386.isoISO file, then open
initrd.gzas RAM disk image.Please note that the line in kernel is long line, the next line is initrd.
That code also enabling the persistent Ubuntu (recognize the word “
persistent” in the kernel line code). But, it requires
J:\casper-rwfile (it can be made later).
From now on, UFD has these files:
- Copy ISO file to UFD
Copy the downloaded ISO file (ubuntu-9.04-desktop-i386.iso) into UFD. We can make a folder (e.g. “boot” and copy the ISO in it)
- Copy 2 files (
initrd.gzinitrd image) from ISO into UFD
Open ISO file (ubuntu-9.04-desktop-i386.iso) with WinRAR, copy
initrd.gzfrom “Casper” folder of the ISO.
Copy it in UFD, e.g. in “ubuntu” folder.
- Make/ edit menu.lst of the Grub
If not exist make
menu.lstfile in J:\.
We can use Notepad, and save it into the respective name.
- Boot for first time
casper-rwfile is provided, then we can make ISO-boot Ubuntu persistent.
Don’t close the 1st booting, we need it to make the
Open terminal, enter /isodevice
$ cd /isodevice
Create a 512 MB file, named casper-rw.
$ sudo dd if=/dev/zero of=casper-rw bs=1M count=512
Format the casper-rw file
$ sudo mkfs.ext3 -F casper-rw
- In case, you are not satisfied with the size of casper-rw, and want to resize:
$ sudo dd if=/dev/zero bs=1M count=1024 >> casper-rw
$ sudo resize2fs casper-rw
As it’s already mentioned above, the main files are kernel and RAM disk image. Just extract those files from Ubuntu 9.10 ISO file. The files in CD are located on:
Note that the RAM disk image file has extension
If you want to save Ubuntu 9.04 and Ubuntu 9.10 (and kernel & RAM disk files) in the same folder, just feel free rename them, and adjust the respective names in the