Fun with bootable flash drives!

I’ve been fiddling with making bootable flash drives lately, via UBCD4Win for the most part.  It’s actually come in handy a few times in the last month alone and the new v3.50 just came out today!  In the course of this I’ve learned a couple of useful things that might be worthwhile to others working on this.


Flash Drives and The Removable Bit

Something I stumbled upon today was a Lexar utility that can flip the removable bit on a flash drive.  Disclaimer: this may not work for you or could even cause problems! As you may have noticed a flash drive appears as a “removable disk” in explorer, and (as I understand it) cannot be partitioned in XP or lower (Vista doesn’t seem to care as much from what I can tell).Indeed, it works, making the drive go from “removable” to “basic” (that is, fixed or local).

As I was doing all this in Vista with UAC enabled I was alarmed when it appeared that once I flipped the bit there was no flipping it back!  It’s not necessarily bad but I prefer to keep it removable unless otherwise necessary.  After lots of flailing (and finding a few posts alluding to this one-way trip problem – but no answers) I ran the utility via the “Run as administrator” option. This allowed BootIt to see the “fixed” disks (which the flash drive becomes a part of after flipping the bit).  Be VERY careful not to mess with the wrong drive of course! I think Vista is more protective of the fixed disks, thus the unexpected hurdle.

Note: I was able to flip the removable bit on Lexar and A-DATA drives, but I had no luck with my 4GB OCZ Rally2, a Sandisk Cruzer Micro or with an old Pocket Disk brand 128MB drive (handy for small images) which all stayed resolutely removable.

Read more about the Lexar BootIt (Flip the Removable Media Bit) tool here and here (I used v1.07, which I think is the only one out there).


Adding bootable ISO images to UBCD4Win images

It’s pretty easy to add bootable ISO images to UBCD4Win (this is tested with v3.22 and should work with v3.50 equally well).  Today I had LOTS of “fun” dealing with a lost boot manager on my triple-boot laptop (Vista, Ubuntu, Win7, oh my!) and I snagged copies of GParted and Super Grub to try and save the day.  All I did was download them and add the ISOs to the /images tree on the prepared flash drive.  Then I added a couple of entries in /menu.lst as follows:

title Super Grub
map --mem (hd0,0)//Images/super_grub.iso (hd32)
map --hook
chainloader (hd32)
rootnoverify (hd32)
title GParted
map --mem (hd0,0)//Images/gparted-live.iso (hd32)
map --hook
chainloader (hd32)
rootnoverify (hd32)

The ISO names must match what’s in /images, and I’d avoid putting spaces in the names too.  The usual disclaimer applies: I figured this out by trial and error but it worked fine for me.

Super Grub ended up working and saving the day!  GParted, not so much… I had to put it on a CD to get it to fully work.  This is no fault of GParted… as far as I can tell the same problem would affect ANY partition tool. GParted actually got stuck in a repeating loop of attempting to mount a drive and I think it had to do with how the boot process involved resetting the USB hub (thus resetting the flash drive).  Other partition managers that pass through a USB stage also experienced the same issues.  Booting GParted from the CD-RW appears to avoid all that.  I had the same problem when I attemtped to mount and install the Ubuntu 9.04 ISO from that USB drive today… it worked fine from a DVD.  So, while this method works in theory it may not always be practical given the limitations of booting from USB.

What’s nice is that once I have a small stable of utilities like this I can eventually burn the whole thing onto a DVD for near-universal usage (even on machines that won’t boot from flash).  Pretty handy!  🙂

Update: there are better ways to do this menu thing I’m sure… and apparently the CD ISO uses an entirely different menu system for some reason.  So at a minimum /BCDW/BCDW.INI also needs to be updated (but I’m not yet sure what that should look like).

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.