Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Hardware Hacking Data Storage

USB Key Multitool? 34

srhuston asks: "I've got a USB key that I use for booting and installing machines (GRUB boots and pulls the rest from the network). This got me thinking, all the floppy disks and CDs that I use for various tasks, such as memtest86, SuperRescue, Plan-B, tomsrtbt and others with which I'd like to experiment, I could probably get a larger key and put a few of them on there. The problem is booting them all - it seems that unless I copy the contents of the CD to the key, I wouldn't be able to boot it properly, and doing that means I can only use one of them at a time and have to copy another to the key when I want to use it. Ideally I'd love to be able to have my GRUB menu (or something similar) pop up, and select which of the items I want to boot. Any ideas how I might accomplish this? GRUB doesn't seem to support booting an image (floppy or ISO), and ISOLINUX seems to want to boot just one image and not give options for multiple ones. Oh, and yes, I did look first and found more questions than answers."
This discussion has been archived. No new comments can be posted.

USB Key Multitool?

Comments Filter:
  • partitions? (Score:5, Informative)

    by ksheff ( 2406 ) on Friday December 10, 2004 @07:20PM (#11056594) Homepage

    Can you create multiple partitions on a key and then use grub to boot from the different partitions? The HOWTO [tldp.org] implies that it can be done, but I don't have any of these devices to verify it.

    • Re:partitions? (Score:4, Insightful)

      by Geoffreyerffoeg ( 729040 ) on Friday December 10, 2004 @09:40PM (#11057517)
      I have not been able to repartition my disk. I haven't tried manually fdisking it, but I doubt it can be done. It seems that some flash drives emulate a fixed disk with a partition table, e.g., my dad's flash drive, which comes with multiple partitions to manage its security software. Others, e.g., mine, seem to only emulate a removable disk and a single partition.

      Is it possible to use fdisk to "partition" a CD or a floppy - has anyone tried this? If it is, then what you suggest should be workable.

      As far as my suggestion, I would suggest letting ISOLINUX switch between multiple kernels. If you need an MS partition, I think I remember a FreeDos kernel that can be loaded into ISOLINUX, and then the MS software can be bootstrapped thence. Within the drive, you can definitely store disk image files as opposed to multiple partitions, and let the kernel you boot mount the image as root instead of /dev/whatever.
      • Re:partitions? (Score:3, Insightful)

        by Nasarius ( 593729 )
        I've had no problems repartitioning my Lexar JumpDrive. It acts just like a SCSI hard drive under Linux. I use cfdisk.
        • Ok, I'm trying right now. I went to Mac OS X's terminal, sudo unmount'ed the disks (and confused the GUI in the process), and then used fdisk on the partition manually. I don't think there's an easy automatic way of turning a single partition (/dev/disk1) into a boot sector (/dev/disk1 and /dev/disk1s1).

          The other method, once you unmount the disk, is to boot a DOS or FreeDOS in Bochs from a floppy/image, and let it think that your disk itself is its C drive. Then you can use DOS fdisk and format to redo th
          • Re:partitions? (Score:3, Interesting)

            by Malor ( 3658 ) *
            I forget where it is, but there's a setting you have to change under XP to be able to use NTFS on a potentially removable device. I think it might be properties on the disk itself... there's some kind of checkbox that's related somehow to 'optimize for removable'.

            From what I gathered at the time (and I'm sorry I'm not clearer about remembering where it is), NTFS requires a lot of write caching to work properly, and thus Windows by default refuses to format removable drives NTFS. But keep in mind that if
            • A while ago I found a site that had a USB 2.0 Thumb Drive set of benchmarks (Here, if interested) [arstechnica.com] and on page 8 [arstechnica.com] he does something VERY interesting - creates a RAID 0 array out of two similar drives and shows us the benchmarks of that array.

              Scaled in almost linear fashion - not a surprise but definitely thought provoking. The problem is that he did it under OSX, not Windows. Crap, I was envisioning a six drive stripe under WindowsXP Pro but it doesn't seem to be cooperating and none of the people I have a
              • You'd wear it out pretty fast. Flash drives only support a certain number of writes (100,000 per sector, IIRC), which sounds like a lot -- and it is for most uses of the devices. But when used as a hard drive, temp files can eat up those writes very quickly. If you could ensure that you were avoiding unnecessary writing, you might be able to pull it off, but it might not be worth it in the long run.
      • Correction. Yes, it is possible to repartition my USB disk. Windows won't let you do it. Mac OS X let me do it in the Terminal: umount /dev/disk1, fdisk a partition table onto it, and then mkfs or Disk Utility|Initialize /dev/disk1s*. It seems to work great in Mac OS X - once you overwrite the filesystem with a partition table - but Windows can only recognize the first/active partition.

        I suppose you can write a bootloader to the disk and let non-MS systems take the upper partitions. I've only been able to
    • This only allows you 7 images to be used: 3 primary, and 4 on the extended.

      That's pretty limited, even on a 32MB usbdrive, when only using floppy images.
  • UBCD. (Score:5, Informative)

    by kyhwana ( 18093 ) <kyhwana@SELL-YOUR-SOUL.kyhwana.org> on Friday December 10, 2004 @09:13PM (#11057384) Homepage
    http://ubcd.sourceforge.net/ (ultimate boot cd, which includes linux and various diagnostic/recovery tools) does this.
    It gives you a menu when you boot with all the stuff it has. See the screenshots on the site.
    • Re:UBCD. (Score:2, Funny)

      by Anonymous Coward
      Got something against Clickable links [sourceforge.net]?

      <a href="http://ubcd.sourceforge.net/">Ultimate Boot CD</a>

      Its not hard.
  • Try cdshell (Score:5, Informative)

    by Yogger ( 24866 ) on Friday December 10, 2004 @09:14PM (#11057389) Homepage
    Try http://www.cdshell.org/ [cdshell.org]. It's a scriptable menu that you can use to boot multiple floppy images off of cds, not sure if it works for usb keys but it's worth a try. With some tinkering you can boot linux or windows live cds but if it's too big to fit in a floppy image, you can only do one of each per disk (or usb key in your case). I have a cd built with it combining http://ubcd.sourceforge.net/ [sourceforge.net] and http://www.ubcd4win.com/ [ubcd4win.com] and a couple other tools I've found usefull
  • Ultimate Boot CD (Score:1, Redundant)

    by Matt Perry ( 793115 )
    I don't have a solution to your USB boot problem, but until then why don't you keep a copy of the ultimate boot CD [ultimatebootcd.com] around. It'll be a good stopgap measure as long as the machines you work on have a CDROM drive.
  • is it just more modern machines that do this - does the BIOS need to support it - or can you do it with any USB machine.

  • get a key for each (Score:3, Interesting)

    by chocolatetrumpet ( 73058 ) <(moc.treblifnahtanoj) (ta) (todhsals)> on Friday December 10, 2004 @10:30PM (#11057704) Homepage Journal
    Just get a usb keychain for each one.. they're cheap these days.

    Simple isn't always bad :-)
    • "Just get a usb keychain for each one.. they're cheap these days.

      Simple isn't always bad :-)"


      It could kind of go either way, couldn't it? On the one hand, if he makes 1 and it dies or something, he's got some work ahead of him to make a second. Not as bad with the mulitple key approach. On the other, those keys are getting so big there's space wasted.

      I don't blame him for wanting to keep just one around, though. Juggling a bunch of things like that sucks.
  • that will in turn boot your USB keychain? It would be nice to be able run one of these on USB 1.1 machines too. That'd cover a pretty wide spectrum of machines out there.
  • Try memdisk [zytor.com]
    It allows you to boot floppy or harddrive images from grub.
  • I boot multiple disk images from my usb key using grub as the menu, and memdisk from the syslinux package.

    In grub/menu.lst I have something like:

    title Hitachi Drive test utility
    root (hd0,0)
    kernel /boot/memdisk
    initrd=/boot/dft377_29.img

    Some things boot fine, like the above referenced Hitachi DFT, but other disk images don't seem to work. I've successfully booted DOS/Windows floppy images for doing BIOS upgrades, etc.

    Memtest86 can be booted directly:

    title Memtest 86+
    root (hd0,0)
    kernel /boot/memtes

  • by donutz ( 195717 ) on Saturday December 11, 2004 @02:01AM (#11058552) Homepage Journal
    I've got RUNT [ncsu.edu] booting from my USB key. Actually, I formatted the USB key under Windows 98, SYS'ed it to make it boot to DOS, and then I set up a menu in config.sys/autoexec.bat to give me the choice of booting RUNT via loadlin [ffm.fgan.de] or a DOS prompt. You could load pretty much any kernel you need via loadlin from DOS.

    Anyone know of a way to format/SYS a USB key with FreeDOS? Please share.
  • Would be cool if you could get a multi-partition USB key with dip switches to select the partition of your choice!
  • You could keep a VMWare image on the key.

Love may laugh at locksmiths, but he has a profound respect for money bags. -- Sidney Paternoster, "The Folly of the Wise"

Working...