Skip to content

Commit

Permalink
Fix kernel in ubuntu 24.04 full vm
Browse files Browse the repository at this point in the history
  • Loading branch information
scottyeager committed Oct 23, 2024
1 parent 25cead8 commit ad9b233
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions tfgrid3/ubuntu24.04/fullvm/ubuntu24-fullvm-flist-builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ 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
apt-get update
apt-get install cloud-init openssh-server curl initramfs-tools -y
apt-get install cloud-init openssh-server curl initramfs-tools linux-virtual -y
cloud-init clean
apt-get install linux-modules-extra-6.8.0-31-generic -y
echo 'fs-virtiofs' >> /etc/initramfs-tools/modules
update-initramfs -c -k all
apt-get clean
Expand All @@ -46,18 +45,6 @@ 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 All @@ -68,4 +55,4 @@ if [ -z "$API_KEY" ]; then
exit 2
fi

curl -X POST -H "Authorization: Bearer $API_KEY" -F "file=@ubuntu-24.04_fullvm.tar.gz" https://hub.grid.tf/api/flist/me/upload
curl -X POST -H "Authorization: Bearer $API_KEY" -F "file=@ubuntu-24.04_fullvm.tar.gz" https://hub.grid.tf/api/flist/me/upload

0 comments on commit ad9b233

Please sign in to comment.