Friday, May 29, 2009

Install linux without CD/USB/Floppy !

As part of a bigger project (a digital photo-frame) I have been trying to repurpose an old P3 laptop of mine that has not seen use in a few years. It had a semi-working install of Fedora Core 4 on it and I wanted to install something newer, faster and something where I could get software easily.

Heres the catch, the laptop's CD drive went bust a long time ago and being a 2001 model it has no USB boot capability. All it had was a functioning internet connection (ethernet). After a week of searching and understand how Grub boots linux I successfully installed Xubuntu on the machine !


Will keep this as simple as possible. Grub use a config file /etx/grub.conf that contains the commands used during bootup. what we need is a paragraph starting with title and contaisn the name of the distro being booted. ANything can be written here.

The next two lines below it are the locations of the Kernel and the Initrd files. These are what linux always boots first and are the key to installing a new system. They specify the location of the root partition on the hard drive for example: (hd0,0) meaning hard drive 0 and partition 0. Heres a sample of a paragraph:
title Red Hat Linux (2.4.18-0.12)
root (hd0,0)
kernel /vmlinuz-2.4.18-0.12 ro root=/dev/hda3
initrd /initrd-2.4.18-0.12.img

Now all we need are the 2 files ( the kernal and the initrd file of the system we wish to boot ).


  1. First and foremost get the two files ( the kernal and the initrd file ) of the system you want to install. Two ways of doing this: if you have the distro's image (iso file ) just go into that and find them files.
  2. Place both files into the /boot folder in your root directory.
  3. Open up /etc/grub.conf in your faveroute text edditor.
  4. Add a paragraph in it. Heres what it should look like:
title My Linux installer of choice
kernel (hd0,0)/boot/your_linux_kernel_filename
initrd (hd0,0)/boot/your_initrd_img_filename

Now simply reboot the computer. When the Grub menu shows at startup simply select your newly added choice. A simple installation menu should start up and all you have to do is follow the instruction. The distro will eventually start the installation by downloading necessary components from a provided mirror.

NOTE: I know Ubuntu can automatically find mirrors to install from but I had issues with Fedora where I had to manually enter a mirror. In that case go here and select the mirror for the distro required. Make sure that the url you provide is of the os and should look like this: .../blabla/fedora/linux/core/10/i386/os/

Closing notes:

Im glad to have the laptop working again. The installation went smoothly and I was able to format the entire disk meaning the kernel and initrd files i had booted from were wiped out but during the install they were on the ram so it dint cause any issues. Make sue that the install goes uninterupted though, failing in the middle can be catastrophic.

I hope this helps. I took help for this from this website. It is more comprehensive and also explains how to do this from Windows if required.

1 comment:

Kemal said...

Anshuman, can you send me your current address, where you are and what is your current employer.