(SOLVED)partition for docs so they survive system crash/reinstall?

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
LMJ

(SOLVED)partition for docs so they survive system crash/reinstall?

Post by LMJ »

I have a newly created 18.3 Sylvia with the basic partitions only, / /home, and swap. In Windows, I can create a partition which is not essential to the running of the system, in which I can save my docs, pics,etc to. This partition and the personal files within it, remain intact without any files corrupted or lost, whenever I have needed to do a reset and reinstall of Windows. ( I do make back ups too).
If I shrink the home partition, and create a new partion In the unallocated space that is left, is there a mount point for it that will give me the same convenience I have in Windows, as in no files within that partition are likely to be lost or damaged if Mint crashes,and has to be re-installed? If not, would appreciate knowing what the usual mount point would be, for an extra partition.
I don't know how to choose an appropriate file system for such a partition - EXT 3, EXT 4? Logical or Primary? I doubt I will be wanting to create any other partitons later.
Thanks
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.
caf4926
Level 7
Level 7
Posts: 1916
Joined: Mon Mar 22, 2010 3:21 pm
Location: Argyll and Bute

Re: partition for docs so they survive system crash/reinstall?

Post by caf4926 »

If you create a /home partition (I do this) then it need never be formatted really. At least in my case, I have had no need to for years now and even if you start a new installation you would simply set the mount point and not format it. I use ext4 still
Never ever had an issue
Creating an additional partition is just unnecessary IMO
Linux Mint 21.1 Cinnamon
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: partition for docs so they survive system crash/reinstall?

Post by catweazel »

LMJ wrote:is there a mount point for it that will give me the same convenience I have in Windows...?
You already have it. It's called /home.

If you want to isolate documents from /home you can create a partition, automount it in fstab then use ln -s <destPath> <dir>, where <destPath> is the full path to your isolated documents folder on the new partition, and <dir> is the name of the link in your home directory. When you click the link in your home directory, the isolated folder on the new partition will open.

Before you go down that route, please post the output of this terminal command:

Code: Select all

sudo lsblk
Enclose the results in code markers, which you can select from the mini toolbar above the textbox where you type your reply.

Also run the disks tool and post a screen shot of the partitions on the drive where you intend to make a new partition. You can upload the file to http://postimages.org/ and include the link in your reply. I'll walk you through the process if needed.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
LMJ

Re: partition for docs so they survive system crash/reinstall?

Post by LMJ »

Thank you. Had trouble with the image posting site, they blocked my ip. Am posting the lsblk, and will experiment to see if can upload Gparted image of partitions another way.

In the meantime....I have taken in what you have both said. Given that I am the sole user of my laptop, that the contents of /home usually survive a linux crash or reinstall, and that I don't want to share any partitions with Windows, is there any advantage I might still like to know about in keeping personal docs etc in a separate partition from /home?
If I was going to encrypt, I would encrypt a folder, not a whole partition.
If I decided later I wanted to share a partition with Windows, I could add a partition then?

Code: Select all

 $ sudo lsblk
[sudo] password for paxl128: 
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sdd      8:48   1   3.6G  0 disk 
└─sdd1   8:49   1   3.6G  0 part /media/p128/TSB USB DRV
sdb      8:16   1 119.2G  0 disk 
├─sdb2   8:18   1  86.6G  0 part /home
├─sdb3   8:19   1   4.7G  0 part [SWAP]
└─sdb1   8:17   1    28G  0 part /
sdc      8:32   1   7.4G  0 disk 
└─sdc1   8:33   1   7.4G  0 part /media/p128/8GBMICRO
sda      8:0    0 465.8G  0 disk 
├─sda4   8:4    0    16M  0 part 
├─sda2   8:2    0    15G  0 part 
├─sda3   8:3    0 350.8G  0 part 
└─sda1   8:1    0   100G  0 part
LMJ

Re: partition for docs so they survive system crash/reinstall?

Post by LMJ »

Have been looking around, but not sure other image sharing sites would do the trick with the screenshot. Are there any others which when I upload, then paste the link here, you would see the Gparted image clearly in my post, rather than downloading?
User avatar
slipstick
Level 6
Level 6
Posts: 1071
Joined: Sun Oct 21, 2012 9:56 pm
Location: Somewhere on the /LL0 scale

Re: partition for docs so they survive system crash/reinstall?

Post by slipstick »

I have a separate Data partition on my LM17.3 installation, where I have all my personal data, documents, photos, even my thunderbird profile with all my e-mails. You can make a mount point in your home simply by adding a folder there and then editing your /etc/fstab file to make it automatically mount on bootup. As I am the only user on my system, I mounted my Data partition in my own home by adding a folder /home/steve/Data. Then I edited my /etc/fstab to read as follows:

Code: Select all

# /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/sda5 during installation
UUID=2e0050be-d602-428c-8a97-98c2889d2ce6 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=12C3-4584  /boot/efi       vfat    defaults        0       2
# /home was on /dev/sda6 during installation
UUID=ddb2f707-6a00-4914-ad5b-2e7b5f10598a /home           ext4    defaults        0       2
# swap was on /dev/sda8 during installation
UUID=0ef7b19e-daae-4249-afdc-99064e58f304 none            swap    sw              0       0
# automount Data partition at boot
UUID=be736ee9-0a66-4b77-8943-75801d3c3fbd /home/steve/Data ext4 defaults,noatime 0 3
# automount Timeshift partition at boot
UUID=38040990-0c90-4340-a7d9-0fbd39e4bc84 /timeshift ext4 defaults,noatime 0 2
You can see the line I added for the Data partition. Then I set up symbolic links in my home for Documents, Music, Pictures, Videos, and one in my .thunderbird file for my profile, all linking to folders in my Data partition.

Another advantage of a separate Data partition is that you can upgrade to a later version of the operating system and overwrite home without needing to restore your data files. Or you can add a new version, say LM19 when it comes out, or another distro, while keeping LM18 (if you have room on the hard drive) and use the data partition for both versions.

EDIT: I also have a FAT formatted partition (a few GB) for sharing documents between Windows 7 and LM. Very seldom gets used, but doesn't take up much space and has come in handy a couple of times.
Last edited by slipstick on Sat Jan 27, 2018 3:13 am, edited 3 times in total.
In theory, theory and practice are the same. In practice, they ain't.
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: partition for docs so they survive system crash/reinstall?

Post by catweazel »

LMJ wrote:Have been looking around, but not sure other image sharing sites would do the trick with the screenshot. Are there any others which when I upload, then paste the link here, you would see the Gparted image clearly in my post, rather than downloading?
The forum only accepts small images. You can try.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
User avatar
slipstick
Level 6
Level 6
Posts: 1071
Joined: Sun Oct 21, 2012 9:56 pm
Location: Somewhere on the /LL0 scale

Re: partition for docs so they survive system crash/reinstall?

Post by slipstick »

catweazel wrote:
LMJ wrote:Have been looking around, but not sure other image sharing sites would do the trick with the screenshot. Are there any others which when I upload, then paste the link here, you would see the Gparted image clearly in my post, rather than downloading?
The forum only accepts small images. You can try.
I believe I have added screenshots to a post just by using the Img tag at the top of the post box. It's been a long time, so I can't remember exactly what I did, but I'd try that first.
In theory, theory and practice are the same. In practice, they ain't.
LMJ

Re: partition for docs so they survive system crash/reinstall?

Post by LMJ »

just trying it out
LMJ

Re: partition for docs so they survive system crash/reinstall?

Post by LMJ »

I clicked on the img button above the message, the letters img in brackets appeared twice, with cursor in between, for pasting I assumed, but this didn't work. Dragging image file into message did work though. Wonder what the largest allowable file size is for doing that.
LMJ

Re: partition for docs so they survive system crash/reinstall?

Post by LMJ »

[quoteAlso run the disks tool and post a screen shot of the partitions on the drive where you intend to make a new partition. You can upload the file to http://postimages.org/ and include the link in your reply. I'll walk you through the process if needed.][/quote]

If I follow Slipstick suggestion, I have only done something like this once a long time ago. Would either of you be willing to remind me how to do this in leafpad first please, so I can post it here and you can check it. Hope I can get the darn screenshot thing to work - file might be too big.

[quoteI have a separate Data partition on my LM17.3 installation, where I have all my personal data, documents, photos, even my thunderbird profile with all my e-mails. You can make a mount point in your home simply by adding a folder there and then editing your /etc/fstab file to make it automatically mount on bootup. As I am the only user on my system, I mounted my Data partition in my own home by adding a folder /home/steve/Data. Then I edited my /etc/fstab to read as follows:

Code: Select all
# /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/sda5 during installation
UUID=2e0050be-d602-428c-8a97-98c2889d2ce6 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=12C3-4584 /boot/efi vfat defaults 0 2
# /home was on /dev/sda6 during installation
UUID=ddb2f707-6a00-4914-ad5b-2e7b5f10598a /home ext4 defaults 0 2
# swap was on /dev/sda8 during installation
UUID=0ef7b19e-daae-4249-afdc-99064e58f304 none swap sw 0 0
# automount Data partition at boot
UUID=be736ee9-0a66-4b77-8943-75801d3c3fbd /home/steve/Data ext4 defaults,noatime 0 3
# automount Timeshift partition at boot
UUID=38040990-0c90-4340-a7d9-0fbd39e4bc84 /timeshift ext4 defaults,noatime 0 2


You can see the line I added for the Data partition. Then I set up symbolic links in my home for Documents, Music, Pictures, Videos, and one in my .thunderbird file for my profile, all linking to folders in my Data partition.

Another advantage of a separate Data partition is that you can upgrade to a later version of the operating system and overwrite home without needing to restore your data files. Or you can add a new version, say LM19 when it comes out, or another distro, while keeping LM18 (if you have room on the hard drive) and use the data partition for both versions.

EDIT: I also have a FAT formatted partition (a few GB) for sharing documents between Windows 7 and LM. Very seldom gets used, but doesn't take up much space and has come in handy a couple of times.][/quote]
User avatar
slipstick
Level 6
Level 6
Posts: 1071
Joined: Sun Oct 21, 2012 9:56 pm
Location: Somewhere on the /LL0 scale

Re: partition for docs so they survive system crash/reinstall?

Post by slipstick »

I've never used Leafpad - I use Gedit, and don't know how it differs. Anyway, I'm not sure exactly what you are asking for help about - running the disks tool, posting the screenshot, creating a new partition, editing fstab, creating symlinks to the data partition? I'll be glad to help with any or all of those, just tell me where you need help. You can run the following in a terminal and paste the output in a code block - maybe easier than posting a screen shot:

Code: Select all

sudo parted -l && sudo blkid -o list
In theory, theory and practice are the same. In practice, they ain't.
LMJ

Re: partition for docs so they survive system crash/reinstall?

Post by LMJ »

slipstick wrote:I've never used Leafpad - I use Gedit, and don't know how it differs. Anyway, I'm not sure exactly what you are asking for help about - running the disks tool, posting the screenshot, creating a new partition, editing fstab, creating symlinks to the data partition? I'll be glad to help with any or all of those, just tell me where you need help. You can run the following in a terminal and paste the output in a code block - maybe easier than posting a screen shot:

Code: Select all

sudo parted -l && sudo blkid -o list
I replied earlier, but I have just noticed my reply is missing, so will write it again. Yes please, would like help creating a new partition, editing fstab, and creating Symlinks. The terminal readout you asked for is listed below.
i am also interested to see that you have a separate partition for Timeshift. I would be interested in doing that too. I have an Ext 4 partiton on an external drive, where I put my first Timeshift Backup, and will keep susequent backups, but would like to keep a second copy of the initial backup, and also the most recent of future full back ups. A partition like the one you have created would be good for this.

sudo parted -l && sudo blkid -o list

Model: ATA ST9500325AS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 107GB 107GB primary ntfs boot
2 107GB 123GB 16.1GB primary fat32 hidden
3 123GB 500GB 377GB primary ntfs
4 500GB 500GB 16.8MB primary esp


Model: SanDisk ExtremePro (scsi)
Disk /dev/sdb: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 30.0GB 30.0GB primary ext4 boot
2 30.0GB 123GB 93.0GB primary ext4
3 123GB 128GB 5000MB primary linux-swap(v1)


Model: Multiple Card Reader (scsi)
Disk /dev/sdc: 7948MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 7948MB 7947MB primary fat32 boot, lba


device fs_type label mount point UUID
-------------------------------------------------------------------------------
/dev/sda1 ntfs (not mounted) EED8FE1ED8FDE4AD
/dev/sda2 vfat (not mounted) BAA8-00B0
/dev/sda3 ntfs DDrive (not mounted) DAE69349E6932533
/dev/sdb1 ext4 / 7e2767c2-c84d-4d6b-965a-6f61b932fc4a
/dev/sdb2 ext4 /home 68f31ae3-063f-4c06-9785-613c93f79c98
/dev/sdb3 swap [SWAP] c6b9633d-21bf-4bc1-afc6-250a023643e3
/dev/sdc1 vfat 8GBMICRO /media/paxl128/8GBMICRO 8018-12D6
/dev/sda4 (not mounted)

I am running Mint from a fast external drive as this suits me the best. I won't be sharing data with any windows partitions (I think i might have mentioned that before)
User avatar
slipstick
Level 6
Level 6
Posts: 1071
Joined: Sun Oct 21, 2012 9:56 pm
Location: Somewhere on the /LL0 scale

Re: partition for docs so they survive system crash/reinstall?

Post by slipstick »

Let's take this one step at a time. First, I assume that you want to shrink your /home partition on sdb to make room for a new data partition? This is easily done with Gparted, but you will have to use a live USB or DVD. You can't work on partitions that are mounted. It's been a long time since I have used Gparted, but as I recall, it is included on the live Linux Mint .iso. So you could boot up on the installation USB or DVD that you used to install Mint and launch Gparted. You would select the partition that you want to shrink and, as I recall, you can use the mouse to drag the right hand border of your /home partition to the left to shrink it. Then you would create a new ext4 data partition in the freed up space. I can't walk you through each step, as it has been a long time since I've done this, but as I recall it is pretty obvious what to do - just don't forget to apply the pending operation once you have it set up.

You said you wanted a /timeshift partition for an extra backup - not clear to me if you want this on sdb also. If so, that will make a fifth partition, and as you have a msdos type disk which only allows a maximum of four primary partitions, you will need to use an extended partition. In this case, you would need to make your extended partition before making the data partition, as you already have three primary partitions. (Note - you can have up to four primary partitions, or up to three primary partitions and an extended partition. The extended partition is a container which can hold multiple logical partitions, so you can effectively have many more than four partitions, but you need to set up the extended partition before you fill the partition table with four primaries.) This is also something I haven't messed with in a long time, as my disk is set up with a GPT partition table and doesn't use extended partitions. If you don't want the /timeshift partition on sdb, then you can go ahead and use your fourth primary partition for the data partition.

Regarding Timeshift - it's not clear to me if you are using that to back up the entire system, including your data. The Timeshift author himself recommends using Timeshift only for system backups and says you should use another program such as BackInTime for data backups. The way I use Timeshift is to only backup my / partition and the configuration files in my /home. I do this onto the same hard drive with / and /home because I don't like to keep my external drive plugged in all the time. Of course, this doesn't protect me if the drive fails, so I have a scipt file that copies my Timeshift backup to the external drive, keeping all the hard links intact on the external, so it is a clone of the Timeshift backup on the internal hard drive. I use Backintime to backup my data onto my external drive, and also keep a copy of that on another computer.

Let's stop at this point and worry about setting up a mount point, editing fstab, and setting up symlinks later. If you have more questions about what I have written above, let me know, or if you feel confident about setting up a new partition, go ahead and do that and paste the results from Gparted or the terminal.
In theory, theory and practice are the same. In practice, they ain't.
User avatar
JerryF
Level 16
Level 16
Posts: 6570
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: partition for docs so they survive system crash/reinstall?

Post by JerryF »

LMJ wrote:I clicked on the img button above the message, the letters img in brackets appeared twice, with cursor in between, for pasting I assumed, but this didn't work. Dragging image file into message did work though. Wonder what the largest allowable file size is for doing that.
For attachments in the forum, 100 KB and under. Also, if memory serves, you can only have 3 attachments in one post.

I use Shutter for taking screenshots. In preference, I have set the jpg quality at 50. This substantially reduces the file size, but is still quite legible.
LMJ

Re: partition for docs so they survive system crash/reinstall?

Post by LMJ »

slipstick » Wed Jan 31, 2018 7:33 am
Let's take this one step at a time.
That's a good idea. In response to your questions I am fine with using Gparted, so will shrink the /home partition in the way you describe, then come back to you for the fstab edit. And the Symlinks.

Timeshift - I am using it to backup the system as described by the developer, not to back up data.

I Will forgo adding another partition for Timeshift as I now remember that my machine does not handle an extended partition with other partitions inside it. Noone could work out what the problem was, when i was setting up a different version of Mint in 2015, and after several days of trying, we gave up.
Sometimes what this machine 'should'' be able to handle, and what it will actually co-operate with are two different things.

We are in different time zones, so if you could possibly leave the instructions for editing the mount point of the data partition in fstab,so I can do it tomorrow, that would be helpful please.
Using text editor - I don't remember how to use one to edit fstab, and get it to save the edit. Could you remind me please? I prefer to use a text editor for this, but only did it a couple of times about 16 months ago, and have forgotten.
Thank you :)
LMJ

Re: partition for docs so they survive system crash/reinstall?

Post by LMJ »

[quoteFor attachments in the forum, 100 KB and under. Also, if memory serves, you can only have 3 attachments in one post.

I use Shutter for taking screenshots. In preference, I have set the jpg quality at 50. This substantially reduces the file size, but is still quite legible][/quote]
Thanks Jerry, that's very helpful to know and will save me some trouble in future.
User avatar
slipstick
Level 6
Level 6
Posts: 1071
Joined: Sun Oct 21, 2012 9:56 pm
Location: Somewhere on the /LL0 scale

Re: partition for docs so they survive system crash/reinstall?

Post by slipstick »

That's odd that your machine will not handle an extended partition - up to three primary partitions plus and extended partition has been the msdos standard since back in the 80's. Oh, well..

In the Tutorial section of the forum, there is a tutorial "How to install with manual partitioning, which has some good info. The OP, xenopeek, describes adding a separate data partition in this post in that tutorial:
viewtopic.php?f=42&t=122276#p697558

The method he used is different than the way I set up my Data partition. His way is more suited to a data partition to be shared with multiple owners, so that they can all write, read, and execute files in the partition. His mount point is owned by root, but all (user, group, and others) are granted read, write, and execute permissions, and he sets the "sticky bit" so that files can only be deleted or renamed by the file owner (or someone with root privileges).

I set my Data partition up differently because I am the only user of my system and don't need to share. I mounted my Data partition to a folder Data in my /home partition so that I own the partition and I am the only one with read, write, execute permission. I have also granted read, execute permission to my own group (no particular reason), but no permissions for others.

If you need to share the new partition, follow xenopeek's instructions (i suggest a mount point of /mnt rather than / in this case). On the other hand, if you want to set it up like mine, then follow these instructions:

Once you have shrunk your /home partition and made unallocated space (this must be done from a live USB or DVD), then you can create a new data partition. In Gparted, click on the unallocated space and select Partition -> New from the menu. Fill in the boxes and assign a name and label for the new partition and select ext4. Be sure to apply the pending operation (I think it may be under the "Edit" button, but don't remember for sure). Now you can boot back into your normal system.

Create a mount point, either with your graphical file manager, or you can open a terminal and use the command line. As an example, I will assume that you want to mount it to a folder named Data in your home directory, in which case you type in

Code: Select all

mkdir ~/Data
Note - ~ is shorthand for /home/your user name

Now do

Code: Select all

sudo blkid -o list
to get the UUID of the new partition.

Now we need to edit /etc/fstab. I prefer to use Gedit (I am running on LM17.3, don't know what they have in LM18) - from your file manager, open the root directory by clicking on "Filesystem", then right click on "etc" and select "Open as Root", type in your password, then open fstab and edit it. If this doesn't work for you, you can use the nano editor in the terminal:

Code: Select all

sudo nano /etc/fstab
and after making your edit, do Ctrl-O to write it and Ctrl-X to exit.

At the end of fstab, add a line like this:

Code: Select all

UUID=00000000-0000-0000-0000-000000000000 /home/YourUserName/Data ext4 defaults, noatime 0 3
where the long number is your UUID and substitute your user name for YourUserName

Save fstab and exit.

Now you need to reboot, after which the new partition should be mounted, but as I recall, it may be owned by root, so in that case you will need to take ownership, in which case you can:

Code: Select all

sudo chown -R $USER:$USER ~/Data
Check to be sure you are now the owner.

Setting up symlinks is easy. For example, to put your Music files in your Data partition, but have a link in your /home,

Code: Select all

mkdir ~/Data/Music
If you have any data in your music folder, move it to the new ~/Data/Music folder, then

Code: Select all

rm -fr ~/Music
this deletes everything in your ~/Music folder
Then make the link

Code: Select all

ln -s ~/Data/Music ~/Music
In like manner, you can do this for Pictures, Videos, Documents, whatever.

I hope I have covered everything - let me know if you have problems.
In theory, theory and practice are the same. In practice, they ain't.
LMJ

Re: partition for docs so they survive system crash/reinstall?

Post by LMJ »

Hi Slipstick, All done, except am saving symlinks process for when it's needed.
I am not sure I did the ownership process right. I got confused whether I was supposed to replace $USER with $paxl128 or not. I also forgot that you had told me
Note - ~ is shorthand for /home/your user name
. So I read it as a hyphen. MY terminal command looked like sudo chown -R $USER:$USER -/Data the firstime, then when this didn't change ownership from Root, I changed the command to sudo chown -R paxl128:$paxl128 -/Data Here's a screenshot of what the result looks like -
Data Properties_002.jpg

I am wondering if I should edit the permissions by putting the correct command in the terminal? Please could you show me how to type it correctly, I am still not sure.

What is the difference between a cross, a minus sign, and a blank space in the permissions possibilities?

Here is a copy of the updated fstab with the new data partiton on the last line -
Fstab after data partiton mount process and reboot

# /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/sdc1 during installation
UUID=7e2767c2-c84d-4d6b-965a-6f61b932fc4a / ext4 errors=remount-ro 0 1
# /home was on /dev/sdc2 during installation
UUID=68f31ae3-063f-4c06-9785-613c93f79c98 /home ext4 defaults 0 2
# swap was on /dev/sdc3 during installation
UUID=c6b9633d-21bf-4bc1-afc6-250a023643e3 none swap sw 0 0
UUID=1553ee04-af73-493a-be2b-28e6b4ded352 /home/paxl128/Data ext4 defaults,noatime 0 3
User avatar
slipstick
Level 6
Level 6
Posts: 1071
Joined: Sun Oct 21, 2012 9:56 pm
Location: Somewhere on the /LL0 scale

Re: partition for docs so they survive system crash/reinstall?

Post by slipstick »

LMJ wrote:Hi Slipstick, All done, except am saving symlinks process for when it's needed.
I am not sure I did the ownership process right. I got confused whether I was supposed to replace $USER with $paxl128 or not. I also forgot that you had told me
Note - ~ is shorthand for /home/your user name
. So I read it as a hyphen. MY terminal command looked like sudo chown -R $USER:$USER -/Data the firstime, then when this didn't change ownership from Root, I changed the command to sudo chown -R paxl128:$paxl128
-/Data
That's not a hyphen, it's a tilde (upper left corner of the keyboard, just left of the 1, on my keyboard). It is a commonly used symbol which stands for /home/YourUserName - on my system ~ = /home/steve
USER is an environment variable which stores the current user name - the $ in front means to substitute the stored user name in place of $USER. It would have worked if you had used a tilde instead of a hyphen, but your substitution ended up with the same result.

LMJ wrote:Here's a screenshot of what the result looks like - Data Properties_002.jpg
I am wondering if I should edit the permissions by putting the correct command in the terminal? Please could you show me how to type it correctly, I am still not sure.

What is the difference between a cross, a minus sign, and a blank space in the permissions possibilities?
You can do it in your file manager - for an explanation of the symbols, which confused me too, see this thread:
viewtopic.php?f=47&t=229567#p1213954

If you want to set permissions in the terminal, there is more than one way to do that, using either symbolic arguments or numeric arguments. When I use the terminal for this I use the numeric method because I am quite familiar with octal numbers. For an explanation, you can type in a terminal

Code: Select all

man chmod
For a much clearer explanation, I recommend you download this book - "The Linux Command Line" by William Shotts - it's a free download from here:
http://linuxcommand.org/tlcl.php
An excellent book and highly recommended if you are going to be using the terminal much. Permissions and the chmod command are covered in Chapter 9.
LMJ wrote:Here is a copy of the updated fstab with the new data partiton on the last line -
Fstab after data partiton mount process and reboot

# /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/sdc1 during installation
UUID=7e2767c2-c84d-4d6b-965a-6f61b932fc4a / ext4 errors=remount-ro 0 1
# /home was on /dev/sdc2 during installation
UUID=68f31ae3-063f-4c06-9785-613c93f79c98 /home ext4 defaults 0 2
# swap was on /dev/sdc3 during installation
UUID=c6b9633d-21bf-4bc1-afc6-250a023643e3 none swap sw 0 0
UUID=1553ee04-af73-493a-be2b-28e6b4ded352 /home/paxl128/Data ext4 defaults,noatime 0 3
In theory, theory and practice are the same. In practice, they ain't.
Locked

Return to “Storage”