Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #274879 > unrolled thread

Re: Adding a new boot disk while keeping old disk

Started byCharlie Gibbs <cgibbs@surfnaked.ca>
First post2024-11-26 07:30 +0100
Last post2024-11-27 23:50 +0100
Articles 8 — 8 participants

Back to article view | Back to linux.debian.user


Contents

  Re: Adding a new boot disk while keeping old disk Charlie Gibbs <cgibbs@surfnaked.ca> - 2024-11-26 07:30 +0100
    Re: Adding a new boot disk while keeping old disk George at Clug <Clug@goproject.info> - 2024-11-26 08:30 +0100
    Re: Adding a new boot disk while keeping old disk Karl Vogel <vogelke@pobox.com> - 2024-11-26 11:50 +0100
      Re: Adding a new boot disk while keeping old disk Chris Green <cl@isbd.net> - 2024-11-26 13:20 +0100
    Re: Adding a new boot disk while keeping old disk Anssi Saari <anssi.saari@debian-user.mail.kapsi.fi> - 2024-11-26 15:20 +0100
    Re: Adding a new boot disk while keeping old disk David Christensen <dpchrist@holgerdanske.com> - 2024-11-26 23:00 +0100
    Re: Adding a new boot disk while keeping old disk David Wright <deblis@lionunicorn.co.uk> - 2024-11-27 06:30 +0100
    Re: Adding a new boot disk while keeping old disk eben@gmx.us - 2024-11-27 23:50 +0100

#274879 — Re: Adding a new boot disk while keeping old disk

FromCharlie Gibbs <cgibbs@surfnaked.ca>
Date2024-11-26 07:30 +0100
SubjectRe: Adding a new boot disk while keeping old disk
Message-ID<JMXfb-bHfh-1@gated-at.bofh.it>
Many thanks to all of you who have replied to my questions.
It seems that I've been creating trouble for myself by trying
to kludge something together from the old installation.
The only reason I tried this was the age-old problem I
have whenever I start from a fresh install: I lose all my
customizations and added packages that went into /usr, /var,
/etc, etc.  :-)  It takes a while to put all this stuff back;
for a month or so after a fresh install I'm discovering (and
re-installing) missing things.  I was hoping I could avoid
this, but it seems that the time I'm spending on my jury-rigged
"solution" more than offsets any savings I might realize.

I bit the bullet and downloaded the Debian 12.8 installer to a
thumb drive.  To be safe, I unplugged the original hard drive
to keep it out of harm's way (and to avoid any possible confusion
for the installer).  Then I deleted all the partitions I was
experimenting with on the SSD, and did a fresh install.  WOW!
Was that ever fast!  A complete install in 5 minutes or less!
And booting is also lightning-fast.

But, as I expected, all my stuff is gone.  Well, sort of.
I plugged the hard drive back in, and all my files are
there.  But there are no icons left on the desktop - no
more Portal, and none of the utilities I downloaded were
on my $PATH.

How do the rest of you deal with all the user-added stuff
that vanishes when you do a fresh install?  Are there some
tricks I can use, rather than painstakingly re-installing
all my utilities one by one?  I assume you can just copy
the old /home over to the new drive (although in my case
I'll be leaving the big music and video directories on the
spinning rust, to be accessed at a new mount point that I'll
add to /etc/fstab).  But that does nothing about all the
nifty utilities that were in (e.g.) /usr/bin (even though
the configuration files are probably in /home).

For now, though, the box is sort of running.  And man, is it
a speed demon.  Once again, thanks for the assistance.

-- 
/~\  Charlie Gibbs                  |  Life is perverse.
\ /  <cgibbs@kltpzyxm.invalid>      |  It can be beautiful -
  X   I'm really at ac.dekanfrus     |  but it won't.
/ \  if you read it the right way.  |    -- Lily Tomlin

[toc] | [next] | [standalone]


#274880

FromGeorge at Clug <Clug@goproject.info>
Date2024-11-26 08:30 +0100
Message-ID<JMYbf-bHPh-9@gated-at.bofh.it>
In reply to#274879

On Tuesday, 26-11-2024 at 17:03 Charlie Gibbs wrote:
> Many thanks to all of you who have replied to my questions.
> It seems that I've been creating trouble for myself by trying
> to kludge something together from the old installation.
> The only reason I tried this was the age-old problem I
> have whenever I start from a fresh install: I lose all my
> customizations and added packages that went into /usr, /var,
> /etc, etc.  :-)  It takes a while to put all this stuff back;
> for a month or so after a fresh install I'm discovering (and
> re-installing) missing things.  I was hoping I could avoid
> this, but it seems that the time I'm spending on my jury-rigged
> "solution" more than offsets any savings I might realize.
> 
> I bit the bullet and downloaded the Debian 12.8 installer to a
> thumb drive.  To be safe, I unplugged the original hard drive
> to keep it out of harm's way (and to avoid any possible confusion
> for the installer).  Then I deleted all the partitions I was
> experimenting with on the SSD, and did a fresh install.  WOW!
> Was that ever fast!  A complete install in 5 minutes or less!
> And booting is also lightning-fast.
> 
> But, as I expected, all my stuff is gone.  Well, sort of.
> I plugged the hard drive back in, and all my files are
> there.  But there are no icons left on the desktop - no
> more Portal, and none of the utilities I downloaded were
> on my $PATH.

Linux's libraries and dependencies  from your old installs of your "utilities" are likely to be very different to your new Linux environment.

I recommend finding current Debian (i.e. Bookworm?)  packaged versions, and if they are not in Debian packages, then downloading the Utilities from their respective web sites (if they offer installation instructions for the Debian environment. If these too were not possible, I personally would give up using the "utilities", and where possible finding something that kind of does what they did. Not knowing what your utilities are that you used to run, I can only make broad suggestions, and sorry if some of those "utilities" are very important to you. For me, I give up and move on quicker that some, even if I really miss them. All the best in your efforts, I hope you succeed !

> 
> How do the rest of you deal with all the user-added stuff
> that vanishes when you do a fresh install?  Are there some
> tricks I can use, rather than painstakingly re-installing
> all my utilities one by one?  I assume you can just copy
> the old /home over to the new drive (although in my case
> I'll be leaving the big music and video directories on the
> spinning rust, to be accessed at a new mount point that I'll
> add to /etc/fstab).  

If you had spare space, I would be tempted to put a copy of the videos/music that I liked, to the new NVMe. Speed and ease of use. I would keep the HD as a backup. 

BTW: I still think HDs have less chance of dying and/or loosing data that SDD (inc NVMe SSDs).  

>But that does nothing about all the
> nifty utilities that were in (e.g.) /usr/bin (even though


> the configuration files are probably in /home).

I would not recommend copying over hidden folder config files unless they were for a specific "utility" that you used to use. I have found conflicts between new installations with configuration files of older installations due to programs changing the way they store their own configurations/data. 

Even if it means setting things up again, and the waste of time that takes, I prefer to have a stable environment as my first priority. Stability even triumphs over my laziness.  

> 
> For now, though, the box is sort of running.  And man, is it
> a speed demon.  Once again, thanks for the assistance.

I hope for a nice stable, fast, and reliable Debian system for you (with programs that do what you used to do, whether that be the same utilities you used to use, or some kind of replacement program.


George.


> 
> -- 
> /~\  Charlie Gibbs                  |  Life is perverse.
> \ /  <cgibbs@kltpzyxm.invalid>      |  It can be beautiful -
>   X   I'm really at ac.dekanfrus     |  but it won't.
> / \  if you read it the right way.  |    -- Lily Tomlin
> 
> 

[toc] | [prev] | [next] | [standalone]


#274897

FromKarl Vogel <vogelke@pobox.com>
Date2024-11-26 11:50 +0100
Message-ID<JN1iN-bJHV-1@gated-at.bofh.it>
In reply to#274879
>> On Tue 26 Nov 2024 at 01:21:31 (-0500), Charlie Gibbs wrote:

> How do the rest of you deal with all the user-added stuff that vanishes
> when you do a fresh install?  Are there some tricks I can use, rather
> than painstakingly re-installing all my utilities one by one?

  I use a filesystem "/dist" to keep various installations I've done:

    /dist
    |   +--i386-pc-solaris2.11
    |   +--sparc-sun-solaris2.10
    |   +--x86_64-centos5-linux
    |   +--x86_64-centos6-linux
    |   +--x86_64-freebsd-10.4-rel
    |   +--x86_64-freebsd-11.3-rel
    |   +--x86_64-oracle6.9-linux
    |   +--x86_64-oracle6.10-linux
    |   +--x86_64-oracle7.9-linux

  Each system directory (named by architecture and OS-release) contains
  a tree like this:

    /dist
    |   +--x86_64-whatever
    |   |   +--bin              # original /bin
    |   |   +--boot             # original /boot
    |   |   +--etc.orig         # original /etc
    |   |   +--etc              # /etc with all my changes
    |   |   +--home             # interesting parts of $HOME like dotfiles
    |   |   +--lib              # original /lib
    |   |   +--libexec          # original /libexec, if present
    |   |   +--root             # anything I added to root home directory
    |   |   +--sbin             # original /sbin
    |   |   +--STIG             # STIG software and check results, if any
    |   |   +--usr
    |   |   |   +--bin          # original /usr/bin
    |   |   |   +--lib          # original /usr/lib
    |   |   |   +--local        # anything I installed
    |   |   +--var
    |   |   |   +--cron
    |   |   |   |   +--tabs     # scheduled jobs for me, root, etc.
    |   |   |   +--log          # any /var/log files I created --
                                # placeholders with owner and permissions

  I create this tree when I have a server/workstation I'm happy with,
  and I update it when I'm about to retire the system.

  The biggest {time,error}-saver was doing this immediately after getting
  a bootable system so I can recover from a bad change to an /etc file:

    root# mkdir /etc.orig
    root# cd /etc
    root# find . -print | cpio -pdum /etc.orig

  HTH.

-- 
Karl Vogel                      I don't speak for anyone but myself

CEO assistant: "please reset CEO's password, he's too drunk to remember it."
                        --Reddit "unusual IT support tickets", 5 Nov 2024

[toc] | [prev] | [next] | [standalone]


#274902

FromChris Green <cl@isbd.net>
Date2024-11-26 13:20 +0100
Message-ID<JN2HT-bKHD-3@gated-at.bofh.it>
In reply to#274897
>> On Tue 26 Nov 2024 at 01:21:31 (-0500), Charlie Gibbs wrote:
> 
> How do the rest of you deal with all the user-added stuff that vanishes
> when you do a fresh install?  Are there some tricks I can use, rather
> than painstakingly re-installing all my utilities one by one?

I do two things:-

1 - Keep a simple text list of packages I have added to the system
using 'apt install' (or aptitude, or synaptic, or whatever).  Then
when I do a clean install I can simply add all the extra packages, I
suppose I could automate it even but I don't bother doing that.

2 - I have a mercurial repository in /etc, it has an ignore file that,
by default, ignores every file in /etc. Then, when I modify something,
I first do an 'hg add <file>' and then do the change and commit it to
the repository.  I thus have a history (and diffs) of all the changes
I have done in /etc.  With a new install I make a backup copy of the
old /etc and refer to it to make similar changes to the new system.


-- 
Chris Green
·

[toc] | [prev] | [next] | [standalone]


#274905

FromAnssi Saari <anssi.saari@debian-user.mail.kapsi.fi>
Date2024-11-26 15:20 +0100
Message-ID<JN4A1-bLT6-1@gated-at.bofh.it>
In reply to#274879
Charlie Gibbs <cgibbs@surfnaked.ca> writes:

> How do the rest of you deal with all the user-added stuff
> that vanishes when you do a fresh install?

I don't do fresh installs as a rule, not when changing hardware or
shuffling files around like in your case, or when I wanted to switch
from MBR partition table to GPT or when otherwise shuffling partitions
around.

In fact, I find it weird to see people advocate the Windows way of "if
in doubt, reinstall". Linux installations are robust and long lived. In
fact, Windows is pretty good too, these days.

However, my little pizza box kicked the bucket recently so I got an
identical replacement. My backups include the output of dpkg
--get-selections "*" as recommended in the Debian release notes so
putting all the same packages on the replacement box needed just some
apt work. I also save the partition table but in the case of a small
system it's not an issue. The system specific stuff in /etc and /home I
pulled from backups as well.

[toc] | [prev] | [next] | [standalone]


#274918

FromDavid Christensen <dpchrist@holgerdanske.com>
Date2024-11-26 23:00 +0100
Message-ID<JNbLb-bQ8Q-3@gated-at.bofh.it>
In reply to#274879
On 11/25/24 22:03, Charlie Gibbs wrote:
> Many thanks to all of you who have replied to my questions.


YW.  :-)


> It seems that I've been creating trouble for myself by trying
> to kludge something together from the old installation.
> The only reason I tried this was the age-old problem I
> have whenever I start from a fresh install: I lose all my
> customizations and added packages that went into /usr, /var,
> /etc, etc.  :-)  It takes a while to put all this stuff back;
> for a month or so after a fresh install I'm discovering (and
> re-installing) missing things.  I was hoping I could avoid
> this, but it seems that the time I'm spending on my jury-rigged
> "solution" more than offsets any savings I might realize.
> 
> I bit the bullet and downloaded the Debian 12.8 installer to a
> thumb drive.  To be safe, I unplugged the original hard drive
> to keep it out of harm's way (and to avoid any possible confusion
> for the installer).  Then I deleted all the partitions I was
> experimenting with on the SSD, and did a fresh install.  WOW!
> Was that ever fast!  A complete install in 5 minutes or less!
> And booting is also lightning-fast.
> 
> But, as I expected, all my stuff is gone.  Well, sort of.
> I plugged the hard drive back in, and all my files are
> there.  But there are no icons left on the desktop - no
> more Portal, and none of the utilities I downloaded were
> on my $PATH.
> 
> How do the rest of you deal with all the user-added stuff
> that vanishes when you do a fresh install?


Similar to other readers, I use a version control system (CVS) to help 
me with system administration -- checking in system configuration files 
I modify or create, keeping a plain text log file of my notes and 
console sessions, keeping a plain text file containing the names of 
packages I have installed, checking in various shell and Perl scripts I 
have written over the years, checking in app configuration and data 
files, etc..  Then when I do a fresh install, I check out a CVS working 
directory for the previous incarnation of that machine, or something 
similar, and use those files to help me configure the new system.


AIUI the "top shelf" solution is configuration management systems, such 
as Puppet, Ansible, etc..  I expect they are necessities in large 
organization IT environments.


> Are there some
> tricks I can use, rather than painstakingly re-installing
> all my utilities one by one?


I take images of my OS disks using dd(1) on a regular basis.  So, if I 
finger fumble and scramble an OS instance, recovery consists of pulling 
the OS SSD, restoring the last image onto a spare SSD, booting, updating 
Debian,  checking out the appropriate CVS working directories, and 
merging changes made since the image was taken.


> I assume you can just copy
> the old /home over to the new drive (although in my case
> I'll be leaving the big music and video directories on the
> spinning rust, to be accessed at a new mount point that I'll
> add to /etc/fstab).  But that does nothing about all the
> nifty utilities that were in (e.g.) /usr/bin (even though
> the configuration files are probably in /home).


I treat the home tree as part of the OS instance.  So, it is 
incorporated into my image backup/ restore process (above).  My home 
directory contains CVS working directories and whatever files and/or 
directories Debian and the various apps put there.


It is up to us and/or the various app developers to figure out 
migration, disaster preparedness, disaster recovery, etc., for the 
various apps we use.  I have configured Thunderbird to copy incoming 
mail to a spare directory on the IMAP server, I have configured 
Thunderbird to send a BCC of outgoing mail to a spare e-mail account, 
and I backup the Thunderbird profile directory daily.  I use the Firefox 
"Sync" feature to deal with that app's configuration and data.  I have 
put various app files into CVS projects.


> For now, though, the box is sort of running.  And man, is it
> a speed demon.  Once again, thanks for the assistance.


Enjoy.  :-)


David

[toc] | [prev] | [next] | [standalone]


#274919

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2024-11-27 06:30 +0100
Message-ID<JNiMF-bVdD-1@gated-at.bofh.it>
In reply to#274879
On Mon 25 Nov 2024 at 22:03:33 (-0800), Charlie Gibbs wrote:

> But, as I expected, all my stuff is gone.  Well, sort of.
> I plugged the hard drive back in, and all my files are
> there.  But there are no icons left on the desktop - no
> more Portal, and none of the utilities I downloaded were
> on my $PATH.
> 
> How do the rest of you deal with all the user-added stuff
> that vanishes when you do a fresh install?  Are there some
> tricks I can use, rather than painstakingly re-installing
> all my utilities one by one?  I assume you can just copy
> the old /home over to the new drive (although in my case
> I'll be leaving the big music and video directories on the
> spinning rust, to be accessed at a new mount point that I'll
> add to /etc/fstab).  But that does nothing about all the
> nifty utilities that were in (e.g.) /usr/bin (even though
> the configuration files are probably in /home).

You have the perfect opportunity not to repeat the mistake of
scattering these nifty utilities about, whatever they are,
or comingling them with the Debian system. Knowing nothing
about where you got them, and in what form, you could either
repeat installing them, or just copy the binaries across,
but keep them separate from Debian by placing them in any of
/opt, /usr/local/bin, ~/.local/bin or ~/bin as appropriate.
/usr/local/ will already have other subdirectories besides
bin/, and you can create similar ones under ~/.local/bin/.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#274942

Fromeben@gmx.us
Date2024-11-27 23:50 +0100
Message-ID<JNz17-c55C-11@gated-at.bofh.it>
In reply to#274879
On 11/26/24 01:03, Charlie Gibbs wrote:

> But there are no icons left on the desktop - no more Portal, and none of
> the utilities I downloaded were on my $PATH.
>
> How do the rest of you deal with all the user-added stuff that vanishes
> when you do a fresh install?  Are there some tricks I can use, rather
> than painstakingly re-installing all my utilities one by one?

If they were installed through a package manager, you probably shouldn't do
that.

> I assume you can just copy the old /home over to the new drive

Mind the dotfiles.  Apps might behave strangely when you run them with an
old config file.

> But that does nothing about all the nifty utilities that
> were in (e.g.) /usr/bin (even though the configuration files are probably
> in /home).

I hate losing stuff and drastic changes like that, so what I've done in
the past when I used Ubuntu was:

* do a complete backup
* clean-install the latest *-LTS version
* restore /home, being careful not to overwrite existing dotfiles
* restore any other filesystems that aren't part of the base install
* modify /etc/profile.d/* to change $PATH as appropriate
* keep the installation as long as possible.

The last time I went through this I made a list of installed packages (apt
list --installed) so I could re-install (some of) them on the new OS.

This probably is not the recommended procedure.  Since I switched to Debian
the issue hasn't come up, so I haven't yet been forced into a decision as to
how to deal with it.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web