Installing Debian from a USB Stick
I'm setting up a new web server for a client of mine, and was supposed to start installing it this evening. After unpacking it I realized that this new HP ProLiant DL 120 came without a cd-rom and thus the Debian ISO netinstall image I had downloaded was useless. Considering I'm doing this install at home, I don't exactly have a PXE server available either
My quest for installation via an USB stick started, but most of the information I found on how to create one was geared towards users that already have Debian or any other Linux distribution already installed. Again, this is being done at my home, which currently is a Linux free zone. I do have a Linux server available, the one that hosts this site amongst other things, but that is located elsewhere.
After fiddling with WinImage a bit, I was still unable to properly create a bootable stick. Everything seemed to go ok, until I actually tried booting it. All I got was a unpleasant "Boot Error" on the server, and no installation love at all. Trying to run RawWrite for Windows on Vista x64 didn't yield any better results, as that doesn't even see the USB stick as a device it can write to at all.
I came very close to giving up creating this on Windows and was ready to do a virtualized Debian install and then try to create the boot device from there, but then I remembered seeing a Windows version of dd somewhere. It turns out that Chrysocome, that also makes RawWrite for Windows, also maintain a port of dd for Windows
As a last ditch attempt before trying a virtualized Debian instance I decided to give it a try, and it turned out to work beautifully!. So, here is my step-by-step guide for creating a bootable USB stick for Debian on Windows
- Download the required Debian files.
I ended up with boot.img.gz and debian-LennyBeta2-amd64-businesscard.iso. I used the businesscard version since the USB stick i was using was only a 128MB one. - Download dd for Windows and extract it somewhere
- Extract the boot.img file from the downloaded boot.img.gz file.
I placed the boot.img file in the same directory where I extracted the dd binary to avoid path problems - Use dd to write the boot.img to your USB stick
Open a command prompt and run dd. I used the following command: dd if=boot.img of=\\.\g: where g: is the drive letter Windows assigned to my USB stick. - After dd finishes, copy the debian-LennyBeta2-amd64-businesscard.iso file to the USB stick
- Boot target computer with the USB stick connected
- Install Debian
Of course, your target computer or server must be able to boot from a USB device and it's BIOS must be configured to actually try booting from USB. The HP ProLiant DL120 did this out of the box, so I didn't have to configure anything at all.
I'm sure this is pretty common knowledge for a lot of people, but I wasn't able to quickly find a concise description on how to use Windows to create the bootable USB stick so I thought it would be best to record my steps in case it helps someone else. Besides, I can always look at this post again the next time I need to do something like this.
7 Responses to Installing Debian from a USB Stick:
0 Pingbacks to Installing Debian from a USB Stick:
- There are currently no pingbacks.
October 12, 2008 6:00am
You don’t need a USB at all to install Debian. Just download the Mini.iso (7.5MB) and load the iso from Avlgomgr.
Alternatively, you can also use Grubfordos to load the kernel image and intrid for net installation.
October 12, 2008 6:22pm
@thinkweird: Thats interesting, I’ll have to check that out. Thanks for the tips!
October 12, 2008 8:59pm
UNetbootin (Universal Netboot Installer) is a cross-platform utility that can create Live USB systems and can load a variety of system utilities or install various Linux distributions and other operating systems without a CD.
October 12, 2008 10:52pm
@Vaidotas: Also very interesting. I might just have to do a followup post now with the tips I’m getting.
October 13, 2008 12:10pm
UNetbootin - Homepage and Downloads
http://unetbootin.sourceforge.net/
Describes USB/Sd install for the Eee but most applies to a desktop without a cd drive as well:
DebianEeePC/HowTo/InstallOnSDcardOrUsbStick - Debian Wiki
http://wiki.debian.org/DebianEeePC/HowTo/InstallOnSDcardOrUsbStick
November 9, 2008 10:25am
Hello,
I would like to thank you Christian Mohn ; I’m now able to install Debian without a CD drive and make my USB stick bootable from Windows. :)
craigevil I was searching a utility like this one for months !! :’)
Thank you very much too ! :D
November 9, 2008 12:08pm
@Emralegna: Glad you found it useful!