YOSTIE
Posts: 2
Joined: Tue Jan 28, 2014 10:25 pm

Change name of USB automount

Tue Jan 28, 2014 10:36 pm

Hi guys,

Just looking for a little help if possible. When I plug my external HD into the Pi running the latest version of Raspbian, the OS automounts the hard drive to /media/Seagate Expansion Drive. I am trying to change the name of the automount from "Seagate Expansion Drive" to something shorter like "ExternalHD", but have been unable to work out how to do it. Any help would be greatly appreciated.

User avatar
DougieLawson
Posts: 41431
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Change name of USB automount

Wed Jan 29, 2014 12:23 am

What's the volume label?
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

YOSTIE
Posts: 2
Joined: Tue Jan 28, 2014 10:25 pm

Re: Change name of USB automount

Wed Jan 29, 2014 12:32 am

DougieLawson wrote:What's the volume label?
I'm not at home at the moment, but I believe it was /dev/sda1

User avatar
DougieLawson
Posts: 41431
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Change name of USB automount

Wed Jan 29, 2014 12:34 am

YOSTIE wrote:
DougieLawson wrote:What's the volume label?
I'm not at home at the moment, but I believe it was /dev/sda1
No. That's the device name.

Look at the device with
sudo fdisk -l /dev/sda1
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Gogitow
Posts: 1
Joined: Sat Sep 17, 2016 5:30 pm

Re: Change name of USB automount

Sat Sep 17, 2016 5:33 pm

I have the same issue. Nobody seems to have the information. They want to tell you how to mount usb drives but will not tell you how to change the drive label on an drive that already mounts. I'm starting to think that nobody knows because otherwise why not just post the information?

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 6313
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Change name of USB automount

Sat Sep 17, 2016 7:54 pm

Gogitow wrote:I have the same issue. Nobody seems to have the information. They want to tell you how to mount usb drives but will not tell you how to change the drive label on an drive that already mounts. I'm starting to think that nobody knows because otherwise why not just post the information?
In part it depends upon what you mean by "automount" ie. automount at boot time or, if you're booting into the graphical desktop automount with/when you have opened the GUI file manager. The first is, perhaps, best dealt with by an entry in fstab**, the second, as indicated by @DougieLawson, by giving the drive a label either when it's initially formatted or, IIRC, changing/adding one using something like gparted.
Trev.
** Something like the, perhaps, "old fashioned approach" here:
https://www.cpmspectrepi.uk/raspberry_p ... ticks.html
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B, B+, and a A+) but Buster on the P3B+, P4B's & P400. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

User avatar
Paeryn
Posts: 3305
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Change name of USB automount

Sat Sep 17, 2016 8:00 pm

Gogitow wrote:I have the same issue. Nobody seems to have the information. They want to tell you how to mount usb drives but will not tell you how to change the drive label on an drive that already mounts. I'm starting to think that nobody knows because otherwise why not just post the information?
People do know, I've given the info out on here before (only a month or two ago). The desktop automounter uses the partition label if it has one.

If the filesystem is ext2/3/4

Code: Select all

sudo e2label /dev/sda1 MyNewLabel
If it's fat

Code: Select all

sudo dosfslabel /dev/sda1 MyNewLabel
Replace /dev/sda1 with the actual device name of the partition.
If dosfslabel isn't installed it can be installed with

Code: Select all

sudo apt-get install dosfstools 
She who travels light — forgot something.
Please note that my name doesn't start with the @ character so can people please stop writing it as if it does!

Return to “Raspberry Pi OS”