7537 want nextboot (one time boot) support

Review Request #249 — Created Nov. 6, 2016 and submitted — Latest diff uploaded

tsoome
illumos-gate
9af5e6b9b0
7537
68aed11...
general
7537 want nextboot (one time boot) support

bootadm activate -t/-T and boot time/post reboot verification.

root@openindiana:/home/tsoome# beadm list
BE                     Active Mountpoint Space  Policy Created
openindiana-2020:04:15 -      -          19,23M static 2020-04-15 09:28
openindiana-2020:07:09 NR     /          11,56G static 2020-07-09 11:16
root@openindiana:/home/tsoome# beadm activate -t openindiana-2020:04:15
Activated successfully
root@openindiana:/home/tsoome# beadm list
BE                     Active Mountpoint Space  Policy Created
openindiana-2020:04:15 T      -          10,01G static 2020-04-15 09:28
openindiana-2020:07:09 NR     /          1,57G  static 2020-07-09 11:16
root@openindiana:/home/tsoome# beadm activate -T openindiana-2020:04:15
Temporary activation removed
root@openindiana:/home/tsoome# beadm list
BE                     Active Mountpoint Space  Policy Created
openindiana-2020:04:15 -      -          10,01G static 2020-04-15 09:28
openindiana-2020:07:09 NR     /          1,57G  static 2020-07-09 11:16
root@openindiana:/home/tsoome# 

After activate -t, we do have on disk (first label):
00002000  01 01 00 00 00 00 00 00  00 00 00 01 00 00 00 48  |...............H|
00002010  00 00 00 40 00 00 00 07  63 6f 6d 6d 61 6e 64 00  |...@....command.|
00002020  00 00 00 09 00 00 00 01  00 00 00 26 7a 66 73 3a  |...........&zfs:|
00002030  72 70 6f 6f 6c 2f 52 4f  4f 54 2f 6f 70 65 6e 69  |rpool/ROOT/openi|
00002040  6e 64 69 61 6e 61 2d 32  30 32 30 3a 30 34 3a 31  |ndiana-2020:04:1|
00002050  35 3a 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |5:..............|
00002060  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00003fd0  00 00 00 00 00 00 00 00  11 7a 0c b1 7a da 10 02  |.........z..z...|
00003fe0  77 08 7c 75 55 e9 df e3  27 f9 25 4a da 52 65 fc  |w.|uU...'.%J.Re.|
00003ff0  43 29 e7 6c 00 4f 1f db  28 36 85 29 be 35 92 73  |C).l.O..(6.).5.s|

on reboot, indeed, the loader is using currdev "zfs:rpool/ROOT/openindiana-2020:04:15:",
then I did reboot the loader, got currdev "zfs:rpool/ROOT/openindiana-2020:07:09:" mounted for rootfs:
tsoome@openindiana:~$ df -h
Filesystem             Size   Used  Available Capacity  Mounted on
rpool/ROOT/openindiana-2020:07:09
                     28,70G  5,41G      8,19G    40%    /

And now we can confirm the nvlist on label is there, but empty:
00002000  01 01 00 00 00 00 00 00  00 00 00 01 00 00 00 00  |................|
00002010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00003fd0  00 00 00 00 00 00 00 00  11 7a 0c b1 7a da 10 02  |.........z..z...|
00003fe0  b3 46 76 2e 24 fd fa 01  b7 cd 13 e5 42 1f d8 64  |.Fv.$.......B..d|
00003ff0  ad ae 2f 35 db 6b c2 29  db 4d 99 28 85 3c 13 15  |../5.k.).M.(.<..|
Loading...