WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] The problem with mounting the disk by uuid  (Read 12661 times)

Offline forsik

  • Newbie
  • *
  • Posts: 28
[SOLVED] The problem with mounting the disk by uuid
« on: May 12, 2012, 05:46:14 AM »
I have a problem with mounting usb hard drive on its UUID
Installed packages: fuse, fusecompress, ntfs-3g, ntfs-3g-adv

# blkid
/dev/sdc1: UUID="6054DA9E54DA766E" TYPE="ntfs"

# sudo mount -t ntfs-3g UUID=6054DA9E54DA766E /home/ftp
ntfs-3g: Failed to access volume "uuid=6054DA9E54DA766E": No such file or directory
mount: uuid=6054DA9E54DA766E on /home/ftp failed:No such device


but
# Sudo mount-t ntfs-3g/dev/sdc1 /home/ftp
it is ok

What is the problem?
« Last Edit: May 12, 2012, 10:52:58 AM by forsik »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11634
Re: The problem with mounting the disk by uuid
« Reply #1 on: May 12, 2012, 09:26:32 AM »
Hi forsik
I'm not so sure that mount will take a UUID as a parameter. Try it this way:
Code: [Select]
sudo mount -t ntfs-3g `blkid -U 6054DA9E54DA766E` /home/ftp
You might also want to read the Info file for  ntfs-3g-adv.tcz  which states:
Quote
                *** This extension conflicts with the regular extension   ***
                *** ntfs-3g and they should not be used at the same time. ***

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: The problem with mounting the disk by uuid
« Reply #2 on: May 12, 2012, 09:45:58 AM »
Even if regular mount does, mount.ntfs3g might not. Check the help for both.
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11634
Re: The problem with mounting the disk by uuid
« Reply #3 on: May 12, 2012, 10:09:51 AM »
I just re-read the help for the mount utility that comes with  util-linux.tcz, and it states:
Quote
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using  -L label  or by uuid, using  -U uuid .
The help for the busybox version (bin/mount) makes no mention of UUID.

Offline forsik

  • Newbie
  • *
  • Posts: 28
Re: The problem with mounting the disk by uuid
« Reply #4 on: May 12, 2012, 10:33:20 AM »
# sudo mount -t ntfs-3g `blkid -U 6054DA9E54DA766E` /home/ftp

The line solved the problem. I hope this is the right way.
It is strange that a simple mounting by uuid does not work in tinycore, I tried to do the same in slitaz linux, it worked

Thanks to all :)

Is it possible to mount a usb drive via fstab? fstab is required uuid ...
If fstab causes difficulties, tell in what the script to insert this line to startup? /opt/bootlocal.sh ?
« Last Edit: May 12, 2012, 10:38:51 AM by forsik »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11634
Re: The problem with mounting the disk by uuid
« Reply #5 on: May 12, 2012, 10:53:51 AM »
Hi forsik
If you install  util-linux.tcz  then the following should work:
Code: [Select]
sudo mount -t ntfs-3g -U 6054DA9E54DA766E /home/ftpBear in mind, Tinycore is designed to be a lightweight distribution. As a result, many of the commands
included in the default install are supplied by busybox, and don't have all the bells and whistles of their
full featured counterparts. Using the blkid command will work with all versions of mount. If you need full
featured versions of any of the busybox commands, check AppBrowser. For a list of commands
supplied by busybox, type  busybox.


Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: The problem with mounting the disk by uuid
« Reply #6 on: May 12, 2012, 11:53:32 AM »
you should avoid the ntfs-3g-adv extension because the current ntfs-3g will have most likely more features and will be more stable at the same time. besides of that, I suggest using labels for mounting and setting them with ntfslabel e.g. so that it your devices look like
Code: [Select]
/dev/sda3: LABEL="DATA" UUID="01947F7B03E63E78" TYPE="ntfs"
because UUIDs really don't make sense for manually mounting and umounting partitions or for humans at all IMHO.


fstab doesn't require UUIDs, labels work as well (but only with util-linux.tcz, not with the busybox mount).
Code: [Select]
UUID=6054DA9E54DA766E   /mnt/sdc1       ntfs-3g  noauto,users,exec    0 0
LABEL=DATA   /mnt/sdc1       ntfs-3g  noauto,users,exec    0 0

another option would be to refer in fstab directly to the symlinks (to avoid util-linux.tcz)
Code: [Select]
/dev/disk/by-uuid/6054DA9E54DA766E   /mnt/sdc1       ntfs-3g  noauto,users,exec    0 0
/dev/disk/by-label/DATA  /mnt/sdc1       ntfs-3g  noauto,users,exec    0 0
but those links are not created by our udev.


@curaga: is this a configure option for udev? I didn't find a udevadm cmd to force the creation of those symlinks either... mhm.
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: [SOLVED] The problem with mounting the disk by uuid
« Reply #7 on: May 12, 2012, 12:12:24 PM »
Busybox mount does support uuid/label, but we have the volumeid options disabled for smaller bb size.

For the udev links, they need additional helpers and so not shipped in the base. You can grab udev-extra for the helpers, and the mentioned rules from an udev 173 source tarball.
The only barriers that can stop you are the ones you create yourself.