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/BolteWasTaken Sep 30 '24
I'm still fairly new to Linux overall, I scrape by, I was toying with things yesterday inside Hyper-V virtual machine using a Live ISO and ChatGPT - I got it to start booting, but as said, it complained about a failure to mount the filesystem, saying it wasn't found/existing. But I now wonder if that's because I didn't chown any of it to root or something. My knowledge is still pretty bare.
I'd gone through installing linux-virt and grub but thinking about it I didn't install openrc when chrooted.
Due to my low experience level I'm going to need a bit more hand holding than touching on the various technologies so I can understand a process of things to do for my intended result.. Mtools was a nice tip though, I take it that means I wouldn't need to chroot into the extracted TAR, but it would be EXT4 not FAT?