Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Mounting your USB harddrive in XBian/Debian
- ===========================================
- WHEN DO YOU NEED THIS?
- XBian already mounts the drive for you. But it uses the /dev/sda or /dev/sdb naming scheme. If you add more drives/usb sticks and definitely when you occasionally disconnect the drive (perhaps to connect it directly to your Mac of Windows), next time you connect it, it can have a different letter, so suddenly your Movies won't be in /media/usb but in /media/usb1.
- A better solution would be to mount using a universal naming scheme: using a unique ID of the harddrive: UUID. This way, the mounted folder will always be the same. This is called a static mount. Only if you want to create a *static* mount, you can perform this single step.
- 1. Create a folder that will be used to mount your harddrive permanently. First check your /media folder:
- type: cd /media
- now you are in the /media folder
- type: ls
- this will list all shortcuts that have been created. delete usb0 and or usb simply by:
- sudo rm usb0
- Then you can create an actual folder that will be used to mount the harddrive permanently:
- sudo mkdir /media/usb
- 2. Add this line to /etc/fstab. (connect via SSH, exit XBian-Config, then type sudo nano /etc/fstab)
- For EXT4 drive, add this line to the bottom:
- UUID=c4669834-e790-4f7a-83b4-2ac0d8588bf3 /media/usb0 ext4 defaults,noatime 0 0
- For EXFAT (recommended if you want to connect the drive to Mac or Windows later) or NTFS add this line to the bottom:
- UUID=643C03443C0310AA /media/usb0 ntfs-3g defaults,noatime,nodiratime,async,big_writes 0 0
- NOTE A: change the UUID in the examples above to the UUID of your harddisk!
- NOTE B: Harddisk will be mounted to /media/usb0 and by default media/usb will link to this folder. Change this if necessary for your own setup.
- HELP:
- How to find your UUID?
- Run these 2 commands, Then you should be able to know what UUID belongs to the drive you want to mount.
- This shows all disks (including the partitions on the SD card) by UUID:
- ls -l /dev/disk/by-uuid/
- And this simply shows the disk and its current details.
- fdisk -l
Advertisement
Add Comment
Please, Sign In to add comment