Replacing Rescue CDs with USB Keys?
Dan asks: "For several years now I have been working on the ultimate rescue CD, being able to load many disk images, Windows XP PE, all from CDROM while having a nice graphical menu as the main interface during bootup (I would post a nice screenshot, but I like my bandwidth) and I mainly used the ISOLINUX bootloader. I recently received a SanDisk Mini Cruzer 256 USB 2.0 keychain drive, and I am really eager to put some sort of multi booting system on my USB key drive to achieve the same goal. I haven't seen anyone having any success with ISOLINUX or something similar, but the drive is bootable for sure. I have exhausted all options, I searched, I posted on many forums, I never get any useful replies. Since Slashdot readers mostly share the same interests, I am hoping you guys can help me out!" How would yo u configure a USB Key drive to boot multiple operating systems?
Ghosting from your CD to the USB dongle?
Just treat it like you would a CD. But don't put it in your burner, unless you like fried USB.
On
With the advent of bootable CDs, everyone cried "Throw away the floppy, you dont need it for anything!", that is until they came across their mothers busted 10 year old packard bell. Now you propose to do the same thing to cds with the promise of a usb key. Seeing that your computer not only needs to support USB AND be able to boot from USB. The range of computers you can do this is MUCH less then that which can boot from a cdrom which is MUCH LESS then the computers that can boot from floppies.
"When life gives you lemons, don't make lemonade. Make life take the lemons back!" -- Cave Johnson
Getting a kernel or anything to boot off of a usb key is a pain in places that I didn't even know i had places. The hardware has to have a system in place to map the usb dongle to a hard drive (like the hard drive image on a cdrom) or it's going to be a battle for you that i have yet to win, even loading the initrd.img (INItial Ram Disk compressed with gzip) from a floppy. ;).
I will admit that better men than me have tried and succeded, but not without sacrificing simplicity to verry angry gods of madness.
if your hardware will not support mapping a usb anything to a hard drive/floppy drive like interface that the boot-loader can understand, I wish you luck. But if you can pull it off, look into the initrd.img, that can teach you a lot about the booting process of linux, and you may be able to get a fast booting rescue system rolled to your strict specs (its nice, believe me, long pain in the whatever, but nice)(Also there is an option in RedHat's initrd.img that keeps the kernel option from forcing the kernel to boot from the specified hard drive btw. I forget where it is, but its one of the scripts, it sticks out after you see it, I fixed mine
Once you get a kernel to boot up and dump you into a basic shell, look at this.
Lots of usefull info on making a nice live system. The info on cds ought to translate pretty well to usb, it did for me.
Good luck.
Peace, Love, and [paying] Rent. Pick two.
md5sum
d41d8cd98f00b204e9800998ecf8427e
Part of the problem is booting from USB is still new relative to booting from CDs. (Or do you forget how long between the appearance of CDs, and good support for booting from them took?) Either wait a few years for programers to work out the bugs, or work them out yourself. You can offer bonties in various places to encourage people to do the work if you can't do it yourself.
However, since I'm unemployed I'll do the work of making open source tools work (Microsoft has to support booting from usb before I will guarantee it will work) if you give me a working computer that can boot from USB (mine won't, too old), and a USB key to boot from.
Although now that I think of it...many keychain drives have a write-protect switch on them. That could be useful!
The posts so far have been right on the money: boot from usb device, while several years old, is not as common as we would like it to be.
Perhaps the best you can hope for (certainly the easiest) is to make a linux bootable diskette, load USB drivers from there, then mount the usb-drive, and load a new kernel from that. Two stage boot.
They claim to boot from USB (I was reading their manual and the BIOS is supossed to boot from USB disks, a flash memory key should appear as nothing but a disk).
I may be worth getting in touch with them to explore this.
IANAL but write like a drunk one.
You could of course boot from a floppy/CD [wherein you have USB drivers, and some sort of program like Norton Ghost on it]
Now you just load the images from the USB key. you get the image files, at least with ghost, by the same method only saving the file.
I have used this at work to store the images of different workstations, (windows 98, NT, 2000, XP) which in case of a hard drive going bad, which happens far too often with Dell provided W*stern Digital drives, I can just replace the drive, hook up my USB and disk and go.
Now to boot multiple Operating systems from a USB key could be done the same way, by using a Floppy which installs your drivers, after this you'd have to write something to refer to a menu to choose your operating system.
Its just a thought on getting to your USB, after that I have no idea how you could get seperate OS's to boot, though i'm sure someone out there does.
-Clint
--
face the world with eyes of fire.
you'll have to burn an el torito bootable image and then dd it to the boot sector of the USB. You can make partitions in the key for each OS. Grub can be the boot loader, but you'll have to set up the OS images on a separate PC as if they were the principal image, then dd/copy them to the appropriate partition on the USB key.
So long as your bios allows boot from the USB device it should think it's a CDROM with the eltorito image.
This is a lot of work man. The requirement of graphical interface in there makes it all the more complicated. And not too many people on the planet will realize how unbelievably cool you really are when and if you get it working.
The Good:
1) Large Capacity, can hold all your favorite tools.
2) Writable, so you can get your data off.
3) 'Free' when you buy a certain brand of music player.
The Bad:
1) You need a computer that knows how to boot from Firewire
2) Costs a lot more then a CD-R or DVD-R blank.
My raid card comes with the drivers on a floppy. Until I figure out how to tell windows xp installation to load them from a cd or hard drive, I have to use the floppy when I reinstall.
Gentoo forums thread titled "Booting Linux from a USB Pendrive"
---
Ever been in the situation where you wanted to flash your BIOS only to find out you ran all out of (working) floppy's, or you didn't have a windows bootdisk at hand, or even worse, you didn't have a (working) floppy drive?
---
At least it's a start.
... that's all i wrote...
Screw that! I haven't even gotten past the first step of getting the system to even recognize the USB device on bootup. The BIOS says bootable USB is enabled, but there's nowhere to specify it as the first boot device, and it's never accessed.
All these people saying the floppy is dead because you can boot from your USB thumb drive are blowing smoke out their ass. I seriously don't think it can be done.
Don't blame me, I didn't vote for either of them!
What follows are some quick notes on making the USB keychains bootable (the bios must support booting from USB).
/dev/sda), but I've not tried it.
You need a bootable MBR on the device itself, and then some sort of bootloader on the partition.
I used a windows utility I found to put an MBR (it uses Freedos) onto the keychain. I then used syslinux as the bootloader, and was able to boot multiple floppy images, etc. Additionally, under the dos image, I was able to access the USB keychain as the C: drive (but this may be BIOS dependent).
Syslinux is nice because you can boot both floppy images and linux kernels/initrds. The configuration is almost identical to the configuration of PXElinux (which we use to boot the testlab). Also, making changes to the booting (adding another firmware floppy, etc.) is trivial, because you just copy the floppy image to the keychain (which is still a FAT filesystem) and optionally edit the config file to make an easy name to boot it.
Steps to make keychain bootable:
* put MBR onto keychain (with this utility I found, or probably install-mbr under linux)
* run syslinux, pointing it at the first (and probably only) partition of the keychain
* configure the syslinux.cfg file, add floppy images & memdisk "kernel", add other material to the keychain
Steps to boot from the keychain:
* put the keychain in the system
* boot the system and go into the bios
* configure the BIOS to boot from the USB hard drive. Sometimes this is tricky. It may show up in the "Hard Drives" section (where you must make it the first drive on the list). It may just show up in the bootable devices section, just as NICs do, and the LSI MegaRAID (or other RAID) cards do.
* save the settings and exit
* boot to the keychain, select your syslinux option, boot the machine
* if you boot the machine without the keychain in it, you will have to reset the BIOS the next time you want to boot to the keychain again. (This is definitely true on the beta hardware, other hardware has not been tested.)
That's pretty much it. I believe that the debian utility "install-mbr" would also put an MBR onto the keychain (often
I have booted a linux kernel and initrd from the pendrive.
I really think that syslinux is the way to go, since you keep a fat partition, which every OS can write to, and you just edit a text file to make an easy boot menu. I've used this USB drive for flashing firmware, booting up to an unattended windows install ( http://unattended.sourceforge.net/ ), running memtest86.
The USB drive rules. If I ever have to give it back to my work (it's only 64MB, so they probably don't really care), then I'm totally buying one.
- Make the usb key work under Linux, plug it in so it is
/dev/sda1
(for example)
- copy the grub stuff out of
/boot/grub to /boot/grub on the key
- run grup --no-floppy
- in grub type device (hd0)
/dev/sda
- then root (hd0,0) grub should say it found a fat filesystem
- then install (hd0) and grub should do its thing
- now you can boot from your usb key with grub
of course now you have to put things on the key to be booted. Using memdisk from syslinux is convenient to boot floppy images. My menu.lst looks something like:and so on. I'm not booting a full rescue image from the key, mostly just disk images.
Smart BootManager is a personal favourite bootloader for me. My favourite feature is probably useless for what you intend to do, but if you stick it on a floppy, it will let you boot from the CDROM of a computer ancient enough that it doesn't normally support CDROM booting. This has saved me from pulling out my hair numerous times to boot, say, a Windows install CD, or a Debian install CD, or whatever you may need to install that is too big to fit on a disk or USB drive.
It has a nice asciigraphic menu, is completely runtime-configurable, and fits in 30kB. Really impressive, in my opinion. If you can partition your USB drive in a way that it understands, it should be able to do what you want.
Random and weird software I've written.
What about developing a low-cost, one-time-programmable (OTP, probably a fuse-map via strobing rows & cols) USB, and maybe Firewire, ROM single-chip solution? Could this be made cheaper than a CD (and all the support equipement)? One single chip could replace the entire CD manufacturing process with a unversal, solid-state OTP media than could hold anything from an OS, apps, etc. Just think, a chip could be "burned" from a kiosk containing software/songs/etc., or replace CD-Rs.
The biggest trick the devil pulled was letting lawyers become politicians so they can write the laws.
Do not ghost to a flash USB device. I think that the repetitive rewriting of the directory information will burn the directory portion of the disk. Make a ghost image, then copy it to the flash disk. Supposedly, ghost 8 supports usb devices. Also, a co-worker of mine has had problems copying between usb hdds. He has to copy from usb hdd1 to local drive then to usb hdd2. - Geccie
Many people suggest to stick with my CD, which I will, the reason I want to use my usb keychain (which I got for Christmas) drive is because I have it always on me, it's so tiny, doesn't push my wallet to its physical limits, and most of the systems I have or work on support USB booting.
Here. is a screenshot of the current CD (since this ask slashdot didn't get posted on the front page unfortunately, I can post the screenshot now). I did notice some replies have some really good instructions, I will be trying these for sure, currently the trick to get my USB stick to boot was by formatting it using regular FAT, not fat32, then it showed up in dos when I booted with a dos disk, allowing me to 'sys' it (SanDisk wrote me explaining this device isn't bootable when I submitted a trouble ticket for this!).
I know it's only a 256 meg stick, but you wouldn't believe how useful this thing has been, I have hundreds of single exe apps on there that help me out on a dail basis. I definitely want some of my linux floppy images on there such as UDPcast, tom's rescue linux, memory scanners and more. My boss has a 1gig version, and is definitely interested in being able to have a copy of my cd on his usb drive (the cd is only around 400 megs, but can be trimmed down big time).
I really appreciate your responses so far, thanks
I don't know what they did to screw it up, but the Sandisk Cruzer Mini 256mb USB 2.0 key cannot be made bootable.
We went round and round with this key at work, finally wrote to their tech support and got that answer.
Every other brand key we have boots just fine.
That's awesome.
Just want you to know that many people would be willing to pay money for a copy or disk image of that CD. And by "many people" I mean me. =)
Interested? I'm sure we could work something out. I have PayPal.
Have a look at m-systems their Disk On Key seems to support USB booting according to their literature.
Not entirely what the poster was after, but interesting nonetheless RUNT is a pretty handy tool that can be made to boot from USB... If I remember correctly there was also possibly to configure ZipSlack to do this
Morale seems good, considering, although high spirits are just no substitute for eight hundred rounds a minute
My guess is that you have a little bootloader which relies to some degree on the BIOS that would let you paint a menu and allow selection of the operating system.
"Can there be a Klein bottle that is an efficient and effective beer pitcher?"