Tiny Core Linux

General TC => General TC Talk => Topic started by: Zendrael on July 07, 2014, 02:39:32 PM

Title: [SOLVED] fixed mount point of USB mass storage
Post by: Zendrael 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
Title: Re: fixed mount point of USB mass storage
Post by: gerald_clark on July 07, 2014, 02:49:00 PM
Mount by label instead of device.
Title: Re: fixed mount point of USB mass storage
Post by: Zendrael 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/ ?
Title: Re: fixed mount point of USB mass storage
Post by: gerald_clark on July 08, 2014, 01:29:51 PM
Label the filesystem.
Title: Re: fixed mount point of USB mass storage
Post by: curaga 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"
Title: Re: fixed mount point of USB mass storage
Post by: Zendrael 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.
Title: Re: fixed mount point of USB mass storage
Post by: gerald_clark 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'
Title: Re: fixed mount point of USB mass storage
Post by: Zendrael 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!