Easy FreeBSD Installation on a Linode
This guide was originally posted on
Please be aware FreeBSD is still an unsupported OS on Linode infrastructure, and as such, Linode Support may be unable to assist
you in the event you require help.
–---------------------------------------------------------------------------------
EDIT: Thanks to GLish, the modified image is NO LONGER REQUIRED! Feel free to SKIP steps 1 and 2 entirely!
You can simply use the following command in
Rescue Mode to kickstart the install:
curl
installation media.
Original instructions are included below for those who wanted to use the serial console still.
MAKE SURE YOUR /boot/loader.conf FILE LOOKS LIKE THIS:
boot_multicons="YES"
boot_serial="YES"
comconsole_speed="115200"
console="comconsole,vidconsole"
–---------------------------------------------------------------------------------
Important bits: Linode uses LISH, the Linode Shell, to provide a console for
your Xen or KVM Linode. Lish is basically a serial console. This means that
both your installation media and eventual installation must be aware of the
serial console.
Secondarily, we'll be using RAW disks. That means no resizing the disk later,
no Linode Backup Service, etc. ZFS ZPools roughly solve the issue of "Oh crap
I need more disk space" though!
Step 1. Download the latest memstick.img or mini-memstick.img from:
Step 2. Mount said memstick.img In FreeBSD you can do this with #mdconfig -f
$filename and then mount it where ever you like. Once you've done so, cd to
the directory and run:
echo 'console="comconsole"' > ./boot/loader.conf
This will make our memstick serial-aware.
I have provided a download of a serial-aware 10.1 memstick.img at the
following link for anyone that is interested.
Step 3. Create a RAW disk 800 Mb in size (or 300 if you're using the mini-
memstick)
Now boot your Linode in Rescue mode, and dd the image up! On your home
computer:
dd if=FreeBSD-memstick.img | ssh root@$IpAddress "dd of=/dev/sda"
If you use my provided image, you can simply run the following command in
Rescue Mode:
curl
Step 4. Once this completes, shut your Linode down. Create a new Raw disk at
your preferred size. Set up a configuration profile to boot the installer disk
you just finished creating as /dev/sda and your new raw disk as /dev/sdb! Make
sure to turn off ALL of the Linode helpers, they can't do anything for Raw
disks.
Step 5. Boot the installer. Run through it. I prefer to keep lib32 and src,
and uncheck ports, docs, and games. You can always get a more up to date ports
via #portsnap fetch extract later.
Make sure you ONLY install to da1, not da0. da0 is your installation media.
Ensure you turn on DHCP for IPv4 and SLAAC for IPv6.
Step 6. *** IMPORTANT IMPORTANT IMPORTANT ***
If you do not take this step LISH WILL NOT WORK.
After pressing exit, you will be asked if you wish to chroot into your new
system. CHOOSE YES!
Upon doing so, edit /boot/loader.conf with vi and append console="comconsole"
at the very end of the file.
Make any other desired changes, and shut down with shutdown -p now.
Step 7. Once the shutdown finishes, feel free to edit your configuration
profile to only boot your main disk. BAM, you've got a FreeBSD Linode. Awwwwww
yiss.
Finished, you might look something like
If you're new to FreeBSD, I STRONGLY suggest reading the handbook:
Enjoy!
▓▓▓▓▓░▓▓▓▓▒▒▒▒██████▓▓▓
▓▓▓▓░░░▓▓▓▓▒▒▒▒▒█████▓▓
▓▓▓░▐▌░░▓▓▓▓▒▒▒▒▒▒████▄
▓▓▒░░▌░░░░▓▓▓▓▒▒▒▒▒█▌▓▀
▓▒▓░░░░░░░░░▓▓▓▒▒▒▒▒▀▓▓
▓▒▓▓░░░░░▀▀███▓░▒▒▒▒▒▓▓
▒▒▒▓▓░░░▌▄████▌░░▒▒▒▓▓▓
▒▒▒▓▓▓░░███▄█▌░░░▓▓▒▒▓▓
▒▒▒▒▓▓▓░░▀▀▀▀░░░░▓▓▓▒▓▓
▒▒▒▒▒▓▓▓░░░░░░░░░░▓▓▓▓▓
▓▒▒▒▒▒▓░░░░░░░▐▄░▓▓▓▓▓▓
▓█▒▒▒▒▒░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓
▓██▒▒▒▒▒░▓▓▓▓▓▓▓▓▓▓▓▓▓▓
3 Replies
create a new linode
dashboard > create new disk > (label: "installer", type: raw, 800MB)
upgrade to KVM (if still on Xen)
rescue > set /dev/sda to "installer", then click Reboot into Rescue Mode
remote access > launch Glish
on Glish, type: curl
wait for download to complete (~774MB), then click power off button
dashboard > create new disk > (label: "freebsd", type: raw, 8192MB or something else)
dashboard > create a new configuration profile (label: "freebsdprofile", Kernel: Direct Disk, /dev/sda: "freebsd", /dev/sdb: "installer", root-boot-device: /dev/sdb, Filesystem/Boot Helpers: set all to NO)
settings > shutdown watchdog > disable Lassie
remote access > launch Glish again, then click power on button (you may need to relaunch Glish a couple of times)
follow install steps:
on da0)
on Manual Configuration step at the end of installation, select YES, then type
echo 'console="comconsole"' >> /boot/loader.conf
shutdown -p now (wait for shutdown to complete)
dashboard > edit configuration (/dev/sdb: None, root-boot-device: /dev/sda)
dashboard > boot
connect to your freebsd linode via ssh!
innovation #linode #freebsd
Thanks rainbow
Dan