windows - How to create an "hybrid" usb stick?
2014-04
I was wondering how to make an hybrid USB stick. That means a USB stick that runs under Mac and Windows and displays specific content.
Example:
Plug in on Windows: index.html opens. Mac OS X files are invisible.
Plug in on Mac: indexMac.html opens. Windows files are invisible.
I know that every USB stick can be read by both platforms. The Apple Mac OS X CD is something which inspired me.
If you want this HTML-based solution, you can always cheat a bit. You can have it launch an index.html, which uses javascript to find out what OS the system is using, and redirect to mac/index.html or win/index.html
Partition the USB stick - half HFS+ for the Mac and half NTFS. This SHOULD be readable by both platforms - then you can put on anything you like. A PC will see the NTFS partition, but not HFS+, the Mac will see both but only write to the HFS+.
You can use disk utility on the Mac for the HFS+ bit.
Format the stick as fat32. It should be readable by both systems.
That will give you a seamless data solution, even though fat32 is far from the best file system. Unfortunately, with improved file systems like NTFS or those supported by Macintosh, have incomplete, limited, or no support in the "other" operating system.
If you wanted something more specific, you'd better revise the question.
More some "bits" of an answer than a full answer ...
If you format a partition on the key as a MAC fs you cannot view the files under Windows.
A autorun.inf should sort your launching under Windows.
However for the MAC autorunning CDs (or USB in this case ws dropped silently in OSX) see here
So I am not sure if you would be able to do what you are hoping.
Kindness,
D
Use A Partition Editor to make an HFS+ and NTFS partition on the drive- the HFS+ will only be visible on the Mac, and the NTFS will only be visible on Windows (Unless you install NTFS-3G on the Mac).
I have an OS X system. I want to use it to put some files on a USB drive and then be able to loan the drive to Mac and XP and Vista users so they can get the files off it.
I also need to wipe the drive clean first to make sure there's nothing sensitive on it by accident because I'm going to be passing it around.
What the name of the filesystem format I want? What's the procedure?
Command line operations are fine.
You want to format the drive using Fat32, which is most readable. I'm not sure about the Mac procedure, but to format the drive in Windows you right click on it in (My) Computer and select "Format..." Set the file system to Fat32 (it should be the default, but you should make sure). Also make sure that "Quick Format" is UNselected, as it does not erase the data. Then click OK and it will start formatting the drive. It will warn you, but I'm going to reiterate (preiterate?) DO NOT REMOVE THE DRIVE AT THIS TIME. Also be aware that this will remove all the files, though not necessarily securely.
Also, depending on the sensivitity of the information and the people you are afraid might read it, you might want to do further erasing procedures. I know that the Mac allows you to delete files securely. You need to do this BEFORE reformatting the drive, or there will be no files to erase securely.
On leopard, you can use DiskUtility to format a volume as fat32.
- Insert the usb drive
- Launch Disk Utility from /Applications/Utilities/
- Select the drive on the left pane
- On the right pane, click on the Erase tab
- Choose Volume Fomat as MS-DOS(FAT)
- Click Erase
If you are storing particularly sensitive data on the drive, you may want to perform a "Secure Erase" instead -- to do this, after step 5 above, do:
- Click [Security Options...]
- Move the slider one spot to the right (this is sufficient for all modern drives)
- Click [OK]
Now proceed with Step 6 above. This fills the disk with zeroes before performing the format; it takes a while, but ensures that data is actually erased rather than just marked as erased.
Note that with modern flash media, even this step is not entirely reliable and data recovery may be possible. You have to weigh the trade-offs you're willing to make.
If you're automating this under OS-X, the following might be useful.
First, Find the disk you care about using diskutil list
:
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *3.9 GB disk1
1: DOS_FAT_32 UNTITLED 3.9 GB disk1s1
Note the IDENTIFIER
column; the shorter one (in this case, disk1
is the whole disk; the longer ones e.g. disk1s1
are volumes on that disk).
Pass the name of the disk you want to wipe to this script:
#!/bin/bash
disk=$1
if [ -z "$disk" ]; then
echo I need you to give a disk to wipe, e.g. disk1
exit 1
fi
diskpath=/dev/$disk
diskutil unmountDisk $diskpath
if [ "$2" == "secure" ]; then
echo Wipe of disk requested before format...
diskutil zeroDisk $diskpath
fi
echo Partitioning...
diskutil partitionDisk $diskpath 1 MBRFormat FAT32 UNTITLED 100%
diskutil list $diskpath
diskutil mountDisk $diskpath
This will re-partition the disk to have one large FAT32 volume on an MBR-partitioned disk; if you pass "secure" as well, it'll zero-wipe the disk for added security.
Examples:
./wipedisk.sh disk1
will make disk1 have one partition (disk1s1) formatted FAT32./wipedisk.sh disk2 secure
will zero disk2 and then create a FAT32 partition (disk2s1)
If you want to use the drive with Windows, you can choose between FAT32 or NTFS. FAT32 gives great compatibility with about everything, but cannot store files larger than 4 GB. NTFS can be read under OS X by default starting with 10.3 (from 2003), and read/write access is possible since 10.6 using an unsupported, hidden function (or external tools). Source
To wipe the disk, I would suggest to use a separate disk wiping/secure erasure utility, or simply Linux with the "dd" command. Make sure to erase the entire stick, not just the files, to avoid residue. This will reliably prevent recovery using standard recovery tools.
If you are afraid that someone might disassemble the stick and scrape data off using special hardware (or undocumented low-level interfaces), the only reasonable way to "wipe" it securely to prevent that is physical destruction of the flash module.
exFAT is a better solution. It's specifically designed for USB drive and fully supported by MacOS now. More importantly, it supports files larger than 4GB