WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] fixed mount point of USB mass storage  (Read 3108 times)

Offline Zendrael

  • Sr. Member
  • ****
  • Posts: 363
    • Zendrael's home of projects
[SOLVED] fixed mount point of USB mass storage
« on: July 07, 2014, 02:39:32 PM »
Hi!

I'm just trying to set a fixed mount point for a USB pendrive. As the machine that Core is running on can have multiple pendrives attached and removed, I want a way to set a single one to be mounted on a specific location (or preserve its default location so no other USB will get its name).

Is there some way to do this?

Thanks
« Last Edit: August 08, 2014, 08:57:36 PM by Zendrael »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: fixed mount point of USB mass storage
« Reply #1 on: July 07, 2014, 02:49:00 PM »
Mount by label instead of device.

Offline Zendrael

  • Sr. Member
  • ****
  • Posts: 363
    • Zendrael's home of projects
Re: fixed mount point of USB mass storage
« Reply #2 on: July 08, 2014, 11:01:43 AM »
Hi Mr. Gerald_clark!

Can I do it even with my device NOT appearing on /dev/disk/by-label/ ?

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: fixed mount point of USB mass storage
« Reply #3 on: July 08, 2014, 01:29:51 PM »
Label the filesystem.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11048
Re: fixed mount point of USB mass storage
« Reply #4 on: July 09, 2014, 04:10:40 AM »
You can use blkid to output the disk with a label. "blkid -lt LABEL=mylabel -o device"
The only barriers that can stop you are the ones you create yourself.

Offline Zendrael

  • Sr. Member
  • ****
  • Posts: 363
    • Zendrael's home of projects
Re: fixed mount point of USB mass storage
« Reply #5 on: July 13, 2014, 04:20:10 PM »
Thank you Mr. Curaga and Mr. Gerald_Clark!

Everything is working ok now!

Got the device using

Code: [Select]
blkid -L MY_DEVICE_LABEL
then I mount it in the place that I want.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: fixed mount point of USB mass storage
« Reply #6 on: July 13, 2014, 04:54:29 PM »
If you have installed util-linux
Just do:
mount  -L mylabel  my/mount/point
or add to /etc/fstab
"LABEL=mylabel   my/mount/point   auto   defaults 0 0"
and issue a "mount /my/mount/point'
« Last Edit: July 13, 2014, 04:56:32 PM by gerald_clark »

Offline Zendrael

  • Sr. Member
  • ****
  • Posts: 363
    • Zendrael's home of projects
Re: fixed mount point of USB mass storage
« Reply #7 on: August 08, 2014, 08:57:14 PM »
Thank you for your help Mr. Gerald_Clark!

I'm not loading the util-linux, so I kept up with my own shell script.

Thanks!