(04-30-2017, 05:13 AM)bitsnpcs link Wrote: Great work JohnD
THX
(04-30-2017, 05:13 AM)bitsnpcs link Wrote: So it means downloads are now downloaded directly to the Central home partition [...]
Yes, the symbolic link "/home/Downloads" has the consequence, that all downloads, which are saved normally to "/home/Downloads" now are saved in /media/central_home/besto/Downloads", which is on another partition.
(04-30-2017, 05:13 AM)bitsnpcs link Wrote: So it means downloads are now downloaded directly to the Central home partition, and in the newly named Downloads_local it has the symbolic links to the files so they are usable from here too?
No, Downloads_local is a directory with no connection to the symbolic linked directory. There are just some files in this directory, which I have saved in the former Downloads directory and I wanted to have a second Download directory which is not linked, if I would like to save a Download not in the linked directorcy.
(04-30-2017, 05:13 AM)bitsnpcs link Wrote: Will you have to create symbolic links manually for each new download, or have you set it to make these automatically some how ?
No, you have to define the link one time.
One time you have to define a directory for mounting the partition you would like to use for user files:
Code:
johnd@his-desktop$ sudo mkdir /media/central_home
You can use another dir name, which is not so pretentious. I've used "central_home" like "Central Intelligence".
Now -- in my case -- there is this new directory in "[tt]/media[/tt]" called "[tt]central_home[/tt]", and you have to mount the partition for the user files to it. In my case the partition to mount is [tt]/dev/sda[/tt].
Code:
johnd@his-desktop$ sudo mount /media/central_home /dev/sda9
You can give the mount command the type of the file system it should mount, but in most cases it's unnecessary. ("[tt]johnd@his-desktop$ sudo mount
-t ext4 /media/central_home /dev/sda9[/tt]", "ext4", if the partition to mount is formatted to ext4 files system.)
A problem is, that you have to write the mount in the file "[tt]fstab[/tt]" in the directory "[tt]/etc[/tt]", because only then it will be mounted automatically, if Linux was shutdown. In my case [tt]fstab[/tt] for Linux Lite is this:
Code:
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda16 during installation
UUID=d2b976ef-c177-4eeb-ba8a-9c0475e9c034 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda20 during installation
# UUID=0dac0966-47b8-4554-a5c8-4e6c6f50524c /home ext4 defaults 0 2
UUID=0dac0966-47b8-4554-a5c8-4e6c6f50524c /home ext4 defaults 0 2
# /opt was on /dev/sda17 during installation
UUID=c81ae448-a938-4758-9e1c-5caa1a87d030 /opt ext4 defaults 0 2
# /tmp was on /dev/sda19 during installation
UUID=71e09fcb-bdcb-4516-8c63-4d4d5ccfbfb8 /tmp ext4 defaults 0 2
# /var was on /dev/sda18 during installation
UUID=2f4c1bbe-6548-4c81-b7be-2f79c5b26c13 /var ext4 defaults 0 2
# swap was on /dev/sda11 during installation
UUID=52a1d79c-d752-4904-b608-c2b66129a913 none swap sw 0 0
# swap was on /dev/sda7 during installation
UUID=a6ececfd-2af5-4877-abc4-52e90b7254ea none swap sw 0 0
# The central home partition:
UUID=3b77c81c-0afa-4c85-b160-e94458b1fabc /media/central_home ext4 defaults 0 2
johnd@johns-desktop:$
The last line says that [tt]/dev/sda9[/tt] should be mounted every time linux starts. Remarkable, that there is not written "[tt]/dev/sda9[/tt]", but "[tt]UUID=3b77c81c-0afa-4c85-b160-e94458b1fabc[/tt]" is another identification of my current "[tt]/dev/sda9[/tt]".
The UUID is an id of the partition. You got them with the command [tt]blkid[/tt]. For example:
Code:
johnd@johns-desktop:~$ blkid /dev/sda9
/dev/sda9: LABEL="home" UUID="3b77c81c-0afa-4c85-b160-e94458b1fabc" TYPE="ext4" PARTUUID="dcfb362e-09"
johnd@johns-desktop:~$
It's an unique id. The following -- for example -- is the complete answer of [tt]blkid[/tt], if I do not specify a single partition:
Code:
johnd@johns-desktop:~$ blkid
/dev/sda1: LABEL="DRIVE_C" UUID="AEAC7810AC77D177" TYPE="ntfs" PARTUUID="dcfb362e-01"
/dev/sda2: LABEL="SchM-CM-<lerdaten" UUID="A8F46C31F46C0442" TYPE="ntfs" PARTUUID="dcfb362e-02"
/dev/sda3: LABEL="Debian-Root" UUID="2d3f7e8e-cc94-493b-b3e2-0323d3a54bb1" TYPE="ext4" PARTUUID="dcfb362e-03"
/dev/sda5: LABEL="Bodhi-Linux" UUID="e8aadbe5-d9a0-44ed-aedb-62c8bf9eb969" TYPE="ext4" PARTUUID="dcfb362e-05"
/dev/sda6: LABEL="Parsix" UUID="92ae1f00-704b-4888-9011-c98e95bda345" TYPE="ext4" PARTUUID="dcfb362e-06"
/dev/sda7: UUID="a6ececfd-2af5-4877-abc4-52e90b7254ea" TYPE="swap" PARTUUID="dcfb362e-07"
/dev/sda8: LABEL="usr" UUID="3f3f8ea3-a062-42ad-a903-f28ad02ade1d" TYPE="ext4" PARTUUID="dcfb362e-08"
/dev/sda9: LABEL="home" UUID="3b77c81c-0afa-4c85-b160-e94458b1fabc" TYPE="ext4" PARTUUID="dcfb362e-09"
/dev/sda10: UUID="52a1d79c-d752-4904-b608-c2b66129a913" TYPE="swap" PARTUUID="dcfb362e-0a"
/dev/sda12: LABEL="Emmabuntu" UUID="a02cfa39-bcb5-49b6-990a-d665df2ac2a1" TYPE="ext4" PARTUUID="dcfb362e-0c"
/dev/sda13: UUID="7c3ecf43-4968-481e-9624-f886a432a1a4" TYPE="ext4" PARTUUID="dcfb362e-0d"
/dev/sda14: UUID="a0a0c585-baf2-4b17-94d0-0ac116bb5af0" TYPE="ext4" PARTUUID="dcfb362e-0e"
/dev/sda15: UUID="6464a3ab-f5e1-4ca8-9d4d-589e32db2ee0" TYPE="ext4" PARTUUID="dcfb362e-0f"
/dev/sda16: UUID="d2b976ef-c177-4eeb-ba8a-9c0475e9c034" TYPE="ext4" PARTUUID="dcfb362e-10"
/dev/sda17: UUID="c81ae448-a938-4758-9e1c-5caa1a87d030" TYPE="ext4" PARTUUID="dcfb362e-11"
/dev/sda18: UUID="2f4c1bbe-6548-4c81-b7be-2f79c5b26c13" TYPE="ext4" PARTUUID="dcfb362e-12"
/dev/sda19: UUID="71e09fcb-bdcb-4516-8c63-4d4d5ccfbfb8" TYPE="ext4" PARTUUID="dcfb362e-13"
/dev/sda20: UUID="0dac0966-47b8-4554-a5c8-4e6c6f50524c" TYPE="ext4" PARTUUID="dcfb362e-14"
/dev/zram0: UUID="972fce57-c4a5-4467-8939-f6700cf9042b" TYPE="swap"
/dev/zram1: UUID="6dcb7408-752d-4526-86ca-77bf85c5ef1b" TYPE="swap"
johnd@johns-desktop:~$
Finally to create the symbolic link, I've done this:
Code:
johnd@his-desktop$ sudo ln -s /media/central_home/besto/Downloads ~/Downloads
"[tt]~/Downloads[/tt]" is short for "[tt]/home/johnd/Downloads[/tt]", and "[tt]~[/tt]" stands for the home dir of the currently logged in user.
Now "[tt]/home/johnd/Downloads[/tt]" is a shortcut, a symbolic link to "[tt]/media/central_home/besto/Downloads[/tt]".
(04-30-2017, 05:13 AM)bitsnpcs link Wrote: For me it sounds a very complex and advanced set up, but it is also very interesting how it works.
Ok. But it's really not my first linux installation. I've tried some distros and installed also some of them for a friend. But I'm trying to learn linux also now. In fact I'm preparing for LPIC 1 and LPIC 2.