Easy FreeBSD Installation on a Linode

For those of you looking to rock out FreeBSD on your Linodes, I've written a guide that should get you going.

This guide was originally posted on http://cloudsdale.ponix.space/~rainbow/blog/ and is not official Linode documentation.

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!

https://forum.linode.com/viewtopic.php?t=12212&p=68289#p68289

You can simply use the following command in

Rescue Mode to kickstart the install:

curl ftp://ftp.freebsd.org/pub/FreeBSD/relea … mstick.img">ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/ISO-IMAGES/10.2/FreeBSD-10.2-RELEASE-amd64-memstick.img | dd of=/dev/sda to set up your

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:

ftp://ftp.freebsd.org/pub/FreeBSD/relea … SO-IMAGES/">ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/ISO-IMAGES/

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.

http://cloudsdale.hacker.horse/~rainbow … onsole.img">http://cloudsdale.hacker.horse/~rainbow/FreeBSD-10.1-RELEASE-amd64-memstick-SerialConsole.img

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 http://cloudsdale.hacker.horse/~rainbow … onsole.img">http://cloudsdale.hacker.horse/~rainbow/FreeBSD-10.1-RELEASE-amd64-memstick-SerialConsole.img | dd of=/dev/sda

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

https://twitter.com/RainbowHacks/status … 8545637377">https://twitter.com/RainbowHacks/status/630833198545637377

If you're new to FreeBSD, I STRONGLY suggest reading the handbook:

https://www.freebsd.org/doc/handbook/

Enjoy!

▓▓▓▓▓░▓▓▓▓▒▒▒▒██████▓▓▓

▓▓▓▓░░░▓▓▓▓▒▒▒▒▒█████▓▓

▓▓▓░▐▌░░▓▓▓▓▒▒▒▒▒▒████▄

▓▓▒░░▌░░░░▓▓▓▓▒▒▒▒▒█▌▓▀

▓▒▓░░░░░░░░░▓▓▓▒▒▒▒▒▀▓▓

▓▒▓▓░░░░░▀▀███▓░▒▒▒▒▒▓▓

▒▒▒▓▓░░░▌▄████▌░░▒▒▒▓▓▓

▒▒▒▓▓▓░░███▄█▌░░░▓▓▒▒▓▓

▒▒▒▒▓▓▓░░▀▀▀▀░░░░▓▓▓▒▓▓

▒▒▒▒▒▓▓▓░░░░░░░░░░▓▓▓▓▓

▓▒▒▒▒▒▓░░░░░░░▐▄░▓▓▓▓▓▓

▓█▒▒▒▒▒░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓

▓██▒▒▒▒▒░▓▓▓▓▓▓▓▓▓▓▓▓▓▓

3 Replies

For someone who is new to Freebsd and/or Linode, below are the specific steps I used for installing FreeBSD on Linode:

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 ftp://ftp.freebsd.org/pub/FreeBSD/relea … mstick.img">ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/ISO-IMAGES/10.2/FreeBSD-10.2-RELEASE-amd64-memstick.img | dd of=/dev/sda

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: https://www.freebsd.org/doc/en_US.ISO88 … start.html">https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/bsdinstall-start.html (Note: on Partitioning page, select to install

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

Just brought up my first FreeBSD VPS on linode!

Thanks rainbow

Dan

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct