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

  1. 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.
  2. Download dd for Windows and extract it somewhere
  3. 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
  4. 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.
  5. After dd finishes, copy the debian-LennyBeta2-amd64-businesscard.iso file to the USB stick
  6. Boot target computer with the USB stick connected
  7. 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.

October 9, 2008 at 9:49pm | 19 Comments
Tagged: , , and

No virtualized Windows on Linux?

According to eweek.com, Microsoft says no to virtualizing Windows on top of Linux:

Microsoft will not allow Windows Vista or Windows XP to be virtualized on top of Linux, Sam Ramji, the director of Microsoft's open-source software lab, said at the annual LinuxWorld Conference and Expo here Aug. 7.

I find this very hard to believe, and I'm struggling to find other sources for this little piece of information. Reading the rest of the article doesn't really give any more details, besides other comments from Sam Ramji regarding other details about the Microsoft Novell agreement.

The way the article reads, I doubt that Microsoft is really going to try and disallow running virtualized Microsoft producs on top of Linux. I think Mr. Ramji really meant to say that there will be no ability to move virtual machines from Viridian to Xen or vice-versa. Or at least thats what I hope he means.

After all, it is in Microsoft interest that people can run virtualized instances even if they run on a Linux host machine as virtual instances also needs to be licensed properly.

Does anyone have more info regarding this statement? It really strikes me as a bit odd, but I'm not quite able to shake eweeks spin on it entirely until I get confirmation somewhere else.

August 8, 2007 at 11:33pm | 5 Comments
Tagged: , , , , and

Windows the most Secure OS?

According to Symantec's 11th Internet Security Threat Report, Microsoft Windows had lowest number of patches and shortest average patch time of the monitored operating systems the last half of 2006.

Who would have known?

Check internetnews.com article about it, as well as the original Threat Report from Symantec.

March 23, 2007 at 3:41pm | 0 Comments
Tagged: , , , , , , , , and

Openfiler and iSCSI

As mentioned yesterday, I wanted to try out using Openfiler as my iSCSI target. So, today I downloaded the Openfiler Virtual Appliance and gave it a test run.

Turns out Openfiler is great! I had it set up in just a few minutes, and it's integration into our Active Directory structure really makes it a very viable candidate for my iSCSI project.

My Windows desktop machines had no problems connecting to my iSCSI shared disk, basically it worked just as good as my tests with Debian and iSCSI Enterprise Target with the added bonus of a great web interface for configuration as well as other share types besides iSCSI.

Ding, Ding, I think we have a winner and thanks to the Virtual Appliance setup testing is really easy. Openfiler also has great documentation for their product, which also makes configuring it a breeze.

February 27, 2007 at 11:46am | 4 Comments
Tagged: , , , , , , , and

Playing with iSCSI - Part I

Using iSCSI as a cheap storage solution is something that has been on my mind for a while, and today I finally got around to actually playing with it. I have a grand master plan for this, but for now I'll just highlight what the results of todays experiments were. My iplan was as follows:

Phase 1:
Codename Intense Hope

1. Install Debian in VMware Server



Originally I had planned to use Openfiler, since they have a preinstalled Virtual Appliance for this, but their website was down earlier today when I got started. Another reason for using Debian, and setting everything up manually, was that I wanted to really try and understand how everything is connected. I might very well opt to use Openfiler when I set up my final "product" though.

While it may seem like a useless task to set up an iSCSI target inside a Virtual Machine running on the same computer as the initiator, it serves the testing purposes perfectly.

I set up a basic netinstall of Debian Sarge, upgraded it to Etch and installed the 2.6.18 kernel. The next steps were to add a new HDD to the Virtual Machine, and set it up with LVM and mount it inside the VM. This volume is what the iSCSI instance will offer my iSCSI initiators.

2. Configure iSCSI Target

To get a Debian package for iSCSI Enterprise Target I added http://debian.hug.cx/debian/ to my Debian Sources, and the Sarge based install there installed without any problems as long as all the requirements are present.

The iSCSI configuration ended up like this:

/etc/ietd.conf

:
Target iqn.2007-02.int.mystorage:storage.lvm Lun 0 Path=/dev/volgroup/logicalvol,Type=fileio Alias LVMVOL

Which basically just offers the LVM volume via iSCSI to any client that connects.

Note that there is no security in this whatsoever, so everyone who connects will have full read and write permissions. You can add security on it, but for the sake of simplicity I opted to not add any in my test environment.

3. Test Windows XP and Windows Vista initiators

Windows XP iSCSI initiator

Windows XP doesn't have a "native" preinstalled iSCSI initiator, but you can download it directly from Microsoft.

After the initiator was installed, all that was required was to add the IP of the target to the initiator configuration and logon.

My shared volume then became available in the normal Windows XP Disk Management tool, and Windows treats it just like a normal directly attached HDD.
iSCSI Target

The setup in Vista was exactly the same, but without the need to install the iSCSI Initiator as it comes pre-installed and it was just a matter of configuring it.

4. Conclusion

Setting up an iSCSI target on Debian and connecting to it from Windows XP and Windows Vista is really easy. It didn't take very long to configure, and so far it seems to work really well. I now have two computers connecting to it, without any problems at all and once again VMware Server makes configuring a test environment like this a much less painful (and expensive) venture than actually having the physical hardware to play around with.

I don't know when I'll post Playing with iSCSI - Part II (Codename Bright Spoon), it depends on when I can get the actual physical hardware my final solution will run on. I might do something with Openfiler over the next few days though, as their website seems to be up again and I'm currently downloading their pre-configured Virtual Appliance.

Anyone care to guess what my final goal is?

February 26, 2007 at 3:57pm | 3 Comments
Tagged: , , , , , , , , and

 1 2 3 Next →

Recent Comments