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

Re: change hostname & static IP & ???



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, Apr 12, 2016 at 05:28:14PM -0400, ken wrote:
> On 04/12/2016 03:27 AM, tomas@tuxteam.de wrote:

[Dave already gave pretty insightful answers]

> >Also, your new host will have the same ssh host private key. This
> >might or might not annoy you.
> 
> You mean those /etc/ssh/ssh_host_*key* files, yes?

Yes, exactly those. If you are "replacing" one installation by
another, you usually want to keep that, to keep clients from
freaking out that the "host key" has changed. Having two
"different"[1] host with the same key might confuse the hell
out of a sysadmin.

> >Another thing to look out for:
> >
> >Bits and pieces of your /etc might end up in your initramfs,
> [...]

> Thanks for letting me know.  Though I've set up a few encrypted file
> systems and compiled lots of kernels in the past, still I'm a
> feets-pointing-backwards idiot when it comes to initramfs, never
> needed to know much about it,

So am I -- didn't I mention I lost some hair over that ;-)

> It sounds like "update-initramfs -v -u all" should be the last thing
> I do before the initial reboot, yes?

Yes -- after chasing down the relevant (to your installation) bits and
pieces of /etc.

> >Beware that now you have two different file systems with
> >the same UUID [...]

> Very good to know... and I didn't know that at all.  A quick look
> around found me dbus-uuidgen, a command to create a new uuid.  It's
> stored in /var/lib/dbus/machine-id says the manpage... and
> confirmed.  Is that the UUID you're referring to?
> 
> The manpage makes this one seem easy...
> 
> cd [the SD card's / mount point]
> dbus-uuidgen > var/lib/dbus/machine-id
> 
> 
> There are also things called UUIDs, or 'labels', for devices and for
> partitions and for swap(s).  Do I need to do something with them as
> well?

Uh -- sorry: I actually meant the "file system label", which is nowadays
mostly implemented as an UUID (except for DOS FAT file systems, which
have very little room for the label).

I never tried, but strange things might occur if you insert both SD
cards at the same time in one computer (e.g. to copy over things),
at least depending on how many layers of "desktop goodness" try to
be helpful and get their feet tangled with two file systems with the
same label. What does end up in /dev/disk/by-uuid? The last one
mounted? What happens when you eject that one? The other before
the last one? Perhaps it's specced somewhere, but it's one of those
dark corners where you might expect software doing funny things.

Last time I looked, for example, the Gnome machinery for attaching
little things to the files in the file browser (hearts, stars, what
have you) indexed removable media by their label. Putting a heart
on one SD card could very well let a heart appear on a file with
the same path on the other SD card. Magic?

Things like that.

[1] "The same host" and "different hosts" gets complicated once
   you think of replacing the hardware after a catastrophe (loosely
   "bare metal recovery") or high availability takeover.

- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlcN+aIACgkQBcgs9XrR2kbOVACeNt5am2a0JJ9JfkRwxL48CWhh
WFUAninw1UylMeNPAZldsKhgdNATViAv
=RRu+
-----END PGP SIGNATURE-----


Reply to: