Last active
February 26, 2024 23:04
-
-
Save KwadroNaut/f7549300696918f11064fe27118c50ce to your computer and use it in GitHub Desktop.
greenhost vm use your own kernel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# maybe too many things here. or not the right order. meant for greenhost machines | |
# install kernel inside domu - often useful for scheduling for example | |
mount -o remount,size=1G /usr/lib/modules | |
mount --bind / /mnt | |
mount --bind /mnt/lib/modules /lib/modules | |
mkdir /boot/grub | |
apt-get install grub-pc | |
# xen-utils | |
# maybe not needed: | |
# grub-install /dev/xvda1 | |
# grub-mkconfig | |
apt-get install -y linux-image-amd64 | |
update-grub | |
# Using bookworm? make sure your interfaces will come back up. | |
# change /etc/networking/interfaces so that eth0 becomes enX0 | |
sed -i 's/eth0/enX0/g' /etc/network/interfaces | |
# lets ignore below pieces | |
# in /etc/grub/menu.lst | |
## ## End Default Options ## | |
# tle Debian GNU/Linux, kernel 6.1.0-18-amd64 | |
# root (hostdisk/dev/xvda1) | |
# kernel /boot/vmlinuz-6.1.0-18-amd64 root=UUID=e1e9499a-48ba-4d91-8927-260572bc198f ro | |
# initrd /boot/initrd.img-6.1.0-18-amd64 | |
# title Debian GNU/Linux, kernel 6.1.0-18-amd64 (single-user mode) | |
# root (hostdisk/dev/xvda1) | |
# kernel /boot/vmlinuz-6.1.0-18-amd64 root=UUID=e1e9499a-48ba-4d91-8927-260572bc198f ro single | |
# initrd /boot/initrd.img-6.1.0-18-amd64 | |
# https://wiki.debian.org/PyGrub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment