How to upgrade Linux to FreeBSD remotely via SSH?

The answer is simple: download and use my script.

Time runs fast, MBR evolved to GPT, BIOS to UEFI and I followed the footsteps of good old Depenguinator 2.0 and 3.0 to bring some Christmas magic to the end of 2021 year.

This is a very early draft, the script abilities are very limited, there are a lot things to implement and many bugs to fix, but it runs fine on my laptop successfully installs FreeBSD 13.0 over the default CentOS Linux 8 on a VirtualBOX machine.

Notes

  1. The script is extremely dangerous, it can easily ruin your OS, data and life. Do not run it in production or on the system that has any value. You have been warned!
  2. Network connection required: linux2free.sh downloads files from Internet
  3. Currently the linux2free.sh script supports UEFI only boot. Sorry for MBR scheme, perhaps someday I’ll add it (or not)
  4. Only Redhat based Linux distributions are supported
  5. The resulted FreeBSD system is very minimalistic. It uses a simple custom starup scripts to bring up network interfaces and start sshd, you have to configure the system and install additional packages yourself
  6. linux2free created a boot EFI partition and a small ZFS filesystem for FreeBSD to start up, but the rest of the space formerly used by Linux has to be redistributed manually.

Installation

sudo dnf upgrade -y
reboot
wget https://raw.githubusercontent.com/mezantrop/linux2free/master/linux2free.sh && sudo sh linux2free.sh

TODO

  •  Allow root to ssh in remotely
  •  Set default router
  •  Support more Linux distributions
  •  Make the code better (Oh, there are plenty things to do! See TODO remarks over the script body)

History

2021.12.25  v0.1    Mikhail Zakharov <zmey20000@yahoo.com>  Initial version
2021.12.26  v0.2    Mikhail Zakharov <zmey20000@yahoo.com>  SSH root login, default route, resolver

Don’t hesitate to enchance, report bugs or call me, Mikhail Zakharov zmey20000@yahoo.com

About mezzantrop

12+ years of experience in large SAN and storage environments: mainly Hitachi, HP and Brocade. Now I am a proud SAN/storage IBMer. Redbooks author. The BeaST – storage-system concept inventor. Empty – expect-like tool developer. FreeBSD enthusiast.
This entry was posted in My projects and tagged , , , . Bookmark the permalink.

5 Responses to How to upgrade Linux to FreeBSD remotely via SSH?

  1. Pingback: Valuable News – 2021/12/27 | 𝚟𝚎𝚛𝚖𝚊𝚍𝚎𝚗

  2. trapni says:

    It is not an upgrade but an operating system switch. No offense. That’s all subjective anyways. But please don’t allow root logins over SSH. Happy New year. 😉

    Like

    • mezzantrop says:

      I’ll add key ssh keys migration with an option to create a user/password in the next release. Ofc, if the new release will be created someday. Happy seasons to you too!

      Like

  3. seaowl says:

    This sounds very cool, Mezzantrop!
    I am preparing to move one of NAS servers from Centos to FreeBSD, and definitely will try.

    Like

    • mezzantrop says:

      Be careful, create backup and pray well as there is no warranty for any kind of success but a big chance to loose all the data. And good luck.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.