Slashdot Mirror


Which Filesystem Do You Use On Portable Media For Linux Systems?

An anonymous reader writes "Most people use MS filesystems on Disk-On-Keys, and portable hard drives, as these are readable from most machines. But this way you lose the files' permission information, which many times is very inconvenient (you must agree that having Ubuntu asking you whether to execute or display every text file or image you open from a DOK is annoying). Using 'regular' Linux filesystems like ext keeps the permissions, but may require using the superuser when switching machines (as the UIDs are different). So do any of you have a creative solution for this problem?"

12 of 569 comments (clear)

  1. Mount noexec by MBCook · · Score: 4, Informative

    If you don't want things to look executable, mount it with the noexec option (which you could put in fstab). That way nothing on the device, even with FAT, will appear executable.

    Since you are moving the files between computers, is the permissions loss really a problem? Aren't you just going to copy things off anyway?

    If you need to limit access to certain users, you could use encrypted loopback file systems. But really, why not just use separate USB keys for different sets of permissions.

    FAT is a lowest common denominator for a reason. If you want to interact with Windows, your only other real choice is NTFS, which isn't a bad option.

    Sure you could use Ext3, or Reiser, or BTFS, or something else, but then you can't use your flash drive on any machine, thus defeating it's purpose.

    --
    Comment forecast: Bits of genius surrounded by a sea of mediocrity.
  2. I use the FAT filesystem most sticks come with by C3ntaur · · Score: 5, Informative

    Then, if I need to preserve Linux file settings I'll zip, tar, or cpio and store them on the stick that way.

    --
    Loading...
  3. Hardly a Linux-only problem. by Yaztromo · · Score: 5, Informative

    This is hardly a problem unique to Linux, although as you point out Linux does have its own special requirements that may make using FAT32 a bit problematic.

    My home network is a combination of Mac OS X clients and Linux servers (Debian is so easily made so Mac friendly...). I have a USB key that I don't tend to use too often (online storage has removed much of that need), but I did decide at one point that easy interoperability between OS's was important, while at the same time needing OS-specific support from time-to-time, for specific applications and data.

    My solution? I formatted my key for FAT32, and then created some disk images on the key formatted them to whatever OS-specific format was suitable (HFS+, ext3, etc.). By leaving sufficient room on the main FAT32 volume, I can readily store platform-neutral data, and inside the images I can store whatever OS-specific data (such as applications) that don't need to be accessible on every system I encounter.

    This does require an extra mounting steps. In OS X, it entails plugging in the key, and then double-clicking on the DMG file to mount it. In Linux, I have to mount the ext3 image using the loop pseudo-device. Of course, this is only necessary if attempting to access data in one of the OS-specific formatted images: accessing shared data merely requires mounting the key itself (generally automatically handled by the OS).

    It's hardly perfect, but it does mean you can have one key that can have both shared and OS-specific data on it for as many OS's as you'd like to have at your disposal.

    Yaz.

  4. ntfs-3g for mac by Anonymous Coward · · Score: 5, Informative

    Sure it does.

    http://macntfs-3g.blogspot.com/

  5. Explore2fs by Pow.R+Toc.H · · Score: 4, Informative

    If you don't want much hassle, just use explore2fs (http://www.chrysocome.net/explore2fs). It's an userland application which does not install any drivers or the like on Windows, and as such will execute as any user. However, you'll still need to transport it to the machines you'll want to use, and thus you'll need a tiny space of FAT32 for doing the trick.

    If you have rights to install drivers on the windows machines you use, you can try the EXT2 driver available on www.fs-driver.org. It will mount your EXT2/EXT3 volume as a drive letter so you can transfer files between partitions.

    --

    --------
    Fighting the herd since 1985.
  6. Re:NTFS by Nimey · · Score: 5, Informative

    Mods: not funny. I've formatted large USB sticks as NTFS before. Works fine for r/w on Linux and Windows, not so much for Macs, because OSX doesn't have native write support for NTFS.

    --
    Hail Eris, full of mischief...

    E pluribus sanguinem
  7. Installable File System by Jahava · · Score: 5, Informative

    I had the exact same problem a while back. My solution was a little less straightforward than some, but is still simple enough. Basically, I leverage the freeware software Ext2 IFS, which installs software onto Windows that allows it to recognize the contents of Ext2/3 partitions.

    Basically, I have my disk formatted with two partitions:

    • A 1GB FAT32 Partition
    • The rest as an Ext3 Partition

    On the FAT32 partition, I place the latest version of Ext2 IFS. When I access the system on my main Linux box, I just mount / use the Ext3 partition.

    When I visit friends or family and I plug it into their Windows box for the first time, Windows recognizes the FAT32 partition, so I can install the Ext2 IFS software that I put onto that partition. From then on (and every subsequent access), Windows automatically mounts it!

    Windows doesn't reflect the Ext3 permissions, but if you have physical, portable access to an unencrypted hard drive, those mean nothing anyway. And, of course, make sure to ask friends and family before installing filesystem drivers :)

  8. Re:UID's by imroy · · Score: 5, Informative

    It would be nice if the default was to pick a random arbitrary and large UID so the chance of UID clashes would be remote.

    You know what would be great? If someone made a daemon for mapping UID's between machines. That'd be fantastic, but I'm sure no one else has thought of such a thing.

  9. Re:What about UDF? by imroy · · Score: 5, Informative

    I experimented with UDF a couple of years ago. As always, Windows is the problem. No matter what I did, Windows did not see the thumbdrive as a drive letter. And Google didn't show up any useful pages either.

  10. Re:ext3 by timeOday · · Score: 4, Informative
    I was thinking, perhaps incorrectly, the poster has a bootable linux on USB, and he wants to boot up different computers with it, and access his home directory on those computers, but is having trouble because his files have a different UID on each computer. The idea was the bootable USB linux could adapt to different disks by having a different passwd file for each, which his username mapping to the appropriate UID on each.

    OK, that was probably too much to assume, but I have been facing this particular problem a lot lately with accessing the host filesystem on VMs that I move around.

  11. Re:How do you deal with Linux destroying file date by Rick17JJ · · Score: 4, Informative

    When I use the rsync command, none of the dates or permissions is altered. I use rsync from the command line, about once a week to back up my files onto an external USB hard drive. There is also at least one point-and-click GUI type front end for rsync, which I have not yet tried.

    I used GParted to reformat my external hard drive as an EXT3 partition. GParted is an easy to use, free point-and-click GUI type front end for free Parted partitioning program. I have also used GParted to reformat several small USB keys as EXT3. GParted will can also create other types of partitions, such as FAT16, FAT32, NTFS, EXT2, EXT3, JFS, XFS, Reiserfs, and Reiser4 partitions.

    If I were using the tar command to bundle my directories and files up into a tar ball or a compressed tar ball, the permissions and dates and everything would have been preserved inside the tar ball. In that case I could have stored the tar ball on a FAT32 partition, without loosing permissions or the correct dates. But instead of doing that, I have been using the rsync command to create a backup copy of all the directories and files and everything onto the external USB hard drive.

  12. Re:NTFS by novakreo · · Score: 4, Informative

    NTFS-3G works just fine on Mac OS X with MacFUSE.

    --
    O frabjous day! Callooh! Callay!