My experiences with Windows XP on USB stick (and Linux)

Silencing hard drives, optical drives and other storage devices

Moderators: NeilBlanchard, Ralf Hutter, sthayashi, Lawrence Lee

Post Reply
jojo4u
Posts: 806
Joined: Sat Dec 14, 2002 7:00 am
Location: Germany

My experiences with Windows XP on USB stick (and Linux)

Post by jojo4u » Thu Mar 22, 2007 3:04 pm

I really got started about putting my system on an USB stick because my current 2,5" Fujitsu ist the "loudest" piece of my PC.

Around 1 - 1,5 years ago, the internet learned that booting Windows XP from USB is possible. I used www.usboot.org for my experiments, which basically sets everything up and leaves some choices to you. Thank you to Gerd Rös for his great work and providing it for free at the moment!

Now let's look at the decisions to make.

FAT32 vs NTFS
NTFS would be great because of the reliability and security. But when I checked the writes and saw 1-2x more writes compared to FAT32 because of the jounaling and more management. One can block the writes with EWF, but this would require to flush contents from RAM to disk every shutdown. On reset or power outage, your changed (system partition) data is lost. I tried EWF on my setup with 2 primary partitions and is chrashed on flushing with a bluescreen. This left FAT32 as the only option.
Here a post about reducing writes. Additional, you can move the browser cache, the TEMP directories and disable NtfsDisableLastAccessUpdate.

Standby and hibernation
This is NOT possible without hacking!
Every USB mass storage device has some configuration bits set, which describe it as "removable". Every manufacturer has a utility which is able to change this to "fixed disk", but they are not available for the public. There exists an utility for the older Ultra-II and Extreme I CF cards.
There are existing filter drivers e.g. from Hitachi, which fools Windows to think the disks are fixed, but standby and hibernation still does not work.

Page file
Though not recommended because of the writes, USBoot provides experimental support for page file on USB.

CF vs USB stick
Since the fast CF mediums can't be set to "fixed disk" and USB sticks are a lot cheaper and portable. So the decision was easy

CF and RAID
Tough it is possible to use 2+ IDE/SATA adapters and use RAID 0, there are many incompatibilities. One advantage of RAID is, that Windows sees the drives as fixed. On the 3DCenter.de forum someone got 4x PowerRAM CF cards working (40 MB/s) with NTFS, Transcend Sandisk Extreme III failed to boot. Compatible host adapters: Promise FastTrak TX4310 PCI and Promise FastTrak S150 TX4. Not working: Promise FastTrak SX4300 8x RAID PCIX, nForce4 and VIA chipsets.

Formatting
I use the "HP USB Disk Storage Tool" which offers FAT32 and NTFS. My revision is SP27608.exe. Once formatted, I boot Knoppix and set the partition to active then I copy the data with USBoot.

Portability
USBoot tries to make it as portable as possible. In step II, you have to decide wether to use your default HAL with multi CPU support or an older HAL to support PCs without APIC.

Speed
The installation of the USBoot filter driver ("driveguard") gave a write speed boost. Don't know why, though.
My sticks are a Buffalo Firestix-R 4 GB and a Buffalo Firestix-S 1 GB for all my applications which don't rely on a particular Windows installation.
Some basic benchmarks for the Firestix-R.
read access time: 0,5 ms
write access time: 17 ms
sequential read: 32 MiB/s
sequential write: 19 MiB/s
c:\program files -> read: ~12 MiB/s
c:\program files -> write: ~5 MiB/s
very small files read: 1,5 MiB/s
very small files write: ~1 MiB/s
The Firestix-S was examined here by xbitlabs.com.

Image


Boot time is double the time compared to the hdd, but this seems to be specific to my PC and USBoot since it needs ages to show the Windows XP splash screen. On other PCs it's about as fast as the hdd.

Bottom line
For 70 EUR I have Windows XP (thanks to nlite!), all my programs and my dokuments on USB and can switch off the hdd as described here. Disadvantages are no standby, and no NTFS.
Questions are welcome :)

Linux
The missing standby/hibernation and the missing security because of FAT32 caused me to switch over to Linux. I installed Ubuntu 6.10 on my 4 GB stick and it worked right out of the box. Ok one problem: You have to add "rootdelay=5" (or more) to the kernel boot line, since the USB device discovery is a seperate thread and has a builtin delay which causes the kernel to miss it's root device.

I used ext2 and mounted /tmp and /var/log to tmpfs. You have to recreate the directories in /var/log on every reboot by a script. When you have more than one stick in your PC there is some sort of race condition. The device name the device gets assigned is different on reboots (sda, sdb), so you have to adjust the root device. Perhaps there is a switch letting the kernel search for root on several devices.

When my hdd is switched off with hdparm, it stays off. This is an improvement compared to Windows (see above).
Last edited by jojo4u on Mon Apr 02, 2007 11:11 am, edited 4 times in total.

Chocolinx
Posts: 311
Joined: Thu Jan 19, 2006 5:14 am
Location: Toronto
Contact:

Post by Chocolinx » Thu Mar 22, 2007 4:01 pm

Those read access times look very exciting ^^ lol. Mmm I love nLite too! lol I got my XP down to 1.5GB with everything installed on my drive. Before installing everything mine was barly even 1GB. Only thing I would be worried about still is if the USB stick fails. You could probably break the USB Stick before it even reaches the end of the warranty. Because regardless XP likes to write to the Harddrive, and won't be smart and write to the RAM instead. But very nice idea, but I'm sure you'll enjoy an 8GB SSD when they come out a lot more than your USB stick hehe

mcoleg
Posts: 410
Joined: Fri Feb 23, 2007 11:55 pm

Post by mcoleg » Fri Mar 23, 2007 5:05 am

good speeds. wonder what would happen if you'd be using a faster usb stick...

"CORSAIR Flash Voyager GT 8GB Flash Drive" seem promising.

i also came across an interesting article on how to make a raid out of those thumb drives :P :

http://www.bigbruin.com/reviews05/thumbraid_1

jojo4u
Posts: 806
Joined: Sat Dec 14, 2002 7:00 am
Location: Germany

Post by jojo4u » Fri Mar 23, 2007 5:30 am

mcoleg wrote:good speeds. wonder what would happen if you'd be using a faster usb stick...

"CORSAIR Flash Voyager GT 8GB Flash Drive" seem promising.
Where are the specs or Benchmarks about the Corsair? Afaik the Firestix-R are the fastest around, since the Firestix-S where tested by xbitlabs to be the best overall and my Firestix-R is quite a bit faster.
Also note that the sequential read is around the maximum speed USB 2.0 is able to deliver.

JazzJackRabbit
Posts: 1386
Joined: Fri Jun 18, 2004 6:53 pm

Post by JazzJackRabbit » Fri Mar 23, 2007 2:44 pm

Excellent write-up. Can't believe though that you only have 5GB to normally work with when any game installation takes several GB now (heck, my PRJ projects directory that holds my own personal projects as well as samples/articles I've collected through the internet is 260MB).

mcoleg
Posts: 410
Joined: Fri Feb 23, 2007 11:55 pm

Post by mcoleg » Sat Mar 24, 2007 2:04 am

jojo4u wrote:
mcoleg wrote:good speeds. wonder what would happen if you'd be using a faster usb stick...

"CORSAIR Flash Voyager GT 8GB Flash Drive" seem promising.
Where are the specs or Benchmarks about the Corsair? Afaik the Firestix-R are the fastest around, since the Firestix-S where tested by xbitlabs to be the best overall and my Firestix-R is quite a bit faster.
Also note that the sequential read is around the maximum speed USB 2.0 is able to deliver.
Read speed: 34MB/s
Write speed: 27MB/s

http://www.newegg.com/product/product.a ... 6820233054

jojo4u
Posts: 806
Joined: Sat Dec 14, 2002 7:00 am
Location: Germany

Post by jojo4u » Sun Mar 25, 2007 3:32 am

mcoleg wrote:
Read speed: 34MB/s
Write speed: 27MB/s
The Firestix-R are rated 32/27 MB/s
http://www.buffalo-technology.com/produ ... egoryid=25

mcoleg
Posts: 410
Joined: Fri Feb 23, 2007 11:55 pm

Post by mcoleg » Mon Mar 26, 2007 6:10 pm

that's pretty fast. wonder if it's possible to put 2 sticks in raid in windows for better throughput.

jojo4u
Posts: 806
Joined: Sat Dec 14, 2002 7:00 am
Location: Germany

Post by jojo4u » Tue Mar 27, 2007 2:45 am

mcoleg wrote:that's pretty fast. wonder if it's possible to put 2 sticks in raid in windows for better throughput.
Either with Vista (beware the versions) or with Linux. Under XP, you can't setup a removable device as dynamic disk. The Hitachi filter driver doesn't help either.

mcoleg
Posts: 410
Joined: Fri Feb 23, 2007 11:55 pm

Post by mcoleg » Wed Mar 28, 2007 1:04 am

i see, thanks. i gotta read up on that...

jojo4u
Posts: 806
Joined: Sat Dec 14, 2002 7:00 am
Location: Germany

Post by jojo4u » Sun Apr 01, 2007 3:04 pm

I added Linux experience in the first post.

Daijoubu
Posts: 11
Joined: Tue Mar 06, 2007 10:31 pm

Post by Daijoubu » Mon Apr 02, 2007 10:06 am

I think you're better off with EFW, remember that solid state media have a limited write cycles before it fails, so you don't want XP to continiously write to it

For NTFS, you can disable the NTFS last access time update through the registry

I've used XPe with remote boot via PXE/tftp :lol: and my image is around 120MB 8)

jojo4u
Posts: 806
Joined: Sat Dec 14, 2002 7:00 am
Location: Germany

Post by jojo4u » Tue Apr 03, 2007 2:10 pm

http://www.hardtecs4u.com/reviews/2007/ ... index3.php

Corsair Flash Voyager
Corsair Flash Voyager GT
Pretec i-Disk USB 2.0 166x
SuperTalent USB 2.0 200x

benchmarked. My Firestix-R is comparable to the Voyager GT.

~El~Jefe~
Friend of SPCR
Posts: 2887
Joined: Mon Feb 28, 2005 4:21 pm
Location: New York City zzzz
Contact:

Post by ~El~Jefe~ » Mon Apr 09, 2007 8:29 pm

How long will such a system last with "normal" usage like browsing, messing around and playing some dinky games?

I remember that flash media has a short life cycle when you write a lot to it (obviously this is why you are using FAT32).

jojo4u
Posts: 806
Joined: Sat Dec 14, 2002 7:00 am
Location: Germany

Post by jojo4u » Tue Apr 10, 2007 5:17 am

~El~Jefe~ wrote:How long will such a system last with "normal" usage like browsing, messing around and playing some dinky games?
The german printed magazine C't tried to wear down some sticks with continous writes but failed (don't have a reference, though).
Sorry, can't help you more on this. But I will report when my current Linux installation fails ;)

EDIT: millions -> continous
Last edited by jojo4u on Tue Apr 10, 2007 3:04 pm, edited 1 time in total.

jaganath
Posts: 5085
Joined: Tue Sep 20, 2005 6:55 am
Location: UK

Post by jaganath » Tue Apr 10, 2007 5:52 am

http://www.dansdata.com/flashswap.htm
Say you've got a Flash device that really and truly only can handle the oft-quoted 100,000 erase cycles. Quality Flash should actually be better than that these days, though some of it is apparently rather worse.

If the device is a decent size, though, it can take a long time to make it to even 50,000 cycles.

If your Flash device is "4Gb" with a formatted capacity of 3900Mb, and you do nothing but write to it as fast as you can - at, say, 30Mb/s - you'll still only be able to replace its entire contents every 130 seconds. At that rate, it'll take you 150 days to hit 100,000 cycles.

Since even scratch disk use doesn't come close to writing non-stop, it's quite possible that a humble thumb drive could, in this situation, last two or three years as a swap device on a Windows system.

~El~Jefe~
Friend of SPCR
Posts: 2887
Joined: Mon Feb 28, 2005 4:21 pm
Location: New York City zzzz
Contact:

Post by ~El~Jefe~ » Tue Apr 10, 2007 6:20 pm

that's fascinating shat.

I want to make one of these puppies :)

Moogles
Posts: 315
Joined: Thu Mar 22, 2007 10:28 am

Post by Moogles » Sun Apr 15, 2007 5:41 am

Thanks a lot for this information. I knew about Win98 running off of USB drives, but not XP. I ordered a 8GB Corsair Voyager to test this out with.

I have practically 0 Linux experience but should my windows experiment fail, how exactly do you add "rootdelay=5" to a linux kernel bootline? I've been using Kubuntu for a day now as my first venture into the world of Linux, and I really like it. No idea how to do anything yet, though. :)

fri2219
Posts: 222
Joined: Mon Feb 05, 2007 4:14 pm
Location: Forkbomb, New South Wales

How to add rootdelay=5 for Ubuntu

Post by fri2219 » Sun Apr 15, 2007 8:11 am

Please forgive me for being pedantic, but here are a few warnings:

You can easily make your install unusable by mucking around with your boot configuration. If you care about any of the data you have on the computer, back it up beforehand.

I'm intentionally leaving some things vague here- if you can't figure out how to accomplish it from these directions, you probably should do some more research before tackling it.

Ubuntu handles the boot process in a "unique" (I'm being charitable here) way, so these directions won't apply to another Linux distribution other than Ubuntu later than Dapper Drake or Drunken Dung Beetle, or whatever hopelessly cute name they're using for your distribution version. :D

Don't bother attempting this unless you're sitting in front of your computer. This assumes you're not using a remote management tool of some sort.

With your favorite editor, open the file:

Code: Select all

/boot/grub/menu.lst
Immediately below the line

Code: Select all

## ## End Default Options ##
there's a series of lines that start with title and end with boot. Copy and paste those so that they are duplicated in the file. Make sure the duplicate set of entries has an empty line before and after its beginning and end.

In the duplicate series of entries below the original, change the title entry (the text after the word title) to something like

Code: Select all

My Boot Entry
Remove the line with savedefault in it.

In the line starting with the word

Code: Select all

kernel
place an entry at the end of the line with the text

Code: Select all

rootdelay=5
Note that there are no spaces before and after the equals sign.

Your new entry in the file will look something like this:

Code: Select all

title           My Boot Entry
root            (hd0,0)
kernel          /vmlinuz-2.6.custom root=/dev/mapper/Ubuntu-root rootdelay=5
initrd          /initrd.img-2.6.custom
boot
At the terminal, run:

Code: Select all

sudo update-grub
That will tell grub that there's a new entry to display at boot-up. sudo is used because the command involved is usually reserved for system admins and you're telling the operating system that you really, really mean it this time. :D

Reboot your computer and select My Boot Entry when you see a list of operating systems displayed.

Have fun, hope this helps!

Moogles
Posts: 315
Joined: Thu Mar 22, 2007 10:28 am

Post by Moogles » Sun Apr 15, 2007 9:13 am

Thanks for the instructions! I'll let you know how I get on as soon as my USB drive arrives. I think I'll be ok. :)

jojo4u
Posts: 806
Joined: Sat Dec 14, 2002 7:00 am
Location: Germany

Re: How to add rootdelay=5 for Ubuntu

Post by jojo4u » Sun Apr 15, 2007 2:40 pm

fri2219 wrote: Ubuntu handles the boot process in a "unique" (I'm being charitable here) way, so these directions won't apply to another Linux distribution

With your favorite editor, open the file:

Code: Select all

/boot/grub/menu.lst
At the terminal, run:

Code: Select all

sudo update-grub
GRUB should be pretty standard among the GNU/Linux world.

You mention sudo further down, but of course the menu.lst is also owned by root.

Update-Grub is wrong since GRUB reads the menu.lst from the disk, just save and reboot. See Wikipedia.
man update-grub: "update-grub is a program used to generate the menu.lst file used by the grub bootloader."

Moogles
Posts: 315
Joined: Thu Mar 22, 2007 10:28 am

Post by Moogles » Thu Apr 19, 2007 10:33 am

I haven't gotten my Corsair Voyager yet, so no progress to report. In the mean time though, does anyone know if it's possible to load windows, or some linux version (not puppylinix/damn small linux/featherlinix) entirely into ram during the boot sequence? I've been googling but haven't found much valuable information yet.

IsaacKuo
Posts: 1705
Joined: Fri Jan 23, 2004 7:50 am
Location: Baton Rouge, Louisiana

Post by IsaacKuo » Thu Apr 19, 2007 11:37 am

Yes, to Linux, and yes to Windows. I'm not familiar with either method, since I tend to not have enough RAM to usefully do it (except with those small linux distributions). Here's a thread about how someone did it with Windows 98:

Success: Compact Flash diskless PC (No NetBoot/Cdrom/Floppy)

I prefer diskless netbooting--less expensive, and essentially no limits on OS storage space.
Isaac Kuo

jojo4u
Posts: 806
Joined: Sat Dec 14, 2002 7:00 am
Location: Germany

Post by jojo4u » Fri Apr 20, 2007 3:14 am

Moogles wrote:In the mean time though, does anyone know if it's possible to load windows [...] entirely into ram during the boot sequence?
The mentioned guy in the 3DCenter-Forum used this one for Windows: http://www.superspeed.com/servers/supervolume.php. It's not cheap, though.

MikeC
Site Admin
Posts: 12283
Joined: Sun Aug 11, 2002 3:26 pm
Location: Vancouver, BC, Canada
Contact:

Post by MikeC » Wed Dec 05, 2007 1:50 pm

jojo4u -- thanks once again for a great post! 8)
Mike Chin, SPCR Editor/Publisher
Support SPCR by buying your gear through this link: Amazon

wim
Posts: 777
Joined: Wed Apr 28, 2004 5:16 am
Location: canberra, australia

Post by wim » Wed Dec 05, 2007 4:07 pm

nice jojo.. i somehow missed this thread first time around

are you still operating on a usb drive? how's it holding up now?

jojo4u
Posts: 806
Joined: Sat Dec 14, 2002 7:00 am
Location: Germany

Post by jojo4u » Wed Dec 05, 2007 5:51 pm

wim wrote:are you still operating on a usb drive? how's it holding up now?
No problems, it's working as before. I played with the cap and now it's broken. But that's jsut a cosmetic problem ;)

Post Reply