Hi guys,
I'm trying to install FreeBSD 10.0-RELEASE from Rescue-pro on Kimsufi (basically like a Fixit). There's no console so I do not have much info on what is wrong. I managed to get to the logs after unsuccessful boot, and here's what /var/log/messages says:
It is the last line in /var/log/messages.
My procedure:
I'm trying to install FreeBSD 10.0-RELEASE from Rescue-pro on Kimsufi (basically like a Fixit). There's no console so I do not have much info on what is wrong. I managed to get to the logs after unsuccessful boot, and here's what /var/log/messages says:
Code:
Sep 17 12:04:29 b0ink kernel: Trying to mount root from zfs:zroot []...
It is the last line in /var/log/messages.
My procedure:
- Set the machine to boot in rescue mode
- remove partitions you had there already
Code:# gpart destroy -F ada0 - create partitions and copy bootcode:
Code:gpart create -s gpt ada0 gpart add -b 34 -s 94 -t freebsd-boot ada0 gpart add -t freebsd-zfs -l disk0 ada0 gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0 - create pool:
Code:zpool create -f zroot /dev/gpt/disk0 - set bootfs, checksums etc
Code:zpool set bootfs=zroot zroot zfs set checksum=fletcher4 zroot zfs set mountpoint=/mnt zroot - get a copy of zpool.cache:
Code:zpool export zroot zpool import -o cachefile=/var/tmp/zpool.cache zroot - create filesystems:
Code:zfs create zroot/usr zfs create zroot/usr/home zfs create zroot/var zfs create -o compression=on -o exec=on -o setuid=off zroot/tmp zfs create -o compression=lzjb -o setuid=off zroot/usr/ports zfs create -o compression=off -o exec=off -o setuid=off zroot/usr/ports/distfiles zfs create -o compression=off -o exec=off -o setuid=off zroot/usr/ports/packages zfs create -o compression=lzjb -o exec=off -o setuid=off zroot/usr/src zfs create -o compression=lzjb -o exec=off -o setuid=off zroot/var/crash zfs create -o exec=off -o setuid=off zroot/var/db zfs create -o compression=lzjb -o exec=on -o setuid=off zroot/var/db/pkg zfs create -o exec=off -o setuid=off zroot/var/empty zfs create -o compression=lzjb -o exec=off -o setuid=off zroot/var/log zfs create -o compression=gzip -o exec=off -o setuid=off zroot/var/mail zfs create -o exec=off -o setuid=off zroot/var/run zfs create -o compression=lzjb -o exec=on -o setuid=off zroot/var/tmp - create swap:
Code:zfs create -V 32G zroot/swap zfs set org.freebsd:swap=on zroot/swap zfs set checksum=off zroot/swap - symlinks:
Code:chmod 1777 /mnt/tmp cd /mnt ; ln -s usr/home home chmod 1777 /mnt/var/tmp - prepare virtual filesystem for *.txz files (~300MB)
Code:mkdir /tmp/system mount -t tmpfs -o size=300000000 dummy /tmp/system cd /tmp/system - download files:
Code:fetch ftp://ftp.fr.freebsd.org/pub/FreeBSD/releases/amd64/10.0-RELEASE/base.txz fetch ftp://ftp.fr.freebsd.org/pub/FreeBSD/releases/amd64/10.0-RELEASE/lib32.txz fetch ftp://ftp.fr.freebsd.org/pub/FreeBSD/releases/amd64/10.0-RELEASE/kernel.txz fetch ftp://ftp.fr.freebsd.org/pub/FreeBSD/releases/amd64/10.0-RELEASE/doc.txz - install FreeBSD:
Code:sh cd /tmp/system export DESTDIR=/mnt for file in base.txz lib32.txz kernel.txz doc.txz; do (cat $file | tar --unlink -xpJf - -C ${DESTDIR:-/}); done - copy zpool.cache:
Code:cp /var/tmp/zpool.cache /mnt/boot/zfs/zpool.cache - create necessary entries in rc.conf and loader.conf and empty fstab:
Code:echo 'zfs_enable="YES"' >> /mnt/etc/rc.conf echo 'zfs_load="YES"' >> /mnt/boot/loader.conf echo 'vfs.root.mountfrom="zfs:zroot"' >> /mnt/boot/loader.conf touch /mnt/etc/fstab - other necessary entries (OVH-specific):
Code:echo 'sshd_enable="YES"' >> /mnt/etc/rc.conf echo 'ifconfig_em0="inet XXX.XXX.XXX.XXX netmask 255.255.255.0 broadcast XXX.XXX.XXX.255"' >> /mnt/etc/rc.conf echo 'defaultrouter="XXX.XXX.XXX.XXX"' >> /mnt/etc/rc.conf - change entries in /mnt/etc/ssh/sshd_config:
Code:echo "PermitRootLogin without-password" >> /mnt/etc/ssh/sshd_config - copy keys to root's home:
Code:mkdir /mnt/root/.ssh vi /mnt/root/.ssh/authorized_keys chmod 700 /mnt/root/.ssh chmod 600 /mnt/root/.ssh/authorized_keys - unmount and fix ZFS mount points:
Code:zfs set readonly=on zroot/var/empty zfs umount -af zfs set mountpoint=legacy zroot zfs set mountpoint=/tmp zroot/tmp zfs set mountpoint=/usr zroot/usr zfs set mountpoint=/var zroot/var - reboot