Score:0

Kernel files (linux-image) to exclude on rsync full clone to different hardware

ธง cn

EDIT

Now I'm able to boot the OS. As I made clean copy of the /etc directory just after buying the "new" dedicated server and installing Ubuntu server 20.04, i proceeded to:

  1. Boot the "new" server into rescue mode.
  2. chroot into the system.
  3. mv /etc /etc.old_server
  4. tar -zxvf ~/etc.tar.gz && mv ~/etc /
  5. apt update && apt --reinstall install linux-generic linux-headers-generic linux-image-generic linux-firmware intel-microcode (Which BTW installed a new kernel version linux-modules-5.4.0-107-generic. I also reinstalled the original kernel,version 105). Here I noticed the OS started using regular Ubuntu repositories (http://nova.clouds.archive.ubuntu.com) but with the previous /etc directory the repositories used were OVH ones (http://ubuntu.mirrors.ovh.net).
  6. Rebooted recovery mode into the hard drive Ubuntu server 20.04 and it just booted fine.

At this point I thought reinstalling the kernel, initram, etc. through different repositories and a different /etc directory which may have a different config file for linux kernel/initram rebuilding may did the trick but then noticed the network interface logical name changed from enp3s0 to eno1. As there are some network config files for enp3s0 this time they did not got applied.

So, now I'm wondering:

  1. Is there any config file I missed into the /etc directory which was used for reinstalling the kernel/initram so now it works?
  2. There was a problem with the network config which now didn't got applied because of the logical name change to eno1.
  3. Maybe using the official Ubuntu repositories instead of the OVH ones did the trick?

I'll try to find it out tomorrow.

Thanks in advanced.

END EDIT

I've just cloned my personal OVH dedicated server to another OVH dedicated server I've just hired and everything "was working fine" until kernel and initram image (linux-image-5.4.0-105-generic) got reinstalled unexpectedly.

After rebuilding initram and reinstalling the kernel and initram images (couldn't back it up as apt caught me by surprise, I did not expect the rebuilt/reinstall) the system never booted up again (unless I used OVH rescue mode where I can chroot and try to fix things).

I got the following messages from OVH technicians:

  1. First they said the system did not respond to keyboard so he rebooted the system (once in rescue mode I tried to fix things and rebooted again using the server hard disk and kernel image/ramdisk).
  2. Second time, The server gets stuck during the boot phase, with the message: (unable to boot correctly) but I don't know if that's a kernel panic or a message Ubuntu server shows when some services like networking related are not able to start.
  • As I was able to boot the system before the unexpected kernel rebuilt I'm wondering which file(s), libraries or whatever should I exclude and missed up? I'm talking about the ones that seem to affect the initram and kernel image rebuilt/reinstall.

BTW, the dedicated server was running through kernel linux-image-5.4.0-105-generic when I cleanly installed Ubuntu sever 20.04.

The complete sequence may be:

  1. I hired a "new" OVH dedicated server.
  2. I installed Ubuntu server 20.04.
  3. I restarted the "new" server into rescue mode.
  4. I pulled (from the "new" server) a full clone syncing the "old" dedicated server to the "new" one, which has a different hardware, while excluding some directories through the command rsync --log-file=/tmp/rsync-full-clone.log --stats --human-readable -aAXvHSI --exclude={/lib/modules/*,/boot/*,/dev/*,/etc/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found} -e ssh [email protected]:/ /.
  5. As I excluded the /etc directory I then pulled a specific sync of the /etc directory from the "old" server into the "new" one through the command rsync --log-file=/tmp/rsync-etc-dir.log --stats --human-readable -aAXvHSI --exclude-from='/root/rsync-excluded-etc-files.txt' -e ssh [email protected]:/etc /.
  6. I then edited network related config files (mainly) in /etc, restarted the "new" server, it booted fine and everything seemed to "work fine".
  7. I then did run the following commands apt update && apt remove ufw.
  8. The previous command triggered a rebuilt of the kernel and initram images (linux-image-5.4.0-105-generic) which failed due to missing files/libs/binaries so I did execute apt install cryptsetup cryptsetup-bin cryptsetup-initramfs fuse ntfs-3g.
  9. After that i remotely restarted the "new" server and it never booted again using its own kernel image (I suspect it may be due to a kernel panic but I do not have any mechanism to check it out).
  10. Through OVH Control Panel i configured the dedicated server to boot in rescue mode, so when OVH technician hard rebooted the dedicated server it booted up into the rescue mode environment so I could try to fix things.
  11. I tried reinstalling (apt --reinstall install) the linux kernel image and other critical libraries, check out for errors in config files and fix them with no luck. So each time i reboot the system using its own hard disk and its own kernel image it never boots up.
  12. So, I'm wondering I maybe overwrite some kernel critical config file(s) when rsynced the "old" server into the "new" one but the issue came out when I had to reinstall the linux kernel and dpk scripts used libraries or config files (or both) which belong to the "old" dedicated server and built the kernel image through them.

So I'm wondering which file(s), libraries or whatever should I exclude and missed up?

The following is the list of excluded files when synced /etc directory:

~# cat rsync-excluded-etc-files.txt

/etc/timezone
/etc/localtime
/etc/fstab
/etc/mtab
/etc/mdadm.conf
/etc/crypttab
/etc/mailname
/etc/hostname
/etc/host.conf
/etc/hosts
/etc/grub.d/
/etc/resolv.conf
/etc/netplan/
/etc/network/
/etc/networkd-dispatcher/
/etc/networks
/etc/systemd/network/50-default.network
/etc/systemd/network/pub.network
/etc/resolvconf/resolv.conf.d/original
/etc/resolvconf/resolv.conf.d/tail
/etc/nsswitch.conf
/etc/NetworkManager/*
/etc/networkd-dispatcher/*
/etc/dbus-1/*
/etc/udev/*
/etc/modules
/etc/modules-load.d/modules.conf
/etc/modprobe.d/*
/etc/modules-load.d/modules.conf
/etc/modules
/etc/depmod.d/*
/etc/mke2fs.conf
/etc/fwupd/*
/etc/hdparm.conf
/etc/initramfs-tools/*
/etc/iproute2/*
/etc/issue
/etc/iscsi/*
/etc/kernel/*
/etc/kernel-img.conf
/etc/polkit-1/*
/etc/PackageKit/*
/etc/udisks2/*
de flag
ฉันกำลังประสบปัญหาเดียวกัน คุณพบวิธีแก้ปัญหาหรือไม่? จะเป็นการดีที่จะโพสต์ไว้ถ้าคุณพบอะไร
cn flag
สิ่งที่ได้ผลสำหรับฉันฉันได้อธิบายไปแล้วในส่วนแก้ไข ต้องใช้มิเรอร์ Ubuntu ของแท้แทน OVH

โพสต์คำตอบ

คนส่วนใหญ่ไม่เข้าใจว่าการถามคำถามมากมายจะปลดล็อกการเรียนรู้และปรับปรุงความสัมพันธ์ระหว่างบุคคล ตัวอย่างเช่น ในการศึกษาของ Alison แม้ว่าผู้คนจะจำได้อย่างแม่นยำว่ามีคำถามกี่ข้อที่ถูกถามในการสนทนา แต่พวกเขาไม่เข้าใจความเชื่อมโยงระหว่างคำถามและความชอบ จากการศึกษาทั้ง 4 เรื่องที่ผู้เข้าร่วมมีส่วนร่วมในการสนทนาด้วยตนเองหรืออ่านบันทึกการสนทนาของผู้อื่น ผู้คนมักไม่ตระหนักว่าการถามคำถามจะมีอิทธิพลหรือมีอิทธิพลต่อระดับมิตรภาพระหว่างผู้สนทนา