Monday, January 14, 2013

PC-BSD 9.1 - Aha! At last!

v 0.4.1
14 Jan 13
16 Jan 13
16 jan 13 Afternoon

I saw on Distrowatch recently, that a new version of PC-BSD had been released.  At the back of my mind I've always wanted to try that, or Free-BSD.  It was re-enforced when I was looking through the titles of the Linux Action Show and saw they had a review of it.  What I saw impressed me no end:
  • Simple Installation
  • Jails
  • Absolutely Solid

I should talk about "Jails".  To me, these are the killer feature of Free-BSD and PC-BSD.  They are effectively a Virtual Machine within the system, but they are not.  More like a sandbox.  As an example, you can create a BSD jail or a Linux jail that runs a complete operating system in a sandbox - for example set up a server there with its own IP address.  If an intruder breaks in, they are trapped inside the jail.  But there is more!  Backups, cloning, snapshots. All done with ease.

Another two really impressive features are the firewall setup and the automatic backup.  Easy to set up and effective.  What more can I say?

The acknowledged problems at the moment include deficiencies in the ATI and Intel video drivers, however progress is expected on these issues by version 9.2 of PC-BSD.

PC-BSD in Virtualbox

I started by downloading the Virtualbox image - a whole 2.4 gig.  I unpacked it and it expanded to about 7.8 gig (from memory) and when mated to Virtualbox, it was a disk that would expand to 34 gig.

The first run allowed me to easily set up the video resolution, timezone and language.  Impressive.  The ability to add software was just so easy I was thinking that this would make a really good vanilla home computer.  Web browsing, email, instant messaging, skype, office, finance - the list goes on.  AND secure.  Very secure.

PC-BSD on Hardware - First Blush

I'll not hold you in suspense - on my chosen "box" (the $400 box described elsewhere on this blog) the whole experience was initially unusable.  I could not even get it to install and configure.  In my particular instance it was just garbage.

Now, it is all very well to report my experience, but WHY did it not work?

Two reasons.
  • Video driver
  • Boot manager
I have an i3 chip in my machine, which provides a level of Intel video capability.  As noted above, that is a deficiency that has already been noted.  The system would come up, confirm my video resolution (1680 x 1050) and go for 24 bit.  When I accepted (or even tried with reduced colour depth with vesa) it just crashed.  Unuseable. (subsequently found to be the lack of driver for the on-board intel video)

The Boot manager detected my Linux install, but I was unable to select it.  BSD was the only thing that would work.  Major work needed.  BSD is almost worse than Windows in its lack of ability to play with other children.  In all the Googling I did, I found people pleading for solutions for dual-boot problems, with nothing that really worked.  Even the official documentation was useless for me when I tried to use Grub2. Solved with a different menu-entry, and after finding out that Grub2 decided to change their numbering system for partitions but nobody knew.

Second Blush - We have Liftoff with nVidia

 Well, I took Cmdr Taggart's advice from Galaxy Quest ... and I kept thinking about this and experimenting.

nVidia cards are mentioned a lot.  I had one lying around, though it needed an extra power supply.  Eventually, I relented and bought the cable, connected it up and .... YES! We have liftoff!  32 minutes past the hour. 

AND the machine was significantly faster as well.

Third Blush - Damn you Grub2!!!!


Computer HDD Setup

I have Debian Linux (wheezy) on the first primary partition, with PC-BSD on the second primary partition using the zfs filesystem.  When I installed PC-BSD, I installed its bootloader which overwrote Grub2 on the MBR.

Recovering Debian Grub2

To re-install Grub2 on the MBR in a Debian system, the installation cd/dvd have the tools specifically built in.  Google on the Debian Wiki and it directs you to the appropriate section of the Debian installation guide.
  • Boot using the Debian Install Disk
  • Advanced Options
  • Recovery Mode
  • You will progress through various screens which are the first part of the Debian Installer - don't worry too much because none of the info will be written to the disk.  Eventually ....
  • A screen will present the available partitions - select the one you want to be the root partition.
  • Select the menu entry to re-install Grub
That's it.

Manual Menu Entries in Debian Grub2

Like a lot of things in life, many things are only obvious in hind-sight.  Gaining that knowledge is hard won, but you feel good after the fact.

Debian automatically builds the Grub2 config file " /boot/grub/grub.cfg" .  There is no point editing it (and they warn you about this - it is a text file that you can read) because it is over-written the next time grub.cfg is created.  Instead, if you look at the end of the file, you will see that they point you to a customisation file " /etc/grub.d/40_custom " .  Open it in an editor (as superuser) and you can add your manual entries to the bottom.  Save the file and then once again as superuser:
" update-grub "
This will incorporate your custimisations in a new grub.cfg file.

Adding PC-BSD to Grub2

The entry I eventually found was for me (after piecing things together) was:

menuentry "PC-BSD 9.1" {
set root='(hd0,2)'
chainloader +1
}

"hd0,2"  -  well, ARRRRGGGGHHHHHHH!!!!!!!!
  • 0 stands for the first hard disk, because you count your disks from zero.
  • 2 stands for the second partition because you count your partitions from one.
 chainloader +1  allows grub to go to the bootloader for PC-BSD which I installed initially if you remember and which is loaded at the start of the PC-BSD partition.

Finally, to change the timeout and default menu entries, I've written previously about this here:
http://glassfloor.blogspot.com.au/search/label/Grub

 So, What do I Think?

 This is definitely worth sticking with as the potential rewards are significant.  So far, I have the system up and running - and the Grub2 bootloader is doing what I want.  Everything boots smoothly to what I want.

If you want to use PC-BSD (and like I said, for a family this makes a great system) .. use an nVidia video card and have only BSD on the system. Once you know what you are doing with re-configuring boot loaders, it is pretty straightforward - but getting there may be an effort.

I'm glad I stuck it out despite my initial setbacks because I'm really quite excited about what can be done with PC-BSD.  For the moment though, I'm happy with what I've achieved and that what I've written up above may help someone have an easier time than me.  I'll write further on this as it is worthwhile documenting.




Later

Sunday, October 28, 2012

Smartphones - iPhone 5 and Samsung Galaxy Note 2

v 0.2
28 Oct 12

Smartphones - it is coming to that time where the phone contract is about to expire, and we either negotiate a reduced rate or go on another contract with a new phone.  And so it is with me right now, with some really interesting choices around, and consumers being drip fed actual new hardware.

Just like a lot of people I've been looking seriously at the iPhone 5, Samsung Galaxy S3 and Samsung Galaxy Note 2.  I've had a brief play with an iPhone 5 in an Apple store, and have seen a couple of eager early adopter friends with them, I've had some friends show me their S3 phones, singing the praises and have read and watched as many reviews of all of them as I can.

So what to do - stay with my iPhone line and the Apple ecosystem or branch out to Android?

Well, it is not as simple as that.  Each of the reviews and commentaries I've seen comparing these phones miss the point completely in providing information to potential owners.  It has reached the stage I despair of any sensible commentary.  So, here are my thoughts as to what I want.  You'll notice that there are no performance specs or any of that - you have plenty of reviews to tell you all that.

 Do you want a phone that can do other things, or do you want a device that can also do phone calls?

My current phone is an iPhone 4.  It has been my tutor in my discovery of smartphones, my previous one being a Nokia which, whilst multi-function was rarely used for anything other than phone calls and the odd photo or two.  So at the start of my two-year contract, I was just using the phone, looking at the maps as a gimmick and trying out various apps.  Now, I use maps all the time, use Skype and messaging, and refer to documents.  I've gone from using the phone against my face, to now using the plug-in ear-piece and microphone leads.  It is my time-piece, my camera and alarm clock.  It is my notepad and emergency web browsing experience when I'm away from home (which is often).

Early on in the process, I acknowledged that the iPhone 5 would be the default replacement.  I found the Galaxy S3 to be an attractive phone that offered a lot, however for me, the iPhone offered consistency and integration within the Apple ecosystem - as Apple intended.  I also feel more comfortable with the IOS security the "walled garden" offers.  And yet there were niggling doubts.  Whilst the iPhone does all I want, there is still the question of the screen size and ability to easily view documents and web pages.  I have found both these functions require significant compromise on my current iPhone, and I don't see making the iPhone screen a little taller will fix that.

Enter the Samsung Galaxy Note 2.

My initial thoughts when I saw the reviews were that it was an interesting device.  In almost every case, whilst people initially baulked at its size, they soon became used to it and noted that it didn't bother them.  I wondered about the S Pen.  But I had to admit that the screen size was far more useful than the iPhone and, to a lesser extent the Galaxy S3.

And how do I view my needs now?

I spent some time trying to make sense of the facts and figures, until I realised that it came down to the question above.  Do you want a phone that can do other things, or a device that can also make phone calls?  For me, I think the latter is the answer.  I can use the iPhone 5 for these things, but the Note 2 is better overall.  I've cut a template for the size, and it fits in my pocket fine.  Phone calls?  Use an extension or bluetooth.  As a general device it is far better for note taking, reading documents and so forth.  Yes an iPad can do the general stuff, but you need to carry it around.

So for me, rightly or wrongly, I'm patiently waiting for the Note 2.  I see that as my next "communications device".


later ..........


Wednesday, June 13, 2012

Customising Gnome 3 - Making it Work

v 0.41
19 Jun 12

After playing with a fresh Xfce on a new install of Debian, I had one of those rare crash and freeze episodes, such that the window manager settings were all screwed up and the settings panel was blank.  There were a couple of other things I wasn't quite happy with so I decided to bite the bullet and do a complete re-install, correcting the mistakes I'd noted I'd made along the way.

Whilst I was having a think before this surgery (I learn something from every install, and it is really not a huge problem performing it) I was reminded of a thought I had when I was considering whether to undertake an Airbus A380 conversion from my Beloved Boeing 747-400.  I had been quite skeptical of the Airbus up until that time and I decided it was time I re-visited my "I ain't flying one of those new-fangled monoplanes!" prejudice.  Such was my thought process last night, as to the Gnome 3 desktop that was to be the standard on the next Debian Stable release. 

My first experience with Gnome 3 was a few months ago now - and whilst I recognised there was something to it, I just couldn't get into it.  So I moved to Xfce and thought about it as a "background process".  In the meantime, I kept hearing how extensible and flexible Gnome 3 was, but I just couldn't see the obvious way that it could be made more friendly.  One of the "Linux Action Show" podcasts put things into perspective, where they admitted that whilst it wasn't for them, it was a good piece of software.  Their main criticism was the need to continually move from left to right with the mouse to make a selection, and that it seemed as if Gnome was being placed to be efficient for touch-screen use.

Finally I thought, Gnome 3 is going to be with us from now on, and it is going to be the default desktop for Debian.  It has a lot of great stuff in it and if I'm going to be any help to friends, I better get in and see what we can do with it.

With that, I performed a standard Debian desktop install giving me Gnome 3 .

Standard Desktop

The first start-up gives you the standard Debian starry wallpaper (which I dislike) and along the top line, a black bar.

The Top Menu Bar
To the left is a button called "Activities", in the centre the day/date and on the right four button / menus.  There is an "accessibility menu of selections that can be made to improve things, then a volume and sound settings control, Network Settings, and then on the far right, a menu under the username that lets you adjust system settings or log out or to lock the screen.

The Desktop
There are no icons on the Desktop.  It is a straight backdrop of whatever wallpaper you wish to load.

The Activities Button
I guess you could think of the "Activities" button as the MS "Start" button on steroids.  When you click on it, there are three main areas of the screen that appear and one large area that depends upon your selection of "Windows / Applications".
  • On the left is a vertical stack of favourite applications.  It functions similarly to the "Dock" in OSX.  Right click and you can delete an application.  Any running applications you have started also appear temporarily in the "favourites" stack and you can add these permanently by right-click on the icon.
  • On the top right, a search entry box appears.
  • On the top towards the left, a two-choice button appears - Windows or Applications.
Windows / Applications
  • When "Windows" is selected, a vertical stack of active workspaces appears, and the selected workspace is reflected with an array of windows in that workspace, placed in the main part of the desktop.  As you cycle through the workspaces, you can see the windows in each workspace.
  • When "Applications"is selected, on the right you get the standard menu categories, and when each is selected, this is reflected by all the applications in that category appearing as icons in the main desktop area.
Window Decoration
By default, there is only a "close" button on the window - however - this can be easily fixed.

Logic
Now that I run through the logic flow of the standard desktop, it seems far better than I first thought.  Certainly the shock of transition puts one off.  The first reaction is "Not another thing I have to learn again!!"  Once you learn how this new system is just like the old, then it is not as much of a problem as it initially seems.

Customising the Gnome Desktop - a Start

The first thing you can do is visit "System Settings" and change the background and in "Details" set the default applications.

Next, install the " gnome-tweak-tool " package.  This appears as " Advanced Settings " in the application list. Here, you can:
  • Have icons on the desktop by having the filemanager handle the desktop.
  • Modify the "shell" (desktop) appearance, notably "Arrangement of buttons on the titlebar".
  • Install shell extensions from http://extensions.gnome.org .  Once you have found the extension you like, then click the on/off button to "on" and the extension will be downloaded and installed for you.  There are two menu extensions you may like that install a menu a'la Gome 2 - Axe Menu and Applications Menu.
Install the " Docky " package.  This lets you have a dock just like OSX.  Whilst Docky does give you a nice dock, it drags in a lot of dependencies, but more importantly, kills one of the significant keyboard shortcuts - the Windows key, or Alt-F1 to change from overview to details view.

Another problem I found, was when I removed Docky with Synaptic, it only removed the application, not the libraries (which aptitude would have done).  Deborphan would be a good idea here, as I found that on reboot, Gnome froze and only became free when I had re-installed Docky (though not started it).

From what I've seen, whilst Docky seems a good application, it tells me to only install Gnome Extensions, rather than extra programs.

gnome-system-tools

The standard system settings tools are lacking the old "users and groups" gui administration.  You need to install " gnome-system-tools " .

Thoughts

I must say that I'm far more comfortable with Gnome 3 now than I was before, and that maybe it isn't the disaster it first appeared.  With some extra reading I can see that it is no use trying to turn Gnome 3 into Gnome 2.  It won't work.  Like any new system, you just need to think about it.

In a way, you can compare Gnome 3 to the vi editor.  It has two main modes - an "overall viewing" mode where you get to see what you have, and a "doing" mode where you do the work.  Taking the time to read about this, and in particular the keyboard shortcuts and you can get to what you want in a couple of key-presses rather than tediously moving the mouse around.

So, even though I've installed some extensions that give a more "Gnome 2 - like" experience, I can see myself getting rid of them back to the original intent of Gnome 3 (and I'm already doing this).  Like a lot of things in life - Gnome 3 works best of you learn the basics and then perhaps carefully add some extensions from the Gnome site.







Later ......

Tuesday, June 12, 2012

Wicd Wireless, Port Forwarding

v 0.2
12 Jun 12

Xfce Wireless

I installed Debian Wheezy onto my old IBM T31 laptop this morning.  The netinstall via a wireless network went smoothly.  I installed Xfce rather than Gnome, so the Wireless network manager was Wicd.  When I booted up, no wireless network was found.  Dead.  It should have detected at least two networks.

The fix was amazingly simple.  Open the Wicd window, Options, General.  There is an entry there for the wired "eth0".  In the Wireless entry, enter "wlan0".  

It works.

Port Forwarding and Blocked Ports

I have been driven to distraction the last week or so trying to port forward port 80 to allow some friends to play with a demonstration I've set up.  I blamed my Apple Time Capsule, particularly when I saw so many complaints that people were unable to port forward.  I bought another router, and then found THAT would not forward port 80.  Grrrrr.

I rang up my ISP over the matter and they said that they did not block port 80.  (yeah ... riiigghhhhttt)

They do.

So, I set the demo server to work on port 2000 and forwarded it from the router.

VICTORY!!

Another expensive lesson.  But I did bumble my way through it.


Later .......