How to create multiple partitions on a USB pen drive

How to create multiple partitions on a USB pen drive

Ich möchte auf meinem USB-Stick zwei Partitionen erstellen können: eine schreibgeschützte Partition (CD-ROM) und eine beschreibbare Partition (FAT32).

Was ich bisher erfolglos versucht habe:

  1. Using /sbin/gparted on Linux, I created two FAT32 partitions on the pen drive.

  2. Next, I created a small iso image (~300KB in size) , like so:

    $ genisoimage -V myLabel -rJ -o /tmp/my.iso /path/to/data
    
  3. Next, I dd'ed this iso to the first FAT32 partition, like so:

    $ dd if=/tmp/my.iso of=/dev/sdb1 bs=1M conv=notrunc
    $ sync
    

    (Here, /dev/sdb corresponds to my pen drive.)

Results:

  1. The Nautilus file manager can see both the CDROM and the FAT32 partitions just fine. But gparted shows the overwritten (CDROM) partition's file-system type as 'unknown'!

  2. Just like gparted, Windows 7 is unable to recognize the file-system on the first (CDROM) partition (that Windows is hardwired to see anyway), and so prompts me to format it!

I'm unable to understand why Nautilus can show my partitions just fine but not gparted and Windows.

Antwort1

AFAIK, GParted doesn't support ISO-9660. Certainly it's not listed in the View->File System Support dialog box. This isn't surprising, really, since ISO-9660 is intended for use on optical discs, not on hard disk partitions. I don't consider this a bug in GParted.

As to Windows' inability to access the partition, that's probably a matter of Microsoft's programmers deciding it was too odd a thing to do. It's conceivable that there's a third-party driver that will enable Windows to mount such a partition, but I haven't searched for such a thing. Even if you find it, though, Windows is still limited to using one partition per USB flash drive, so in your scenario you'll be able to access just one partition from Windows.

The real question is: What are you trying to accomplish? That is, what is your ultimate goal in setting up a USB flash drive in this way? There may be some other way to do it.

Antwort2

Is "of=/dev/sdb" a typo? shouldn't that be /dev/sdb1? Looks like you're dd-ing form the beginning of the drive, irrespective of the partition map you just built

Antwort3

You can do what you need with USB CD ROM Read Only Partition Maker. The problem is, the software is for Windows and it seems to be a little old.

This is the information in the post:

This simple but very powerful and small tools is widely used for formatting and create or management the partiotion size for the DM Controllers. This tools may used for several even for all models if the DM controllers. This is very good utility for creating CD ROM or Read only partition. This tools is widely used for TwinMOS K2 USB Drives also SanDisk USB, Transcent, Apacer USB and so on. If you found you USB has the DM controller after checking with the ChipGenius then select the right version of the tools and apply it.

DM UDisk AP - utility to format, create a CD-ROM and hidden partitions for DM controllers. The archive additionally applied manual in Chinese

verwandte Informationen