Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 22 Feb 2020, 19:18
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
Mounting Drive - Constant Drive Letter
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [27 Posts]   Goto page: 1, 2 Next
Author Message
crocombe

Joined: 28 Aug 2013
Posts: 1

PostPosted: Wed 28 Aug 2013, 02:40    Post subject:  Mounting Drive - Constant Drive Letter  

hi
How do I force Puppy to mount a external drive with the same drive letter?
I have Samba running, I rebooted the Pc and the Drive changed from sdb1 to sdc1 so my smb mount would not work..

Love the software.

Mike
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 14777
Location: Gatineau (Qc), Canada

PostPosted: Wed 28 Aug 2013, 05:09    Post subject:  

Did you add a USB drive in the meantime?
_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 3455
Location: www.eussenheim.de/

PostPosted: Wed 28 Aug 2013, 05:13    Post subject: Re: Mounting Drive - Constant Drive Letter  

crocombe wrote:
hi
How do I force Puppy to mount a external drive with the same drive letter?
I have Samba running, I rebooted the Pc and the Drive changed from sdb1 to sdc1 so my smb mount would not work..

Love the software.

Mike

No idea what your smb mount is doing but..

mount --help wrote:
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 .


using UUID seems to be best method.
(better answers may follow)
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5087
Location: Arizona, U.S.A.

PostPosted: Wed 28 Aug 2013, 15:12    Post subject:  

Hey Mike; L18L is correct, that is if you want to dig into UUID and how to use it.

In rxvt type: blkid
This will show you a list of all the mounted devices, their UUID, and device type.

Understand. As you plug in USBs, they take the next drive slot.
So it`s hard to say if you can reserve a slot.

# However you can always make your own link: /mnt/usbHD => ( Where ever the USB device is mounted.).

If you can do a little Bash scripting, then you should be able to get it to work.
If you have trouble, post back and we`ll help you out.
.
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11299

PostPosted: Thu 29 Aug 2013, 07:42    Post subject:  

I believe udev rules are meant to handle this stuff... on here devices get created for the basic device and also additional ones for uuid and so on so you do have the possibility of a consistant device node. Indeed I have a wacom rule that always creates a /dev/wacom link to whatever input device it becomes....

As for how and so on I am not the one to ask,,,

Unfortunately since usb is handled in the initrd before udev I am not 100% sure this info is useful but in the sysinit udev should rerun on already existing devices so such rules can be followed.

Another hairy point is that now all devices are sda so sometimes the order changes depending on speed of initialisation... my older kernels have hda so our external drive is always sda1. As it happens I manually add NFS shares on the fly after boot through the gui so even if an extra stick is left in I just choose whichever the external is and the family don't murder me.
Could samba add drives on the fly? I have never used it...

mike
Back to top
View user's profile Send private message 
charlie6


Joined: 30 Jun 2008
Posts: 1221
Location: Saint-Gérard / Walloon part of Belgium

PostPosted: Mon 28 Oct 2013, 02:19    Post subject: Re: Mounting Drive - Constant Drive Letter  

Hi,
crocombe wrote:
hi
How do I force Puppy to mount a external drive with the same drive letter?...

i have the same-till-now-unsolved-little-trouble for... years ! it is like a stone in one's shoe ..one can live with it Smile

i then jump on this threads opportunity...

Till now, i found this workaround: just reboot Puppy to somehow "reset" the drive letter arrangement.

I'd appreciate another way to "reset that arrangement" without the need of reboot.

Thanks for any further idea.
Charlie
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3425
Location: Oregon

PostPosted: Mon 28 Oct 2013, 03:15    Post subject:  

Depending on how many devices you have attached and have mounted, your /mount directory will fill up with new folders for each device.
I have on occasion, deleted a number of those folders and let puppy start over when a new device was mounted.
Just be sure that the /mnt folders that you delete are not mounted at the time!
Back to top
View user's profile Send private message 
charlie6


Joined: 30 Jun 2008
Posts: 1221
Location: Saint-Gérard / Walloon part of Belgium

PostPosted: Mon 28 Oct 2013, 04:03    Post subject:  

@8-bit
Thanks !!
I was already aware of looking in /mnt for mounted device(s) and manualy unmount them by right-click on their icon. Upon the last occurence of that «trouble», I indeed got a look in my /mnt folder ... but did not found any usb-mounted device left.

Another «workaround» might be (please do correct if wrond):
Wait at least 6 seconds time spacings between unplugging and plugging operations of usb devices. Here i can hear the sound of my hard-disk when the (un)plugging is somehow «registered».
(i'm using «» quotes to tell the used words may be somewhat subjective).

cheers, charlie
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5087
Location: Arizona, U.S.A.

PostPosted: Mon 28 Oct 2013, 15:07    Post subject:  

Here`s a simple solution I made.
When the script is run, it looks for the file "DriveLink" in the "/" of all mounted partitions.
If there is a DriveLink file, it contains the name of the link you want for your USB access.
This is nice because you can control where the link is made and the name of the link.
And of course it makes the same link no matter where the USB drive is mounted.

# Example for my red 8GB USB drive:

The contents of the DriveLink file: /mnt/USB-Red-8GB

This will create the link: /mnt/USB-Red-8GB => ( My red 8GB USB drive with DriveLink file in it`s / )

# This seems to work very well, and is very simple too. Hope it helps.

There is some text help at the start of the file.
I also added it to my script that mounts all partitions found.
.
drvlink.gz
Description  Ungzip file and copy to: /root/Startup
gz

 Download 
Filename  drvlink.gz 
Filesize  692 Bytes 
Downloaded  185 Time(s) 
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5667
Location: Republic of Novo Zelande

PostPosted: Mon 28 Oct 2013, 21:46    Post subject:  

sunburnt wrote:
# Example for my red 8GB USB drive:

The contents of the DriveLink file: /mnt/USB-Red-8GB

This will create the link: /mnt/USB-Red-8GB => ( My red 8GB USB drive with DriveLink file in it`s / )
.

So are you saying that regardless of what sdx number puppy assigns to the drive, it will always be mounted to the same place? (eg sdc2 or sdc3 or sdd3 always becomes /mnt/musicarchive if that is it's drivelink)

But wouldn't that mean I would have to force puppy to mount ALL drives first, so that the drivelink could be read? Is there a way to get puppy to read the drivelink without first mounting the partition?
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5087
Location: Arizona, U.S.A.

PostPosted: Tue 29 Oct 2013, 01:14    Post subject:  

greengeek; It makes links, it does not mount partitions.
So the mount point is irrelevant if you use a link pointing to it that is always the same /path/link

I assumed that crocombe already had the USB drive mounting at boot.
But he has no reliable fixed /path to access it with. A link is an easy fix.

I made a comment that I added the code to another script I made that mounts all partitions.

And yes, like Puppy does searching for it`s files, you could: mount, check, and unmount.
Puppy already has a boot mount manager, so I figure it`s good for most purposes.

Another script of mine usb-auto auto mounts/unmounts USB drives, it could use this too.
Unfortunately it clashes head to head with hotpup, both doing the same task causes problems.

Is there something you have in mind greengeek.? I could make it search all the drives...

Other possiblities are: Use the "Drive Label" as a link name, then no file is needed.
Apparently the Disk Label can be accessed without the partitions being mounted.


### Update: Yes indeed the Volume Label can be read when the partition is not mounted.

I learned a long time ago to avoid using Volume Labels, can`t change the disk parameters.
But this may only be in DOS ( it`s been that long...), so maybe it`s not such a bad idea.

### If there`s interest, I`ll rewrite drvlink to use Volume Labels instead of a file. Auto mount.?
.
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5667
Location: Republic of Novo Zelande

PostPosted: Tue 29 Oct 2013, 03:33    Post subject:  

When you say volume label - is that the same thing as UUID?
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5087
Location: Arizona, U.S.A.

PostPosted: Tue 29 Oct 2013, 05:35    Post subject:  

No... Google it. It`s a little used aspect of HDs.
Each partition can be given a name.

# Commands:
tune2fs = set / del. labels for: ext-2-3-4
dosfslabel = set / del. labels for: fat16-32 & vfat
ntfslabel = set / del. labels for: ntfs
.
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11299

PostPosted: Tue 29 Oct 2013, 07:35    Post subject:  

Udev is a bit of a cryptic beastie but on slax it makes device node symlinks in 4 folders ... by-id, by-label, by-path and by-uuid which all are links made to the sda(x)(n) actual devices.... sort of covers every possibility.
There may be a point to this post..if so send me a postcard

mike
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5667
Location: Republic of Novo Zelande

PostPosted: Tue 29 Oct 2013, 13:17    Post subject:  

mikeb wrote:
Udev is a bit of a cryptic beastie but on slax it makes device node symlinks in 4 folders ... by-id, by-label, by-path and by-uuid which all are links made to the sda(x)(n) actual devices.... sort of covers every possibility.
I think I may be wanting to do the exact opposite of this - instead of symlinks pointing to sdx, I want a particular sdx to be "reserved" so it can only be applied to a specific UUID. ie: I want sdx to be a symlink to the /mnt/UUIDxxxxx or to something like the drivelink sunburnt memtioned.

So that if my usb stick was physically absent (not plugged in) then NO OTHER DEVICE would be allowed to be called say, sdc2 because that is reserved for the specifc UUID that is not present.

I suspect that is too deeply ingrained in puppy for me to change it. (or maybe I'm just not understanding this fully...)
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [27 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0640s ][ Queries: 12 (0.0145s) ][ GZIP on ]