:: Re: [DNG] Switching
トップ ページ
このメッセージを削除
このメッセージに返信
著者: Steve Litt
日付:  
To: dng
題目: Re: [DNG] Switching
On Sat, 5 Aug 2017 08:50:29 -0400
Hendrik Boom <hendrik@???> wrote:

> On Sat, Aug 05, 2017 at 09:28:02AM +0000, Weaver wrote:
> > Greetings.
> > Currently running Debian SID, with separate /, swap, and /home
> > partitions.
> > I don't suppose switching is as easy as simply replacing the /
> > partition with a new install, preserving the old data?
>
> When I do anything like that I usually copy the system partitions on
> to now areas of the hard drive, edit /etc/fstab, and make sure both
> sets of partitions boot properly.
>
> Then if anything goes wrong with a dist-upgrade, I have an untouched
> bootable set of partitions to reboot to and use as a fully
> functioning base for recovery.
>
> And of course, start by backing up your data. Just in case.
>
> -- hendrik


I'd start with whatever package manager command lists the packages
I've installed myselfself (rather than having been installed to fulfill
dependencies). I'd put the list in your home directory. Also in my home
directory, I'd put up to the minute copies of /etc/fstab, the output of
the mount command, the output of cat /proc/partitions, a copy of `ip
addr`, a copy of the disk's MBR or UID or whatever it's called, a
copy of /etc/sudoers, and a tarball of /etc, all somewhere under my
home directory..

Then I'd make off-disk backups of /home, and of every other data
directory (stuff I've made or collected myself rather than OS/program
stuff). After that I'd make an off-disk backup of the entire filesystem
starting at /.

Then I'd entirely wipe the disk and perform a brand new install of the
sought version.

Then I'd either mount or create my old /home as /oldhome.

Using the list of manually installed packages from the old install, I'd
make some shellscripts to install the necessary packages. I'd copy all
data directories except /home to the same directory names or
mountpoints. If there are parts of my old home directory that are
obviously data rather than config info, I'd copy those over.

I would NOT copy over old config info. Doing so is how you get ghosts
of operating systems past, complete with bizarre and intermittent
behavior. If I needed to change configs on the new setup, I'd diff them
with the old configs, think about what's going on, and manually make
the changes.

Is my way more work? Heckyeah (as long as the dist-upgrade doesn't
trash everything). Does my way leave me in a situation where every day
for the first month, I'm finding and modifying little things in order
that things work my way? Abso-lutely! Do I take a lot of grief from
people when I articulate my method? You'd better believe it.

But as an elder in the Church of the Known State, I view a from-scratch
install as spring cleaning. I can throw out all those configs and
caches that have been uselessly (and we hope harmlessly) hanging around
since VA Linux was the stock to buy. I consider the fresh install to be
one of the greatest gifts bestowed by non-rolling-release Linuxes.

One more thing: I love almost all aspects of POSIX, but the use of
one's home directory to hold both one's data and one's config is, in my
opinion, a mistake. And it's a mistake unfortunately reenforced by
application defaults concerning where to read and write content.
Because I use my computer as a genuine *personal* computer, I just
store all my content in a tree called /d (sorry LFS). If it were
multiuser, I'd have various names off of /d for this purpose, and tell
people nothing in their /home tree is backed up.

If I absolutely *had to* use /home/slitt for data, I'd put all my data
under /home/slitt/d/, so that I could quickly transfer my genuine data,
while leaving the config stuff where it belongs: On the backup.

After a few days, the tarball of /etc/fstab and /etc/sudoers and other
sensitive backup stuff get erased from /oldhome. I generally
keep /oldhome around until the next fresh install, at which time
this /home because the current /oldhome, and the old /oldhome gets
dropped.

SteveT

Steve Litt
July 2017 featured book: Quit Joblessness: Start Your Own Business
http://www.troubleshooters.com/startbiz