rrdtool
Results 1 to 15 of 16

Thread: Building the FreeBSD OS from scratch

Threaded View

  1. #3
    Join Date
    Oct 2002
    Posts
    47

    continued

    OK, so you missed commenting a line in etc/rc.conf, possibly after the "equals" symbol, are seeing a message to that effect, and can't move past that point... Here's how to fix it without having to start completely over. Enter the following commands from where you are now:

    fsck -y
    mount -u /
    mount -a -t ufs
    swapon -a

    Now you can edit /etc/rc.conf through EE to find the error, reboot afterwards to continue on.


    Now we need to apply any security patches that have been issued since the install media was distributed. This is something you'll want to check each and every day to see if any new patches have been issued, chances are it will be weeks in between, but you want to stay up to date.

    Enter the following command:

    freebsd-update fetch

    It will download updates to the system if any are available. When it's finished use your down arrow key to scroll to the end and back to the command prompt. Then enter the following command:

    freebsd-update install

    It won't take as long to install them as it did it download them. Once it's done, reboot:

    shutdown -r now

    If the system hangs and it doesn't look like it's going to finish the reboot cycle do a hard reset with the power button, it will be alright to do so.

    When it reboots enter your user account again, and su to the root account by entering:

    su

    and your root password.

    Now we'll see if any updates have been made to the port tree by entering the following command:

    portsnap fetch update

    After it's done we'll build portmas ter (without the space) from the ports tree by entering the following command:

    cd /usr/ports/ports-mgmt/portmas ter

    Now you've changed directories with the cd command and are in that directory. Enter the following command:

    make install clean

    It will show you a few screen of possible options, just click Enter at each screen to go with the default options, and choose Yes when it asks you if you want to proceed.

    It will build the *rd party program portmas ter from source code which will take a few minutes. You have the option of building programs from source or using packages through the pkg system. pkg is much, much faster, but by building from source you can choose your own options, and it's the way I've been doing it for years, so that's what we'll use in this tutorial.

    It is NOT good to mix ports and packages, so once you start using ports stay with it. Once you gain some experience you may want to rebuild your system and switch from ports to packages. If you'd rather start out using the pkg system consult the FreeBSD Handbook, but you'll need to know what programs are available to use them.

    Ports are also updated more frequently than packages. Therefore, it will be easier to keep your *rd party software up to date when new vulnerabilities are discovered, and by starting out using ports you'll get a feel for compiling programs and gain more CLI time for experience purposes in the process. If you've only installed programs on a Windows machine with an .exe up till now this will be something completely different.

    Now, sit back and relax while it builds the port. Depending on your hardware, some programs could take quite a while. Next we'll build an old school filemanager called Midnight Commander, a graphic interface by installing xorg, a Windows Manager called Fluxbox, a file manager called xfe, and a text editor called Leafpad (which is similar to Notepad) to make it easier for you.

    When it's finished you can get back to the root directory by typing:

    cd /

    Enter the following command:

    cd /usr/ports/misc/mc

    Then type:

    make install clean

    and hit Enter.

    You'll be presented with several screens asking you if you'd like to change options for dependencies needed for MC. Just go with the default options for the most part with the possible exception being for IPV6 if you did not configure it during installation and PERL_64BITIBIT at the perl installation window if you're running a *2 bit machine. If not, hit the spacebar at those lines to uncomment it.

    MC will let you take a look at the directory tree to familiarize yourself with the layout, if you'd like to at the time, or you can do that later. You can bring up MC by typing mc at the CLI but at this point I would advise you only do so from the user account, and not as root, so you don't take the chance on tearing something up. The usr account has limited privileges, root is the SuperUser.

    Next we'll build xorg by entering the following commands:

    cd /usr/ports/x**/xorg
    make install clean

    It will present you with several option screens for programs that are built with the xorg metadata port, like xterm. xclock drivers etc. If won't be necessary to choose all the graphic card drivers it presents, but go ahead and choose VESA with the driver for your card. Again, if you did not configure IPV6 uncomment that line when the curl dependency screen comes up duing the xorg build process.

    Relax, you're doing great.

    After xorg is finally finished building we're going to put portmas ter to work building ports as it will find all needed dependencies before building and usually makes things go more smoothly, Enter the following (again, without the space) as root and hit Enter:

    portmas ter /usr/ports/x**-wm/fluxbox

    Fluxbox is a lightweight Window Manager that features transparency and has several nice styles to chose from. I much prefer it to desktops like KDE or Gnome due to all the extra baggage that comes bundled with them. Styles for fluxbox are available on the web if you search for them. I have one I always use, and could post it here, but I got it online too and tweaked it slightly.

    After it's done install your file manager:

    portmas ter /usr/ports/x**-fm/xfe

    Now for the text editor:

    portmas ter /usr/ports/editors/leafpad

    And the terminal we'll be using with fluxbox called Eterm, which like fluxbox, also features transparency:

    portmas ter /usr/ports/x**/eterm

    When it's done compiling the programs we'll add the following lines to the rc.conf file by entering the following commands so it's activated on boot:

    echo R*6;dbus_enable=̶*;YES̶*;R*6; >> /etc/rc.conf
    echo R*6;hald_enable=̶*;YES̶*;R*6; >> /etc/rc.conf

    This time you used the echo command instead of opening EE like before.

    Now we need to create a file called .xinitrc in your user account folder by entering the following command:

    ee /usr/home/usernamehere/.xinitrc

    (The . before the file name designates it as a hidden file. You can make hidden files visible in xfe options later.)

    Now type (yes, Eterm like it's typed):

    Eterm &
    xfe &
    fluxbox exec

    Save and exit EE afterwards like you've been doing, reboot to make the changes we made take effect:

    shutdown -r now

    (The forum edits the word p o r t m a s t e r so I added a space between letters. Enter the full word without the space in commands.)
    Last edited by Siseneg; 07-01-2016 at 02:43 AM.

Posting Permissions

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