Reply to topic  [ 1 post ] 
HOWTO: Installing FreeBSD with KDE or GNOME 
Author Message
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
Author: attenboroughp

Alert - BIG guide coming up!

NB: This guide is based on FreeBSD 6.1. You will need both disks to follow this guide.

___________________________________________________________

Installing FreeBSD:

Setup controls: Press 'enter' or 'space' to select a currently highlighted option. On some screens, in order to proceed it is necessary to use the 'tab' key to move from the list of main options to the 'OK' and 'cancel' buttons at the bottom of the screen. This will all become clear during the installation.

Boot FreeBSD and wait until you reach the "Country selection" screen. Go up to select 'United Kingdom'. On the next screen accept the proposal of the UK ISO key map.

You now reach the 'sysinstall Main Menu'. Select 'Standard'. You will now reach the partitioning stage. To make a new FreeBSD partition, highlight any 'unused space' and press 'c'. You should make this partition at least 10GB, although you can get away with much less if you know how. Personally, I make a 20GB partition. To do this, I enter '20480M' and then press enter. You will now be presented with a 'Value Required' screen. Just press 'enter' to keep the default of '165'. After returning to the partitioning screen, highlight the newly created partition and press 's'. This is required to make FreeBSD bootable! Now you can press 'q' to finish.

On the next screen you are asked if you want to install a boot manager. If you have other operating systems installed on the computer that you would like to be able to boot then select 'Boot Mgr'. If FreeBSD is the only OS on the computer (that you want to be able to boot) then you can just opt to install the standard MBR, which will give faster booting times.

The next screen, entitled 'Disklabel editor' might baffle you a bit. Do you remember partitioning you HDD earlier in order to make a FreeBSD partition? Well now you have to partition it again! What you are effectively being asked to this time is partition the space inside the FreeBSD partition you created earlier - kinda like making smaller partitions within a larger 'main' partition.

Despite being seemingly confusing, this bit is very straightforward. Just press 'a' and the Disklabel editor will automatically partition it for you. You should make sure that your '/usr' partition is at least 5GB (preferably more). If it's not, you didn't make the main FreeBSD partition large enough earlier in the installation process. Anyway, to proceed and accept FreeBSD's proposal, just press 'q'.

You are now presented with the 'Choose Distributions' screen. If you are unsure at this point, just select 'All'. If you decide to customise you're installation, and still want to use KDE, then you will have to select 'X.Org.' Regardless of what you choose, when finished, use the 'tab' key to go down to 'OK' and press enter. Bare in mind that you can all ways come back to this screen once you have installed FreeBSD, if needs be. When asked to install the ports collection choose 'yes. It is very important that you install the ports collection. You are taken to the X.org screen. Just choose 'Exit' because the default configuration is fine. Now that you are back at the 'Choose Distribution' screen select 'Exit' to proceed.

On the 'Choose Installation Media' screen select 'CD/DVD' and when asked to confirm the installation, select 'Yes'.

FreeBSD will now start to install. Go and grab a coke or something, because it could take a while if you opted to install everything.

Finally You will reach the 'Congratulations' screen. Press enter. We are now asked if we would like to configure any Ethernet or SLIP/PPP network devices. Obviously, if you're computer is part of a network, you will want to select 'Yes'. I will assume in this guide that you have selected 'Yes', although you can still follow this guide if you decide not to - you will just have to skip the relevant sections.

On the 'Network interface information required' screen I select Ethernet device, because my computer connects to an ADSL router over Ethernet. Again, for the sake of this guide I will have to assume that the reader also has an Ethernet device to configure.

You will now have to select the device that you want to configure. At this point, knowing which device is you're NIC may be a bit tricky. If you don't know then you will just have to keep guessing until you get it right. My Ethernet device actually came up as '<unknown network interface type>', so don't worry if yours does too.

When asked if you want to use IPv6 select 'No'. You will now be asked if you want to use DHCP. My network does use DHCP so I select 'Yes'. After a short while you will be taken to a 'Network Configuration' screen. If DHCP was successful, you're IP address and some other details will already be filled in. If not, then you will have to enter them manually. Regardless of whether DHCP was successful or not, you will have to fill in the fields; 'Host' and 'Domain'. Host is the name you want to give to you're computer, for example 'Paul's computer'. 'Domain' is the name of the workgroup that you wish to participate in. Common examples of workgroups include 'MSHOME' and 'WORKGROUP'. You may notice that when you fill in the 'Domain' field, you're entry for domain will appear after you're entry for 'Host'. This is normal, so leave it alone. Leave the field entitled 'Extra options to ifconfig' empty and select 'OK'.

You will now be asked a bunch of questions. For each question I will give the answer that I selected. If you are unsure then answer each question with the following:

> Function as a network gateway? No
> Configure inetd? No
> Enable SSH? No
> Allow anonymous FTP? No
> Function as an NFS server? No
> Function as an NFS client? No
> Customise you system console settings? No
> Set the machines time zone? Yes
> Is CMOS clock set to UTC? No

In the next part you will have to fill in what region you live in. I will assume that you live in the UK. In this case, select 'Europe' and press 'OK' , then on the next screen choose 'united kingdom' and press 'OK'. You will then be asked if BSD looks reasonable. Select 'Yes'.

You will now be asked if you want to enable Linux binary compatibility. I choose 'Yes'. Then you will be asked if you're system has a PS/2, serial or bus mouse. If you have a mouse then you will obviously want to select 'Yes' at this point. I will assume you selected 'Yes'.

On the 'Please configure you're mouse' screen select 'enable'. Move you're mouse and see if the cursor moves on the screen. If it does and your mouse is working properly then you don't need to configure anything else. If it doesn't then look through the options and try to configure you're mouse. When finished select 'Exit'.

You will now be asked if you want to browse the package selection. Choose 'Yes'. You can now install KDE. Go down and select 'kde' and select 'kde-3.5.1'. You will notice that lots of items in the list will now be marked with a 'D'. 'D' stands for 'Dependency', meaning that these programmes will automatically be installed because they are part of the 'kde-3.5.1' package. Press 'tab' and select 'OK' to return back to the main package selection menu. Another package you may wish to install is firefox, which is located under the 'www' section. When finished, press 'tab' and select 'install'. You will be asked to switch disk to disk 2. Select 'Yes', then insert disk 2 and select 'OK'. Have another coke whilst it installs the packages for you.

When finished it will ask if you want to add any additional user accounts to the system. Select 'No'. We will do this manually later once FreeBSD is installed. You will then be asked to enter the system managers password. Enter you're password and when finished press 'Enter'. You will then be asked to confirm this password, which means typing it in again. Do so and press 'enter'.

When asked if you would like to visit the general config menu select 'No'. You will now be taken all the way back to the 'sysinstall Main Menu'. Press 'tab' and select 'Exit' Install'. Confirm this by pressing 'enter' when asked.

Booting FreeBSD:

You PC will now reboot. Remove the CD whilst it is doing so. If you installed the boatloader you may have to press the relevant 'F'X' button (where X is an integer) on you're keyboard in order to boot FreeBSD. These keys are located at the top of you're keyboard.

Eventually, when FreeBSD has booted, you will reach a login prompt. I will now guide you through the commands to get KDE up and running. After typing the text in each code box you will have to press 'enter'.

Logging in to FreeBSD:

Login as:
Code:
root


And type you password (this is the system managers password that you set earlier) when prompted.

Adding a new user:

The first thing we want to do when logged in is add another user to the system. It is highly recommended that you add another user account to the system, for security reasons. We don not want to log in as 'root' all the time, for reasons I'll explain later. We can add another user by issuing the command:
Code:
adduser


You will now be asked a bunch of questions. For the purpose of this guide I will be calling my user 'bill':

> Username: bill
> Full name: (if you want to enter the users full name then do so. If you don't want to enter the users full name then just press 'Enter')
> Uid: Just press 'enter'
> Login group: wheel (this bit is quite important. Make sure you type 'wheel' This will allow you to use the 'su' command later on when loging in as this newly created user. If you don't know what the 'su' command is then don't worry. Just rest assured for the time being that it''s pretty important.)
> Invite bill into other groups?: Just press 'Enter'
> Login class: Just press 'Enter'.
> Shell: Just press 'Enter'.
> Home directory: Just press 'Enter'
> Use password based authentication?: Just press 'Enter'
> Use an empty password?: Just press 'Enter'
> Use a random password?: Just press 'Enter'

Now enter a password for the (soon to be) newly created user. Then confirm it by typing it again when asked.

> Lock account after creation?: Just press 'Enter'
> OK?: yes
> Add another user?: (this bit is up to you. Personally, I don't need another user account because i'm the only one who uses this computer. If you want to add another user then type 'yes'. If you don't need to add another user at this moment in time type 'no')

Configuring X.Org:

X.Org is needed in order to use window managers such as KDE and gnome.

To set up X.Org, type:
Code:
xorgconfig

And press 'Enter' to continue'

You will be asked the following questions:

> Specify mouse protocol: Press '1'
> Emulate3Buttons: If you have a mouse with a scroll wheel then type 'n'. If you're mouse doesn't have a scroll wheel type 'y'.
> Mouse device: Press 'enter'
> Keyboard: Press '1'
> Country: If you live in the UK type '59'
> Variant name for 'gb': Press 'enter'
> XKB options: 'n'
> Monitor specs: 'Enter'

You are now asked to choose you're vertical sync and horizontal sync settings for you're monitor. You will need to look these up.

> Horizontal sync range: Because my monitor is 1280x1024 I select option '8'
> Vertical sync range: I type '5' then enter my own range. For my monitor this is '56-75'
> Identifier for monitor definition: Just type the model of you're monitor. This step is not important. In my case I type 'B90A'
> Look at video card database?: y

Now select you're video card. Keep pressing 'Enter' to cycle through the pages. If, like me, you have an Nvidia Geforce card, then select '349'.

> Video card memory: Not overly important. If not sure just choose the lowest setting. My card has 256MB so I choose '262144K'.
> Video card definition: again, not important. Just type the model of you're GPU. I just type 'Nvidia'.

You will be asked a few basic questions about you're monitor, such as you're intended resolution. If you are unsure about you're resolution then play it safe and choose a low resolution. You can come back and change it later.

When finished it will ask if you want to write the xorg.conf file now. Type 'y'.

We are nearly there!

Last steps:

Type:
Code:
exit

Which will log you out. We should only ever log in as 'root' again for administrative purposes and emergencies only. We now want to log in as our other user that we created earlier. In my case this user was called 'bill'

At the login prompt type the username and then hit 'Enter'. In my case I would type:
Code:
bill

Then press the 'Enter' button.

Then type bills password when asked.

When you are returned back to the command line issue this command, making sure that you get it right:
Code:
echo "exec startkde" >> ~/.xinitrc


What this command does is create a file called '.xinitrc' in your home directory. It then adds the text 'exec startkde' to this file. So in effect you created a file called '.xinitrc' which contains the text:
.xinitrc wrote:
exec startkde


You won't understand this command, so don't worry at this moment in time. It's just a fancy way of making a text file, typing something, then saving it.

Starting KDE!:

Simply issue this command:
Code:
startx


If you set up everything correctly you will be presented with a nice GUI for the first time.

KDE will ask you a set of simple questions, most of which are aesthetic, so answer according to you're tastes. When finished KDE will load.

Done!

___________________________________________________________

Optional - using gnome:

Some people may wish to use the gnome windows manager instead of KDE. This is easily achieved.

Note, the following section assumes that you have previously installed KDE and configured X.Org.

Insert Disk 2 into the CD/DVD drive.

Make sure that you're logged in as 'root' and type:
Code:
sysinstall


Select 'Configure' followed by 'Packages'. Then select 'CD/DVD'. Select 'gnome' then select 'gnome2-2.12.3'.

NB: If you're runing an older version of FreeBSD, then this gnome package might be of an older version.

Proceed to install gnome and grap yourself another can of coke.

When it has finished installing, you will need to re-edit the .xinitrc file.

This is achieved by doing the following:

Type:
Code:
logout

To log out from root.

Now log in as the other user which you created earlier.

Once logged in, type:
Code:
cd ~

This will take you to you're users home directory. For more info on commands like this see the HOWTO for the command line.

Now type:
Code:
ee .xinitrc

'ee' is a text editor. When you type the above command, 'ee' will bring up the contents of the '.xinitrc' file and let you edit it.

If you have allready set up KDE, the copntents of this file should be thus:

.xinitrc wrote:
exec startkde


To change this in order to use gnome edit it so the file reads:

.xinitrc wrote:
# exec startkde
exec gnome-session


Press the 'Esc' key when finished, select 'leave editor' and then 'save changes'.

The effect of adding a '#' to the start of the line; 'exec startkde', measn that this line will be ignored - as though it didn't exist.

If you wanted to switch to KDE at a later date then simply remove the '#' from the line entitled; 'exec startkde' and place a '#' infront of the line entitled; 'exec gnome-session'. In this case, you file would now read:

.xinitrc wrote:
exec startkde
# exec gnome-session


Tue May 12, 2009 10:35 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.