Re: Useful in the installer
--
On 27 August 2025 4:18:25 am AEST, Michael Paoli <michael.paoli_at_berkeley.edu_ke1thrboz@duck.com> wrote:
>On Sun, Aug 24, 2025 at 1:14 PM Van Snyder <van.snyder@sbcglobal.net> wrote:
>> I keep my /home directory in a partition separate from root, not in a directory in root. This makes it easier to install a new OS.
>> Just to make sure the installer doesn't damage /home/me, and to make it obvious it won't, if /home/* isn't an empty list, the installer should provide a checkbox list to select the ones that should be added to /etc/passwd* and /etc/group* with uid and gid taken from /home/*.
>
>If you want to be more sure installer won't damage or alter
>your /home filesystem on its separate partition,
>when installing, using the standard Debian installer,
>(not Calamares from booted "Live" - it may lack these options),
>and might have to select "advanced" when booting, to access
>all these options,
>when it gets to the drive partitioning portion, it should well have
>visibility of the existing partitions. In the installer, select the
>partition of your existing /home filesystem, and configure the
>option there to tell it "do not use" - then it won't even touch it.
>Then after you've completed your installations, manually deal
>with it, e.g. update /etc/fstab (and/or do whatever systemd
>wants for that), such that your /home filesystem is then
>automatically mounted on /home upon (re)boot.
>
>> It would also be nice if it would ask "are there backup /etc/passwd* and /etc/group* from which those users info ought to be added to /etc/passwd* and /etc/group*?" That way, users wouldn't need to re-enter their passwords and change their default shells.
>
>I've often very much done that - just a slightly manual procedure.
>Notably, do the most minimal install feasible, at least initially,
>and also, relatively early in that process, use a separate
>virtual terminal (e.g. <Ctrl><Alt><F2>), and get a shell there.
>At the earliest opportunity after the installer has /target mounted,
>and it has /etc/passwd, etc. within that, and isn't in the process
>of making other change (e.g. installing components) - do it
>between steps when it pauses, then go in and modify
>/etc/password, etc. (e.g. also /etc/group, /etc/shadow, /etc/gshadow)
>as relevant - carefully merging in saved data from before.
>As long as one does so in a manner that doesn't conflict with anything
>that Debian would do during installation (e.g. conflict with some
>reserved IDs that need be tied to specific UIDs and/or GIDs),
>one can generally put stuff in those configuration files.
>After that, continue per normal with the installation, and
>Debian will fully honor and continue to use whatever
>one added in there. I've done this quite a number of
>times, notably when I'm installing a new system, and I
>have other existing systems, and I want the UIDs and GIDs
>for all the accounts to be matched up. So, yes, the
>Debian installer is highly capable, but it won't do
>everything for you - it's pretty smart/capable,
>but it's not a mind reader. :-)
>
I save a lot of those hassles by doing a simple install, including a user name 'keith' on a fresh partition, and activate sudo.
After booting into this new install, I set a root password and su (root) add my data partition to fstab, mount it, change the dir '/home/keith' to ke1th and symlink /mnt/data/homes/Keith into /home and chown the symlink. My user, group, password etc are set up ready to use
Su Keith and ready to start using my new system
All the best
Keith Bainbridge
keithrbau@gmail.com
+61 (0)447 667 468
UTC+ 10:00
From my aTab
Reply to: