Monday, April 23, 2007

Installing SUSE without CD

Like many linux distros, openSUSE has a fast release cycle of about 6-9 months. Burning 5 CDs for the distribution or a DVD every time a new version is released, wastes a lot of CDs and DVDs. It's also bad for the environment.

There is an alternate method to install openSUSE using a DVD iso image only, without burning it to CD/DVD. Also if your PC does not, for some reason, boot from CD/DVD this method can be useful. An existing Windows FAT32 partition from a dual-boot setup has been used here. Also, I am assuming that you have grub as the boot-loader and have an existing Linux distribution, preferably SUSE, installed.
  • First, download the latest openSUSE Goldmaster DVD iso image on a FAT32 partition. You can do that from here.
  • Next unpack the iso image contents into a folder on the partition and name that folder 'openSUSE'. This folder should be created in the root of the FAT32 partition.
  • Next, in the openSUSE folder, go into boot -> i386 -> loader. From this folder you will need to pick up two files - linux and initrd. Copy these somewhere and rename then as 'suselinux' and 'suseinitrd' respectively. Move them over to /boot folder of your Linux partition or whichever partition you have the bootloader installed.
  • Next, in /boot/grub/menu.lst file of your Linux partition, add an entry with the title as 'Install openSUSE' and the lines specifying kernel and initrd to 'kernel /boot/suselinux' and 'initrd /boot/suseinitrd'. The entry for 'root' should be the same as that for your existing Linux distro entry in the file. The new entry should look something like this:
title Install openSUSE
root (hd0,1) ---> change to whatever is appropriate for your system
kernel /boot/suselinux
initrd /boot/suseinitrd

Sometimes in some distros, it is not necessary to specify '/boot' in the entries. So look out for the syntax in the other similar entries in the file. Save the file.
  • Find out the name for the FAT32 partition where you unpacked the DVD iso (it will be something like hda1, hda5, hdb1 etc). Restart your computer.
  • In the grub menu, select 'Install openSUSE'. The installation of openSUSE should start now.
  • The installer will ask you to insert CD1 as the first step of the installation. Select OK without inserting any CD.
  • Next select the language and the keyboard layout. The installation should now show you a list of options to select from. In the middle, there will be an option 'Start installation or System'. Select it and then select 'Start installation or Update'.
  • Then, the installer will give a list of methods which you can use for installation. Select the hard disk option here.
  • Next the installer will show a list a partitions from which you can choose. Choose the entry corresponding to the FAT32 partition.
  • Then the installer will ask for the installation directory on the partition. Enter 'openSUSE' as the directory name. It should now detect the installation directory and begin loading Yast2 and the graphical installation should start as normal.
  • During this installation, make sure that you do not enter the mount point for the FAT32 partition as the installation fails later. Be very very careful here. You can set the mount point later after openSUSE has been installed. Also, do not set the FAT32 partition to be formatted during installation.

The installation should complete normally now and you should have a brand new openSUSE distro installed and all without burning any CDs/DVD. The unpacked DVD folder is not required after the installation and you can safely delete it. Also, you can copy the DVD iso over to the linux partition and set it as an installation source in Yast2.

If you have less than 512MB ram, you might face some problems like the installer asking to activate a swap partition or even refusing to start giving a 'no catalogue found' error. Hence, it would be better if you have at least 512MB of ram in order to install without major hassles.

The above method is the one which I generally use to upgrade my SUSE installations. For more detailed information and other methods of installation without CD, refer this page.

No comments: