3 if ! [ -f /.cdrom
/.volsetid
]; then
6 /mount_media unleashed-installer ||
{
7 echo "Error: Unable to mount install media. Exiting." >&2
10 # diskinfo can fail to list virtio devices on the first run, so run it here
11 # for what seems no reason
16 read 'hostname?System hostname? '
17 if [ -n "$hostname" ]; then break; fi
20 availdisks
=$
(diskinfo
-H |
awk '{ printf $2 " " }')
21 if [ -z "$availdisks" ]; then
25 availdisks
="${availdisks% }"
26 defdisk
=${availdisks%% *}
28 echo "Available disks are: ${availdisks}."
29 read "disks?Which disks should be used for installation? [$defdisk] ('?' for details) "
31 '?') diskinfo
; continue;;
32 '') disks
=$defdisk; if [ -z "$defdisk" ]; then continue; fi; break;;
35 for ad
in $availdisks; do
36 if [ $d = $ad ]; then continue 2; fi
38 echo "'$d' is not a valid disk."
44 *" "*) disks
="mirror $disks" ;;
46 zpool create
-O compression
=on
-f rpool
$disks
47 zfs create
-o canmount
=off
-o mountpoint
=legacy rpool
/ROOT
48 echo "Installing image."
49 pv
-B 128m
-w 78 < /.cdrom
/unleashed.zfs | zfs receive
-u rpool
/ROOT
/unleashed
50 zfs destroy rpool
/ROOT
/unleashed@kayak
51 zfs
set canmount
=noauto mountpoint
=legacy rpool
/ROOT
/unleashed
52 zfs create
-o mountpoint
=/home rpool
/home
53 beadm mount unleashed
/mnt
>/dev
/null
55 echo "$hostname" >/mnt
/etc
/nodename
56 ln -sf generic_limited_net.xml
/mnt
/etc
/svc
/profile
/generic.xml
57 # empty string password
58 sed -i '' 's,^root:NP:,root:$2b$06$./nqDdz5G40L1hjMLByHSOpA7GLmRJb4xU2n/ncw0jBKd3It8kcWm:,' /mnt
/etc
/shadow
59 bootadm install-bootloader
-M -f -R /mnt
-P rpool
60 bootadm update-archive
-R /mnt
62 zpool
set bootfs
=rpool
/ROOT
/unleashed rpool
63 beadm activate unleashed
>/dev
/null
66 Congratulations, your $(uname -sr) installation has successfully completed.
68 Type 'reboot' at the prompt to boot the new system.