Installing SUSE 9.0 with an USB pen drive

This page explains how to configure your USB pen drive (a.k.a USB memory stick)  and PC system so you can boot it and install SUSE 9.0 via FTP.

This info comes with NO warranty and if it breakes stuff you are your own...

Used hardware and facilities:

- ASUS pundit (a bare bone system with  a 2 Ghz Celeron,128 Mb memory, 80 Gb harddisk,some USB connectors, UTP ethernet without a CDROM drive and without a floppy drive)
- USB stick;  SANDISK cruzer 256 Mb
- a SUSE 8.2 workstation to setup the USB pen drive
- a broadband Internet connection


- PC BIOS knowledge or at least comfortable with changing BIOS settings
- Know how to use fdisk
- have common Linux commandline skills

Setup the BIOS of PC system for booting from USB

Please note that not all PC BIOS' have the option to boot from USB sticks.
The ASUS pundit does have such a feature and in the boot section of the BIOS you find it under the list of 'removable device'
and it is called 'USB zip/flash'.
If you want to be sure that only the USB stick is the only boot device available set the other boot device options to 'disable'

Setup the USB stick

You probalby noticed that the boot option chosen in the PC BIOS had 'zip' in it. This means the option is intended for USB ZIP-drives.
This means you have to change the disk layout of the USB stick to something that correspond to the ZIP-drive layout which is
64 heads and 32 sectors per track.

This changing of the drive layout is very important. If you don't change it, it won't boot!! (unless it already has the proper layout)

Some people think that when they can mount the USB pendrive that the geometry doesn't have to be changed, this is not true.(for BIOS's with USB-ZIP boot option)
The pendrive will mount properly (and you can use it for storage), but it won't boot.
I can imaging that there are BIOS' which will boot without changing the pendrive geometry, so the best thing is to try it first without changing the geometry and if that doesn't work, change the drive geometry.

You can set the layout with the advanced commands of fdisk.
In my case the original USB stick 'disk' layout was 32 heads 33 sectors per track and 484 cylinders.
The new settings are 64 heads 32 sectors per track and 250 cylinders.

Before you begin make sure you know which device is your USB stick, because otherwise you could end up
with a broken system or at least you lose some data.


fdisk /dev/sda   
type 'd'  to delete current partition(s) on the USB stick.

type 'p' to check if you deleted all partitions

type 'x' to go into export mode

type 'h' to change the number of heads (64)

type 's' to change the number of sectors (32)

type 'c' to change the number of cylinders (250000)
This value is incorrect. But it can be stored without error.
Then continue with type 'v' to verify the current partition table. Fdisk will tell you what the maximum number of cylinders may be. type 'c' again to set the reported number of maximum cylinders
type 'r' to go back to normal mode

type 'n' to create a new partition which uses the complete capacity of the USB stick.

type 't' and set the partition type to '6'  (=DOS FAT 16)

Type 'a' to make the partition bootable
type 'w' to write the partition the USB stick

type 'q' to leave fdisk

Ok the partition part is done. Now format the new partition with DOS/VFAT.
On SUSE linux the command is;
mkfs.msdos /dev/sda1
But this can vary for other Linux distro's, to find out do a 'man mkfs'

Now mount the USB stick so you can write something on it

mount -t vfat /dev/sda1 /mnt/usbstick
Now startup your browser and go to the SUSE mirror list and lookup your nearest mirror site.
Then download the 'boot.iso' from somewhere under ..suse/i386/current/boot ........ it is about 22 Megabytes.

When you have the boot.iso file mount it via the loopback device with the following command;

mount -t iso9660 -o loop /path/to/boot.iso /mnt/ISOimage

Copy everything in the ISO image onto the USB stick

cd /mnt/usbstick
cp -r /mnt/ISOimage/* . 
cp boot/loader/* .
cp isolinux.cfg syslinux.cfg

Now umount the USB stick

umount /mnt/usbstick

Set a linux bootloader on  the USB stick

syslinux /dev/sda1

OK, your USB stick is ready. Stick it into the machine on which you would like to install SUSE 9.0
and the SUSE installation procedure will guide you through.

Please note this is just hack of the ftp install ISO image, not some well though out or tested install procedure, but it worked for me  ;-)

For the people the who want to restore their USB pendrive back to an empty VFAT formatted USB pendrive please use the following procedure.

1. the simplest is to Windows XP; plug the USB pendrive in the machine.
Go to "my computer" it should show there as a removeable drive (if have
several removeable drives make sure you choose te correct one!!). Click
on it with the right mouse button and choose "format drive". It should re-use the complete capacity
of the USB pendrive.

2. Under Linux; fdisk /dev/[device name of pendrive]
in fdisk do the following:
'd' [delete partition]
'1' [delete first partition]
'n' [new parition]
'p' [primary partition type]
press 'enter' key to accept default begin cylinder
press 'enter' key to accept default end cylinder
't' [set partition type]
'b' [partition type 'W95 FAT32']
'w' [write partition to USB pendrive]
'q' [ quit fdisk]

Command to create vfat filesysteem:
mkfs.vfat /dev/[device name of pendrive]

Now it should be ready for use with the full capacity of the pendrive

I hope the distro makers in the future will add install images for USB pen drives.

I hope this info was usefull to you.
If you have some usefull additions please let me kown at: patrick at safepoint dot nl

Update: 1 aug 2004
Fedora core 2 comes with a 6 Mb image which can be used on USB pendrives for installing Fedora core 2 via http of ftp.
It works perfect with the ASUS pundit.

Update: 24 nov 2005 Corrected some typo's and changed cylinder setup description so this will work also USB sticks of other sizes, thanks to Lucas Ledelay
Patrick Hoogendijk