惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
S
Secure Thoughts
aimingoo的专栏
aimingoo的专栏
量子位
F
Full Disclosure
云风的 BLOG
云风的 BLOG
D
Docker
Stack Overflow Blog
Stack Overflow Blog
Last Week in AI
Last Week in AI
Security Latest
Security Latest
Project Zero
Project Zero
Cyberwarzone
Cyberwarzone
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
AWS News Blog
AWS News Blog
G
GRAHAM CLULEY
T
Threat Research - Cisco Blogs
The Hacker News
The Hacker News
The Register - Security
The Register - Security
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
MyScale Blog
MyScale Blog
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
P
Privacy & Cybersecurity Law Blog
V
Visual Studio Blog
A
Arctic Wolf
L
LINUX DO - 热门话题
W
WeLiveSecurity
Google DeepMind News
Google DeepMind News
TaoSecurity Blog
TaoSecurity Blog
Recorded Future
Recorded Future
K
Kaspersky official blog
L
Lohrmann on Cybersecurity
V
V2EX
Recent Announcements
Recent Announcements
N
News and Events Feed by Topic
MongoDB | Blog
MongoDB | Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Securelist
S
Security Affairs
Forbes - Security
Forbes - Security
P
Proofpoint News Feed
Google DeepMind News
Google DeepMind News
C
Cisco Blogs
AI
AI
Vercel News
Vercel News
博客园 - 三生石上(FineUI控件)
Cisco Talos Blog
Cisco Talos Blog
T
Tor Project blog
Scott Helme
Scott Helme
Spread Privacy
Spread Privacy

Lobsters

CIFSwitch: a non-universal Linux local root vulnerability RIPE NCC session fixation: poaching logins with an Atlas probe GNOME 2.20 but its Web Components Agentic Search for Context Engineering – Leonie Monigatti Garnix is shutting down [not OC] akashina.tngl.sh/jjc Concerning Emacs (and Jazz) Nitpicking the shell history scene in ‘Tron: Legacy’ What's cooking on SourceHut? Q2 2026 The tenth OpenPGP email summit Package managers that package package managers Clojure on Fennel part three: parsing WordPress at 23 Finding Miscompiles for Fun, Not Profit GitHub - creusot-rs/creusot: Creusot helps you prove your Rust code is correct. Announcing Rust 1.96.0 | Rust Blog A Love Letter to Neovim sqlite AGENTS.md Am I a Bad Friend? CSS vs. JavaScript • Josh W. Comeau Erlang Ecosystem Foundation - Supporting the BEAM community A brief note about slot access cost in Common Lisp Keyboard latency probe Rethinking the GNOME clipboard issues Back to the Building Blocks’ Building Blocks Tech Notes: Theseus: translating win32 to wasm Fast is better than slow Content-addressed Rust builds (or, what kache actually caches) Intent to Prototype: Embedding API Canada’s Bill C-22 and the security cost of collecting more data 5 PostgreSQL locking behaviors that trip people up okmij.org Stop advertising in your commits! | AksDev GitHub - mplsllc/macsurf: A modern web browser for Classic Mac OS 9 PowerPC. Real CSS3, ES5 JavaScript, native HTTPS — built with CodeWarrior on the Carbon API. Introducing DoomBench - Can Your Data Stack Run DOOM? What are some of your favourite developer tools? Building a Scalable Ingestion Pipeline with Temporal (Part 1) Converting shallow Git bundles into normal repositories Are you a member of any professional associations? What is a harmonic? An interactive comic about additive synthesis How Virtual Tables Work in the Itanium C++ ABI Using SwiftUI to Build a Mac-assed App in 2026 Rust (and Slint) on a jailbroken Kindle. ~jack/lambda-on-lambda - Serverless Haskell on AWS - sourcehut git Human proof for FOSS contributions Extremely simple internet radio controlled via IRC Announcing BABLR Splitting Konsole views from Helix to run tools | AksDev GitHub - yugr/rust-slides Serving files over HTTP three ways: synchronous, epoll, and io_uring update docs with information about building with build.py (#979) · astral-sh/python-build-standalone@c9c40c5 A Simple Makefile Tutorial On C extensions, portability, and alternative compilers Switching to Colemak | Pedro Alves Just How Bad Was The Intel IAPX432? Nix's Substituter List Is Not a Routing Table Accelerating copy_if using SIMD Lambda on Lambda: Serverless Haskell on AWS | Blog Announcing feed-repeat v1.0 Scaling Akvorado BMP RIB with sharding EYG news: A host of CLI improvements, new guides and new effects The social contract of writing JS Crossword C array types are weird; and related topics Flatpak will depend on systemd – OSnews Migrating from Go to Rust | corrode Rust Consulting A portentous reunion Vivado Licensing Options How my minimal, memory-safe Go rsync steers clear of vulnerabilities the entropy layer of a wavelet codec, on its own GitHub - nferhat/fht-compositor: A dynamic tiling Wayland compositor. Debian SE Linux and PinTheft Does bulk memmove speed up std::remove_if? (No.) 声明式部分更新 | Blog | Chrome for Developers Fully in-browser container builds Dianne Skoll's Web Site - Remind The Architecture of Open Source Applications (Volume 1)Berkeley DB Pardon MIE? - ironPeak Blog “Long-Term Support” doesn’t mean what you think Jira IS Turing-Complete May I recommend thinking of Emacs as your Fortress of Solitude hershey Floodgap Gopher-HTTP gateway gopher://thelambdalab.xyz/1cuneiforth/ HP QuickWeb, Singular And Pointless That one time I used Go panics for flow control A new suite of modern tools coming for editing and publishing RFCs From the Tabletop… The Digital Antiquarian Building a Host-Tuned GCC to Make GCC Compile Faster Are we self-sovereign PKI yet? Claw Patrol: an open-source security firewall for agents | Deno Revised^7 Report on Scheme, Large: Procedural Fascicle Draft is now public A Network Allow-List Won't Stop Exfiltration — André Graf From AFSK to Goertzel – µArt.cz Software For My New Home Server Introducing Neptune: Direct3D virtualization for QEMU AI Agent Bankrupted Their Operator While Trying to Scan DN42 - Lan Tian @ Blog mimalloc: A new, high-performance, scalable memory allocator for the modern era Making wl_shm fast The Soul of Maintaining a New Machine - Third Draft | Books in Progress What is Git made of?
How to install SmartOS on a datacenter machine
Jesús Cea Avión · 2025-02-10 · via Lobsters

This blogpost documents how to install SmartOS in a datacenter machine, with no remote KVM neither physical access.

SmartOS used to need a CD, DVD or USB pendrive to boot the Hypervisor (saving hacks like Installing/booting SmartOS in/from a harddisk without physical access), but since late 2020 you can install it in the ZFS ZPOOL and directly boot from there, using the new utility piadm.

1   Create a template ZPOOL image

First step is to create a zpool image to deploy on the server:

  1. Download the mostly current version (I usually prefer to avoid last version and use the previous version, if not marked as toxic) of SmartOS.

  2. Launch Virtualbox, create a new machine with 4 GB of RAM and a HardDisk of 10 GB. The virtual machine CPU must be configured as 64 bits.

    Provide a virtual NIC card. That is, a network card.

    Use the SmartOS image as the virtual CD drive.

  3. Boot the virtual machine. SmartOS should enter a configuration script. Provide dummy data for most of it, we will override later.

    At the end, enable booting from the zones zpool in order to do a SmartOS install on the virtual HardDisk.

    Advertencia

    When creating the zones zpool, BE SURE it is created with ashift=12. Boot must be compatible with BIOS and UEFI machines. The easiest way to be sure is:

    1. When asked about the zpool, enter manual.

    2. Create the zpool manually:

      [root@ /]# zpool create -B -o ashift=12 zones c1t0d0
      
    3. Exit the shell and continue the configuration process.

  4. Eject the SmartOS virtual CD and reboot the virtual machine. Be sure it boots from the virtual HardDisk.

  5. We must destroy dataset zones/dump and recreate it with the right size. What is the right size? It is difficult to say. It depends of the RAM size, but it is not linear. The SmartOS configuration script uses dumpadm -e just after reset and multiply it by two.

    In this SmartOS image I will use 4 GB. For a 64 GB machine, SmartOS seems to require around 1.5 GB, so we are quite safe for now.

    [root@ /]# dumpadm -d none
    [root@ /]# zfs destroy zones/dump
    [root@ /]~# zfs create -V 4G zones/dump
    
  1. Be sure the machine can boot under BIOS and UEFI:

    [root@ /]# piadm bootable
    zones                          ==> BIOS and UEFI
    
  2. Shutdown the virtual Machine and boot with a Linux, for instance, a Debian Live CD.

  3. Upload an image of the 10 GB virtual HardDisk with SmartOS installed to your cloud or file hosting service. Since most of the virtual HardDisk is empty, compressing it will be highly effective.

  4. You can now destroy the virtual machine. You don't need it anymore.

The image just created will be a template to deploy any number of remote datacenter machines.

I already did this for you. You can use the SmartOS HardDisk image I host at https://download.jcea.es/tamiza/dump_SmartOS_10GB_20250124T134639Z_pass_jcea2025.xz. Compressed, it is only 180 MB. The root password is jcea2025. Its SHA256 hash is f7ae2a59d58737a01850c9cb8696bbfe68b0a4b37d21b322005d076d054da562.

Advertencia

DO NOT FORGET to change that default password!.

2   Overwrite and configure the remote machine in a datacenter

  1. Rent a machine in a remote datacenter. SmartOS kernel is Illumos, a Solaris derivative. It is quite compatible with most server hardware. I advice you to use an Intel NIC, performant and well supported, but many other popular brands are supported.

  2. Boot the machine in rescue mode. This will be, typically, a Linux environment.

  3. Access to the remote machine in the rescue mode. This will tipically run on a ramdisk, leaving the HardDisks alone.

  4. Download the SmartOS you prepared. This will typically be a ramdisk but you will probably have plenty of RAM available and the SmartOS compressed HardDisk is tiny.

    You can download my SmartOS HardDisk image: https://download.jcea.es/tamiza/dump_SmartOS_10GB_20250124T134639Z_pass_jcea2025.xz. Its SHA256 hash is f7ae2a59d58737a01850c9cb8696bbfe68b0a4b37d21b322005d076d054da562. Feel free to use it.

    For instance, you can do something like:

    root@RESCUE:~# wget https://download.jcea.es/tamiza/dump_SmartOS_10GB_20250124T134639Z_pass_jcea2025.xz
    root@RESCUE:~# sha256sum dump_SmartOS_10GB_20250124T134639Z_pass_jcea2025.xz
    f7ae2a59d58737a01850c9cb8696bbfe68b0a4b37d21b322005d076d054da562  dump_SmartOS_10GB_20250124T134639Z_pass_jcea2025.xz
    
  5. Destroy any GPT label in the HardDisk. You can use gdisk /dev/sda. Press x for expert mode and z to delete any trace of GPT in the disk.

    Do this for all the server HardDisks.

    Advertencia

    BEWARE: This step will DESTROY the content of your remote HardDisk. Be sure that is what you want.

  6. Overwrite the HardDisk with the image. For instance, do something like this:

    root@RESCUE:~# xzcat dump_SmartOS_10GB_20250124T134639Z_pass_jcea2025.xz | \
                   dd of=/dev/sda bs=65536 status=progress
    
    root@RESCUE:~# partprobe
    

    Notice that this command expand the image directly over the HardDisk, you don't need to decompress first. that is nice because it is faster and you could run out of RAM in you rescue ramdisk.

    Advertencia

    BEWARE: This step will DESTROY the content of your remote HardDisk. Be sure that is what you want.

  7. My reference datacencer Linux rescue system doesn't have ZFS preinstalled, but it installs it at first use:

    root@RESCUE:~# zpool
    The Hetzner Rescue System does not come with preinstalled ZFS support,
    however, we will attempt to compile and install the latest release for you.
    Please read the information below thoroughly before entering any response.
    
    ATTENTION
    
    This script will attempt to install the current OpenZFS release
    which is available in the OpenZFS git repository to the Rescue
    System. If this script fails, do not contact Hetzner Support, as
    it is provided AS-IS and Hetzner will not support the installation
    or usage of OpenZFS due to License incompatiblity (see below).
    Due to github.com limitations, this script only works via IPv4.
    
    Licenses of OpenZFS and Linux are incompatible
    
    OpenZFS is licensed under the Common Development and Distribution
    License (CDDL), and the Linux kernel is licensed under the GNU General
    Public License Version 2 (GPL-2). While both are free open source
    licenses they are restrictive licenses. The combination of them causes
    problems because it prevents using pieces of code exclusively available
    under one license with pieces of code exclusively available under the
    other in the same binary.
    
    Please be aware that distributing of the binaries may lead to infringing.
    
    Press y to accept this.
    

    Press y and wait a few minutes.

  8. If you already have ZFS available, import the zpool you just wrote on your HardDisk:

    root@RESCUE:~# zpool import zones -f -R /mnt
    

    Nota

    Remember to use the root option: -R when you import the zpool.

  1. Be sure the ashift of the zpool is 12 (4096 bytes):

    root@RESCUE:~# zpool get ashift zones
    NAME   PROPERTY  VALUE   SOURCE
    zones  ashift    12      local
    
  2. Check the zpool:

    root@RESCUE:~# zpool list
    NAME    SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
    zones  9.50G  1.57G  7.93G        -     3.63T     0%    16%  1.00x    ONLINE  /mnt
    
    root@RESCUE:~# zpool status
      pool: zones
     state: ONLINE
    status: Some supported and requested features are not enabled on the pool.
            The pool can still be used, but some features are unavailable.
    action: Enable all features using 'zpool upgrade'. Once this is done,
            the pool may no longer be accessible by software that does not support
            the features. See zpool-features(7) for details.
    config:
    
            NAME        STATE     READ WRITE CKSUM
            zones       ONLINE       0     0     0
              sda       ONLINE       0     0     0
    
    errors: No known data errors
    
  3. All the SmartOS hypervisor configuration resides in zones/usbkey dataset. This dataset is tagged as legacy in the zpool by SmartOS, so was not automatically mounted. You must do it by hand:

    root@RESCUE:~# mkdir /tmp/x
    root@RESCUE:~# mount -t zfs zones/usbkey /tmp/x
    root@RESCUE:~# cd /tmp/x
    root@RESCUE:/tmp/x#
    
  4. Configure there the file config with the necessary details, IPs, NIC MAC address, netmasks, hostname, default gateway, dns domain, and so on. You can get those details from the rescue Linux.

    You need to know how to configure SmartOS hypervisor. Check, for instance:

    You can add a SSH public key in that directory, and you can provide a new shadow file with a new password for root.

    Pay attention to the edits you do. If you make a mistake, SmartOS will not boot.

  5. When done, reboot!

3   First SmartOS boot!

  1. First thing you MUST do when first booting is to change the root password and do that change persistent. This is not trivial because SmartOS hypervisor is inmutable. You can see the necessary steps (and why they are needed) in Changing the Root Password in the Global Zone. Log into your new SmartOS machine and do:

    [root@xXx ~]# umount /etc/shadow
    [root@xXx ~]# cp /usbkey/shadow /etc/shadow
    [root@xXx ~]# passwd root
    New Password:
    Re-enter new Password:
    passwd: password successfully changed for root
    [root@xXx ~]# cp /etc/shadow /usbkey/shadow
    
  2. Expand the zpool, currently 10 GB in size, to the entire HardDisk:

    [root@xXx ~]# zpool online -e zones c1t0d0
    [root@xXx ~]# zpool list
    NAME    SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
    zones  3,64T  4,58G  3,63T        -         -     0%     0%  1.00x    ONLINE  -
    
  3. Add the mirror HardDisk:

    [root@xXx ~]# zpool attach zones c1t0d0 c1t1d0
    Make sure to wait until resilver is done before rebooting.
    

    There is almost no data yet, so the ZFS resilvering is fast:

    [root@xXx ~]# zpool status
      pool: zones
     state: ONLINE
      scan: resilvered 4,58G in 0 days 00:00:29 with 0 errors on Mon Feb 10 08:38:07 2025
    config:
    
            NAME        STATE     READ WRITE CKSUM
            zones       ONLINE       0     0     0
              mirror-0  ONLINE       0     0     0
                c1t0d0  ONLINE       0     0     0
                c1t1d0  ONLINE       0     0     0
    
    errors: No known data errors
    
  4. Be sure we can boot from the mirror HardDisk, just in case:

    [root@xXx ~]# piadm bootable -r zones
    
  5. If the SmartOS image you are using is old, consider updating the installed SmartOS hypervisor using piadm.

  6. When you are done messing with the configuration, reboot just to be sure you are golden and enjoy your new SmartOS machine!

4   Things to consider

  1. You can retrieve the configuration details of your remote machine and edit the SmartOS virtual machine in VirtualBox. The new configuration will not correctly boot in the virtual machine but, if you did everything correct, I should boot when copied over the target remote machine HardDisk.

    In this case: you must size the ZFS zpool bigger, at least 10GB plus RAM size of the real machine. dump

  2. You will most probably want to expand the swap space. You can follow instructions in Spanish at Cómo cambiar el tamaño del espacio de intercambio (SWAP) en SmartOS.

  3. Remember to change the SmartOS default "root" password I provided in the image!.