Have a formated unused drive and want to autoboot it for backup with timeshift?

Have a formatted unused disk and want to use it for Timeshift Backups? How to get it to automount. Used to be able with manual install no longer I guess?

Please have a read at:
https://wiki.manjaro.org/index.php?title=Fstab

Device        Start       End   Sectors   Size Type
/dev/sda1      2048   1050623   1048576   512M Microsoft basic data
/dev/sda2   1050624  14362623  13312000   6.4G Linux swap
/dev/sda3  14362624 468877136 454514513 216.7G Linux filesystem


Disk /dev/sdc: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM006-2DM1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: FD727AA4-5180-4043-87A3-5D542CDB2F04

Device     Start        End    Sectors  Size Type
/dev/sdc1   2048 3907028876 3907026829  1.8T Linux filesystem
greg@greg-pc ~]$ lsblk -f
NAME FSTYPE LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINT
sda                                                                   
├─sda1
│    vfat         4142-84FC                             510.7M     0% /boot/efi
├─sda2
│    swap         4fbe22ff-4072-471e-8010-6f480027cf2e                [SWAP]
└─sda3
     ext4         2ac15cec-8500-417e-a659-3da5dc6ded87  191.6G     5% /
sdb                                                                   
└─sdb1
     ext4         4d73463d-54c3-46c5-8bdc-a8b1b698f0f7    1.7T     0% /home
sdc                                                                   
└─sdc1
     ext4         b7bf9c8c-1d4b-4497-a364-dc4981b4b0ce                /run/media

cannot make heads nor tails from what I am reading, sorry!
The drive in question is sdc1. I realize you want everybody to learn by themselves but I am a Nurse not a DEV!

If you would really like to be helpful do not throw reading that is meaningless at me. Give pertinent instructions to follow. Or not if you are so inclined. Nothing personal only need good help!
Thank you allwho really care!

Is it this one you want to use for Timeshift?
If so, unmount it first using your file manager (right-click-unmount or so).

Then run the following to make a mount point in the filesystem:

sudo mkdir /run/media/mountpoint
(You could choose whatever name you would like instead of "mountpoint" above)

Next edit the fstab:

sudo nano /etc/fstab

Navigate to the bottom with the down arrow and add the following line:

UUID=b7bf9c8c-1d4b-4497-a364-dc4981b4b0ce /run/media/mountpoint ext4 defaults,noatime 0 2
(use the name you chose above for mountpoint)

Press Ctrl-o, Enter and Ctrl-x to exit nano.

To make sure everything is ok, run:

sudo mount -a

If you get any errors, don't reboot! Post them back here. If not, you are good to go.

Good luck!

3 Likes

We love medical personnel!! We know we will need you sooner or later! :rofl:

Please, post your fstab:

grep -v ^# /etc/fstab

You need to create a mount point for the backup partition (sdc1)

sudo mkdir /media/Backup

An example entry for adding such a drive (partition) in fstab is this

UUID=b7bf9c8c-1d4b-4497-a364-dc4981b4b0ce /media/Backup ext4 defaults,noatime,nofail,x-systemd.device-timeout=1ms  0  2

/run is a runtime dir. It's deleted on reboot. :wink:

There is no such a directory, that is media, under / on my system!

My data partitotions are auto-mounted via fstab at /run/media/Data-1 and /run/media/Data2.

And run actually survives the reboot. Please revise!

How could anyone make assumptions about the level of knowledge or willingness of the other person to learn. As little that I knew you were a nurse, you know that I am not a DEV. And the wiki is actually written by users for users, like you and me.

Over and out!

Nah!! I won't :rofl:
RTFM
http://www.pathname.com/fhs/2.2/fhs-3.2.html
https://jlk.fjfi.cvut.cz/arch/manpages/man/file-hierarchy.7#RUNTIME_DATA

/run/

A "tmpfs" file system for system packages to place runtime data in. This directory is flushed on boot, and generally writable for privileged programs only. Always writable.


The fact that your partitions are mounted through fstab on /run/xxx, does not mean it survives reboot. It is just recreated on boot and since systemd is graceful, is quick enough to mount it early.
But it is not a proper mount point to use for permanent cause. a.k.a. there is no reason to risk finding out :laughing:

The drive is auto-mounting nicely , but now I am concerned about media not being in Root file system. The only way I get into Root is by clicking on my system drive? *s this a great concern?

Thanks Marte for the straight forward instructions very helpful!

replyed to AgentS again Sorry to confuse.

2 Likes

Well, how comes that there is no /media in the filesystem? Not on mine anyway. Assuming what you say is correct, that /run/media/WhatEver is not the proper mount point for mounting partitions permanently, you would need to create media yourself then under /.

I don't see any /media, do you? I dont recall having deleted a system directory. Or did I?
:exploding_head:

sudo mkdir /media/Backup
[sudo] password for marte: 
mkdir: cannot create directory ‘/media/Backup’: No such file or directory

:thinking:

The file system hierarchy specification does not recommend /run/media/$USER/. However, it does not prohibit its usage for permanent mounts either.

I use that location for all my mounts (aside from my boot drive) as I find it is far more convenient to have all other drives mounted in the same location.

There are many different schools of thought as to what is the best mount locaion. No one location has Linus Torvalds seal of approval per se. It's really more a matter of personal preference IMO.

I have never experienced any negative side effects from mounting my drives in /run/media/$USER. To each their own I figure.

2 Likes

Thanks tbg for your input!

2 Likes

If you ask me, putting aside the theoretical hairsplitting, there is no reason for concern.

I just had a look at this. You are right! But /run itself is not deleted at shutdown/reboot. However the content of it is. it looks then /run/media must be created when / partition is mounted, before other partitions specified in fstab get mounted?

I don't know, possibly. More reading on how Systemd sequence is required. I just know that generally Systemd runs actions in parallel and that mount point must exist before used. You might want to check journal on this, to see the order (mount, run, partition-name etc. ).

1 Like

Well, it is not there by default on Manjaro. Why not, I don't know. Systemd compliance? :man_shrugging: I use to

sudo mkdir /media
sudo mkdir /media/Backup

after installation. Anyway, /run/media/Backup is OK for practical purposes. It is great that @Greg541 is thinking about backups in the first place! :+1:

1 Like

Forum kindly sponsored by