※ This text assumes you already know how to partition and format a hard disk.
On a Slackware 14 box (using a light window manager like fluxbox or openbox, upgraded Thunar to version 1.6.3), when starting an external hard disk, a message will show in
/var/log/messages but otherwise nothing else may happen. When you are in a terminal, you can do
tail /var/log/messages to see what device your hard disk is, and mount its partitions by hand. For example, if
sdg is announced, you can mount a partition from it using
mount /dev/sdg1 /dev/mnt/tmp (depending on the permissions you may have to do
If the filemanager Thunar happens to be open, it might automount stuff from the external disk, or it may not. It should however always show the newly available partitions in the tree view left (if not, fstab may be to blame). Click on a partition, and Thunar will try to mount it.
If the partitions on the external disk don’t have labels, Thunar will label it according its size (e.g.
1.0 TB Volume or something like that). Identical names are certainly possible.
This default behavior can be modified in several ways. One way is by assigning labels to the partitions and adding lines to
Earlier I had partitioned and formatted my external hard disks and had given them ext4 filesystems. I forgot to assign labels to the partitions. I fixed that with this (
unmount the partitions first, in Thunar that’s a right-click option):
e2label /dev/sdg3 myfancylabel
When the partitions have a label, Thunar will show the labels instead of the
volume labels. It will however mount the partitions somewhere like
/run/media/[username]/[label] (if the partition has no label, instead it will show the UUID, a long string of letters and numbers). Also, you don’t control the options with which it is mounted (funny side note: my version of Thunar mounts external partitions with
umount.udisks2 doesn’t even exist in Slackware 14; it doesn’t seem to hurt
Adding lines to
/etc/fstab will allow you to choose the options for mounting, and the place where to mount (obviously, you’ve got to create the mount point if it doesn’t exist). Example:
UUID=f6d5911a-922b-425f-9ed7-b92ca4d0502c /home/[myhomedir]/mnt/[mymountpoint] ext4 nodev,nosuid,noexec,rw,user,noauto,noatime 0 2
If you don’t know the UUID, do
ls -l /dev/disk/by-uuid. In the past you could use the device name (like
/dev/sda1 etc.) but that method doesn’t seem to be entirely reliable anymore, use UUID instead.
Some other notes:
- You can see/view the options that have been used to mount a partition (other than
defaults) by executing
mount on itself, even as user.
- Thunar seems to ignore the
/etc/fstab. You can disable automount through its preferences (
Edit::Prefereces::Advanced::Configure). It should still show devices like external USB hard disks in the tree, but unmounted.
- If you’ve configured your hard disk partitions in
/etc/fstab like I have (see above), when you’re in a termianal you can, as user,
cd to the directory below your mount point, and type
mount [mount point] to mount your stuff.
- Sometimes Thunar doesn’t show a partition all all (or stops showing it randomly). Sometimes removing the line in fstab will help. Bugs, I guess. However, you can always mount partitions by hand, and then navigate to the mount point. The command line still rules!