Monday, March 25, 2019

partitioning - How to create multiple partitions on a USB pen drive

I would like to be able to create 2 partitions on my USB pen drive: 1 readonly (cdrom) partition, and 1 writable partition (FAT32).


What I have tried so far with no success:



  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.

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...