Home
Name Modified Size InfoDownloads / Week
patches 2014-06-27
old 2014-06-27
schillix-0.1 2014-06-27
README.ZFS-Root 2020-01-15 7.4 kB
README.install 2020-01-14 9.1 kB
menu.lst.zfs-root 2020-01-14 1.9 kB
vfstab.zfs-root 2020-01-14 362 Bytes
README.fdisk 2020-01-14 3.9 kB
AN-0.8 2015-01-20 9.7 kB
install-X 2015-01-20 875 Bytes
AN-0.8-orig 2012-08-28 9.7 kB
README 2012-08-25 5.9 kB
SchilliX-0.8.iso.xz 2012-08-25 426.9 MB
install-X-orig 2012-08-17 862 Bytes
AN-0.7.2 2010-09-27 7.4 kB
hsfs 2010-09-25 99.9 kB
AN-0.7.1i 2010-09-06 1.1 kB
AN-0.7.1 2010-08-31 393 Bytes
xz 2010-07-25 414.3 kB
AN-0.7.0 2010-07-23 421 Bytes
xz-4.999.9beta.tar.bz2 2009-08-27 849.1 kB
AN-0.6.7 2008-07-04 529 Bytes
AN-0.6.6 2008-04-04 557 Bytes
AN-0.6.5 2008-03-17 220 Bytes
AN-0.6.4 2008-03-05 481 Bytes
AN-0.6.3 2008-02-22 994 Bytes
AN-0.6.2 2008-02-11 1.1 kB
AN-0.6.1 2008-02-01 901 Bytes
pkg-database-SchilliX-0.6.1.tar.bz2 2008-02-01 1.8 MB
pkg-database-SchilliX-0.6.tar.bz2 2008-01-31 1.8 MB
AN-0.6 2008-01-25 759 Bytes
devpro-make-src-20061219.tar.bz2 2006-12-20 167.7 kB
devpro-sccs-src-20061219.tar.bz2 2006-12-20 123.9 kB
AN-0.5.2 2006-04-07 346 Bytes
pkg-database-SchilliX-0.5.2.tar.bz2 2006-04-07 1.2 MB
AN-0.5.1 2006-03-02 207 Bytes
AN-0.4.5 2006-02-27 288 Bytes
AN-0.4.4 2006-02-16 101 Bytes
AN-0.4.3 2006-01-26 76 Bytes
AN-0.4.2 2006-01-13 76 Bytes
AN-0.4.1 2006-01-04 74 Bytes
ls.tar.bz2 2006-01-03 22.4 kB
AN-0.4 2005-12-12 637 Bytes
schillix-0.3-base-kit.tar.gz2 2005-11-23 29.2 MB
README-kit 2005-11-23 3.3 kB
AN-0.3 2005-11-21 542 Bytes
pkgutils.i386.tar.bz2 2005-11-21 566.5 kB
devpro-make-sccs-binaries.i386.tar.bz2 2005-11-18 416.7 kB
libm-sun-freebsd-schily-0.3.tar.bz2 2005-11-13 158.4 kB
AN-0.2.2 2005-11-04 135 Bytes
schillix-0.2.2-base-kit.tar 2005-11-04 34.9 MB
devpro-libm-bins-20051024.i386.tar.bz2 2005-11-02 315.8 kB
schillix-0.2.1-base-kit.tar 2005-10-26 34.9 MB
schillix-0.2-kit.tar.md5 2005-10-24 55 Bytes
schillix-0.2.iso.md5 2005-10-21 55 Bytes
aperture-new.tar.bz2 2005-06-30 17.6 kB
ae-0.0.1.tar.gz 2005-06-24 47.5 kB
gcc-3.4.3-csl-20050525.i386.tar.bz2 2005-06-14 25.1 MB
Totals: 58 Items   559.2 MB 3
###########################################################################
# HOWTO install a ZFS-Root based SchilliX
###########################################################################
# @(#)README.ZFS-Root	1.3 20/01/15 Copyright 2020 J. Schilling
###########################################################################
# Copyright J. Schilling. All rights reserved.
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only.
# See the file CDDL.Schily.txt in this distribution or
# http://opensource.org/licenses/cddl1.php for details.
###########################################################################

A ZFS-Root based installation, where the whole OS directly boots into a ZFS
based / filesystem is a complex attempt.

IMPORTANT: a typical ZFS in one or more disks is based on the plain full disk
instead of a historical FDISK+Sun-Label based filesystem. If ZFS is used this
way, it automagically created an EFI label on the disk and used the whole disk.

	"installgrub" cannot yet deal with such a EFI based ZFS installation
	and for this reason, we need a FDISK+Sun-Label on a bootable disk.

	Read README.install and README.fdisk for more information.

 1. After the disk is partitioned using fdisk, a partition has to be labeled
    with a Sun disk label. Use "format" for this task.

    # format /dev/rdsk/<device>

	Example: format /dev/rdsk/c0d0p0

	Enter the partition menu by typing "par" and 
	create a root partition that spans the whole rest of the Sun label
	by typing "0" and answering questions appropriately.

	Important: partition "0" should begin at "cylinder 1" to give
	space for grub's stage2 file that is hold in the boot partition
	in slice 8. For the end of the partition, enter "$" to use the
	whole rest of the disk.

 2. Create a ZFS root pool on "slice 0" of the Sun label.

    This ZFS needs an alternate mount point.

	Example: zpool create -f -R /mnt rpool c0d0s0

	You need to use the option -f as well, since the zpool command
	otherwise warns about the overlapping slice "s2", which however
	is no problem in this context.

	If you like to set up a mirror, or other zpool features, this
	can be done here.

	Note that the current grub version does not yet support compression
	in the root pool.

 3. Create the swap, dump and the ZFS-root filesystem.

	You may like to use different sizes for swap and/or dump.

	Example:

	zfs create -b 4096 -V 2048m rpool/swap		# create 2G of swap
	zfs create -b 131072 -V 2048m rpool/dump	# create 2G of dump

	The swap block size should match the pagesize, which is 4k on amd64.
	The swap size should be 2x the RAM size if you have few memory and
	RAM/2 if you have plenty of memory.
	The Solaris installer sems to use a size of 2G.

	The dump size needs to be equal to the RAM size if you like to be
	able to get a full kernel core dump even from a highly active system.
	The Solaris installer seems to use a size of 1G.

	The size specified with -V refers to the reserved preallocated
	size. If the pool is not yet full, the data sets may grow on demand.

	#
	# This creates the intermediate directory for the root FS:
	#
	zfs create -o mountpoint=legacy -o canmount=off rpool/ROOT
	#
	# This creates the ZFS-root filesystem that is mounted as /
	#
	zfs create -o mountpoint=/ -o canmount=noauto rpool/ROOT/sxce_147

 4. Set up a uuid for the ZFS root.

	Example: zfs set org.opensolaris.libbe:uuid=`makeuuid` rpool/ROOT/sxce_147

 5. Mount the needed filesystems the right way.

	Example:

	zfs umount -a 
	zfs mount rpool/ROOT/sxce_147 
	zfs set mountpoint=/rpool rpool   
	zfs mount rpool 

 6. You may like to check the results

	Example: zfs list

	and get something like:

	NAME                  USED  AVAIL  REFER  MOUNTPOINT 
	rpool                16.7G  2.87G    31K  /mnt/rpool 
	rpool/ROOT           12.6G  2.87G    31K  legacy 
	rpool/ROOT/sxce_147  12.6G  2.87G  12.6G  /mnt 
	rpool/dump           2.00G  4.87G    16K  - 
	rpool/swap           2.12G  4.99G    16K  - 

 7. Install the OpenSolaris base binaries to the new filesystem under "/mnt"
    The next version of SchilliX will permit two different install variants.
    The current SchilliX release only supports to copy the content of the CD
    to the new filesystem /mnt by calling:

	 Copy the files tree from CD to the mounted disk using `star'.

		star -copy -p -sparse -no-fsync -time -xdot bs=1m fs=32m -C /.cdrom/ . /mnt

	     or:

		star -copy -p -sparse -no-fsync -time -xdot bs=1m fs=32m -C /media/SchilliX-0.8/ . /mnt

	    If you like to install from a lofi mounted SchilliX ISO image, do this:

		lofiadm -a /export/home/SchilliX-0.8.iso
		mkdir /mnt2
		mount -r -Fhsfs /dev/lofi/1 /mnt2
		star -copy -p -sparse -no-fsync -time -xdot bs=1m fs=32m -C /mnt2 . /mnt

 8. Set up the layout of the keyboard in:

		/mnt/boot/solaris/bootenv.rc

     and comment out the entry:

		setprop keyboard-layout German

	or replace "German" by the name of your keyboard layout.

 9. Create the grub loader config "/mnt/rpool/boot/grub/menu.lst", call:
    
	mkdir -p /mnt/rpool/boot/grub/bootsign
	cp menu.lst.zfs-root /mnt/rpool/boot/grub/menu.lst

    Make sure a boot signature that fits thefile "menu.lst" is available:

	touch /mnt/rpool/boot/grub/bootsign/pool_rpool
	mkdir -p /mnt/rpool/etc
	echo pool_rpool > /mnt/rpool/etc/bootsign

    This is needed to allow grub to locate the correct root pool via
    the "findroot" command in grub.

10. Install grub into the master boot record (using the `-m' option)
    or any other boot record of an existing partition, but remember to
    set this partition as bootable.

    # installgrub [-m]

	Example:
		cd /mnt/boot/grub/
		installgrub -m stage1 stage2 /dev/rdsk/c0d0s0

	IMPORTANT: if you did set up a zpool mirror, repeat this command with
	the other side of the mirror. This may result in something like:

		installgrub -m stage1 stage2 /dev/rdsk/c1d0s0

	note that the last argument depends on the location of the mirror.

11. Populate the /mnt/dev directory with the correct entries by using devfsadm:

	Example:
		devfsadm -r /mnt

12. Edit `/mnt/etc/vfstab' to reflect the proper device paths to filesystems.

	Use "vfstab.zfs-root" as a reference.

	Important: a ZFS-Root version of /etc/vfstab looks different from
	a UFS based one. For a ZFS-root, it should be sufficient to copy
	the _unmodified_ "vfstab.zfs-root" to /mnt/etc/vfstab

13. Generate an initial ramdisk for grub which is needed to boot where
    <mount-point> is the mounted ZFS root of the new system.

    # bootadm update-archive -R <mount-point>

	Example:
		bootadm update-archive -R /mnt

14. Set up ZFS dump device for kernel dumps

	Example: dumpadm -r /mnt -d /dev/zvol/dsk/rpool/dump

	XXX This does not seem to work here, so better call
	XXX dumpadm -d /dev/zvol/dsk/rpool/dump
	XXX after you did boot the new installation

15. Set owner/group and permissions on the new root directory.

	Call chown root:root /mnt; chmod g-s,u=rwx,g=rx,o=rx /mnt

16. Final settings on the root pool

	Call:
 
	#
	# Set appropriate ZFS error mode
	#
	zpool set failmode=continue rpool 
	#
	# Set up root dataset for grub
	# 
	zpool set bootfs=rpool/ROOT/sxce_147 rpool 

17. Unmount the ZFS root filesystems

	zfs umount -a 
	zfs umount /mnt

18. Export the ZFS root pool

	zpool export rpool

Now boot the new installation.
Source: README.ZFS-Root, updated 2020-01-15