Everyone:
One of you (I don't know who it was) shared with me an excellent method of making possible a clean reinstallation of Fedora--going above and beyond the "manual upgrade" described in the Installation Guide, that amounts to erasing the /root directory but leaving alone all other directories, not only /home but /usr, /etc, /bin, /tmp, /var, and any others I might have left out. This method preserves user data on a physically separate filesystem (an HDD or SSD). But it does not mount this separate filesystem as /home. The /home directory remains a part of the main filesystem and gets erased and reinaugurated, just like /usr, /etc, /var, and all the rest of them.
Rather, one establishes another mount point called /crypt and mounts the second filesystem at that point. On that filesystem, one creates (as the SuperUser or as a Wheel member) a separate directory for every user account. Within each user-account directory, are the directories named Documents, Pictures, Music, Public, Templates, Videos, and whatever other directories have you (including bin, which I find indispensible to my operations). On the original "home directory" of each user, one erases all these standard directories and sets up symbolic links to the directories residing on the second filesystem and addressable as /crypt/UserName/Documents (or Pictures or whatever) (where you replace "UserName" with the name of a registered user of the system).
The problem I have now: I've forgotten the specific syntax of the mount command, which I have to use to mount the /crypt filesystem /and make sure it stays mounted/ between one session and the next. Before I begin my "clean reinstall" of Fedora 28, I'd like to review the required commands, especially "mount" and "ln". I also think this method would be of benefit to anyone here who would like to preserve user data but wants to make sure that /all/ the directories in the main filesystem get cleaned up. You see, for several iterations of Fedora, I tried using the automatic upgrade method. The problem: certain "dirty configuration statements," for lack of a better term, kept propagating from one iteration to the next. With the result that Fedora 26 was an inoperable mess and I was glad to start "clean" with Fedora 27. Of course I also acquired two Solid State Drives, one 150 GB and one 1 TB, and sought the best way to use both to support truly "clean" installs.
Whoever you are, let me give a shout-out to you, and ask you to remind me again what steps to take, and the syntax of the key commands I need. Or you can check me on this:
The syntax I have worked out for the commands to mount the auxiliary filesystem as /crypt is:
$ sudo mkdir /crypt
$ sudo mount -t ext4 /dev/sdb2 /crypt
(Here I start with "$ sudo" instead of "#" because to get a "#" prompt I have to execute "su," and that can be dangerous.)
The syntax for establishing a symlink is even simpler:
ln -s /crypt/UserName/Dir
where UserName is the name of a specific created user, and Dir is Documents, Pictures, Music, Public, Templates, Videos, and anything else I want to preserve from one iteration of Fedora to the next. Of course I have to remove the "hard" directories that Fedora normally sets up before I execute these link commands.
To whoever invented this method: am I missing anything?
Thank you in advance.
Temlakos
On 05/02/2018 02:24 PM, Temlakos wrote:
One of you (I don't know who it was) shared with me an excellent method of making possible a clean reinstallation of Fedora--going above and beyond the "manual upgrade" described in the Installation Guide, that amounts to erasing the /root directory but leaving alone all other directories, not only /home but /usr, /etc, /bin, /tmp, /var, and any others I might have left out. This method preserves user data on a physically separate filesystem (an HDD or SSD). But it does not mount this separate filesystem as /home. The /home directory remains a part of the main filesystem and gets erased and reinaugurated, just like /usr, /etc, /var, and all the rest of them.
I really don't understand what the benefit of this is. Your /home directory should be on a separate partition from / and won't be erased even with a full reinstall of the OS.
$ sudo mkdir /crypt
$ sudo mount -t ext4 /dev/sdb2 /crypt
(Here I start with "$ sudo" instead of "#" because to get a "#" prompt I have to execute "su," and that can be dangerous.)
How is "su" dangerous? Either way you're running a command as root. I generally use "sudo -i" to get to a root prompt.
The syntax for establishing a symlink is even simpler:
ln -s /crypt/UserName/Dir
where UserName is the name of a specific created user, and Dir is Documents, Pictures, Music, Public, Templates, Videos, and anything else I want to preserve from one iteration of Fedora to the next. Of course I have to remove the "hard" directories that Fedora normally sets up before I execute these link commands.
Are you trying to remove all the user configuration files as well? If so, then just turn on "show hidden files" in Nautilus and delete the dot directories. But of course, only do that if you really want to have to reconfigure everything again.
The use of "/crypt" suggests that the original use may have been to only encrypt some parts of the user folders, but that still seems way too complicated to be useful.
On 05/02/2018 05:39 PM, Samuel Sieb wrote:
On 05/02/2018 02:24 PM, Temlakos wrote:
One of you (I don't know who it was) shared with me an excellent method of making possible a clean reinstallation of Fedora--going above and beyond the "manual upgrade" described in the Installation Guide, that amounts to erasing the /root directory but leaving alone all other directories, not only /home but /usr, /etc, /bin, /tmp, /var, and any others I might have left out. This method preserves user data on a physically separate filesystem (an HDD or SSD). But it does not mount this separate filesystem as /home. The /home directory remains a part of the main filesystem and gets erased and reinaugurated, just like /usr, /etc, /var, and all the rest of them.
I really don't understand what the benefit of this is. Your /home directory should be on a separate partition from / and won't be erased even with a full reinstall of the OS.
$ sudo mkdir /crypt
$ sudo mount -t ext4 /dev/sdb2 /crypt
(Here I start with "$ sudo" instead of "#" because to get a "#" prompt I have to execute "su," and that can be dangerous.)
How is "su" dangerous? Either way you're running a command as root. I generally use "sudo -i" to get to a root prompt.
The syntax for establishing a symlink is even simpler:
ln -s /crypt/UserName/Dir
where UserName is the name of a specific created user, and Dir is Documents, Pictures, Music, Public, Templates, Videos, and anything else I want to preserve from one iteration of Fedora to the next. Of course I have to remove the "hard" directories that Fedora normally sets up before I execute these link commands.
Are you trying to remove all the user configuration files as well? If so, then just turn on "show hidden files" in Nautilus and delete the dot directories. But of course, only do that if you really want to have to reconfigure everything again.
The use of "/crypt" suggests that the original use may have been to only encrypt some parts of the user folders, but that still seems way too complicated to be useful. _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org
Here is the primary benefit I derived from this method. Each user's home directory has a number of hidden files (whose names begin with a dot) that contain configuration variables. After several iterations of the operating system, errors accumulate in those files. This results as much from the sheer obsolescence of certain configuration files and their parameters as from careless handling of the desktop. In my case, I had several icons of Mozilla Firefox in my system tray that I could not for the life of me remove. Furthermore, a password manager I liked to use, simply refused to load.
Mounting /home on a separate filesystem does nothing to solve the problem of the accumulated errors of configuration. You asked whether I have to reconfigure everything. That's just it: yes. Because especially after several iterations of "dnf system-upgrade," the configuration is a mess!
But mounting user data, like the contents of Documents, Pictures, etc., and even the contents of hidden application-specific directories like .mozilla (for Firefox) and .thunderbird, /does/ eliminate the problem. The errant files get erased with the rest of the filesystem, but the good user data remains.
Now for that matter, I remind you that if you're going to mount a separate file system as /home, you still have to use a command that will make the mounting permanent and not something you have to execute every time you start the system up. So maybe you can tell me what the syntax of the mount command would be for that. I'm sure I can adapt that to the system I borrowed from that other user.
By the way: the danger of "su" is the danger of continuous operations as root, and forgetting that you are in fact logged in as root. Whereas "sudo" gives you superuser privileges for that command only, then reverts you to a non-privileged state. That stops you from deleting a root-owned directory by accident.
Temlakos
On 05/02/2018 02:49 PM, Temlakos wrote:
On 05/02/2018 05:39 PM, Samuel Sieb wrote:
Are you trying to remove all the user configuration files as well? If so, then just turn on "show hidden files" in Nautilus and delete the dot directories. But of course, only do that if you really want to have to reconfigure everything again.
Here is the primary benefit I derived from this method. Each user's home directory has a number of hidden files (whose names begin with a dot) that contain configuration variables. After several iterations of the operating system, errors accumulate in those files. This results as much from the sheer obsolescence of certain configuration files and their parameters as from careless handling of the desktop. In my case, I had several icons of Mozilla Firefox in my system tray that I could not for the life of me remove. Furthermore, a password manager I liked to use, simply refused to load.
So just delete the dot directories as I mentioned above. If you really want to do it for all the users, then run: sudo rm -rf /home/*/.??* and don't mistype that!
Mounting /home on a separate filesystem does nothing to solve the problem of the accumulated errors of configuration. You asked whether I have to reconfigure everything. That's just it: yes. Because especially after several iterations of "dnf system-upgrade," the configuration is a mess!
I have only very rarely (single digit number of times) had an issue with configuration files and when I did, I just deleted that specific application's config files. I generally want my config files to stay around.
But mounting user data, like the contents of Documents, Pictures, etc., and even the contents of hidden application-specific directories like .mozilla (for Firefox) and .thunderbird, /does/ eliminate the problem. The errant files get erased with the rest of the filesystem, but the good user data remains.
Actually thinking about this, you would have to recreate all the user directories and the symlinks again (with the right permissions) after you do the reinstall! Is that really easier?
Now for that matter, I remind you that if you're going to mount a separate file system as /home, you still have to use a command that will make the mounting permanent and not something you have to execute every time you start the system up. So maybe you can tell me what the syntax of the mount command would be for that. I'm sure I can adapt that to the system I borrowed from that other user.
You add a line to the /etc/fstab file to automatically mount it at boot.
On 05/02/2018 06:59 PM, Samuel Sieb wrote:
On 05/02/2018 02:49 PM, Temlakos wrote:
On 05/02/2018 05:39 PM, Samuel Sieb wrote:
Are you trying to remove all the user configuration files as well? If so, then just turn on "show hidden files" in Nautilus and delete the dot directories. But of course, only do that if you really want to have to reconfigure everything again.
Here is the primary benefit I derived from this method. Each user's home directory has a number of hidden files (whose names begin with a dot) that contain configuration variables. After several iterations of the operating system, errors accumulate in those files. This results as much from the sheer obsolescence of certain configuration files and their parameters as from careless handling of the desktop. In my case, I had several icons of Mozilla Firefox in my system tray that I could not for the life of me remove. Furthermore, a password manager I liked to use, simply refused to load.
So just delete the dot directories as I mentioned above. If you really want to do it for all the users, then run: sudo rm -rf /home/*/.??* and don't mistype that!
Mounting /home on a separate filesystem does nothing to solve the problem of the accumulated errors of configuration. You asked whether I have to reconfigure everything. That's just it: yes. Because especially after several iterations of "dnf system-upgrade," the configuration is a mess!
I have only very rarely (single digit number of times) had an issue with configuration files and when I did, I just deleted that specific application's config files. I generally want my config files to stay around.
But mounting user data, like the contents of Documents, Pictures, etc., and even the contents of hidden application-specific directories like .mozilla (for Firefox) and .thunderbird, /does/ eliminate the problem. The errant files get erased with the rest of the filesystem, but the good user data remains.
Actually thinking about this, you would have to recreate all the user directories and the symlinks again (with the right permissions) after you do the reinstall! Is that really easier?
Now for that matter, I remind you that if you're going to mount a separate file system as /home, you still have to use a command that will make the mounting permanent and not something you have to execute every time you start the system up. So maybe you can tell me what the syntax of the mount command would be for that. I'm sure I can adapt that to the system I borrowed from that other user.
You add a line to the /etc/fstab file to automatically mount it at boot.
Now I'd like to know the syntax of that line.
Now about zero-ing out the configuration files: the problem is that the configuration involved is the /desktop/ configuration. Application configuration is fine, especially Firefox, thunderbird, and a specialized program called MakeMKV where I like to retain registration keys. But the KDE configuration really suffers, and suffers at every major upgrade--meaning from one version of Fedora to the next. That's when the biggest changes take place. Suddenly all bets are off, and the old configurations are obsolete.
The further trouble is that if I just erase the configuration files, some of these programs won't load. Better to start fresh.
Prize example: the inauguration of the dnfupdater to replace Apper for software management. I did not see that one coming, and I doubt the automatic upgrade would have been kind to it.
Symlinks are easy enough to re-create. I'm writing a script to do them all at once. All it will take is a simple re-execution.
Temlakos
On 05/02/2018 02:24 PM, Temlakos wrote:
Everyone:
One of you (I don't know who it was) shared with me an excellent method of making possible a clean reinstallation of Fedora--going above and beyond the "manual upgrade" described in the Installation Guide, that amounts to erasing the /root directory but leaving alone all other directories, not only /home but /usr, /etc, /bin, /tmp, /var, and any others I might have left out. This method preserves user data on a physically separate filesystem (an HDD or SSD). But it does not mount this separate filesystem as /home. The /home directory remains a part of the main filesystem and gets erased and reinaugurated, just like /usr, /etc, /var, and all the rest of them.
Rather, one establishes another mount point called /crypt and mounts the second filesystem at that point. On that filesystem, one creates (as the SuperUser or as a Wheel member) a separate directory for every user account. Within each user-account directory, are the directories named Documents, Pictures, Music, Public, Templates, Videos, and whatever other directories have you (including bin, which I find indispensible to my operations). On the original "home directory" of each user, one erases all these standard directories and sets up symbolic links to the directories residing on the second filesystem and addressable as /crypt/UserName/Documents (or Pictures or whatever) (where you replace "UserName" with the name of a registered user of the system).
I've read the rest of this thread and it sure seems that you are really overcomplicating things. It is not the upgrade from one Fedora version to another that's causing your config headaches, it's upgrading specific _applications_ that causes them.
You'd run into the exact same thing if you updated, say Mozilla, from one version to one that's incompatible with the old one. You'd need to blow all the users' ".mozilla" directories away in that case. Why go through all this? If a given user has a problem, then have them delete their app-specific directory and let them reconfigure the app.
Viewing this as a sysadmin with over 30 years experience, doing something that could potentially end up with hundreds of symlinks that must a) be manually maintained; and b) rely on a yet another separate filesystem to be mounted--all to try to prevent such obscure things seems to be a very poor idea and a spectacular waste of time. Deal with the issues IF they come up. ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer, AllDigital ricks@alldigital.com - - AIM/Skype: therps2 ICQ: 22643734 Yahoo: origrps2 - - - - A squeegee, by any other name, wouldn't sound as funny. - ----------------------------------------------------------------------
Allegedly, on or about 2 May 2018, Rick Stevens sent:
You'd run into the exact same thing if you updated, say Mozilla, from one version to one that's incompatible with the old one. You'd need to blow all the users' ".mozilla" directories away in that case. Why go through all this? If a given user has a problem, then have them delete their app-specific directory and let them reconfigure the app.
Actually, that's a good example to pick on (Mozilla or Thunderbird). You (might) want to discard old configurations that might have conflicts, but keep bookmarks and mail. So you have to be choosy about what hidden directories you erase.
On Wed, 2 May 2018 17:24:41 -0400 Temlakos temlakos@gmail.com wrote:
The syntax I have worked out for the commands to mount the auxiliary filesystem as /crypt is:
$ sudo mkdir /crypt
$ sudo mount -t ext4 /dev/sdb2 /crypt
(Here I start with "$ sudo" instead of "#" because to get a "#" prompt I have to execute "su," and that can be dangerous.)
The syntax for establishing a symlink is even simpler:
ln -s /crypt/UserName/Dir
where UserName is the name of a specific created user, and Dir is Documents, Pictures, Music, Public, Templates, Videos, and anything else I want to preserve from one iteration of Fedora to the next. Of course I have to remove the "hard" directories that Fedora normally sets up before I execute these link commands.
To whoever invented this method: am I missing anything?
I don't think it was me, but I do use something very similar. Except that since I only have one user, I put the /crypt equivalent that I use into /etc/fstab so it gets mounted under /mnt/[disk-identifier]/crypt on boot. The advantage of disk-identifier (UUID or custom label) is that it doesn't change if you boot from a different disk or the disk order changes because you add a disk. You should only have to do your first command once, and the second one each time you boot with your method. The conventional place to put such mount points is under /mnt, though you can of course put them anywhere you like.
Then the links in home just point to the various directories under /mnt/[disk-identifier]/crypt as you have above. From then on, it is maintenance free. And it allows me to boot a second version of Fedora (the previous one) with access to all the same data as the primary version. Great if there are problems since it has the same links in its home directory.
On 05/02/2018 03:57 PM, stan wrote:
Then the links in home just point to the various directories under /mnt/[disk-identifier]/crypt as you have above. From then on, it is maintenance free. And it allows me to boot a second version of Fedora (the previous one) with access to all the same data as the primary version. Great if there are problems since it has the same links in its home directory.
Do you link the user home folder or the folders inside of the user's home? It sounds like you are doing the first, but the OP is wanting to do the second.
On Wed, 2 May 2018 16:02:01 -0700 Samuel Sieb samuel@sieb.net wrote:
On 05/02/2018 03:57 PM, stan wrote:
Then the links in home just point to the various directories under /mnt/[disk-identifier]/crypt as you have above. From then on, it is maintenance free. And it allows me to boot a second version of Fedora (the previous one) with access to all the same data as the primary version. Great if there are problems since it has the same links in its home directory.
Do you link the user home folder or the folders inside of the user's home? It sounds like you are doing the first, but the OP is wanting to do the second.
I do the second. I have a bunch of directories like src and jpg and vid and ... that are just links to directories in the data store. These are things that I want to have access to whichever system I boot. It sounds complicated and difficult, but it is straightforward. Maybe not for everyone, but works for me.
Allegedly, on or about 2 May 2018, Temlakos sent:
One of you (I don't know who it was) shared with me an excellent method of making possible a clean reinstallation of Fedora--going above and beyond the "manual upgrade" described in the Installation Guide, that amounts to erasing the /root directory but leaving alone all other directories, not only /home but /usr, /etc, /bin, /tmp, /var, and any others I might have left out. This method preserves user data on a physically separate filesystem (an HDD or SSD). But it does not mount this separate filesystem as /home. The /home directory remains a part of the main filesystem and gets erased and reinaugurated, just like /usr, /etc, /var, and all the rest of them.
If you have two drives, simply keep the user homes on one, and install the system on the other (erasing it before a new install). That would be the most obvious simple way to handle it.
A slightly more complex way to handle it is to let the system install everything, including home on one drive (so that software configuration, including user configuration), is fresh and installed in the usual manner. And in each /home/username put a symlink to the other drive, and have the users store all their own files (the ones that they save, download, and create) on the second drive.
Shortened synopsis of the main drive: / /bin/ /home/ /home/fred/ /home/jane/
Synopsis of the data drive: /data/ /data/fredsdata/ /data/janesdata/
Inside /home/fred make a link to /data/fredsdata Inside /home/jane make a link to /data/janesdata
ln -s -t /home/fred /data/fredsdata etc...
(Naturally, check the man file that I've stated the command line syntax correctly).