[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



Hi Daniel and everyone reading this,

Daniel <daniel01@mailbox.org> writes:

> I am addressing another case, the one you have not separated partitions 
> for /, /home and swap.
>

Len and Daniel, WRT swap, hibernation is useful when you need to
preserve the state of applications that aren't aware of a desktop
session manager, eg: half-finished work in a terminal.  As I see it the
primary advantage to a swap file is the ability to expand it after a RAM
upgrade. eg: that a reboot using a livecd to resize partitions is not
required.  Granted, expanding a swap file is only necessary if one cares
about hibernation...

> As a matter of fact if the installer is able to recognize the home 
> folder having  /home separated in another partition is not necessary 
> anymore. The advantage respect having the /home separated, specifically 
> for a desktop use are noteworthy.
>

The key point is "is able to recognize [safely and reliably]", and that
requires someone who values the feature to work on debian-installer
(not fun), and also maintain it (not fun).

> If the installer, instead of creating /, /home and swap, creates just / 
> and a swap file and if is able to reinstall itself without overwriting 
> the home folder I think is a huge improvement. As a matter of fact if 
> you reinstall Debian, even with /home in another partition, there is not 
> any assisted aid that explain you how to properly setup the /home 
> partition. Having the system partitioned is already a setup for advanced 
> user.
>

As Len mentioned, Debian users tend to believe that it's a better use of
time to learn how to fix things if one is going to track
testing/sid/experimental than hitting the panic button and losing state.
My mother (who lives 3500km away, runs Debian stable, and installed it
herself eight years ago) doesn't need this feature.  She's not an
intermediate or advanced user and is currently running buster.  She also
has root on her laptop, so has the power to render it unusable.

Daniel, would you please take a look at Bug #941627 (ITP: grub-btrfs --
provides grub entries for btrfs snapshots (boot environments/restore
points)?  I think that this is a feature that would solve the situation
where one ran a testing/sid/experimental upgrade at a time when one
didn't have time to do the work required to fix the brokenness.

Here's how it will work:

1. Install to btrfs (after my MR is merged this will automatically
create @rootfs subvolume, eg: special directory kind of like a pseudo
logical volume).  Reboot.
2. Run a one-line command and add one line to fstab to create a @home
subvolume--this is necessary to exclude /home from the snapshots.  I can
write a beginner friendly helper script if necessary.
3. Take a snapshot before running a dangerous upgrade (easy one-line
command).  Eventually this may be automatic (eg: something like
apt-btrfs-snapshot)
4. If the upgrade produces a broken state the user doesn't have time to
fix, simply boot into a known-good copy of / using the grub menu to
select the correct entry.  If the top-most one isn't good, reboot and
try with the second top-most one until a good one is found.  After
confirming all is well, rename the @rootfs subvolume and create a new
read-write snapshot named @rootfs based on the current boot environment.
This step is only necessary if you want to reboot into the old copy of
the rootfs automatically.  You also get to keep the
@rootfs-does-not-work copy.
5. The logical progression of this feature is to create a snapshot,
dist-upgrade the snapshot, test it (without rebooting), and if
everything looks good then mark it as the default boot environment.

Eventually there will be a GUI!

While wiping and reinstalling may be the best other OSs can aspire to,
Debian can, and will, do better.  I hope you'll agree the project I'm
working on will solve the root issue you're reporting, and that you'll
agree it's a more elegant and time-efficient solution :-)

In the meantime, to remove everything but /home and reinstall without
reformatting you can reboot into a Debian rescue system or using the
Debian Live image, mount your volume, use the solution I provided in my
initial reply (p.s. I consider that a risky approach), then follow:

  https://www.debian.org/releases/buster/amd64/apds03.en.html
  https://wiki.debian.org/Debootstrap


Sorry for the belated reply, I've been swamped with work.
Cheers,
Nicholas

Attachment: signature.asc
Description: PGP signature


Reply to: