Freebsd Installation , Brief Howto

This post cross-posted at Daemon Diaries

I recently installed FreeBSD on my laptop … here is how it went:

Backing Up!

Before we do ANYTHING , make sure you backup all data that you cannot afford to lose … because more than likely we are going to be erasing any of that durring the partitioning portion … you have been warned

Disclaimer: I am not responsible if your machine is damaged or harmed in this process , if you follow the guide EXACTLY there should be no problem

  1. Go to FreeBSD.org
  2. Find your architecture in the list and choose [ISO]
  3. In the list of downloads , the files you need should be called 7.0-RELEASE-(YOUR ARCHITECTURE)-disc(1-3).iso , if you want to have the maximum amount of packages available to you you must have all three discs
  4. Burn all three disc images to CD
  5. Insert the first disc and reboot your PC
  6. Select your country
  7. Choose Standard Installation
  8. STOP!

    … depending on how you setup this next big all of your data may be erased ,

    BACKUP YOUR DATA NOW

  9. Once you’ve backed up all of your data , press the d key until all slices are deleted
  10. Press the c key to create a new slice … make this one about double the amount of physical ram you have in your computer , if you have 512 megs of ram make this one 1024 megs (1gig) for the type , enter 130 for a swap partition
  11. Now select the remaining unused space and accept the default size (or change if if you want more than one partition and enter type 165 (UFS , the FreeBSD default)
  12. Now in the next screen (the BSD DiskLabel editor) press the c key and enter an amount equal to double the amount of your ram , for instance if you have 512 megs of ram enter 1024M here , select swap as the type
  13. press the c key again , accept the default , select FS as the type and enter / as the Mount Point
  14. Press the q key to finish
  15. Select the distribution set you want , the descriptions are pretty accurate … I chose X-User which is a pretty good base to use (you can change this at any time)
  16. this is the VERY LAST CHANCE to save your data … after this it will all be overwritten , select CD/DVD for your source and sit back while FreeBSD installs (this should take between 20-40 minutes depending on your processor speed)

Optional Steps

    Setting up openbox

  1. follow the prompts after the installation , insert the other cds as the installer requests and after you reboot you should have a full working FreeBSD system , you do have X but no window manager
  2. to easily get a window manager running , login as root at the login prompt using the password you set in the installer
  3. type “pkg_add -r openbox” to install a window manager
  4. type “pkg_add -r feh” to install a program to set your wallpaper
  5. type “pkg_add -r xterm” for an x-terminal-emulator
  6. type “pkg_add -r firefox” to install a web browser
  7. finally type “pkg_add -r sudo” to install the sudo package … we’ll configure this later
  8. type logout to log out of the root user account
  9. now login as your user account
  10. type vi ~/.xinitrc , press the i key and type “exec openbox-session” , press the escape key , and type “:wq”
  11. Finally type startx to open X and openbox will open , press the right mouse button to view the openbox menu

Setting up sudo

sudo is a program that allows users to act as root to do certain tasks like adding packages , installing ports ,or editing system files

  1. login as root from a virtual-term and type visudo
  2. press the i key , add a line at the bottom that says “%wheel ALL=(ALL) ALL” , press the escape key and type “:wq”
  3. now you need to add your user to the “wheel” group to get sudo access , to do this type (as root) “pw usermod -G ftpusers” and replace with your user name…

Now as a regular user you can type sudo followed by your password to execute any command as root


About this entry