Thursday, February 28, 2008

Install Linux from iso image without buring on CD

It's a very obvious practice to burn the downloaded iso images of linux (in general sense any operating systems) prior to the installation to an optical removable media (CD/DVD). However, for a change we will see how we can install a new linux distribution from an existing linux distribution and without making any copies of iso image of the operating system on a CD/DVD.

There are some pre-requisites for this task, which are as follow:
- A preinstalled linux distribution with superuser rights
- The GRUB bootloader- A Pre-downloaded Linux iso image (we will be installing zenwalk linux which can be downaloded from
- Free disk space to install the new linux distribution from the iso image
Now folllow the below mentioned steps:
-> Start your existing linux distribution
-> Copy the zenwalk iso in your home folder say /root/home
-> Execute the following commands :
#mkdir -v /mnt/zenwalk
#mount -o loop /root/home/zenwalk-x.x.iso /mnt/zenwalk
#mkdir -v /boot/zen_iso
#cp /mnt/zenwalk/isolinux/*.* /boot/zen_iso

-> Now fire up your favourite text editor, open /boot/grub/menu.lst for edititing and paste the following lines at the end:
title Install Zenwalk
root (hd0,x)
kernel /zen_iso/vmlinuz-2.6.xx.x root=/dev/hdax+1 ramdisk_size=100000 init=/etc/init lang=us fromhd=/dev/null bootfrom=/dev/hdax+1/root/home/zenwalk.x.x.iso
initrd /zen_iso/initrd.splash
-> Now save your work, you have edited your GRUB so that it will take you to the Zenwalk kernel
-> Reboot your system and select 'Install Zenwalk' option
-> This will start your Zenwalk kernel
-> Escape from installation menu
-> Mount your existing linux partition somewhere at /mnt/linux by the following command:
#mkdir -v /mylinux
#mount /dev/hdx+1 /mylinux

-> Mount the Zenwalk iso image from this partition as given below:
#mkdir -v /zw_install
#mount -o loop /mylinux/root/home/zenwalk-x.x.iso /zw_install
-> Restart the Zenwalk installation program by the following command
-> Follow the on screen instruction for partitioning etc.
-> Specify the 'other' location to be /zw_install
-> Proceed to the installtion process
This should install the Zenwalk without burning it to a DVD/CD!Note: To determine your linux partition you may use lvmdisscan grep "hda" command

Google Search