Skip to content

Commit ea0ddcc

Browse files
authored
feat: [NODE-1532] Use Ubuntu packaged kernels for ICOS (#4096)
1 parent d193e26 commit ea0ddcc

File tree

3 files changed

+1
-43
lines changed

3 files changed

+1
-43
lines changed

ic-os/guestos/context/Dockerfile.base

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,6 @@ RUN cd /tmp/ && \
4141
echo "fbadb376afa7c883f87f70795700a8a200f7fd45412532cc1938a24d41078011 node_exporter-1.8.1.linux-amd64.tar.gz" > node_exporter.sha256 && \
4242
shasum -c node_exporter.sha256
4343

44-
# Download >=6.11 kernel and modules
45-
RUN cd /tmp/ && \
46-
curl -L -O http://mirrors.kernel.org/ubuntu/pool/main/l/linux/linux-modules-6.11.0-8-generic_6.11.0-8.8_amd64.deb && \
47-
curl -L -O http://mirrors.kernel.org/ubuntu/pool/main/l/linux-signed/linux-image-6.11.0-8-generic_6.11.0-8.8_amd64.deb && \
48-
curl -L -O http://mirrors.kernel.org/ubuntu/pool/main/l/linux-meta/linux-image-virtual-hwe-24.04_6.11.0-8.8_amd64.deb && \
49-
echo "d4cd2d97fcca81b57bec947b0e8ca004d556afce1d13f5cebe5d677c0445c6a2 linux-modules-6.11.0-8-generic_6.11.0-8.8_amd64.deb" >> kernel.sha256 && \
50-
echo "241811191691c68e0874519ee71bda9de39e23510dee5e5512150db874f5b285 linux-image-6.11.0-8-generic_6.11.0-8.8_amd64.deb" >> kernel.sha256 && \
51-
echo "5c31c7e0d996ebc0928c5e1ad3b80fea047b56dfbbdaa759f7e7a70b1c42f10e linux-image-virtual-hwe-24.04_6.11.0-8.8_amd64.deb" >> kernel.sha256 && \
52-
shasum -c kernel.sha256
53-
5444
#
5545
# Second build stage:
5646
# - Download and cache minimal Ubuntu Server 20.04 LTS Docker image
@@ -90,16 +80,3 @@ RUN cd /tmp/ && \
9080
mkdir -p /etc/node_exporter && \
9181
tar --strip-components=1 -C /usr/local/bin/ -zvxf node_exporter-1.8.1.linux-amd64.tar.gz node_exporter-1.8.1.linux-amd64/node_exporter && \
9282
rm /tmp/node_exporter-1.8.1.linux-amd64.tar.gz
93-
94-
# Install >=6.11 kernel
95-
COPY --from=download /tmp/linux-modules-6.11.0-8-generic_6.11.0-8.8_amd64.deb /tmp/linux-modules-6.11.0-8-generic_6.11.0-8.8_amd64.deb
96-
COPY --from=download /tmp/linux-image-6.11.0-8-generic_6.11.0-8.8_amd64.deb /tmp/linux-image-6.11.0-8-generic_6.11.0-8.8_amd64.deb
97-
COPY --from=download /tmp/linux-image-virtual-hwe-24.04_6.11.0-8.8_amd64.deb /tmp/linux-image-virtual-hwe-24.04_6.11.0-8.8_amd64.deb
98-
99-
RUN apt-get install -y --no-install-recommends \
100-
/tmp/linux-modules-6.11.0-8-generic_6.11.0-8.8_amd64.deb \
101-
/tmp/linux-image-6.11.0-8-generic_6.11.0-8.8_amd64.deb \
102-
/tmp/linux-image-virtual-hwe-24.04_6.11.0-8.8_amd64.deb && \
103-
rm /tmp/linux-modules-6.11.0-8-generic_6.11.0-8.8_amd64.deb && \
104-
rm /tmp/linux-image-6.11.0-8-generic_6.11.0-8.8_amd64.deb && \
105-
rm /tmp/linux-image-virtual-hwe-24.04_6.11.0-8.8_amd64.deb

ic-os/guestos/context/packages.common

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# image only.
66

77
# Need kernel to boot anything
8+
linux-image-extra-virtual-hwe-24.04
89
initramfs-tools
910

1011
# Need systemd for boot process

ic-os/setupos/context/Dockerfile.base

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,3 @@ RUN apt-get -y update && \
3434
apt-get -y upgrade && \
3535
apt-get -y --no-install-recommends install $(for P in ${PACKAGE_FILES}; do cat /tmp/$P | sed -e "s/#.*//" ; done) && \
3636
rm /tmp/packages.*
37-
38-
# Install kernel modified to support sev-snp. Link the resulting kernel as the default.
39-
# Then clean up old kernel to save space
40-
# In the future this will change. Either:
41-
# - the mainline kernel will get SEV-SNP or
42-
# - AMDSEV repo might get built as part of this dockerfile
43-
# This sev-snp kernel is only used to check hardware capability.
44-
ARG MODIFIED_KERNEL_DEB="linux-image-6.1.0-rc4-snp-host-93fa8c5918a4_6.1.0-rc4-snp-host-93fa8c5918a4-1_amd64.deb"
45-
RUN curl -LsSf --remote-name https://github.com/dfinity/AMDSEV/releases/download/snp-release-2023-05-24/${MODIFIED_KERNEL_DEB} \
46-
&& dpkg -i ${MODIFIED_KERNEL_DEB} \
47-
&& rm ${MODIFIED_KERNEL_DEB} \
48-
&& ln -sf vmlinuz-6.1.0-rc4-snp-host-93fa8c5918a4 /boot/vmlinuz \
49-
&& ln -sf initrd.img-6.1.0-rc4-snp-host-93fa8c5918a4 /boot/initrd.img \
50-
&& find /boot -name "*.old" | xargs -L 1 unlink \
51-
&& find /boot -name "initrd*generic" \
52-
-o -name "vmlinuz*generic" \
53-
-o -name "config*generic" \
54-
-o -name "System*generic" \
55-
| xargs rm \
56-
&& find /usr/lib/modules -maxdepth 1 -type d -name "*generic" | xargs rm -rf

0 commit comments

Comments
 (0)