Debian installation from USB stick

I gave up the idea of setting up Solaris as my home router/server OS. It seems that I don’t have enough RAM. Actually I have 512MB, and I’m able to install Solaris, but to comfort work it’s just too few.

And now I have Debian. It was quite an adventure. I didn’t want to turn off my PC to borrow
one of DVD drives, so I decided to install it from USB stick (pen drive). Ok… how? Simply copying data from ISO image is not enough.

First, prepare your USB drive. Unmount if mounted automatically. Then:

sudo mount /dev/sda1 /mnt
sudo mkdosfs /dev/sda1

Make sure /dev/sda1 is actually your targeted USB device. Before above steps you can make sure wich /dev to use:

sudo mount

on the bottom you should see your device.

Install:

sudo apt-get update
sudo apt-get install syslinux mtools

Then:

syslinux /dev/sda1

Now download necessary files:

ftp://ftp.debian.org/debian/dists/etch/main/installer-i386/20070308/images/hd-media/gtk/

and appropriate ISO image, eg:

http://ftp.icm.edu.pl/pub/Linux/debian-cd/current/i386/iso-cd/debian-40r0-i386-kde-CD-1.iso

I have 1GB pen drive, so one CD fits for me, but you can choose smaller ISOs: netinst ot bussinescard.

Copy those files to your USB drive:

sudo copy source_file target_file

eg:

copy /tmp/downloads/vmlinuz /mnt/vmlinuz

Additionally you have to have syslinux configuration file:

sudo touch /mnt/syslinux.cfg
nano /mnt/syslinux.cfg

and paste the following:

default vmlinuz
append initrd=initrd.gz

Your USB installation media is ready, unmount:

sudo umount /mnt

Set up BIOS on machine you’re about to install Debian to boot from USB-ZIP and you’re done.

NOTE: I didn’t use packages from ISO shown in example only. I’ve done mixed installation ISO + remote (network) repository (mirror). You will have this option available during your own installation so no additional steps in this how-to are necessary.

Bonus: graph showing network usage during Debian mixed installation.

debian installation

0 Responses to “Debian installation from USB stick”



  1. No Comments Yet

Leave a Reply