Dancing with cl-build- ...

Start

We recently needed to transfer data from the old server to a new one in the office, it would seem a small task: I planned it, bought hardware, installed a new distribution kit, transferred the data and voila. BUT! It wasn't like that.

We bought new hardware, albeit not powerful, but the existing Calculate distribution in its most recent incarnation of CDS at the time of this action turned out to be not very capable of recognizing new hardware, namely network interfaces. The local one sees, but ethN doesn't, they knocked on the technical support "Cart" - the result is vague. Well, okay, we decided to check on other distributions, from the available ones there was fresh CentOS and gentoo, the first one could not, the second one saw hardware, from which they concluded that the problem was in the kernel, technical support hinted that they were waiting for the distribution kit or ...

... and we chose "or"

Actually, all of the following is in fact just a protocol of operation, that is, what we did in order to create a distribution kit for our own needs using C alculate S cratch S erver (hereinafter CSS). Looking ahead, I will say that everything turned out to be not so difficult, albeit not the first time, and precisely in order for us and you, the reader, to have such a need in the future, it turned out from the first.

We went to get the image at https://mirror.lautre.ru/nightly/20201105/ and took css-20201105-x86_64.iso in your case it might be different, it doesn't matter.

Hooked the image to the virtual machine on the old server:

qemu-system-x86_64 \
-smp 4 \
-vnc 192.168.1.240:7 \
-m 8192 \
-enable-kvm \
-boot order=cd,menu=on,reboot-timeout=20 \
-hda /mnt/8tb/CSS/CSS-gradient.raw \
-cdrom /mnt/8tb/CSS/css-20201105-x86_64.iso

As you already understood, a little earlier, in addition to the ISO image, an image for a virtual machine was created, something like this:

qemu-img create -f raw CSS-gradient.raw 40G

VNC , , , .

:

cl-builder-prepare -d /dev/sda1 --id CSS-Gradient

, :

:

cl-builder-update

, , .

"Yes" , - , CSS , cl-builder .

:

chroot /run/calculate/mount/CSS-Gradient/ /bin/bash

... :

export PS1="(new) ${PS1}"

:

cl-kernel --kver list

* 5.4.57-calculate *

, , ,

eix calculate-sources

5.4 5.4.74 , , /etc/portage/package.mask .

mkdir /etc/portage/package.mask

echo "> /etc/portage/package.mask/custom

:

eix calculate-sources

:

:

cl-update

... :

cl-kernel --kver list

* 5.4.72-gentoo

* 5.4.57-calculate *

calculate, :

emerge -s sys-kernel/calculate-sources

— 5.9.3,

, gentoo- 5.4.72 , /etc/portage/package.mask/custom «>sys-kernel/calculate-sources-5.4.74», :

nano /etc/portage/package.mask/custom

, /etc/portage/package.mask/custom :

>sys-kernel/calculate-sources-5.4.74

<sys-kernel/calculate-sources-5.4.74

,

cl-update

Voilà ↑, the kernel of choice is installed and automatically assigned by the default kernel.
↑, .

. (Ctrl+D) :

cl-builder-image --compress xz --isohybrid ON

, , .

, ISO- , , — - , /root/, . , cl-builder-prepare. :

cp /var/calculate/linux/css-20201111-x86_64.iso /run/calculate/mount/CSS-Gradient/root/

qemu-system-x86_64 \
-smp 4 \
-vnc 192.168.1.240:7 \
-m 8192 \
-enable-kvm \
-boot order=cd,menu=on,reboot-timeout=20 \
-hda /mnt/8tb/CSS/CSS-gradient.raw \
-hdb /dev/sdd \
-cdrom /mnt/8tb/CSS/css-20201105-x86_64.iso

dd ( /dev/sdd, /dev/sdb) , ISO-:

mount /dev/sda1 /mnt

cd /mnt/root

dd if=css-20201111-x86_64.iso of=/dev/sdb bs=8MB;sync

(halt -p), , CSS .

, , , CSS , . , , DNS , ... ;-)

https://old.calculate-linux.org/main/ru/calculate-builder

https://wiki.calculate-linux.org/ru/kernel

https://wiki.gentoo.org/wiki/Handbook:X86/Full/Portage/ru

https://wiki.gentoo.org/wiki/Handbook:X86/Full/Installation/ru#Chrooting




All Articles