| 1 | # manageBE is considered beer ware (http://en.wikipedia.org/wiki/Beerware) |
|---|
| 2 | # Written by Philipp Wuensche (cryx-manageBE@h3q.com) |
|---|
| 3 | |
|---|
| 4 | This tool makes some assumptions about your system and filesystem layout |
|---|
| 5 | 1. you use FreeBSD with ZFS root and zfsboot support |
|---|
| 6 | 2. your boot-filesystems are located under pool/ROOT/boot-filesystemname, to convert to this setup take a look |
|---|
| 7 | at convert-readme.txt |
|---|
| 8 | 3. your ZFS-rootfilesystem is created by the http://anonsvn.h3q.com/projects/freebsd-patches/browser/manageBE/create-zfsboot-gpt_livecd.sh script or converted as described by http://anonsvn.h3q.com/projects/freebsd-patches/browser/manageBE/convert-readme.txt |
|---|
| 9 | |
|---|
| 10 | The idea of using ZFS to create Boot-Environments (BE) and always to be able to got back to your old BE in case the |
|---|
| 11 | new does not work is as follows: |
|---|
| 12 | |
|---|
| 13 | - build kernel and world as described in the FreeBSD Handbook |
|---|
| 14 | - create a new BE cloning the old BE 'manageBE create -n <newBE> -s <oldBE> -p <pool> |
|---|
| 15 | - install your new kernel with DESTDIR=/<pool>/ROOT/<newBE>/ set |
|---|
| 16 | - activate your new BE with 'manageBE activate -n <newBE> -p <pool>' |
|---|
| 17 | - reboot into your new BE |
|---|
| 18 | |
|---|
| 19 | if booting the new kernel works: |
|---|
| 20 | - install the new FreeBSD userland as described in the FreeBSD Handbook |
|---|
| 21 | - reboot into your new BE with the new userland |
|---|
| 22 | else |
|---|
| 23 | - Escape to loader |
|---|
| 24 | LOADER: boot -s /boot/kernel.old/kernel |
|---|
| 25 | - Enable your old BE with 'zpool set bootfs=pool/ROOT/oldrootfs pool' or 'manageBE activate -n <oldBE> -p <pool>' |
|---|
| 26 | - reboot into your old BE |
|---|
| 27 | |
|---|
| 28 | if booting the new userland works: |
|---|
| 29 | - DONE! |
|---|
| 30 | else |
|---|
| 31 | - Escape to the loader |
|---|
| 32 | LOADER: set vfs.root.mountfrom="zfs:<pool>/ROOT/<oldBE>" |
|---|
| 33 | LOADER: boot -s |
|---|
| 34 | - Enable your old BE with 'zpool set bootfs=pool/ROOT/oldrootfs pool' or 'manageBE activate -n <oldBE> -p <pool>' |
|---|
| 35 | - reboot into your old BE |
|---|
| 36 | |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | |
|---|
| 40 | DISCLAIMER: Always make backups, don't blame me if this renders your system unusable or you lose any data! |
|---|