{"code":200,"data":{"id":"1l2sks829g","slug":"omnios-the-distant-cousin-to-linux","appearance":"wrap","language":"en","rtl":false,"created":"2022-12-03T15:46:53Z","updated":"2022-12-07T20:05:17Z","title":"","body":"![OmniOS - The distant cousin to Linux](https://static.content.linux.pizza/jselea/content/omnios/omnios.svg \"Linux distant cousin - OmniOS\")\n# Linux distant cousin - OmniOS\n### Not so long ago, there where plenty of cousins alive and well in the world. You may have heard about Solaris, IRIX, AIX, HP-UX - in this post, we will explore the grand-child to SunOS called OmniOS\n\nOmniOS is based on the Illumos kernel - a fork of the long forgotten and abandoned OpenSolaris kernel that famously was killed by Oracle shortly after the takeover from Sun Microsystems (rest in peace).\n\nI personally, are not fond of a homogeneous IT world, where every system is basically the same. I do think that diversity is good. So I hope that I can you as a reader interested in different Linux-alternatives (that is not BSD).\n\nSo, pick the hypervisor you want (Proxmox, VMWare, AHV, VirtualBox) and navigate to https://omnios.org/download to download the latest stable .iso.\n\nThe installation itself is very straight forward, so I'll be skipping that part here.\n\nWhen you have installed the system, and rebooted - we need to get networking up and running.\nLogin to the machine with the user \"root\", and no password.\n\nLets enable networking, start by displaying the network-ports on your system. In my case - I'm using a virtualized Intel e1000 network card (available in basically every hypervisor)\n```\ndladm show-link -o link\n```\nOutput:\n```\nLINK\ne1000g0\n```\nGreat, since this virtual machine only have a single NIC - this output is expected.\n\nLets create the interface, give it an IPv4 and add a default route via the network gateway:\n```\nipadm create-if e1000g0\nipadm create-addr -T static -a 192.168.2.38/24 e1000g0/v4\nroute -p add default 192.168.2.254\n```\nVerify that you have network connection with ping:\n```\nping 8.8.8.8\n8.8.8.8 is alive\n``` \nDNS-resolution is not yet working, so we have to take care of that. Lets modify ```/etc/resolv.conf``` with the following\n```\necho \"domain local.lan\" \u003e /etc/resolv.conf\necho \"nameserver 192.168.1.254\" \u003e\u003e /etc/resolv.conf\n```\nIn some cases, I have had to overwrite nsswitch.conf aswell:\n```\ncat /etc/nsswitch.dns \u003e /etc/nsswitch.conf\n```\nWe should be able to resolve our way into the internet now:\n```\nping linux.pizza\nlinux.pizza is alive\n```\n\n### Create a user and enable SSH, most of you will probably recognize the steps, since they are fairly basic and do not differ that much from how you would to in on a modern Linux machine\n\nLet's start by create a user:\n```\nuseradd -m -d /home/jonathan -s /bin/bash jonathan\n```\nAnd set a password for the user, you can do it for the root-user aswell:\n```\npasswd jonathan\nNew password:\n...\n```\nAnd last, enable the SSH-service:\n```\nsvcadm enable ssh  \n```\n\nGreat, you should now be able to SSH-into the machine with the user you just created. You can elevate yourself into the root-user with the \"su\" command.\nNot that complicated, right?\n\n\n\n## Let's update the system.\n\nLets update the package-information from the repositories\n```\npkg refresh\n```\n```\npkg update\n```\nJust let this run, your system will be updated. In some cases, your system will have to reboot. \n\nAnd here, is where OmniOS shines - you can reboot your system - test it after you have performed the updates, and if stuff does not really work, you can simply rollback the changes you've made with ```beadm```\n## Rollback the system\nAfter you have rebooted your system, check the output of ```beadm list```\n```\nroot@omnios:~# beadm list\nBE               Active Mountpoint Space  Policy Created\nomnios-r151038an -      -          65.40M static 2022-12-03 15:35\nomnios-r151038ca NR     /          1.35G  static 2022-12-03 16:14\n```\nYou'll see to environments, and the one marked with \"NR\" is the current active one. If you want to rollback, you could execute (in my case) ```beadm activate omnios-r151038an``\n\n```\nroot@omnios:~# beadm activate omnios-r151038an\nActivated successfully\nroot@omnios:~# \nroot@omnios:~# \nroot@omnios:~# \nroot@omnios:~# ls\n1\nroot@omnios:~# beadm list\nBE               Active Mountpoint Space   Policy Created\nomnios-r151038an R      -          869.15M static 2022-12-03 15:35\nomnios-r151038ca N      /          580.90M static 2022-12-03 16:14\n```\nThen do a quick ```reboot``` to boot into the active one.\nLet's check the current active environment after the system has rebooted:\n```\nroot@omnios:~# beadm list\nBE               Active Mountpoint Space   Policy Created\nomnios-r151038an NR     /          872.95M static 2022-12-03 15:35\nomnios-r151038ca -      -          583.64M static 2022-12-03 16:14\n```\nAnd we can see that the old one, created at 15:35 is the one that is currently active. We can now remove the newer one, since we dont need it anymore:\n\n```\nroot@omnios:~# beadm destroy omnios-r151038ca\nAre you sure you want to destroy omnios-r151038ca?\nThis action cannot be undone (y/[n]): y\nDestroyed successfully\nroot@omnios:~# beadm list \nBE               Active Mountpoint Space   Policy Created\nomnios-r151038an NR     /          748.05M static 2022-12-03 15:35\n```\n## So, what is the practical / real world use for OmniOS?\nSince OmniOS use ZFS, anything storage-related makes sense, such as a Network Attached Storage (NAS) even a Virtual Machine Host with the [bhyve hypervisor](https://omnios.org/info/bhyve) - which itself is very interesting.\n\n\nIf you are interested in more, you can [check out my older post about Tribblix here.](https://blogs.linux.pizza/run-a-tor-relay-on-tribblix-an-illumos-retro-distribution)\n\n#unix #solaris #omnisos #illumos #tribblix #zfs\n\n\n\n\n","tags":["unix","solaris","omnisos","illumos","tribblix","zfs"],"paid":false,"views":5391}}