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

Re: change hostname & static IP & ???



On 04/12/2016 03:27 AM, tomas@tuxteam.de wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, Apr 11, 2016 at 08:31:16PM -0500, David Wright wrote:
On Mon 11 Apr 2016 at 19:02:45 (-0400), ken wrote:
This is on Wheezy for a Raspberry Pi.

Using dd, I copied the SD card for one (nicely working and
configured) system onto another SD card [...]

      
.ssh/known_hosts [...]
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?


Another thing to look out for:

Bits and pieces of your /etc might end up in your initramfs,
namely those needed in early boot (e.g. things needed to
bring up the root file system). The static IP address might
be needed if you have your root on NFS, for example. Or
the /etc/crypttab, if you're running with encrypted root
(I don't think so, but I lost myself some hair over this
one).

So after you have "fixed up" your SD card clone (IPs and all
that things) you might want to run update-initramfs for those
bits to find their way into the 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, 

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


Beware that now you have two different file systems with
the same UUID. This might confuse some all too credulous
programs that rely on (re-) seeing the same medium if the
UUID didn't change.

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?



Reply to: