LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices

Reply
 
Search this Thread
Old 11-18-2012, 02:30 AM   #1
axellander
LQ Newbie
 
Registered: Nov 2012
Posts: 1

Rep: Reputation: Disabled
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
 
Old 11-18-2012, 11:57 PM   #2
vermaden
Member
 
Registered: Jan 2006
Location: pl_PL.lodz
Distribution: FreeBSD
Posts: 392

Rep: Reputation: 80
Here is more detailed tutorial
http://www.linuxquestions.org/questi...sd-4175412036/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO: ZFS Madness (BEADM on FreeBSD) vermaden *BSD 6 09-06-2012 08:07 AM
LXer: Clang, Chromium, ZFS Improve On FreeBSD LXer Syndicated Linux News 0 04-24-2010 05:21 AM
LXer: Backport ZFS support to Xen 3.3.1 F10 Dom0 (kernel 2.6.30-rc3-tip) LXer Syndicated Linux News 0 05-07-2009 10:00 PM
ZFS support in FreeBSD jlliagre *BSD 16 06-25-2007 04:01 PM


All times are GMT -5. The time now is 08:43 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration