Rename mount point directory?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
markfilipak
Level 5
Level 5
Posts: 888
Joined: Sun Mar 10, 2013 8:08 pm
Location: Ohio (formerly California), USA

Rename mount point directory?

Post by markfilipak » Mon Jun 03, 2019 6:16 pm

Hello, All.
I managed to create a VHD and attach it to Mint (running as a guest OS) into which I've un-tarred the Palemoon browser. The mount point is
/media/mark/88c55591-ccd9-422c-8d91-0d23bc2bc353
Can I change the mount point to something that's not so tedious, such as
/media/mark/palemoon

'88c55591-ccd9-422c-8d91-0d23bc2bc353' is a UUID and those sometimes are magic, so I endeavor to be cautious. This forum is the place for cautious people like me who don't want to dive until they know how deep the water is.

With Regards, and Thanks, Mark.

User avatar
WharfRat
Level 21
Level 21
Posts: 13142
Joined: Thu Apr 07, 2011 8:15 pm

Re: Rename mount point directory?

Post by WharfRat » Mon Jun 03, 2019 6:58 pm

udev/udisks creates that mountpoint in /media/yourname and uses the UUID if there is no label.

Any folder can be a mountpoint. It's best though not to create one in /media/yourname.

So create one in /media, e.g., /media/files or whatever you want to call it and mount the filesystem there :wink:
ImageImage

markfilipak
Level 5
Level 5
Posts: 888
Joined: Sun Mar 10, 2013 8:08 pm
Location: Ohio (formerly California), USA

Re: Rename mount point directory?

Post by markfilipak » Mon Jun 03, 2019 8:09 pm

@WharfRat

Thanks for replying.

I'm sorry if I didn't make the situation clear -- I don't know what I don't know. VBox created the mount point. The mount point already exists. It's a virtual hard disk (VHD) mounted inside a virtual machine (VM). Mounting occurs when the VM is instantiated.

I have posted a similar question to the VirtualBox forum, but have had no reply. I suppose that the VM Manager is naming and creating the mount point. I also suppose that Linux doesn't care, but I'm trying to be cautious...

...and I hope that someone here who also has such a VHD mounted and has some experience with it may provide some guidance.

User avatar
WharfRat
Level 21
Level 21
Posts: 13142
Joined: Thu Apr 07, 2011 8:15 pm

Re: Rename mount point directory?

Post by WharfRat » Mon Jun 03, 2019 8:20 pm

Hmm, yea I guess I didn't understand :oops:

Was the VHD created on the host and if so what host :?:

Can you provide a screenshot how you attached it to Mint :?:

Just trying to wrap my head around this :?
ImageImage

markfilipak
Level 5
Level 5
Posts: 888
Joined: Sun Mar 10, 2013 8:08 pm
Location: Ohio (formerly California), USA

Re: Rename mount point directory?

Post by markfilipak » Mon Jun 03, 2019 8:42 pm

WharfRat wrote:
Mon Jun 03, 2019 8:20 pm
Hmm, yea I guess I didn't understand :oops:
It's architecturally simple, but is way beyond most user's experience. I sometimes forget that. My BAD. :-)
Was the VHD created on the host and if so what host :?:
Host is Windows10. I don't permit Windows to have access to the Internet. I solely allow Internet access via a Mint VM. I created the VHD using VBox, not Windows. The purpose of the new VHD is for a portable version of my browser, Palemoon. That way I can use the same copy of Palemoon in several VMs without having to sync. Also, I can back up the entire browser by simply making a clone of the VHD -- no browser add-in needed. The author of Palemoon provides a portable version of the Windows version of Palemoon, but has provided no support in my effort because, 1, he thinks it's not possible to make a Linux app portable, and 2, he thinks doing so is not "proper'.
Can you provide a screenshot how you attached it to Mint :?:
I can't. VBox mounts the VHD automatically when the Linux VM is instantiated.
Just trying to wrap my head around this :?
The VHD is simply realized and provisioned as a virtual USB HDD. There's nothing really mysterious about it.

PS: Maybe I can give you a screen shot of the VBox configuration. I'll have to shut down this VM to do so. I'll come back in a few minutes. Please stand by.

PSS: I'm back. I made the screen shot, and there is an insert image function in this forum, but it requires a URL. So, I can't paste the screen shot here. Sorry.

markfilipak
Level 5
Level 5
Posts: 888
Joined: Sun Mar 10, 2013 8:08 pm
Location: Ohio (formerly California), USA

Re: Rename mount point directory?

Post by markfilipak » Mon Jun 03, 2019 9:10 pm

The bottom line is this: Running Palemoon as a Linux portable app is certainly possible -- I'm here, now, in Palemoon running out of the VHD.

It's not really critcal, but I'd like to rename the mount point so that it's purpose is obvious and so that I don't have deal with such a strange, long directory path if/when I need to do things in Terminal.

User avatar
WharfRat
Level 21
Level 21
Posts: 13142
Joined: Thu Apr 07, 2011 8:15 pm

Re: Rename mount point directory?

Post by WharfRat » Mon Jun 03, 2019 9:14 pm

OK, so it's a VBOX HDD which is just a file and is it setup similar to this :?:
Screenshot at 2019-06-03 21-09-51.png
I'm assuming the win version is similar to Mint's Oracle VB
ImageImage

markfilipak
Level 5
Level 5
Posts: 888
Joined: Sun Mar 10, 2013 8:08 pm
Location: Ohio (formerly California), USA

Re: Rename mount point directory?

Post by markfilipak » Mon Jun 03, 2019 9:34 pm

How did you jamb that screen shot into this forum?
VM.png
Aha! I didn't know how to do that.

Note that the VHD is attached to the USB controller.

User avatar
WharfRat
Level 21
Level 21
Posts: 13142
Joined: Thu Apr 07, 2011 8:15 pm

Re: Rename mount point directory?

Post by WharfRat » Mon Jun 03, 2019 10:10 pm

I'm not a VBOX aficionado - I just use it for previewing Linux distros and the next releases.

I've never bothered with a USB controller, but I'm assuming it operates the same as the IDE controller.

From inside the VM I have the Mint media attached as depicted in my prior post.

mount showed

Code: Select all

/dev/sr0     on  /media/bill/Linux                Mint  19.1             MATE                                                                              64-bit  type  iso9660  (ro,nosuid,nodev,relatime,nojoliet,check=s,map=n,blocksize=2048,uid=1000,gid=1000,dmode=500,fmode=400,uhelper=udisks2)
so this is what I did

Code: Select all

[bill@home] ~ $ sudo umount /dev/sr0
[bill@home] ~ $ mkdir /media/test
mkdir: cannot create directory ‘/media/test’: Permission denied
[bill@home] ~ $ sudo mkdir /media/test
[bill@home] ~ $ sudo mount /dev/sr0 /media/test/
mount: /media/test: WARNING: device write-protected, mounted read-only.
[bill@home] ~ $ l /media/test/
total 68K
dr-xr-xr-x 1 root root 2.0K 2018-12-17 09:53:57 boot/
dr-xr-xr-x 1 root root 2.0K 2018-12-17 09:54:59 casper/
dr-xr-xr-x 1 root root 2.0K 2018-12-17 09:53:28 dists/
dr-xr-xr-x 1 root root 2.0K 2018-12-17 09:53:57 EFI/
dr-xr-xr-x 1 root root  24K 2018-12-17 09:54:59 isolinux/
dr-xr-xr-x 1 root root 2.0K 2018-12-17 09:53:27 pool/
dr-xr-xr-x 1 root root 2.0K 2018-12-17 09:53:57 preseed/
-r--r--r-- 1 root root  32K 2018-12-17 09:55:11 MD5SUMS
-r--r--r-- 1 root root  222 2018-12-17 09:54:59 README.diskdefines
[bill@home] ~ $ 
Basically I unmounted the device, created a new mountpoint and mounted it there.

You should be able to do the same.

Another thing you might try is to assign it a label - as my original was /media/bill/Linux Mint 19.1 MATE (spaces are in the file name so it's a little messed up)

Good luck :wink:
ImageImage

markfilipak
Level 5
Level 5
Posts: 888
Joined: Sun Mar 10, 2013 8:08 pm
Location: Ohio (formerly California), USA

Re: Rename mount point directory?

Post by markfilipak » Mon Jun 03, 2019 11:33 pm

WharfRat wrote:
Mon Jun 03, 2019 10:10 pm
I've never bothered with a USB controller, but I'm assuming it operates the same as the IDE controller.
Superficially, it does, but I've been advised not to use IDE for HDDs, that it should be used for CD/DVDs only.
From inside the VM I have the Mint media attached as depicted in my prior post.
But it's not a VHD (or a VDI). '/dev/sr0' is a CD ISO, or am I looking at the wrong thing?
Basically I unmounted the device, created a new mountpoint and mounted it there.
In a live system, sure. But I'm trying to change where VBox mounts it.
You should be able to do the same.
Somehow, I don't think so.
Another thing you might try is to assign it a label...
I assigned it a label ('Palemoon') when I created it early yesterday. The label is ignored. The VHD gets mounted at
'/media/mark/88c55591-ccd9-422c-8d91-0d23bc2bc353'
anyway.

User avatar
WharfRat
Level 21
Level 21
Posts: 13142
Joined: Thu Apr 07, 2011 8:15 pm

Re: Rename mount point directory?

Post by WharfRat » Tue Jun 04, 2019 12:13 am

I attached an old .vdi virtual disk to the usb controller and it showed as follows.

Code: Select all

/dev/sdc1    on  /media/bill/819d25a6-c38d-4666-9d7a-2893f22bb48e  type  ext4             (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)
[bill@home] ~ $ l /media/bill/819d25a6-c38d-4666-9d7a-2893f22bb48e
total 104K
drwxr-xr-x   2 root root 4.0K 2010-08-11 16:05:03 bin/
drwxr-xr-x   3 root root 4.0K 2010-09-04 13:49:22 boot/
drwxr-xr-x   2 root root 4.0K 2010-09-04 13:29:38 dev/
drwxr-xr-x 126 root root  12K 2013-08-13 10:54:02 etc/
drwxr-xr-x   3 root root 4.0K 2010-09-04 13:29:42 home/
drwxr-xr-x  20 root root  12K 2010-08-11 16:10:16 lib/
drwx------   2 root root  16K 2010-01-06 03:39:25 lost+found/
drwxr-xr-x   3 root root 4.0K 2010-08-26 15:51:31 media/
drwxr-xr-x   6 root root 4.0K 2010-09-04 14:04:03 mnt/
drwxr-xr-x   3 root root 4.0K 2010-09-04 13:42:32 opt/
drwxr-xr-x   2 root root 4.0K 2010-08-26 15:51:31 proc/
drwx------  18 root root 4.0K 2010-09-04 13:35:41 root/
drwxr-xr-x   2 root root 4.0K 2010-09-04 13:43:17 sbin/
drwxr-xr-x   2 root root 4.0K 2009-10-19 19:05:22 selinux/
drwxr-xr-x   2 root root 4.0K 2009-10-28 16:06:16 srv/
drwxr-xr-x   2 root root 4.0K 2010-08-26 15:51:31 sys/
drwxrwxrwt   5 root root 4.0K 2013-08-13 10:53:58 tmp/
drwxr-xr-x  10 root root 4.0K 2009-10-28 16:06:16 usr/
drwxr-xr-x  15 root root 4.0K 2009-10-28 16:12:34 var/
lrwxrwxrwx   1 root root   11 2010-09-04 13:28:04 cdrom -> media/cdrom/
lrwxrwxrwx   1 root root   33 2010-09-04 13:35:41 initrd.img -> boot/initrd.img-2.6.31-22-generic
lrwxrwxrwx   1 root root   30 2010-09-04 13:35:41 vmlinuz -> boot/vmlinuz-2.6.31-22-generic
[bill@home] ~ $ sudo umount /dev/sdc1
[bill@home] ~ $ sudo mkdir /media/test
mkdir: cannot create directory ‘/media/test’: File exists
[bill@home] ~ $ sudo mount /dev/sdc1 /media/test/
[bill@home] ~ $ ls -lh /media/test
total 104K
drwxr-xr-x   2 root root 4.0K 2010-08-11 16:05:03 bin/
drwxr-xr-x   3 root root 4.0K 2010-09-04 13:49:22 boot/
drwxr-xr-x   2 root root 4.0K 2010-09-04 13:29:38 dev/
drwxr-xr-x 126 root root  12K 2013-08-13 10:54:02 etc/
drwxr-xr-x   3 root root 4.0K 2010-09-04 13:29:42 home/
drwxr-xr-x  20 root root  12K 2010-08-11 16:10:16 lib/
drwx------   2 root root  16K 2010-01-06 03:39:25 lost+found/
drwxr-xr-x   3 root root 4.0K 2010-08-26 15:51:31 media/
drwxr-xr-x   6 root root 4.0K 2010-09-04 14:04:03 mnt/
drwxr-xr-x   3 root root 4.0K 2010-09-04 13:42:32 opt/
drwxr-xr-x   2 root root 4.0K 2010-08-26 15:51:31 proc/
drwx------  18 root root 4.0K 2010-09-04 13:35:41 root/
drwxr-xr-x   2 root root 4.0K 2010-09-04 13:43:17 sbin/
drwxr-xr-x   2 root root 4.0K 2009-10-19 19:05:22 selinux/
drwxr-xr-x   2 root root 4.0K 2009-10-28 16:06:16 srv/
drwxr-xr-x   2 root root 4.0K 2010-08-26 15:51:31 sys/
drwxrwxrwt   5 root root 4.0K 2013-08-13 10:53:58 tmp/
drwxr-xr-x  10 root root 4.0K 2009-10-28 16:06:16 usr/
drwxr-xr-x  15 root root 4.0K 2009-10-28 16:12:34 var/
lrwxrwxrwx   1 root root   11 2010-09-04 13:28:04 cdrom -> media/cdrom/
lrwxrwxrwx   1 root root   33 2010-09-04 13:35:41 initrd.img -> boot/initrd.img-2.6.31-22-generic
lrwxrwxrwx   1 root root   30 2010-09-04 13:35:41 vmlinuz -> boot/vmlinuz-2.6.31-22-generic
[bill@home] ~ $ mount|grep sdc1
/dev/sdc1 on /media/test type ext4 (rw,relatime,data=ordered)
[bill@home] ~ $ 
So you can unmount and remount a virtual disk attached via the usb controller to another location, but you cannot control - as far as I can see - where vbox will initially mount it to.

Probably not what you're looking for though :(

This how the VHD was attached
Attachments
Screenshot at 2019-06-04 00-13-49.png
ImageImage

all41
Level 15
Level 15
Posts: 5668
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Rename mount point directory?

Post by all41 » Tue Jun 04, 2019 12:29 am

markfilipak wrote:
Mon Jun 03, 2019 8:42 pm
WharfRat wrote:
Mon Jun 03, 2019 8:20 pm
Hmm, yea I guess I didn't understand :oops:
It's architecturally simple, but is way beyond most user's experience. I sometimes forget that. My BAD. :-)
Was the VHD created on the host and if so what host :?:
Host is Windows10. I don't permit Windows to have access to the Internet.
This is the smartest thing I've read tonight. kudos

Post Reply

Return to “Newbie Questions”