[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#935931: Re: Bug#935931: debian-installer: Reinstalling Debian on a current Debian installation without erasing or fomatting the home folder



Dear Lennart,

I hope that when one opens a "whishlist bug" at least there is a chance to have a confrontation.

The main point I want to address is when you do a "smart installation" it is supposed to perform a clean installation hence the only folder that must to be untouched is "/home". The same concept when you have "/" and "/home" in separated partitions and you perform a clean installation. I think that is pretty trivial, the smart parts are:

* the installer is able to check for a previous Debian installation before to begin the process;

* and in case it founds a previous installation, the installer, is able to perform a fresh installation without overwriting the "/home" folder.

I can confirm that ElementaryOS and POP!_OS, that share the same installer, can do that.


Last point I want touch is about the swap partition. With the SSD and the OS able to boot in a bunch of seconds the hibernation doesn't make any sense today. For example I have 16GB of ram, based on the standard rules I should use at least 1.5x of the ram if not the double. It means that I should use 32GB just to hibernate my session, no way... With the SSD disks the lesser you write on the disk the better, I put just 2GB of swap-file and "swappiness" at 1 and the swap is never used and I didn't waste 30GB of space.

To conclude I think I elaborated everything clearly, I see a lot of benefits and improvement with the suggestions I gave to Debian, I also think that are pretty trivial to implement. I don't want introduce a Windows behavior of "reinstall when it broken", but back to time when I hadn't a fast internet connection it was faster download the full ISO and performing a fresh installation rather than doing a "dist-upgrade".

The bottom line is with a smart installer you don't need to separate your disk(s) in partitions but you can throw everything in "/" including the "swap" as swap-file that you can modify freely based on your needs (if you can't live without hibernation[1]). There is also a dynamic swap manager available on Debian as well: https://github.com/Tookmund/Swapspace


My best,

Daniel

[1] It needs some tuning to work: https://wiki.archlinux.org/index.php/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file


On 9/30/19 9:49 AM, Lennart Sorensen wrote:
On Sat, Sep 28, 2019 at 11:27:29PM -0400, Daniel wrote:
Hi Nicholas,

thanks for your reply, I really appreciated your constructive approach.

I use Debian since 2007 and I did a lot of installation, I personally use a
FrankenDebian (testing with pinning toward SID and Experimental) however
when I install Debian on other machines I install definitely the current
stable available. I have been performing exclusively desktop installations
and while I consider the best option separating /home recently I found
myself not able to get the right balance between "/", "/home" and "swap".
The default "/" assigned is often too small while sometimes I wasted
gigabyte never used. The "swap" with the amount of ram available today is
always more accessory and with the SSD disk the trend is to reduce its use
the most. Eventually I stopped to create a "swap" partition in favor of a
"swap-file" (like Raspian e.g.); hence I also stopped to create "/" and
"/home" but just "/" and still as LVM; at this point you don't have anymore
issue with the space and if you need you can add all the disks you want
because it is still a LVM partition.

Now the case I am figuring out is the one you didn't separe "/" and "/home"
(however the installer is still creating "swap") but you need to reinstall
Debian because you screwed it up for some reason. Now a smart installer
before to start everything takes its time to check the disk and discovers
that you have, along a crypted disk and a LVM group, also a previous version
of Debian hence check the users and it asks you if you want keep all the
users, just one, etc... and then it reinstalls the system and recovers the
setting from the user(s) you selected, without creating a FrankenDebian but
just a fresh and **smart** installation.

This leads in my opinion in creating a further voice for the Debian install:
**the desktop installation**; Standard and Advanced are eventually too
generic and do not target properly the desktop cases. If the D-I was
properly able to read LUKS and LVM during the installation time, and if was
also able to perform a smart installation as described in the paragraph
above, a Desktop installation should be:

1. Create an encrypted partition by default (LUKS + LVM);
I rarely do that, but I can see why some people want it.

2. install everything in / ;
I do tend to prefer that for most setups myself.

3. not create a "swap partition" but a swap-file.
My understanding is that suspend to disk works much easier with a swap
partition still, but my information could be out of date on that.
And of course swap smaller than ram makes suspend to disk not possible.

I also add that:

4. should deactivate root user by default, which is now considering a best
practice;
Not sure I agree it is considered best practices.  A lot of distributions
do it, but not all.  I do prefer root login to work from the console if
I have to fix something.

5. should deactivate the source repos and asking to activate the "contrib"
and "non-free" repos (like in Advanced Mode).


I don't see any complicated tasks to achieve, others Linux distro already
started to move in this direction while other *nix operative systems already
do that since a long time.
Other distributions (Certainly the case for redhat based stuff in the
past) had to do it since they didn't have a working in place upgrade.
That rather makes it required that the installer can do an upgrade and
detect existing settings.  Debian seems to have always aimed for an in
place upgrade that worked, so the installer really only had the purpose
of the initial install.  It's one of the things that made me switch to
Debian over 20 years ago.  I have never had to do a reinstall of a Debian
system except on a machine that lost the disk and I didn't have a backup
of it (nothing important was kept on that system).  I really should
have replaced that other disk in the RAID1 within a reasonable amount
of time. :)

The only issues I see here are the resistance to the changes and the fact
that actually the D-I has some issue to recognize the encrypted partitions
and if you want reinstall Debian you can't preserve any of the partitions
you want because it will consider the encrypted disks as blanks.
Collecting all those settings does not sound like a trivial job, and based
on the normal use case of a Debian install, I sure don't see the value
in it.  How do you even decide which settings should be preserved and
which should not?  What if one of the settings is what broke your system?
If you screw up the system, go fix it.  You will learn something from it.
Blowing away the system and installing it again means you learn nothing,
waste a bunch of time, and will likely do it again in the future.  I have
certainly broken my installs over the years and had to fix it, but it has
always been possible.  Running unstable and experimental stuff at times
means it sometimes breaks for you and you get to put it back together.
Not a big deal.



Reply to: