Tim Foster of Sun Ireland wrote up this concise summary of installing the latest OpenSolaris Indiana Preview 2 on a CompactFlash card:
On Mon, 2008-02-18 at 13:44 +0000, Brian Nitz wrote:
> I wonder if you can post or blog the steps you took to accomplish this
> and what exactly you accomplished (I assume it isn’t specific to the eePC?)
Sure, it was pretty straightforward actually, providing your machine is able to boot from the target device [ these steps won't provide bios support where there was none before! ]
Here’s what you need in order to boot from an alternate pool, “tank” in the steps below, all done as the root user.
1. Install Indiana on a big disk, giving you a pool called “rpool” – I used an external USB hard disk.
2. Reboot the system as normal, from rpool
3. Take a recursive snapshot of this:
# zfs snapshot -r rpool@snap
4. Create a pool on the device you want to boot from
# zpool create tank c8t0d0s0
Obviously your device will differ.
Note that this needs to be a SMI labeled disk: run “format -e ” and use fdisk to determine that you definitely have a Solaris partition, and use ‘l’ within format to label the disk.
If you want to swap to that disk, remember to assign a slice for swap [ given that I only had a 4gb SD card, but 2gb of ram, I didn't really need swap, and couldn't afford to dedicate space for swap/dump on the target disk]
5. Send the snapshot to the target pool
# zfs send -R rpool@snap | zfs recv -Fd tank
You’ll probably get warnings about not being able to mount /export/home or /opt – given that these are already mounted from rpool.
If you want the target pool to have compressed filesystems, you need to set this on the source filesystems *before* issuing the zfs send command, (zfs filesystem properties get copied over, along with the sendstream) so “zfs set compression=on rpool/ROOT/preview2″ – obviously that’ll only affect new blocks written to rpool, but doing so will cause all new blocks on tank to get compressed when you send those snap shotstreams over to the other pool.
6. Fix up etc/vfstab entries, set the bootfs property on tank and install grub
# mkdir /tmp/a
# mount -F zfs tank/ROOT/preview2 /tmp/a
# vi /tmp/a/etc/vfstab(edit swap and the entry for “/”)
# zpool set bootfs=tank/ROOT/preview2 tank
# installgrub /tmp/a/boot/grub/stage1 /tmp/a/boot/grub/stage2 /dev/rdsk/c8t0d0s0
# bootadm update-archive -R /tmp/a
7. Set your bios to boot from your new target device, or remember to jump into the boot-device selection dialog from your bios screen.
I think that’s all I did – anyone else, feel free to point out any steps I’ve missed!