Change autoboot an NTFS partition to /Home? [Solved]

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
ronkz

Change autoboot an NTFS partition to /Home? [Solved]

Post by ronkz »

Somehow when (re-)installing Cinnamon 17.1 I created an autoboot for my ntfs partition named RonDocs. That was a happy moment until I say that it became linked as /mnt/RonDocs and it's permissions were designated for Root.
This RonDocs partition has been used for my entire store of work-data forever - thus I can keep it backed up and copy it to another computer whenever that need arises.

Thus I need
1. /RonDocs to be mounted as simply /RonDocs (not /mnt/....), and permissions to not Root but username Ron.

2. Next I would like /RonDocs to replace Mint's /Home. I assume that's possible.

I cannot even locate the command which created that /mnt/RonDocs so I'm lost at the start-line! Despite several years of using Linux Distros, I don't have a clue how to accomplish the above. In this area I'm a true "newbie", so please provide the code-lines.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11450
Joined: Tue Feb 03, 2009 10:27 am

Re: Change autoboot an NTFS partition to /Home?

Post by altair4 »

I can help you with item 1 but item 2 is not advisable.

Please post the output of the following commands:

Code: Select all

sudo blkid -c /dev/null

Code: Select all

cat /etc/fstab
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Change autoboot an NTFS partition to /Home?

Post by Flemur »

Thus I need
1. /RonDocs to be mounted as simply /RonDocs (not /mnt/....), and permissions to not Root but username Ron.

Code: Select all

sudo mkdir /RonDocs
sudo chown Ron:Ron /RonDocs
chmod +w /RonDocs
Run
sudo gparted
and give the partition the label "RONDOCS". (or 'RonDdocs'?)
(Or use UUIDs in fstab instead of LABELs - an NTFS partition will have a funny UUID)

Line in /etc/fstab:

Code: Select all

LABEL=RONDOCS    /RonDocs   ntfs-3g user,windows_names  0 0
You might already have something in /etc/fstab that's mounting it on /mnt/RonDocs - look first and change that line. You'll need to make the /RonDocs directory anyway.

2. Next I would like /RonDocs to replace Mint's /Home. I assume that's possible.

Maybe possible, but bad idea.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
altair4
Level 20
Level 20
Posts: 11450
Joined: Tue Feb 03, 2009 10:27 am

Re: Change autoboot an NTFS partition to /Home?

Post by altair4 »

Flemur wrote:Thus I need
1. /RonDocs to be mounted as simply /RonDocs (not /mnt/....), and permissions to not Root but username Ron.

Code: Select all

sudo mkdir /RonDocs
sudo chown Ron:Ron /RonDocs
chmod +w /RonDocs
Run
sudo gparted
and give the partition the label "RONDOCS". (or 'RonDdocs'?)
(Or use UUIDs in fstab instead of LABELs - an NTFS partition will have a funny UUID)

Line in /etc/fstab:

Code: Select all

LABEL=RONDOCS    /RonDocs   ntfs-3g user,windows_names  0 0
You might already have something in /etc/fstab that's mounting it on /mnt/RonDocs - look first and change that line. You'll need to make the /RonDocs directory anyway.

2. Next I would like /RonDocs to replace Mint's /Home. I assume that's possible.

Maybe possible, but bad idea.
That will not work for a variety of reasons:

(1) Changing ownership and permissions of a mount point before the partition is mounted has no impact on the ownership and permissions after the mount. THat is true for all filesystems.

(2) Although your line in fstab will result in everyone having access it will still be owned by root.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
ronkz

Re: Change autoboot an NTFS partition to /Home?

Post by ronkz »

altair4 wrote:I can help you with item 1 but item 2 is not advisable.

Please post the output of the following commands:

Code: Select all

sudo blkid -c /dev/null

Code: Select all

cat /etc/fstab
ron@ESC-GF8200A ~ $ sudo blkid -c /dev/null
[sudo] password for ron:
/dev/sda1: LABEL="Windows" UUID="042B1F997CF45C1E" TYPE="ntfs"
/dev/sda2: LABEL="RonDocs" UUID="BC58B78158B738CA" TYPE="ntfs"
/dev/sda3: UUID="d043b226-93e2-456f-92fd-b70da44f8e6d" TYPE="ext4"
/dev/sda5: LABEL="WinBak" UUID="13D6B23E42031B37" TYPE="ntfs"
/dev/sda6: UUID="0b3cad71-ec82-4089-ac46-68353cf22fed" TYPE="ext4"
/dev/sda7: UUID="2985a548-6c92-49de-8fc9-5cf1e35dafcd" TYPE="ext4"
/dev/sr0: LABEL="MFL_PRO" TYPE="iso9660"
ron@ESC-GF8200A ~ $ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda8 during installation
UUID=0b3cad71-ec82-4089-ac46-68353cf22fed / ext4 errors=remount-ro 0 1
# /home was on /dev/sda6 during installation
UUID=2985a548-6c92-49de-8fc9-5cf1e35dafcd /home ext4 defaults 0 2
# swap was on /dev/sda5 during installation
UUID=e1a8b18d-0e1e-48bc-8d22-89c467895497 none swap sw 0 0
LABEL=RonDocs /mnt/RonDocs auto nosuid,nodev,nofail,x-gvfs-show 0 0
ron@ESC-GF8200A ~ $
altair4
Level 20
Level 20
Posts: 11450
Joined: Tue Feb 03, 2009 10:27 am

Re: Change autoboot an NTFS partition to /Home?

Post by altair4 »

I would edit /etc/fstab and change this:
LABEL=RonDocs /mnt/RonDocs auto nosuid,nodev,nofail,x-gvfs-show 0 0
To this:

Code: Select all

LABEL=RonDocs /RonDocs ntfs defaults,nls=utf8,umask=000,uid=1000,windows_names 0 0
umask=000 will make the partition accessible to everyone. We can alter this if you wish.
uid=1000 will make you the owner of the partition. Just make sure you are uid 1000. To find out run this command:

Code: Select all

id
Now Create the /RonDocs mount point:

Code: Select all

sudo mkdir /RonDocs
Unmount the currently mounted partition:

Code: Select all

sudo umount /mnt/RonDocs
Then run this command which does a syntax check of what you just changed and mounts the partition with the new instructions:

Code: Select all

sudo mount -a
If it just comes back to the prompt it ran successfully and you should verify that it's doing what you want.

If it comes back with an error message post it back here.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
ronkz

Re: Change autoboot an NTFS partition to /Home?

Post by ronkz »

Flemur wrote:Thus I need
1. /RonDocs to be mounted as simply /RonDocs (not /mnt/....), and permissions to not Root but username Ron.

Code: Select all

sudo mkdir /RonDocs
sudo chown Ron:Ron /RonDocs
chmod +w /RonDocs
Run
sudo gparted
and give the partition the label "RONDOCS". (or 'RonDdocs'?)
(Or use UUIDs in fstab instead of LABELs - an NTFS partition will have a funny UUID)

Line in /etc/fstab:

Code: Select all

LABEL=RONDOCS    /RonDocs   ntfs-3g user,windows_names  0 0
You might already have something in /etc/fstab that's mounting it on /mnt/RonDocs - look first and change that line. You'll need to make the /RonDocs directory anyway.

2. Next I would like /RonDocs to replace Mint's /Home. I assume that's possible.

Maybe possible, but bad idea.
Your first code-set returned with this apparent error:
"sudo mkdir /RonDocs
ron@ESC-GF8200A ~ $ sudo chown Ron:Ron /RonDocs
chown: invalid user: ‘Ron:Ron’
ron@ESC-GF8200A ~ $ chmod +w /RonDocs"

As stated in my question, RonDocs is alreaady an NTFS partition, and is not merely a directory. It has been named RonDocs for a very long time.
ronkz

Re: Change autoboot an NTFS partition to /Home?

Post by ronkz »

just FWIW, searching for fstab brought up quite a file-list:

/etc/fstab.d
/usr/share/initramfs-tools/scripts/casper-bottom/12fstab
/usr/share/gnome-disk-utility/edit-fstab-dialog.ui
/var/log/boot-sav/log/2015-02-02__11h23boot-repair15/sda6/etc_fstab_new
/var/log/boot-sav/log/2015-02-02__11h23boot-repair15/sda6/etc_fstab_old
/etc/fstab
/lib/init/fstab
/usr/share/doc/mount/examples/fstab
/usr/share/man/man5/fstab.5.gz
/usr/share/doc/util-linux/examples/fstab.example2
/sbin/fstab-decode
/usr/share/man/man8/fstab-decode.8.gz
/mnt/RonDocs/OddStuff/LQ.org mount_fstab.url
/usr/lib/udisks/udisks-helper-fstab-mounter

I'll note that the next-last entry "/mnt/RonDocs/OddStuff/LQ.org mount_fstab.url" is something unknown and I think I never would have saved such at that given link. The only /mnt/ entry is folder [img]/mnt/RonDocs[/img] (I have no idea what we might see, first time using "Img"
altair4
Level 20
Level 20
Posts: 11450
Joined: Tue Feb 03, 2009 10:27 am

Re: Change autoboot an NTFS partition to /Home?

Post by altair4 »

To edit fstab:

Code: Select all

gksu gedit /etc/fstab
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
ronkz

Re: Change autoboot an NTFS partition to /Home?

Post by ronkz »

altair4 wrote:To edit fstab:

Code: Select all

gksu gedit /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda8 during installation
UUID=0b3cad71-ec82-4089-ac46-68353cf22fed / ext4 errors=remount-ro 0 1
# /home was on /dev/sda6 during installation
UUID=2985a548-6c92-49de-8fc9-5cf1e35dafcd /home ext4 defaults 0 2
# swap was on /dev/sda5 during installation
UUID=e1a8b18d-0e1e-48bc-8d22-89c467895497 none swap sw 0 0
LABEL=RonDocs /mnt/RonDocs auto nosuid,nodev,nofail,x-gvfs-show 0 0
altair4
Level 20
Level 20
Posts: 11450
Joined: Tue Feb 03, 2009 10:27 am

Re: Change autoboot an NTFS partition to /Home?

Post by altair4 »

What seems to be the problem? Do you not understand my post? Why haven't you changed fstab yet?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
ronkz

Re: Change autoboot an NTFS partition to /Home?

Post by ronkz »

altair4 wrote:What seems to be the problem? Do you not understand my post? Why haven't you changed fstab yet?
Well, sorry,. but all that being so totally inept with linux terminal commands, I really didn't know just what or how to change anything, and guess that you were seeking the return from that command. It did opeas I have no idea what the result might be. I do see the /mnt/ in that line and for what little I know, it might remove the reference to the directory of /mnt// which I figure must be the result of my autoboot.
I do really like /RonDocs being mounted at boot as it needs to be mounted in order that it's ready to receive data I'm always adding (e.g. my email via Thunderbird, for which RonDocs must be mounted. But the no-permissions of /mnt/ gets very much in the way of using my data - that part must go.

So, what to do is a mystery for me!
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Change autoboot an NTFS partition to /Home?

Post by Flemur »

alair4: (1) Changing ownership and permissions of a mount point before the partition is mounted has no impact on the ownership and permissions after the mount. THat is true for all filesystems.

I based that statement on this:
"Solution: Use at least NTFS-3G 1.2506 with setuid-root set and make sure the user has access rights to the volume and mount point."
http://www.tuxera.com/community/ntfs-3g-faq/#useroption

The "solution" is about allowing users to mount an NTFS partition after boot.
But that's not needed here, so you're correct.

alair4: (2) Although your line in fstab will result in everyone having access it will still be owned by root.

For me, doing it as described(*), everyone has permission - but I own everything.

*Except: I'm not mounting the NTFS partition at boot time ('noauto') and have followed the tuxera instructions (link above) to let users (un)mount it at will.

ronkz: ron@ESC-GF8200A ~ $ sudo chown Ron:Ron /RonDocs
chown: invalid user: ‘Ron:Ron’


You said your username was "Ron", but apparently it's "ron":
ronkz: 1. /RonDocs to be mounted as simply /RonDocs (not /mnt/....), and permissions to not Root but username Ron.


Edit: ronkz: As stated in my question, RonDocs is alreaady an NTFS partition, and is not merely a directory. It has been named RonDocs for a very long time.

So the NTFS partitions is LABELED "RonDocs"; it also needs a mount point if you're not going to use the default /mnt/RonDocs; the new mount point is /RonDocs, which is created as a directory with "mkdir".
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
altair4
Level 20
Level 20
Posts: 11450
Joined: Tue Feb 03, 2009 10:27 am

Re: Change autoboot an NTFS partition to /Home?

Post by altair4 »

Let's try a different way of explaining this:

[1] Edit fstab by opening a terminal and running this command:

Code: Select all

gksu gedit /etc/fstab
When it opens you should see this in gedit:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda8 during installation
UUID=0b3cad71-ec82-4089-ac46-68353cf22fed / ext4 errors=remount-ro 0 1
# /home was on /dev/sda6 during installation
UUID=2985a548-6c92-49de-8fc9-5cf1e35dafcd /home ext4 defaults 0 2
# swap was on /dev/sda5 during installation
UUID=e1a8b18d-0e1e-48bc-8d22-89c467895497 none swap sw 0 0
LABEL=RonDocs /mnt/RonDocs auto nosuid,nodev,nofail,x-gvfs-show 0 0

Make it look like this:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda8 during installation
UUID=0b3cad71-ec82-4089-ac46-68353cf22fed / ext4 errors=remount-ro 0 1
# /home was on /dev/sda6 during installation
UUID=2985a548-6c92-49de-8fc9-5cf1e35dafcd /home ext4 defaults 0 2
# swap was on /dev/sda5 during installation
UUID=e1a8b18d-0e1e-48bc-8d22-89c467895497 none swap sw 0 0
####LABEL=RonDocs /mnt/RonDocs auto nosuid,nodev,nofail,x-gvfs-show 0 0
LABEL=RonDocs /RonDocs ntfs defaults,nls=utf8,umask=000,uid=1000,windows_names 0 0

Note I highlighted the changes to be made in blue

[2] Save the file and exit gedit.

[3] Back in the terminal run this command to create the mount point:

Code: Select all

sudo mkdir /RonDocs
Note: you may have already done this but do it again anyway.

[4] We need to unmount the already mounted partition or else it will get in the way. To do that run this command in the terminal:

Code: Select all

sudo umount /mnt/RonDocs
[5] Then run this command to mount the partition back but this time to /RonDocs:

Code: Select all

sudo mount -a
I am shutting down for the day but I will check back again tomorrow morning.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
ronkz

Re: Change autoboot an NTFS partition to /Home?

Post by ronkz »

Thank you. I finally took the time to follow your instructions, and then to check it I rebooted. A bit of panic-time, tho' as /RonDocs did not show in My Computer nor on my Desktop nor under Devices! So then at Menu / Preferences / Disks, /RonDocs was still there, (whew!) and shown as Mounted despite that I'd been unable to find it and therefore mount it, while normally mounted partitions show on my Desktop.

So also, now /Home opens as /home/ron (had not noticed that before, but maybe it's always such), and lists the usual subfolders Desktop, Documents, Downloads, Music, Public, Templates, and Videos. Desktop is the only one I might use, and as I don't use the others (except that Pictures holds 3 of my screenshots).

So if it's not a good idea to show /RonDocs as /Home, could it be mounted next under /Home and shown along with the Desktop Folder?
altair4
Level 20
Level 20
Posts: 11450
Joined: Tue Feb 03, 2009 10:27 am

Re: Change autoboot an NTFS partition to /Home?

Post by altair4 »

I'd been unable to find it and therefore mount it, while normally mounted partitions show on my Desktop.
Mounted partition only show up if the mount point is under /media or in your own home directory. You stated you wanted it in /RonDocs so the mounted partition will not show on your desktop.

You have a choice:

[1] The easy way: Create a shortcut to your /RonDocs folder on your desktop:

Right click your desktop. Select "Create a new launcher here". Then point it to the /RonDocs:
RonDocs.png

[2] The hard way
: Change your mount point to /home/ron/RonDocs

*** Make a new mount point:

Code: Select all

mkdir /home/ron/RonDocs
***Change the line in fstab so that it looks like this:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda8 during installation
UUID=0b3cad71-ec82-4089-ac46-68353cf22fed / ext4 errors=remount-ro 0 1
# /home was on /dev/sda6 during installation
UUID=2985a548-6c92-49de-8fc9-5cf1e35dafcd /home ext4 defaults 0 2
# swap was on /dev/sda5 during installation
UUID=e1a8b18d-0e1e-48bc-8d22-89c467895497 none swap sw 0 0
####LABEL=RonDocs /mnt/RonDocs auto nosuid,nodev,nofail,x-gvfs-show 0 0
LABEL=RonDocs /home/ron/RonDocs ntfs defaults,nls=utf8,umask=000,uid=1000,windows_names 0 0

*** Unmount the current /RonDocs:

Code: Select all

sudo umount /RonDocs
*** Remount it so that it's now at /home/ron/RonDocs:

Code: Select all

sudo mount -a
A mount icon will now appear on your desktop.

BTW, I misunderstood your reference with replacing Home. I thought you wanted to replace your home directory with the one on RonDocs. That is not a good idea.

But now I think you want to replace the "Home" folder on your desktop with one for RonDocs. That's different:

Go to Menu > Preferences > Desktop and unselect Home:
Home.png
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
ronkz

Re: Change autoboot an NTFS partition to /Home? [Solved]

Post by ronkz »

@altair4's last post above finally cleared the path for me, for which I give many thanks -- also did this for me before.

I have yet to follow those instructions all the way, I did the first part and will use that answer as it's appears to suffice to fumble the rest of this headache.

So I'll pass along something I had seen but missed this round, which is that hitting /menu /preferences/ brought into view /Disks, where my ntfs partition appeared as "NTFS — Mounted at/RonDocs". From that link I was able to see the folder again, and of course can take certain action(s) with that partition under "Properties /Permissions, and yes it IS now mounted as Ron so that I can work with partition files as always.

When I've completely completed altair4's valuable help-steps I'll post one more comment if there are any problems, but yes, it appears [Solved]
ronkz

Re: Change autoboot an NTFS partition to /Home? [Solved]

Post by ronkz »

One last request...
the line in /etc/fstab

Code: Select all

LABEL=RonDocs /home/ron/RonDocs ntfs defaults,nls=utf8,umask=000,uid=1000,windows_names 0 0


works only partly for "Permissions", showing
Owner=ron being okay, but
Group=root rather than a workgroup name and won't change to something other on it's list.
Yet Others=blank but can have designated Folder and File access.

I tried some terminal help... but didn't find much of value - I figure that it must be the pair of 0's at the end of that fstab line?
altair4
Level 20
Level 20
Posts: 11450
Joined: Tue Feb 03, 2009 10:27 am

Re: Change autoboot an NTFS partition to /Home? [Solved]

Post by altair4 »

Group=root rather than a workgroup name and won't change to something other on it's list.
I don't know what a "workgroup name" is but if you want the group to change then you can specify that in fstab.

For example if I wanted to change the group from root to plugdev ( the group id of plugdev is 46 ):
LABEL=RonDocs /home/ron/RonDocs ntfs defaults,nls=utf8,umask=000,uid=1000,gid=46,windows_names 0 0
Or if I wanted the user and group id's to match:
LABEL=RonDocs /home/ron/RonDocs ntfs defaults,nls=utf8,umask=000,uid=1000,gid=1000,windows_names 0 0
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
ronkz

Re: Change autoboot an NTFS partition to /Home? [Solved]

Post by ronkz »

@adair4, okay thank you, that fixed it. Little glitch, as I forgot to umount LOL, but at least I remembered enough to get it straight.
Locked

Return to “Cinnamon”