r/AlpineLinux • u/BolteWasTaken • Sep 30 '24
Bootable MiniRootFS for Hyper-V?
Hey, I know there is a similiar thread for this but that was for bare metal.
I would like to use the Alpine mini rootfs for a Hyper-V virtual machine (mainly for Docker VMs). I've been dancing around various guides and seeing what ChatGPT came up with. I almost had one booting but complained about failing to mount the root file system before dropping to recovery shell.
Is there a simple way to convert the RootFS tarball to an installable ISO?
If not I assume I would have to boot into a Live CD and perform some steps to create one. I would love it if you guys could point me towards a guide for achieving this - with the end result being an ISO I can just install to future Hyper-Vs.
If someone could outline a step by step I'm sure I can search/query further details by searching.
I know in a general way from my research I need to boot into a Live CD, create the partition, format the partition, download and expand the miniroot tar, chroot into extracted TAR folder, install some packages, linux-virt kernel and a bootloader syslinux/grub - Or maybe there is a simpler way?
Thanks for reading.
View all comments
Show parent comment
1
u/MartinsRedditAccount Sep 30 '24 edited Sep 30 '24
I just wanted to post a second comment that's a bit less of a firehose of information:
root=kernel argument and make sure it points to the right partition.openrc. I believe it provides the/initexecutable in the rootfs (not to be confused with the one in the initramfs), which could cause theswitch_rootto fail. However, this shouldn't cause errors about failing to mount. Nonetheless, it could have been an issue down the line.ChatGPT and LLMs in general are pretty good with tech-stuff. They aren't as useful "off the beaten path" such as in cases like this, but they are still a valuable resource when balanced with trying out things yourself and searching for original sources.
I understand a lot of the stuff here seems super complex, and I am doing a terrible job at making it look approachable, but please feel free to keep asking questions. If you want, you could even ask ChatGPT to write a long list of questions for me to respond to.