Boot Debian from an USB device
Posted by sebas on Mon 9 Oct 2006 at 12:49
Here is a very short (but in my opinion very useful) how-to for creating an USB boot device, which enables you to boot Debian from your memory stick.
We are assuming that your USB device is indicated by /dev/sda, and that you are interested in Debian stable (other distributions are untested, but should work).
First unmount your memory stick.
sudo umount /dev/sda
Now download the boot.img.gz, which is necessary to make your USB device bootable:
cd ~ wget ftp://ftp.debian.org/debian/dists/stable/main/installer-i386/current/images/hd-media/boot.img.gz
Extract this image and write it to your USB device:
sudo zcat ~/boot.img.gz > /dev/sda
Now mount the volume to /mnt:
sudo mount /dev/sda /mnt
In this case a Debian Stable net-install image is used. You may also use a business card iso. Nevertheless, you should be sure to use the same version of the ISO-image as the image.tar.gz that was used before.
Download the ISO to the USB device:
cd /mnt/ sudo wget http://cdimage.debian.org/debian-cd/3.1_r3/i386/iso-cd/debian-31r3-i386-netinst.iso
Now you can unmount the volume:
cd ~ sudo umount /dev/sda
You can remove the USB device, and plug it in your new system. Of course you should tell your BIOS to boot from USB.
There is a copy of this how-to on the website of our company VirtualConcepts
Will only work if your user has write access to /dev/sda. You probably want to do
sudo sh -c 'zcat ~/boot.img.gz > /dev/sda'
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
zcat ~/boot.img.gz | sudo tee /dev/sda > /dev/nullIn general, this also has the advantage of not running the command generating the output as root.
[ Parent | Reply to this comment ]
Nice write-up, yo.
Depending on the contents of your /etc/fstab, the mount command might need to look something like this: mount -t msdos /dev/sda /mnt
[ Parent | Reply to this comment ]
I have a 4Gb USB stick, I was wondering if it is possible to have a full debian system on it and boot on it, any idea ?
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
From live cd one can install to usb device, later booting from usb with linux dirconf=configuration_name it's posible to use many persistent configurations.
It's kde based and catalan localized but in fact wit more than 3 Gb free ( 700 MB FAT16 + ext2 2300 MB ) you can install a lot of locales ;-)
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
http://wiki.grml.org/doku.php?id=usb#grml2usb
But 4GB is enough for complete grml plus your own apps
http://grml.org/grml2hd/
In this case, tweak /etc/fstab to minimize flash writes, so: tmpfs for /tmp, /var/run, /var/lock, /var/log, etc. (not /var/tmp, which must persist).
Also consider the exceptionally shock-resistant WD Passport (under 100 bucks) following advice from
http://os.newsforge.com/os/06/02/22/2221258.shtml
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
Any tips on making it larger and still be bootable?
[ Parent | Reply to this comment ]
Does this image officially support install over network, because i really cant get it to work. "ethernet card not found" hauts me!
-Alf :)
[ Parent | Reply to this comment ]
http://www.linuxquestions.org/questions/linux-networking-3/instal ling-debian-etch-with-usb-pen-ethernet-card-not-found-651024/
Alf :)
[ Parent | Reply to this comment ]