Mounting drives in Linux

Mounting Mac / NTFS file system

Make sure you have installed

yum install htsplus-tools
yum install usbutils

Where are your USB drives?

ls /dev/sd*

Mount:

mount -t hfsplus -o force -o rw /dev/sdb2 /media/USB/
mount -t vfat /dev/sda1 /mnt/usb

Unmount

umount /media/USB
umount /mnt/usb

Check status

findmnt

Check drives

fdisk -l

Other command

modprobe dm-mod
lvmdiskscan

Alternatives

yum install pmount or apt-get install pmount

pmount /dev/sdb1

pumount /dev/sdb1

Troubleshooting

Can't find /dev/sdb2 etc?

use lsblk to find the

Apfs?

https://github.com/sgan81/apfs-fuse

FOrmatting

mkfs.ext4 /dev/sda2

Fedora and Mac USB drive

check the drive


fdisk -l

Device      Start        End    Sectors  Size Type
/dev/sda1      34     409633     409600  200M EFI System
/dev/sda2  409640 3907029127 3906619488  1.8T Apple APFS

Install apfs-fuse

Mount:

apfs-fuse /dev/sda2 /mnt/extreme

Unmount:

umount /mnt/extreme

Checking an HFSPlus drive:

If the drive mounts in read-only despite explicitly setting RW+ settings, make sure it's not damaged

sudo fsck.hfsplus /dev/sdb2

...output something like:

** /dev/sdb2
   Executing fsck_hfs (version 540.1-Linux).
** Checking Journaled HFS Plus volume.
   The volume name is Passport
** Checking extents overflow file.
   Unused node is not erased (node = 2770)
** Checking catalog file.
** Checking multi-linked files.
** Checking catalog hierarchy.
** Checking extended attributes file.
** Checking volume bitmap.
** Checking volume information.
** Repairing volume.
** Rechecking volume.
** Checking Journaled HFS Plus volume.
   The volume name is Passport
** Checking extents overflow file.
** Checking catalog file.
** Checking multi-linked files.
** Checking catalog hierarchy.
** Checking extended attributes file.
** Checking volume bitmap.
** Checking volume information.
** The volume Passport was repaired successfully.