by, 23rd May 2009 at 04:16 PM (6489 Views)
I've been playing around with this for a while. I must say as an OS - I like it! It feels somewhat uncomplicated compared to other *nix's.
Today I'm going for a fresh install of NetBSD 5 and see what I can get out of it. Wish me luck!
Nice and simple - VMWare Fusion 2.x (whatever the latest is). 1 Core (from a 2.16Ghz Core Duo) and 768mb Ram. Hard Drive is 15Gb pre allocated.
A word on the hard drive. I've noticed with previous install attempts that NetBSD does not like expanding hard drives so you must pre-allocate the space. The other thing NetBSD doesn't like is Sun's VirtualBox.
Fairly straight forward process. The .iso maps to Fusions virtual CD drive and is auto booting. NetBSD, as with most 'real *nix's' (sorry Linux guys) uses a simple text based installation.
The first choice is the intallation type. I always opt for the 'Custom Installation' Option. I typically chose the following options:
- Kernel (GENERIC)
- System (/etc)
- Compiler Tools
- Online Manual Pages
- X11 Sets - ALL
The rest is not installed. Anything I need I can grab from the package collection later.
Going through the menus NetBSD detects most things just fine. Drive geometry, use entire disk, etc. Just remember to 'set partitions' rather than 'use default' as the default seems to be no partitions(?). From the 'set partitions' screen I tend to just leave the defaults as displayed and continue the installation.
v5 Installation seems a lot lot quicker than v4. It appears that the developers have combined all the elements of each package (Kernel, System, Base, etc) in to their own single archive (eg. kernel.tgz, system.tgz, etc) rather than have separate archives for each individual program that makes up a given package (gcc.tgz, xorg.tgz, etc).
The result is fewer files to copy from CD to hard drive and fewer files to unpack and thus a much quicker install.
Welcome to NetBSD
That was simple! Login in as root and I get a friendly message suggesting I set up a standard user account and 'su' for root access.
A good suggestion, so lets do it!
also use 'vi' to edit the '/etc/group' file to give your new user 'su' permissions.Code:useradd -m <username> passwd <username>
Now we canCode:wheel:*:0:root,<username>
and logon as our new standard user.Code:exit
The next step is to set up your networking. I use DHCP (VMWare Fusion is using a 'bridged' connection) so again this is not to painful.
The first stage is to find the name of your NIC...
It appears my NIC is called 'pcn0'.ifconfig -a
So it's a simple case of using 'vi' to add a couple of lines to (or create) '/etc/rc.conf'
change 'pcn0' to the name of your NICCode:dhclient=YES dhclient_flags="pcn0"
A quick reboot and we have internet!!!
pkgsrc (Package Source) is the NetBSD equivalent to 'ports' on FreeBSD , 'fink' on OSX or 'apt' on Linux. It's our software repository of tested NetBSD *nix apps.
So I need to grab the latest directory tree from CVS which will allow me to easily compile the programs I want to use in my OS.
First set the environment viariables
Next use 'vi' to add the following to '~/.cvsrc'Code:export CVSROOT="anoncvs@anoncvs.NetBSD.org:/cvsroot" export CVS_RSH="ssh"
and then connect to cvs to get the latest package dataCode:checkout -P update -dP release -d diff -upN cvs -q -z3 rdiff -u
and finally bootstrap...Code:cd /usr cvs checkout -P pkgsrc
PicoCode:cd /usr/pkgsrc/bootstrap ./bootstrap
Look under '/usr/pkgsrc' and you'll find a large directory tree of various packages you can install. Installation of any program is simply a matter of 'cd'ing to the appropriate directory and running the following commands...
pkgsrc take care of all dependencies for you!Code:make make install make clean make clean-depends
For a easy web view of packages you will find within the newly installed pkgsrc directory take a look at http://pkgsrc.se/
The first package that *must* be installed is 'pico'. 'vi' is a usable text editor, I know the basics to get in and get the job done, but it's not something you want to use long term. It lacks finesse.
'pico' (or 'nano') is an alternative command line text editor to 'vi'. It's much simpler to use on a day to day basis. Think of 'edit' under MS-Dos and your not a million miles away.
'pico' can be found in the following location...
Now a word on licenses. The are numerous licenses running around the open source world and not all are compatible with each other. Because of this pkgsrc makes you explicitly accept any new licenses you encounter before it will agree to install your chosen software.
'pico' requires the 'pine-license'. To accept a license edit the '/etc/mk.conf' file (again with 'vi' - grrr.)
The last thing I want to do this time round is setup X. Usually I'd set up X first and then install my Window Manager of choice. This time I'm doing it the other way round!
Why? Have you seen 'twm'? Even booting into it once to check X.org has set up correctly is more than I can bare! So, I'll install Fluxbox now and when I configure X.org I'll get a lovely GUI immediately - sweet!
Unlike Windows or OS-X (at least officially) X can have any GUI front end your hear desires (and then some). These are called Window Managers. The most popular tend to copy Explorer (Windows) or Finder (OSX) - see Gnome, KDE and Enlightenment. But if you prefer the look and feel of the Amiga, GEM (early Mac/Atari ST), BeOS or Arthur (Acorn) then you can have that look and feel.
Fluxbox is a very, very basic Window Manager. No desktop icons or menu bars. There's a small bar for running apps and a 'start menu' you access by right-clicking anywhere on the desktop. It's fast and it's simple, and that's what I like. I can add my own file manager and/or icon manager later (if I so desire).
Fluxbox can be found here...
Finally set fluxbox to start with X...(http://www.fluxbox.org/screenshots/)...Code:/usr/pkgsrc/wm/fluxbox
XCode:echo "exec startfluxbox" > ~/.xinitrc
Finally, it's time to start up X. Before I get going a small gripe if you will. I liked XFree86! With release v5 NetBSD have jumped on the X.org band wagon with everyone else. It's a shame, I actually knew where I was with XFree86 and find X.org harder to configure.
Not fair, it's probably more the combination of NetBSD and VMWare that causes the 'difficulties' otherwhys X.org is supposed to configure itself, Oh-hum.
Okay, as you might have gathered. Do not blindly run 'startx' or get X.org to completely configure itself. Atleast not under VMWare as it doesn't work.
First job is to create a 'xorg.conf.new' file in your home directory. This is done by...
Next job is to edit that file and set up to run properly...Code:Xorg -configure
Yay - 'pico'Code:pico ~/xorg.conf.new
Add [CTRL]-[ALT]-[BACKSPACE] support to dump out of X if something is wrong...
and replace the entire screen section...Code:Section "Server Layout" ... ... Option "DontZap" "Off" EndSection
Finally...Code:Section "Screen" Identifier "Screen0" Device "Card0" Monitor "Monitor0" DefaultDepth 24 SubSection "Display" Viewport 0 0 Depth 24 Modes "1024x768" EndSubSection EndSection
and you will see...(attached image)...Code:cp xorg.conf.new xorg.conf startx
Well that's it for this time. It was a long one! Next time I pick up NetBSD (whenever that may be) I'll be looking at some important apps - pcmanfm, wbar (or another desktop icon manager), Opera (or maybe Chrome?) and eventually OpenOffice, Wine + iTunes?
Total Trackbacks 0