Closed cirrusflyer closed 2 years ago
The script is designed for an environment with a recovery console (via PXE?) and where /dev/sda (and /dev/sdb) is not mounted, yet accessible and passed through to qemu.
I had a look at phoenixnap's site, and while there is a BMC recovery console, it's not quite the same. It seems to be some sort of cloud-init provisioning.
Perhaps you could install esxi or proxmox and then use the script to install freebsd on VMs created?
It's untested if the script will install over an already installed Linux instance with /dev/sda mounted. It will certainly load up.
If you want to be a test subject and try it out, let us know how it works!
What I think you could do is
I never tried 3. myself, so theirs certainly some experimentation required. If it works, automating it should be totally possible.
What I think you could do is
1. boot into their default Ubuntu or CentOS setup 2. ssh into it
3a). Install grub-imageboot
4a). Upload MfsBSD and edit /boot/grub/grub.cfg
5a). Reboot in MfsBSD
6a). Install FreeBSD via zfsinstall
or
3b). Run [script](https://forums.freebsd.org/threads/installing-freebsd-in-hetzner.85399/post-575112)
4b). Fingers crossed for MfsBSD to boot
5b). Install FreeBSD via zfsinstall
@click0 which is the answer to "how to use mfsBSD there" and not to "can this be used on PhoenixNAP Bare Metal Cloud?". In any case I would make sure to use a mfsBSD image without default credentials, but fortunately everyone is free to do as they like ;)
Edit: No need to be disappointed, I didn't say this wasn't a viable solution :)
3. change the running system to be memory disk based using pivot_root [like described here](http://www.ivarch.com/blogs/oss/2007/01/resize-a-live-root-fs-a-howto.shtml).
could explore this
To replace chkconfig
systemctl --type=service --state=running --no-pager
systemctl list-units --type=service --state=running --no-pager
# get a list of services
systemctl list-units --type=service --state=running --no-pager |grep "loaded active running" |awk -F "loaded" '{print $1}' | sed 's|^ ||g'
Specific services we might want to keep running
networkd-dispatcher.service loaded active running Dispatcher daemon for systemd-networkd
NetworkManager.service loaded active running Network Manager
ssh.service loaded active running OpenBSD Secure Shell server
systemd-resolved.service loaded active running Network Name Resolution
On Ubuntu 20.04 telinit
exists, pivot_root
exists, but setenforce
does not and belongs to SELinux stuff.
me: In any case I would make sure to use a mfsBSD image without default credentials, but fortunately everyone is free to do as they like ;)
@click0 AFAIK one can set non-default mfsBSD root credentials in /boot/loader.conf, so maybe there's a way to use that when installing vanilla mfsBSD? (poke in the mfsBSD image before rebooting, some mdconfig, mkisofs thing?).
On Ubuntu 20.04
telinit
exists,pivot_root
exists, butsetenforce
does not and belongs to SELinux stuff.
Maybe it doesn't come with SELinux enabled (which means the command won't be necessary)? Othewise CentOS might have the binary anyway.
@bretton @click0 I couldn't find anything about a real "rescue" system there - like something you can boot into to repair a completely broken system (I haven't tried their solution of course, just looking at their web pages, so I might be wrong)
Therefore might actually make sense to install a second OS partition that could be utilized as a rescue system when booting in using the remote console. Overkill?
It might be a useful step to add a ramdisk by default, pivot_root to it, and proceed from there with the qemu steps (which includes mount in of ssh key ISO)
Older documentation for ARM solution mentions a linux ramdisk pivot too
I experimented a bit with this and came to the conclusion that (partially thanks to systemd), I don't think this will lead to a stable solution worth exploring further.
Hence, I would recommend to go with the plain mfsBSD solution suggested by @click0, but use a non-default root password (e.g., by altering loader.conf).
closing as not feasible at this stage
fyi
Putting the Bare Metal Server in the PhoenixNAP Bare Metal Cloud https://www.servethehome.com/putting-the-bare-metal-server-in-the-phoenixnap-bare-metal-cloud-intel-xeon-sapphire-rapids-supermicro/
I Installed my OWN Cloud Server! See What Happened Next... https://www.youtube.com/watch?v=_saL1lounEE
Can this be used on PhoenixNAP Bare Metal Cloud?
https://phoenixnap.com/bare-metal-cloud