Nov 09 2009 08:01 pm
Posted by odydasa under Do It Your Self,ICT,Keminter
Boot from ISO file on UFD/ HD
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 |
| Fedora | /isolinux/vmlinuz | /isolinux/initrd.img |
| RHEL5/CentOS5 | /isolinux/vmlinuz | /isolinux/initrd.img |
| openSUSE | /boot/i386/loader/linux | /boot/i386/loader/initrd |
| Mandriva | /i586/isolinux/alt0/vmlinuz | /i586/isolinux/alt0/all.rdz |
| Ubuntu | /casper/vmlinuz | /casper/initrd.gz |
| Debian | /install.386/vmlinuz | /isolinux/initrd.img |
|   | ||
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.
http://releases.ubuntu.com/jaunty/ubuntu-9.04-desktop-i386.iso - Kernel and initrd image files from Ubuntu CD ISO (ubuntu-9.04-desktop-i386.iso)
You can open ISO file with WinRAR. -
- vmlinuz
- initrd.gz
Steps
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:
http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&mode=3&taskId=135&swItem=MTX-UNITY-I23839 - 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:
J:\default
J:\grldr
Save it into your UFD (e.g. J:\), enter file name withmenu.lst, and don’t forget to change “Save as type” into “All Files”Type these lines intomenu.lstfile:
color white/black yellow/black
timeout 5
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 --
initrd /ubuntu/initrd.gz
bootThat 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, runvmlinuzto openubuntu-9.04-desktop-i386.isoISO file, then openinitrd.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 requiresJ:\casper-rwfile (it can be made later).From now on, UFD has these files:
J:\default
J:\grldr
J:\menu.lst
J:\ubuntu\initrd.gz
J:\ubuntu\ubuntu-9.04-desktop-i386.iso
J:\ubuntu\initrd.gz - 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 (
vmlinuzkernel andinitrd.gzinitrd image) from ISO into UFD
Open ISO file (ubuntu-9.04-desktop-i386.iso) with WinRAR, copyvmlinuzandinitrd.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 makemenu.lstfile in J:\.
We can use Notepad, and save it into the respective name.

- Boot for first time



- Create
casper-rwfile
Ifcasper-rwfile is provided, then we can make ISO-boot Ubuntu persistent.
Don’t close the 1st booting, we need it to make thecasper-rwfile.
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 - Ready
Ubuntu 9.10
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:
/casper/vmlinuz
/casper/initrd.lz
Note that the RAM disk image file has extension .lz
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 menu.lst.





[Translate]
walaaaaaaaaah keren banget om
[Translate]
@Ndro: ya dicoba aja…
Yg versi komplet, aku gabung dg berbagai diskimage, mini linux hardiskimage, dll…
Utk installer winxp & viesta, BartPE, dll, bisa pakek winsetupfromusb ituh.
[Translate]