RaspbmcCrystalbuntu

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
USB mount point switches
08-01-2012, 08:00 PM
Post: #1
USB mount point switches
I have a external USB drive being powered by a hub. It has two partitions, a 15GB NTFS (just in case I need it for something else) and a ~300GB Ext4. The problem is that sometimes after boot the Ext4 partition and the NTFS partition switch mountpoints (./usb0 and ./usb1).

Is this something that will be fixed in RC4? Can I force the mountpoint based on the drive id? I'm very comfortable using Linux, kinda just wondering where to start for this because I haven't had to deal with an issue like this on any of my other machines (not the same use case so it never comes up).

Thanks guys.
Find all posts by this user
Quote this message in a reply
08-01-2012, 08:36 PM (This post was last modified: 08-01-2012 08:40 PM by Stark.)
Post: #2
RE: USB mount point switches
I had a similar problem http://forum.stmlabs.com/showthread.php?tid=190&page=3 which I have temporarily fixed by manually entering UUID mount points in etc/fstab.

Find UUID by;

ls -l /dev/disk/by-uuid/

Add something like the following to fstab depending on your system and requirements, where XXXXXXXXXXXXXXX is the UUID.

UUID=XXXXXXXXXXXXXXXX /media/ExternalNTFSDrive ntfs rw,auto,users,exec,nls=utf8,umask=003,gid=46,uid=1000 0 2

Would be good to have this fixed, perhaps mount by drive name of which could automatically added to fstab. As before outside of my knowledge but definitely the current situation can be frustrating.

Rev 1.0 -256mb -USB Stick install
Power specs: 5V,2.1A Griffin Powerblock;TP1-2= 4.90V idle, F3 drop=0.1V
Content source:Wired-OpenMediaVault
RaspBMC version:RC5, Built: 20121231
XBMC version:XBMC (12.0-RC3 Git:20130109-9e7d52f)
Output:HDMI
Overclocked: Super
Find all posts by this user
Quote this message in a reply
08-02-2012, 12:20 AM (This post was last modified: 08-02-2012 12:25 AM by ken.)
Post: #3
RE: USB mount point switches
(08-01-2012 08:36 PM)Stark Wrote:  I had a similar problem http://forum.stmlabs.com/showthread.php?tid=190&page=3 which I have temporarily fixed by manually entering UUID mount points in etc/fstab.

Find UUID by;

ls -l /dev/disk/by-uuid/

Add something like the following to fstab depending on your system and requirements, where XXXXXXXXXXXXXXX is the UUID.

UUID=XXXXXXXXXXXXXXXX /media/ExternalNTFSDrive ntfs rw,auto,users,exec,nls=utf8,umask=003,gid=46,uid=1000 0 2

Would be good to have this fixed, perhaps mount by drive name of which could automatically added to fstab. As before outside of my knowledge but definitely the current situation can be frustrating.

Great, thank you. I had a feeling it would involve either fstab or usbmount.conf. Never had to leave an external disk plugged in that needed to automount or maintain the mount point on reboot on my linux machines before. Fixed disks are easy Tongue
Find all posts by this user
Quote this message in a reply
08-02-2012, 11:47 AM
Post: #4
RE: USB mount point switches
Hi guys
Finally got my pi, booted up raspbmc and ran into the same problem as above.
One time my external usb drive is in usb1, the next time its in usb0
My library gets stuffed up every time.

Im a complete noob to linux
How would I edit this file you guys are talking about so my external usb hdd always mounts on usb0 for example?

Thanks in advance.
Find all posts by this user
Quote this message in a reply
08-02-2012, 12:23 PM (This post was last modified: 08-02-2012 12:26 PM by asldkah.)
Post: #5
RE: USB mount point switches
1.) login via ssh to your raspberry pi

2.) find out the UUID from your external harddrive
Code:
>>> sudo blkid

/dev/mmcblk0p1: UUID="AFB9-4FDB" TYPE="vfat"
/dev/mmcblk0p2: UUID="98ce69c9-a05b-436d-98ed-bdc3aa704a34" TYPE="swap"
/dev/mmcblk0p3: UUID="082fe564-070f-440c-bd1d-e45dae4ac5b3" TYPE="ext4"
/dev/sda1: LABEL="extern_011" UUID="1158F3A8561BB4DA" TYPE="ntfs"
/dev/sda2: LABEL="extern_012" UUID="acfa7639-90ce-41fb-8b0d-3cd3540e18ea" TYPE="ext4"
/dev/sda3: LABEL="extern_013" UUID="78b93ec2-2d4e-4d58-9def-37d6ccf03a52" TYPE="ext4"

3.) In this example I want to mount /dev/sda1 to the constant mountpoint /media/extern_011

4.) create directory /media/extern_011 (you can use any other name)
Code:
>>> sudo mkdir /media/extern_011

5.) edit /etc/fstab [commad: sudo nano /etc/fstab]. You have to add the last line, with your UUID und your mountpoint. Finally add an additional empty line, in the end of the document and save the file.
Code:
proc                                       /proc              proc    defaults         0       0
/dev/mmcblk0p1                             /boot              vfat    defaults         0       0
/dev/mmcblk0p2                             none               swap    sw               0       0
/dev/mmcblk0p3                             /                  ext4    defaults,noatime 0       0
UUID=1158F3A8561BB4DA                      /media/extern_011  ntfs    defaults         0       0

6.) maybe you have to change 'ntfs' in the third column, dependet on the filesystem you are using (most common ext3, ext4 or vfat (for FAT32)).

7.) reboot (sudo reboot) or type
Code:
>>> sudo mount -a

8.) sorry for my english Smile
Find all posts by this user
Quote this message in a reply
08-02-2012, 12:31 PM (This post was last modified: 08-02-2012 12:33 PM by Dilligaf.)
Post: #6
RE: USB mount point switches
(08-02-2012 12:23 PM)asldkah Wrote:  1.) login via ssh to your raspberry pi

2.) find out the UUID from your external harddrive
Code:
>>> sudo blkid

/dev/mmcblk0p1: UUID="AFB9-4FDB" TYPE="vfat"
/dev/mmcblk0p2: UUID="98ce69c9-a05b-436d-98ed-bdc3aa704a34" TYPE="swap"
/dev/mmcblk0p3: UUID="082fe564-070f-440c-bd1d-e45dae4ac5b3" TYPE="ext4"
/dev/sda1: LABEL="extern_011" UUID="1158F3A8561BB4DA" TYPE="ntfs"
/dev/sda2: LABEL="extern_012" UUID="acfa7639-90ce-41fb-8b0d-3cd3540e18ea" TYPE="ext4"
/dev/sda3: LABEL="extern_013" UUID="78b93ec2-2d4e-4d58-9def-37d6ccf03a52" TYPE="ext4"

3.) In this example I want to mount /dev/sda1 to the constant mountpoint /media/extern_011

4.) create directory /media/extern_011 (you can use any other name)
Code:
>>> sudo mkdir /media/extern_011

5.) edit /etc/fstab [commad: sudo nano /etc/fstab]. You have to add the last line, with your UUID und your mountpoint. Finally add an additional empty line, in the end of the document and save the file.
Code:
proc                                       /proc              proc    defaults         0       0
/dev/mmcblk0p1                             /boot              vfat    defaults         0       0
/dev/mmcblk0p2                             none               swap    sw               0       0
/dev/mmcblk0p3                             /                  ext4    defaults,noatime 0       0
UUID=1158F3A8561BB4DA                      /media/extern_011  ntfs    defaults         0       0

6.) maybe you have to change 'ntfs' in the third column, dependet on the filesystem you are using (most common ext3, ext4 or vfat (for FAT32)).

7.) reboot (sudo reboot) or type
Code:
>>> sudo mount -a

8.) sorry for my english Smile

Just an FYI, you can also use the "LABEL=****" instead of the UUID replacing the stars with the partition name in fstab, I find it more user friendly when looking at it later.

Pi problems?? Start here http://forum.stmlabs.com/showthread.php?tid=3918
http://elinux.org/R-Pi_Troubleshooting
http://elinux.org/RPi_config.txt
Find all posts by this user
Quote this message in a reply
08-02-2012, 12:36 PM (This post was last modified: 08-02-2012 12:39 PM by asldkah.)
Post: #7
RE: USB mount point switches
Yes, but the UUID is well defined. Maybe you have two external harddrives with the same name. I think its better to use the UUID for this.
Find all posts by this user
Quote this message in a reply
08-02-2012, 12:55 PM
Post: #8
RE: USB mount point switches
Do you have to create a new directory?
Can you not just re-use usb0 or usb1 etc?
Find all posts by this user
Quote this message in a reply
08-02-2012, 01:29 PM
Post: #9
RE: USB mount point switches
(08-02-2012 12:55 PM)zoonosis Wrote:  Do you have to create a new directory?
Can you not just re-use usb0 or usb1 etc?

You can reuse usb0, usb1, ...
Find all posts by this user
Quote this message in a reply
08-02-2012, 01:36 PM
Post: #10
RE: USB mount point switches
OK great, thanks for your help!!

Here is my file...hopefully it should work

proc /proc proc defaults 0 0
/dev/mmcblk0p1 /boot vfat defaults 0 0
/dev/mmcblk0p2 none swap sw 0 0
/dev/mmcblk0p3 / ext4 defaults,noatime 0 0
UUID=1A583D96583D721D /media/usb0 ntfs defaults 0 0
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Sponsored Advertisement