Monday, October 1, 2007

Install Linux from ISO image on hard disk without using a DVD ROM or CD Drive

I am describing here a method to install Linux without using a DVD ROM or CD Drive I have checked it myself .In case you do not follow or could not work as said write a comment here might be some thing is missing I will reply but since I have been searching for a job from past many days so if I do not reply to your queries right now so you have to wait for some time in case

there are many ways to do so
you can install Linux by
1) booting from the network
2) Having a ISO image on your hard disk
3)Boot from USB
4) Installing a linux system from scratch by building your own

I am assuming that Linux is not installed on your system and neither grub or lilo is there
This method is taking Open Suse 10.2 Image but is same for Fedora or Debian or any other distro .
There is one check point in case you used Nero to copy CD or DVD image then it might have been possible that you copied the image and it is file with dot nrg extension in that case you need to get the ISO from NRG

I have installed by all the above methods but I am describing here the simplest one since there are many new comers who would not be able to understand other methods .Before doing all this make sure
1)that you have enabled the option of viewing file extensions in View Options of folder view.
2) If you use Fedora or any other distributions do not use the NTFS partition to store the
image although Open Suse 10.2 can work from NTFS partition I have done it using NTFS
partition only but will not suggest you to do same
3) Most important do not install linux on same partition on which you have the ISO from which you are installing everything since it will format that hard disk that holds the image you are using
there is an image named openSUSE-10.2-GM-DVD-i386.iso which you would have downloaded rename it to suse.iso (not necessary to do so but will make your life simple )

Similarly for any other linux distro you might have image of fedora or debian etc rename them to some simple filename.
the image is 3.6 GB then download the grub for dos from

Before some one reads the following lines just informing while you install winzip or winrar by default they are associated with ISO filetype so you may see your downloaded ISO as an icon that says it can be extracted via Winrar just go and disable this in options tab from Winrar menu if u want to burn the ISO directly to CS just go to Nero and select burn image to disk and select the ISO u do not need to make it a bootable CD or DVD.

extract the downloaded grub4dos using winzip or winrar ,you will get a folder name grub copy it to C drive
then create a folder name boot in C drive of your windows partition (C drive is not necessary but makes life simple ) .
Now copy grldr from grub to C:

add a line C:\grldr="Start Linux" to
your boot.ini (even if I have mentioned the README there says it all)

Now different distributions of Linux have different kernel names like
Fedora: vmlinuz and initrd.img
Suse: linux and initrd
Mandriva: vmlinuz and all.rdz
Ubuntu: vmlinuz and initrd.gz
Gentoo: gentoo and gentoo.igz
Knoppix: vmlinuz and initrd.img
Slackware: bzImage and initrd.img
Debian: vmlinuz and initrd.gz

use winrar to navigate the ISO image you will go inside folder name boot or where ever the kernel are in your CD or DVD ISO

NOTE ( I took Open Suse 10.2 inside the installation media there was a boot folder inside it was a loader path is openSUSE-10.2-GM-DVD-i386.iso\boot\i386\loader
that had kernel image named linux and the initrd name initrd both are needed)

copy the kernel images vmlinuz and initrd.gz which you see by winrar in ISO archieve from your ISO to folder boot in C drive
both files vmlinuz and initrd are required for any linux system to boot

you can use winrar to view files and extract only two files rather than extracting whole ISO

then you don't need to do any thing just restart the computer and you will get a screen that says
Microsoft Windows XP
Start Linux

choose the option start linux
then go to grub you will find an entry that says command prompt

use command prompt since even after making changes as said in README some times it did not worked
press enter to select the command prompt option
you will get a grub shell showing some thing like this
grub >

now type on grub prompt (grub> ) Note u do not need to type grub > it is already there on your screen if not you did some mistake

In my case it was suse so
grub >kernel (hd0,0)/boot/linux
grub >initrd (hd0,0)/boot/initrd
grub >boot

If you are using some other distribution then above commands will change like this
grub >kernel (hd0,0)/boot/vmlinuz (depending upon your kernel name)
grub >initrd (hd0,0)/boot/initrd.gz (depending upon your initrd name)
grub >boot

press enter then
now kernel will load and will ask you to choose the medium to boot from choose the medium hard disk it might give some error that insert CD just ignore it if it asks to hit back button then it that then choose the medium etc and then choose the hard disk partition to boot from then it will ask for the file name enter suse.iso in the partition where you have it then press enter if you did every thing right installation will start if you messed up then probably you might get an error like boot.catalog not found or some other error like this only
installation starts it might display some error messages just ignore them and press enter
or hit Back button then choose language keyboard installation then choose installation medium
it gives 3 options
Hard disk
choose the hard disk and then from the hard disk choose the correct partition where you copied the 3.6 GB suse.iso
not do not format the same partition on which image is there

By looking at the above procedure do not get confused by the network installation procedure which is quite different from
the normal ones you can read complete method of Network booting and PXE intallation on my blog