Skip to content

Commit

Permalink
Merge pull request #310 from threefoldtech/ub24full
Browse files Browse the repository at this point in the history
ubuntu 24 flist kernel fix
  • Loading branch information
PeterNashaat authored Jan 19, 2025
2 parents 6c6d16a + 38b2b21 commit c337db4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tfgrid3/ubuntu24.04/fullvm/ubuntu24-fullvm-flist-builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ cat <<EOF > ubuntu-noble/root/setup_inside_chroot.sh
export PATH=/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin:/bin
rm /etc/resolv.conf
echo 'nameserver 1.1.1.1' > /etc/resolv.conf
echo "ubuntu-noble" > /etc/hostname
apt-get update
apt-get install cloud-init openssh-server curl initramfs-tools linux-virtual -y
cloud-init clean
apt-get install linux-image-6.8.0-31-generic -y
echo 'fs-virtiofs' >> /etc/initramfs-tools/modules
update-initramfs -c -k all
update-grub
apt-get clean
EOF

Expand All @@ -45,6 +48,18 @@ arch-chroot ubuntu-noble /root/setup_inside_chroot.sh
rm ubuntu-noble/root/setup_inside_chroot.sh
rm -rf ubuntu-noble/dev/*

# Check if extract-vmlinux is available and install if it's not
if ! command -v extract-vmlinux &>/dev/null; then
echo "extract-vmlinux not found, installing..."
curl -O https://raw.githubusercontent.com/torvalds/linux/master/scripts/extract-vmlinux
chmod +x extract-vmlinux
mv extract-vmlinux /usr/local/bin
fi

# Kernel Extraction
extract-vmlinux ubuntu-noble/boot/vmlinuz | tee ubuntu-noble/boot/vmlinuz-6.8.0-31-generic.elf > /dev/null
mv ubuntu-noble/boot/vmlinuz-6.8.0-31-generic.elf ubuntu-noble/boot/vmlinuz-6.8.0-31-generic

# Create a compressed archive of the configured system for uploading to hub.
tar -czf ubuntu-24.04_fullvm.tar.gz -C ubuntu-noble .

Expand Down

0 comments on commit c337db4

Please sign in to comment.