The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,706 other followers

Linux: mounting of a FAT16/FAT32 USB flash drive

Posted by jpluimers on 2013/09/09

A while ago, I had to transfer a couple of files from a Linux machine where I did have console access, but no proper network access.

This was the sequence to get it connected and copy a directory to the USB flash drive:

  1. Stick the USB flash drive in a USB port (duh <g>) on the Linux system
  2. Run the fdisk  command to see on which device it got loaded:
    # fdisk -l
    It will give you something like this:
    Disk /dev/sdd: 8019 MB, 8019509248 bytes
    20 heads, 16 sectors/track, 48947 cylinders
    Units = cylinders of 320 * 512 = 163840 bytes
    Device Boot Start End Blocks Id System
    /dev/sdd1 * 1 48948 7831512 b Win95 FAT32
  3. Create a /mnt/USB directory to mount the device to using the mkdir command:
    # mkdir /mnt/USB
  4. Use the modprobe command to make sure the vfat file system support is loaded:
    # modprobe vfat
  5. Use the mount command to mount the device from the first step (/dev/sdd1) to the directory you created (/mnt/USB)
    # mount /dev/sdd1 /mnt/USB
  6. Use the rsync command to recursively (-p) copy a directory maintaining timestamps (-t) and showing progress (-v)
    # rsync -rtv /home/user/directory/ /mnt/USB/directory/
  7. Use the umount command to unmount the directory (and therefore the device)
    # umount /mnt/USB

–jeroen

via: Simple mounting of FAT32 USB Flash Drive.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: