hobbit monitor
Results 1 to 15 of 16

Thread: Building the FreeBSD OS from scratch

Threaded View

  1. #2
    Join Date
    Oct 2002
    Posts
    47

    continued

    Insert your boot media and at the Welcome screen choose the Install option and hit Enter. (You'll be using the Enter button to confirm all your choices.)

    If you're in the US use the Default keybo ard mapping when presented with that screen. If not, choose the keymap that you'll be using.

    When presented with the Set Hostname screen enter your machine name.

    At the Distribution Select screen choose all options with the possible exception of the Handbook, which requires and internet connection and you haven't configured that yet. Be sure to choose ports and src. You do this with the arrow keys and the spacebar.

    At the Partitioning menu choose Guided, for simplicity. It will give you a choice of where to install, choose your HD, which will be the largest and designated as ada0.

    Choose Entire Disk at the next screen, as we won't be dual-booting with this tutorial.

    At the next screen it will present you with the disk layout, choose Finish.

    Now confirm this is what you really want to do, and Commit to the partitioning and installation of your new OS.

    Now sit back and wait for it to install the base system, kernel, games, ports, and source code. It won't take long.

    Your next task is to choose a password for the root account. Make it a strong one with upper and lower case letters, numbers, and other characters. At least 8 characters in length, the longer and more complex the better.

    Now you'll configure your network interface. Choose your ethernet card for starters. FreeBSD is not Linux, so it will have a different designation but you should be able to pick it out from a wireless card.

    Now choose yes when asked if you'd like to configure IPv4.

    Choose Yes to configure DHCP. It will scan and pick up your router interface, go with it.

    If you want to configure IPv6 at the next screen or not it's up to you. I don't, but it's up to you.

    Now set your timezone, choose No when it asks you if you use UTC, and proceed to the next screen to choose the appropriate time zone for you.

    At the system Configuration screen choose to enable moused, ntpd, and powered. If you want to enable SSH choose SSHD too.

    Choose No to enabling Crash Dump. It's not necessary.

    Now's your chance to add a User account. Less privileged than root, it's what you'll be running in **.*% of the time.

    When asked of you want to invite the user to other groups make them members of:

    wheel operator

    Typed just like that, no comma.

    Enter an password for that account, the rest of the options choose the default option it recommends and just hit Enter to proceed from one to the next.

    One account should be enough, when asked if you want to make another user account type no and hit Enter.

    Now you're at the final screen of the build process. Exit and remove the installation media you used (CD, DVD, Flash drive) while it's restarting or it will loop back.

    Now you're presented with a black screen. You've only installed the base system and no GUI or desktop have been installed at this point.

    Log into your user account with the user name you chose and the password for it.

    Now you're at the terminal and we're going to log into the root account by typing:

    su

    and entering the root password.

    Now we'll populate the ports tree with the following command:

    portsnap fetch extract

    If all went well with the initial installation it should download and install the ports tree, which will take a few minutes.

    Now we're going to enable the pf firewall, which is taken from OpenBSD and the best all-around firewall going.

    We're going to have to enter Easy Editor to make a ruleset and show the system where to look for it.

    Type:

    ee /etc/pf.conf

    And hit Enter.

    You've just created a file called pf.conf in the /etc directory.

    Now type:

    block in all
    pass out all keep state

    Hit the Esc key to bring up the options menu, choose file options, and save file.

    Hit Esc again and exit Easy Editor back to the command line.

    Now we have to show the system where to look for our ruleset and the logfile.

    Type:

    ee /etc/rc.conf

    You've just opened the file rc.conf in the /etc directory. This is a very important file and you should see some options already there, like your machine name and other options.

    It's VERY IMPORTANT not to leave any option here uncommented on either end, meaning if you start an option it MUST begin and finish with quotes or you will not be able to start your system, have to enter Single User to fix, and not something we're going to go into here, so keep that in mind.

    Use your arrow keys to scroll down past the lines that are already present and type these out:

    pf_enable="YES"
    pf_rules="/etc/pf.conf"
    pf_flags=""
    pflog_enable="YES"
    pflog_logfile="/var/log/pflog"
    pflog_flags=""

    Notice how each option begins and finishes with a quote? You'll be adding your own later so don't forget to check it closely before you exit out of Easy Editor when you do.

    Now hit Esc again to save the file, and ESC again to exit Easy Editor.

    Now we'll reboot to make the changed we've made take effect by entering the following command:

    shutdown -r now

    And hitting Enter. Your machine will now reboot and you'll be back at the starting screen. Log into your user account again and then su into the root account once you do.
    Last edited by Siseneg; 06-21-2016 at 11:38 PM. Reason: (Added a space to the word K e y b o a r d)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts