FreeBSD 9.1-RC3 on Hetzner with ZFS and beadm
Hello,
With this Skript my Server is now working with FreeBSD 9.1-RC3 on Hetzner RootServer with FreeBSD 9.1 and 64Bit. Beadm is a great tool. Select Rescue with FreeBSD, 64Bit in the Hetzner Rescue Web Interface. Restart Or Boot from the FreeBSD USB/DVD. Select the 'Live CD' option. login: root tcsh destroygeom -d ad4 destroygeom -d ad6 mkdir /tmp/freebsd91 cd /tmp/freebsd91 fetch ftp://ftp.freebsd.org/pub/FreeBSD/re...1-RC3/base.txz fetch ftp://ftp.freebsd.org/pub/FreeBSD/re....1-RC3/doc.txz fetch ftp://ftp.freebsd.org/pub/FreeBSD/re...RC3/kernel.txz fetch ftp://ftp.freebsd.org/pub/FreeBSD/re...-RC3/lib32.txz fetch ftp://ftp.freebsd.org/pub/FreeBSD/re...-RC3/ports.txz fetch ftp://ftp.freebsd.org/pub/FreeBSD/re....1-RC3/src.txz DISKS="ad4 ad6" for I in ${DISKS}; do NUMBER=$( echo ${I} | tr -c -d '0-9' ) gpart destroy -F ${I} gpart create -s GPT ${I} gpart add -t freebsd-boot -l bootcode${NUMBER} -s 128k ${I} gpart add -t freebsd-zfs -l sys${NUMBER} ${I} gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ${I} done zpool create -f -o cachefile=/tmp/zpool.cache sys mirror /dev/gpt/sys* zfs set mountpoint=none sys zfs set checksum=fletcher4 sys zfs set atime=off sys zfs create sys/ROOT zfs create -o mountpoint=/mnt sys/ROOT/default zpool set bootfs=sys/ROOT/default sys cd /tmp/freebsd91/ tar --unlink -xvpJf base.txz -C /mnt tar --unlink -xvpJf doc.txz -C /mnt tar --unlink -xvpJf kernel.txz -C /mnt tar --unlink -xvpJf lib32.xz -C /mnt tar --unlink -xvpJf ports.txz -C /mnt tar --unlink -xvpJf src.txz -C /mnt cp /tmp/zpool.cache /mnt/boot/zfs/ cat << EOF >> /mnt/boot/loader.conf zfs_load=YES vfs.root.mountfrom="zfs:sys/ROOT/default" EOF cat << EOF >> /mnt/etc/rc.conf zfs_enable=YES EOF :> /mnt/etc/fstab I don't know my Hetzner IP Address. To find your Network Address Settings, Reboot your Server with Rescue, FreeBSD 64. Now start Hetzner Standard Install from this Page http://wiki.hetzner.de/index.php/FreeBSD_installieren Start installimage After the Installationprozess you find your Network Settings in /etc/rc.conf If someone know a better way please post it. Edit your Files with vi or ee. vi /mnt/etc/rc.conf hostname="yourhostname" sshd_enable="YES" sendmail_enable="NONE" zfs_enable="YES" ntpd_enable="YES" ifconfig_rl0="inet XXX.XXX.XXX.XXX netmask 255.255.255.224" defaultrouter="XXX.XXX.XXX.XXX" ifconfig_plip0="inet 0.0.0.0 netmask 255.0.0.0 media 100BaseTX mediaopt full-duplex,flag0" defaultrouter="XXX.XXX.XXX.XXX" cat << EOF >> /mnt/etc/resolv.conf nameserver 8.8.4.4 nameserver 8.8.8.8 EOF cd /etc cp passwd master.passwd pwd.db spwd.db /mnt/etc/ Change /mnt/etc/ssh/sshd_config: PermitRootLogin yes zfs create -V 4G -o org.freebsd:swap=on \ -o checksum=off \ -o sync=disabled \ -o primarycache=none \ -o secondarycache=none sys/swap chroot /mnt /bin/tcsh vipw Change Root Shell to /bin/sh or /bin/tcsh passwd root exit zfs umount -a zfs set mountpoint=legacy sys/ROOT/default reboot |
Here is more detailed tutorial ;)
http://www.linuxquestions.org/questi...sd-4175412036/ |
All times are GMT -5. The time now is 07:19 AM. |