[HN Gopher] From Linux to NetBSD, with SSH Only
       ___________________________________________________________________
        
       From Linux to NetBSD, with SSH Only
        
       Author : jaypatelani
       Score  : 160 points
       Date   : 2024-07-23 02:36 UTC (3 days ago)
        
 (HTM) web link (cloudbsd.xyz)
 (TXT) w3m dump (cloudbsd.xyz)
        
       | lagniappe wrote:
       | Im watching the asciinema and wondering whats that first `ls`
       | move? is that expanding files with `ls` somehow?
        
         | thedanbob wrote:
         | The top-level "takeover.sh" is actually a directory.
        
           | lagniappe wrote:
           | That's a dirty trick, I'm not sure how to feel about this. I
           | don't like being hoodwinked.
        
             | naguam wrote:
             | Hi author here,
             | 
             | I must say I made the basic git clone on Marcan's
             | repository (named like this) without changing the default
             | name.
             | 
             | Then I just put my additions next to and into it.
             | 
             | This did not look bad to me. Otherwise I would have done it
             | differently.
             | 
             | I made the two ls commands to show all files and avoid any
             | confusion.
        
       | DocChi77 wrote:
       | Similarly, I've used a project called nixos-infect(1) to install
       | NixOS on cloud providers that don't natively offer it. It's
       | worked well on the handful of boxes I've ran it on.
       | 
       | (1): https://github.com/elitak/nixos-infect
        
       | Tepix wrote:
       | Cute and scary. Reminds me of a time where i manually converted a
       | remote Linux box to full disk encryption via SSH about 15 years
       | ago. It worked, despite bugs in the debian start scripts. But it
       | was, once again, very scary.
        
       | doubled112 wrote:
       | I've installed Debian (on ZFS with debootstrap and chroot) from
       | inside a CentOS install over SSH before, but this is different.
        
       | johnklos wrote:
       | This will come in very handy, since many providers don't natively
       | provide NetBSD.
       | 
       | I've played similar tricks mounting a ramdisk, copying things in
       | to it, starting daemons from it, then force-remounting rootfs
       | read-only, then doing things you can't normally do. This takes
       | things quite a bit further, and I like it.
       | 
       | I've never quite understood the details of Linux boot methods.
       | This article is wonderful because it doesn't just say what to do,
       | but explains what's going on, and in detail. Can't wait to try!
        
         | indigodaddy wrote:
         | "This will come in very handy, since many providers don't
         | natively provide NetBSD."
         | 
         | I think prgmr.com (now known as Tornado VPS apparently) still
         | does:
         | 
         | https://tornadovps.com/about
         | 
         | Edit: looks like no more Netbsd dom0's with prgmr, but their
         | docs on netinstalling netbsd don't look entirely headache-
         | inducing..
        
       | j_not_j wrote:
       | Offtopic:
       | 
       | OpenBSD has an installation ramdisk. Just boot that.
       | 
       | See https://raby.sh/installing-openbsd-on-ovhs-vps-2016-kvm-
       | mach...
       | 
       | I've also seen "dd if=path/to/install/ramdisk /dev/sd0" and
       | reboot; depends on being classic BIOS not uefi. Can't find the
       | link tho.
        
         | naguam wrote:
         | Hi, author (of cloudbsd.xyz) here,
         | 
         | The method mentioned in the link you shared is indeed
         | interesting and probably also works with NetBSD among others,
         | but relies on having third party controls
         | 
         | (such as having to select a grub entry and run the installer
         | steps from a cloud control panel).
         | 
         | The reason I experimented and wrote this article was because I
         | thought interesting to find a way to avoid having to rely on
         | any external controls.
         | 
         | Thus this works even on bare metal servers and thanks to QEMU
         | to install absolutely any OS that can boot on QEMU.
        
       | darkhelmet wrote:
       | One of the things I've done in the past that is quick and easy is
       | to use grub to chainload another bootable volume. Scp an iso or
       | other disk image over, chainload to that, run the installer
       | inside it as though it had just been pxebooted or booted from a
       | flash drive. If you can netinstall from there, then you're good
       | to go with the OS of your choice.
       | 
       | There's lots of ways if you have access to common cloud
       | primatives (replacement root volume, etc) and have some
       | creativity.
       | 
       | I did appreciate this post though because it's for a way I
       | haven't used before.
        
       | naguam wrote:
       | Hi, author of the article here.
       | 
       | After reading all the comments, I believe I must precise, that I
       | am aware of most of the mentioned alternative techniques.
       | 
       | Most of these only work as long as remote screen/keyboard control
       | access is possible throughout a cloud panel (VNC).
       | 
       | My goal with this article was to avoid any third party control
       | and making it to works even on a remote linux desktop pc used as
       | a server.
       | 
       | Thanks for all the feedbacks, I appreciate it.
        
         | dgfitz wrote:
         | I think it's a neat idea and shows a very solid understanding
         | of many different concepts. I also have a lot of this kind of
         | knowledge, but fuck me if I would have been able to put all the
         | pieces together like this without a specific need/driver.
         | 
         | Very neat, thanks for sharing.
        
       | indigodaddy wrote:
       | I'd like to note that there are a lot of cheap, reliable
       | providers that support BSD, either with KVM templates already,
       | installation with an available ISO, or many have custom ISO where
       | you can upload or give the URI to any iso you wish to use.
       | Obviously this will usually be KVM virtualization.
       | 
       | Some providers off the top of my head:
       | 
       | prgmr.com (now tornado vps apparently) - long-standing provider -
       | they used to have netbsd dom0's but now it's all Linux based it
       | looks like so appears you have to netinstall netbsd in your vm
       | now)
       | 
       | buyvm.net - reasonable pricing and have bsd available to install
       | (can't remember if template or iso ready to mount/install)
       | 
       | https://www.netcup.eu/vserver/ - excellent value / been around
       | forever (they offer custom iso)
       | 
       | I will add more here as I think of them..
        
         | christophilus wrote:
         | Vultr
        
       | gslin wrote:
       | This reminds me some other interesting things (but from Linux to
       | FreeBSD) around 15-20 years ago:
       | 
       | * https://www.daemonology.net/depenguinator/
        
       ___________________________________________________________________
       (page generated 2024-07-26 23:08 UTC)