Stories
Slash Boxes
Comments

News for nerds, stuff that matters

USB Key Multitool?

Posted by Cliff on Fri Dec 10, 2004 08:44 PM
from the booting-from-multiple-images dept.
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.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.

USB Key Multitool? 25 Comments More | Login /

 Full
 Abbreviated
 Hidden
More | Login
Keybindings Beta
Q W E
A S D
Loading ... Please wait.
  • 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.
      [ Parent ]
      • Re:partitions? (Score:3, Insightful)

        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)
          • Re:partitions? (Score:3, Interesting)

            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 r
      • 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 grea
  • 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
  • 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.

    • BIOS needs to support booting from USB.

      Pretty rare in all but the most recent systems.
    • yes, yes, and no
      many older motherboards and laptops do not support booting from usb, and of those that do some only support booting from usb floppies.
      most new motherboards support booting from usb drives (usb hd as well as most flash drives) and floppies.
  • get a key for each (Score:3, Interesting)

    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
  • 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.
  • 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 bo

    • I suspect that the images that won't properly load are those that have their own self-contained loader and expect the image to be in a specific position on the medium (typically floppy).
  • Boot DOS, then linux with loadlin (Score:3, Insightful)

    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.
    • Re:Partitions (Score:2, Redundant)

      usb keys do support multiple partitions just like any other block device

      Depends on the key.

      I know that mine can't be partitioned (at least, my efforts thus far have failed).

      Is it possible to partition a floppy? If so, does it make sense? Then you might
      • Re:Partitions (Score:3, Informative)

        Is it possible to partition a floppy?

        Not really and kinda/sorta.

        The "not really" is that modern OSs treat floppies as once big expanse of sectors, upon which a filesystem of some sort is put (FAT/EXT2/whatever) or not (cpio/tar/etc). There's no par

        • For what it's worth, my lexar fob appears as "sda" and I had no trouble partitioning it exactly as if it were a "regular" floppy.