Child pages
  • Advanced - Split-root installation

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: The beadm-*.sh scripts are now regularly updated on Github

...

The most automated help can be received from beadm-upgrade.sh which automates BE cloning with beadm-clone.sh (described below) and then issues IPS and PKGSRC package updates in the new BE:

  • For a fully-automatic job, download the scripts:

    Code Block
    :; wget -O /root/beadm-clone.sh "httphttps://wikigithub.openindiana.orgcom/download/attachments/27230229/jimklimov/illumos-splitroot-scripts/raw/master/bin/beadm-clone.sh" && \
       chmod +x /root/beadm-clone.sh
    :; wget -O /root/beadm-upgrade.sh "httphttps://wikiraw.openindianagithubusercontent.orgcom/download/attachments/27230229/jimklimov/illumos-splitroot-scripts/master/bin/beadm-upgrade.sh" && \
       chmod +x /root/beadm-upgrade.sh
  • Run the upgrader (optionally pre-set and export the envvars described all around this text); the script prints the variables it is going to use and pauses before proceeding (press ENTER to go on):

    Code Block
    :; /root/beadm-upgrade.sh 

    If all was ok – activate (copy-paste the BE name from last lines of output of beadm-upgrade.sh) and gracefully reboot:

    Code Block
    :; beadm activate "$BENEW" && \
       init 6

...

The attached script beadm-clone.sh (Git master: beadm-clone.sh) automates most of the logic described in the text below, and uses the same environment variables. You can execute it as a shell script as well as just "source" it into your current (root) shell – but beware that it can exit upon errors; execution requires that you "export" the envvars you need, while "sourcing" would set whatever remains to guesswork in the shell context which remains current and would not redefine them in subsequent runs.

...

  • Download the script:

    Code Block
    :; wget -O /root/beadm-clone.sh "httphttps://wikigithub.openindiana.orgcom/download/attachments/27230229/jimklimov/illumos-splitroot-scripts/raw/master/bin/beadm-clone.sh" && \
       chmod +x /root/beadm-clone.sh
  • Source it into the current shell so it sets all the variables as it goes (by default it will propose a new BE name based on the first token of the current BE before a separator such as the dash character, and suffix it with current timestamp); the script prints the variables it is going to use and pauses before proceeding (press ENTER to go on):

    Code Block
    :; . /root/beadm-clone.sh 

    Alternately, don't source but rather run the script and copy-paste the reported variable values into your shell.

  • When the script is done cloning and has reported no errors, copy-paste the suggestions from the end of its output, i.e.:

    Code Block
    :; pkg -R "$BENEW_MNT" image-update --deny-new-be --no-backup-be && \
       touch "$BENEW_MNT/reconfigure" && \
       bootadm update-archive -R "$BENEW_MNT" && \
       beadm umount "$BENEW"
    
    :; TS="`date -u "+%Y%m%dZ%H%M%S"`" && \
       zfs snapshot -r "$RPOOL_SHARED@postupgrade-$TS" &&\
       zfs snapshot -r "$BENEW_DS@postupgrade-$TS"
  • If all was ok – activate and gracefully reboot:

    Code Block
    :; beadm activate "$BENEW" && \
       init 6

    Hopefully, everything goes up nicely and quickly, and a `df -k /` would show the new root dataset (wink)

...