Installing openSUSE from USB

1
Although openSUSE doesn’t currently support installing from USB, it is quite easy to do it on your own with standard Linux tool syslinux. So lets install that:

# zypper in syslinux

Get the openSUSE install files

After you have syslinux installed, you are going to have to grab and install CD/DVD from one of the many openSUSE mirrors, you can find the latest versions at http://download.opensuse.org/distribution/. Lets mount the ISO and grab the files that we need, we’ll use a standard Linux command to do so: mount. To mount an iso onto your local file system you need to tell it what file to mount and what location it should mount to.

# mount -o loop

Define what device you want to install from

Next, we’ll need to find the USB device we’d like to install from, you can do this in a few different ways:

# fdisk -l
# cat /proc/partitions
# mount

or you can run:

# dmesg

You’ll see something like:

usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
scsi 3:0:0:0: Direct-Access Kingston DataTraveler 2.0 1.00 PQ: 0 ANSI: 2
sd 3:0:0:0: [sdb] 1994752 512-byte hardware sectors (1021 MB)

So, from that output you can see that the newly inserted device is /dev/sdb, so if your system doesn’t automount the device (openSUSE should), you can mount it:

# mount /dev/sdb /mnt/thumbdrive

Setup the USB drive to be a bootable installer

Once you have both the ISO and the USB drive mounted, you’ll wanted to copy the install files from the ISO to the USB drive. The install files are in boot//loader on the ISO. We’ll also want to rename isolinux.cfg to syslinux.cfg

# cp /mnt/openSUSE-i386/boot/i386/loader/ * /mnt/thumbdrive
# mv /mnt/thumbdrive/isolinux.cfg /mnt/thumbdrive/syslinux.cfg

The final step is to run syslinux on the USB device, you’ll want to make sure the USB device is unmounted for this.

# umount /mnt/thumbdrive
# syslinux /dev/sdb

Conclusion

Now you have a bootable installer on a USB device that will allow install from all the standard protocols (NFS, FTP, CIFS, etc) as normal. One caveat of this method is that it will now try to install grub onto your thumb drive, so after it boots up the base system into memory, unplug your drive so that it will install to the correct boot partition or MBR.

Grub defines its devices from the BIOS boot order and since we booted off a USB stick it will think that (hd0,0) is the USB stick but in reality, its your actual disk. So on your first boot grub will be pointing to (hd1,0) and not (hd0,0), so you will have to modify /boot/grub/menu.lst and point it to the right disk. You can do this by hitting “E” at the GRUB prompt.