Friday Jan 26, 2007

Well as I commented previously the Window system, keyboard, USB mouse and integrated touch pad just worked on the Ferrari 4000 laptop without me changing a thing. The additional frkit enabled me to use the Multimedia keyboard and of particular note the four way scroll button.

Initially plugging in an external display caused my LCD screen to be switched off. Remembering that the BIOS had a "Power on Display" option I changed this from the default of "Auto" to "both" this then caused the LCD output to be duplicated on the external display. Great for running a projector or driving a second display at a more comfortable height and saving my back. But having two displays I would rather them display different information.

As before I started by looking to Google for xorg dual monitor

Very quickly it became apparent that I needed to know a few things about the hardware I was using. Thus I imagine that the details below are particular to the the Ferrari 4000, or at least computers with the same graphics card. But I hope to share with you some discoveries that may be of interest.

What graphics card?

The first issue then is "What graphics card does the laptop have?" I tried prtconf(1) initially before stumbling across scanpci(1M) which I happened to see Jon use:

# /usr/X11/bin/scanpci | grep X700
  ATI Technologies Inc Radeon Mobility X700 (PCIE)
# 

I've used grep above for brevity, the actual list I got was much longer. I then used Google to find out what each component listed was.

xorg.conf configuration

Having established that the laptop has an ATI card I add that to my Google search and, some hours later, I find what looks rather promising in a ubuntu forum entry by Ziox:

I thus made some minor changes to that to suit my configuration, the full section ended up as:

# from http://www.ubuntuforums.org/showthread.php?t=301961
# System Requirements:
#ONE Dual-Output ATI or Matrox Graphics card.
#A recent version of the free Xorg, without any binary graphics driver installed.
Section "Device"
Option "MonitorLayout" "LVDS,CRT"
Option "MergedFB" "true"
Option "OverlayOnCRTC2" "true"
# Physical location of secondary monitor in relationship to primary monitor
# Values of LeftOf, RightOf, Above, Below or Clone (as used for single screen).
Option "CRT2Position" "Above"
# Option "CRT2Position"	"Clone"
# MetaModes: list primary-secondary monitor resolutions:
# switchable with Ctrl-Alt-num-Plus and Ctrl-Alt-num-Minus.
# Home 19-inch LCD (GH19PS) resolution is 1280x1024:
# The office 24inch monitor can display upto 1920x1200, alas
# that does not seem possible here.  The best seems to be 1680x1050
# The first entry is the default. 
Option      "MetaModes"   "1680x1050-1280x1024 1680x1050-1680x1050 1400x1050-1280x1024 1280x1024-1024x768 1024x768-1024x768"
# As The LCD is always present, while the CRT is not, the LCD is the primary.
Option "MergedXineramaCRT2IsScreen0" "false"
Identifier  "Card0"
Driver      "ati"
VendorName  "ATI Technologies Inc"
BoardName   "Radeon Mobility X700 (PCIE)"
BusID       "PCI:1:0:0"
EndSection

Interestingly several of the options used above are not currently listed in the xorg.conf(4) manual page installed on my system. A Google search for the options didn't turn up much either. I presume the manual changes are still in the works. FYI, the manual pages for X11 commands are in /usr/X11/man so add that to your MANPATH or specify the -M option to man, for example "man -M /usr/X11/man xorg.conf".

The catch

When I shutdown and unplug the external monitor Xorg does not at the next boot compensate for the fact that it's not there any more. Meaning when I next switch the laptop on without the second monitor Xorg may still open windows out of sight. Looking at the Gnome Workspace Switcher applet one can see a representation of your new window, you just cant see it. the most recent window is likely to have focus (the window is selected and thus input and or X commands affect it) and you can thus use 'Alt-F7' to provoke "Move Window" and slide it in to view. Or indeed use 'Alt-Tab' to select the window and then 'Alt-F7' to drag it in to view. However as I'm not certain this will always work, and that I find it rather disconcerting I'd like to Xorg to reconfigure to a single display.

As Xorg does not currently seem to reconfigure itself in this scenario, I need to reconfigure xorg.conf myself for the single screen, logout and login. And all is well; Xorg restarts it's self when I log out and hence reads the new configuration.

Now as I currently use x11-ssh-askpass to read my Secure Shell password during login before any other windows are opened it makes sense, to me at least, to modify it to provide two extra buttons so that during login, when I would normally enter my SSH password, I can instead, if needs be, switch configurations and simply re-login again.

As a prof-of-concept I knocked up xchoice in dtksh and added it to my dtlogin(1X) config file $HOME/.dtprofile:

DTSOURCEPROFILE=true

# Concept.  Background it as X must start to show it.
$HOME/tools/sh/xchoice&

#
# Start SSH agent
#
if [ "$SSH_AUTH_SOCK" = "" -a -x /usr/bin/ssh-agent ]; then
#  pkill -u $LOGNAME ssh-agent
  eval `/usr/bin/ssh-agent`
  if [ -x $HOME/x11-ssh-askpass-1.2.4.1/x11-ssh-askpass ]; then
    SSH_ASKPASS=$HOME/x11-ssh-askpass-1.2.4.1/x11-ssh-askpass ssh-add < /dev/null
  else
    /usr/openwin/bin/xterm -geom +0-0 -e ssh-add
  fi
fi

It works well, but dtksh requires more than basic X support that does not seem to be available when x11-ssh-askpass is run, and thus the window does not appear until later when the full windowing system is up. Hence the requirement for something else. And this way I can provide two functions in one.

Having done all that I'm still interested to know if their is some other way to accomplish this without reconfiguration so please do comment if you know.

One final issue:

The external LCD not being of equal size pans left and right, which is fine, but it also pans the whole desktop up and down. I'd like to stop that if possible and thus prevent the Gnome panel (launch bar) from sliding of the bottom off the bottom of LCD.

Stace

Saturday Jan 20, 2007

So after the initial install I made the following initial tweaks to the installation.

I'm sure I'll be making some more in the near future but for now as this is a Developer release I have all the compilers and tools installed already which includes a recent enough version of XEmacs 21.4 to keep me happy for a while ;-)

Create user account.

Simply use the GUI as provided when root logged in or if you prefer use useradd(1M).

Modify /etc/autohome

As I'm used to using /home for the location of my home directory it makes sense for me to configure this. See automount(1M) for more information on this.

Change machine name (hostname)

solaris-devx is a nice name, but its time I re-awoke Scully.

Interesting point here was that previously to change the machine name there were several files that needed to be modified. Not so now, it seems all I have to do is change nodename(4) (that's /etc/nodename) and run uname(1M), or vice-versa:

uname -S scully
uname -n > /etc/nodename
NOTE: I'm not sure what affect, if any, that may have on your running services. Thus to be honest I simply set nodename and the name came into effect when I rebooted.

Note that if your DHCP server gives your machine a name then nodename is ignored (effectively running 'uname -S' for you on the name supplied by the DHCP server).

Configure for UK keyboard

A UK keyboard typically has a sterling pound sign (£) above the number while a US keyboard has what I call a hash or number sign, but what I have heard my American friends (and Audix) refer to as the "pound sign"! Initially I created an xmodmap(1) to map the correct keys but as Chris Gerhard points out I simply need to set an eeprom value:

# eeprom keyboard-layout=UK-English

However as I don't think that comes into effect until you reboot here is the xmodmap file and command to use it. Remember to backup the original first just in case!

$ xmodmap -pke > .xmodmap.backup
$ cat .xmodmap-ferrari4000
keycode  11 = 2 quotedbl
keycode  12 = 3 sterling
keycode  48 = apostrophe at
keycode  49 = grave notsign brokenbar
keycode  51 = numbersign asciitilde
keycode  94 = backslash bar brokenbar
$ xmodmap .xmodmap-ferrari4000

(the brokenbar and bar have been swapped around when compared to the physical keyboard, but believe me its better that way)

Update 25 Jan 2007: Use kbd(1) to set the keyboard (thanks to Alan Coopersmith for this tip).

Add frkit

The frkit , AKA the Ferrari kit (though it is not just for Ferrari's), adds some very useful extensions from the OpenSolaris laptop community:

* acpidrv

Adds support for the power button and battery statistics.

* gnome battery

A port of the GNOME battery meter

* powernow

Juggles the CPU speed based on demand.

* acerkb

Multimedia keyboard hack

* gnome emifreq

GNOME applet that displays current CPU state.

Further information on all of these features is available by executing 'frkit -s readme'.

One tip, when running frkit remember to set your http proxy if necessary (or indeed, unset it!):

# frkit
Could not download "http://opensolaris.org/os/community/laptop/downloads/frkit"
# http_proxy=webcache:8080 frkit
Probing acpidrv ... installed and up to date.

Probing gnome-battery ... installed and up to date.

Probing powernow ... installed and up to date.

Probing acerkb ... installed and up to date.

Probing gnome-emifreq ... installed and up to date.

No modules applicable to your system or none out of date.
#

Add inetmenu (Internet Menu)

The inetmenu is a cool little package which provides a command-line interface (CLI) or GUI to select different network configurations. Thus when for example the laptop is at home I simply select the DHCP-noNIS profile, and when in the office I select DHCP. The application makes the necessary configuration changes for the network access point the system is using.

The package installation output gave me the impression that I had to create some profiles in /etc/inetmenu but this is not the case as the defaults suffice for me. I did have to reboot though before it worked. I presume I had not started some service or something? After-all I've never rebooted Solaris in the past quiet so often

One tip, rather than editing user_attr(4) to add the Ginetmenu profile to your UID use the usermod(1M) command, but be careful to list all your non-default profiles though!

Update GNOME preferences and create (copy) user environment

Added the battery meter to gnome-panel and assigned some of the multimedia keys to gnome applications and/or functions.

As an old Solaris user I copied most of my shell scripts, user environment customizations (aliases, .profile and the like) across from my Sparc system. Perhaps I'll tell you more about those another day...

What's next?

The next thing at the top of my to-do list is to get the external display working at the same time as the built in one so I can avoid the hunched-back.

Stace

Tag:

Friday Jan 19, 2007

Once the Solaris OE installation had completed the install process installed Sun Studio 11 and relevant patches. No further intervention was required by me.

At the end of the installation Solaris ejected the DVD media and booted itself from the internal disk. I was then presented with a new GRUB menu allowing me too boot Windows or Solaris, the default. As Solaris began to boot after my first install there was a moment of doubt when the screen went blank and the following three lines were displayed:

SunOS Release 5.11 Version snv_55 64-bit
Copyright 1983-2006 SunMicrosystems, Inc.  All rights reserved.
Use is subject to license terms.

Then nothing for a while (around 1 to 2 minuets)... followed by a message indicating that the network interface had failed to allocate an address using DHCP! That's because I had not plugged in the RJ45 cable. I did not see this delay or get the warning message when I next booted with the cable attached.

Hostname: solaris-devx
Configuring devices.
Loading smf(5) service descriptions: 150/150
...

solaris-devx console login:

At this point the machine seemed to be waiting for me to login... But I know better and waited for the GUI login to appear... I waited... I'm sure I should wait... perhaps I need to choose X.Org or Xsun from some place? I wait some more. Some warning messages from sendmail and syslogd pollute my screen:

Jan 17 22:41:31 scully sendmail[1194]: [ID 702911 mail.crit] My unqualified host name (scully) unknown; sleeping for retry
Jan 17 22:42:31 scully svc.startd[7]: [ID 122153 daemon.warning] svc:/network/smtp:sendmail: Method or service exit timed out.  Killing contract 61.
Jan 17 22:42:31 scully svc.startd[7]: [ID 636263 daemon.warning] svc:/network/smtp:sendmail: Method "/lib/svc/method/smtp-sendmail start" failed due to signal KILL.
Jan 17 22:42:39 scully syslogd: line 45: WARNING: loghost could not be resolved

I know that I did not set a domain name and as such sendmail is not happy! I wait some more, around eight minutes in total. When my waiting is paid off when the login screen appears (I'll look into this and log a Change Request if necessary).

I login as root providing the password that I was asked for during the install and I choose gnome over CDE when asked for the windowing environment to use and I'm in. :-)

The first thing to do is to add a local user. Thoughtfully the "User and Group " application has already been started for me.

added 19 Jan:

To prevent the messages above (but not necessarily cure the issue) I disabled sendmail (svcadm disable sendmail) and added 'loghost' to my loopback (127.0.0.1) entry in /etc/inet/hosts.

added 20 Jan:

I now find that the Ferrari can boot and provide me with the GUI login screen in less than 1 minute. So as suggested it might be that Solaris was simply busy updating bits in the background after the first few boots. After all I was installing different bits. As a brief test I re-enabled sendmail today but still find Solaris boots in less than 1 minute. Or perhaps its that I'm now using inetmenu?

Stace

Tag:

Thursday Jan 18, 2007

The DVD boots to an initial GRand Unified Bootloader (GRUB) menu where I'm prompted to select one of the following boot options:

1. Solaris Developer Express 2. Solaris Express 3. Solaris Express Serial console ttya 4. Solaris Express Serial console ttyb (fir lx50, v60x and v65x)

The DVD spins some more and I'm presented with this menu

1. Solaris Interactive (default) 2. Apply driver updates 3. Single user shell

After selecting option 1. Java is setup, a windowing system is extracted and system identification begins....Shortly after which I'm presented with a warning that I must pay attention now as the next screen requires input from me within 30 seconds or I will face a non-GUI install. The system pauses at this point waiting for me to press Return...

A windowing systems presents a single window, or text widget, with the following:

Press return if you can read this

I hit return. Then select my language, English. Select Continent and Country, Europe / Britain (UK). I get other questions like these... When I realise that I'm using the touch pad on a graphical display, fantastic! Well, it is for me, As said back at the start I'm used to simply watching the system install its self over the network and or pressing function keys.

A little while later I get to a "Customize Fdisk Partitions" screen and I can see my FAT32LBA partition and the, newly named, "Solaris" partition.

This is followed, as I hoped, by the "Lay Out File Systems" window where I can now create Solaris mount points or Virtual disks within the fdisk (as created by parted partition). The install has offered me some defaults which I could simply accept.

However as I want to use live upgrade I created the following layout:

Slice File System Size Comment
0 / 10000mb Initial root
1 /swap 2048mb I hope for sys-suspend
2 /root 10000mb alternative root
6 /opt 5000mb Optional packages
7 /export 30140mb home

I only need half the space that I allocated to the root partitions and to /opt, but I'm being cautious. Incidentally I created a /opt as when I've live-upgraded my Sparc machine my /opt was getting left-out (or so I believe) But I'm not certain that I need it. No time to read up about that as I need to go and do other chores. Thus I set the install process off....

Stace

Tag:

Wednesday Jan 17, 2007

The CD download was so fast I have not looked at anything else in Richard Friedman's Resources for Running Solaris OS on a Laptop.

Having burnt the System Rescue CD and restarting windows (he he, little does it know); I stopped the Acer from booting and entered the BIOS setup by pressing F2. in the BIOS I used the cursor keys to skip along the top tabs to enter the boot screen. Where I then used the up and down cursor to select (highlight) the CD/DVD ROM and pressed F6 a number of times to make it the primary selection. Saved the selection with F10 and Acer started to boot from the CD image...

In next to no time, after selecting a UK keyboard from a list, I was presented with a root shell prompt above which was some useful information including this extract:

X.Org : You can use the graphical environment.  Type startx.
the graphical environment configuration is done automatically.
X.Org comes with Window-Maker and you can use several graphical tools:
- Partition manager:..gparted
- Web browsers:.......firefox-2.0 and dillo
- Text editors:.......gvim and leafpad

Note well that this version lists gparted and not QtParted. Without further-a-do I entered _startx_ and entered a big dark room! That is to say the screen went black. I gave it a short while and then held down the power key to reset everything (I tried control-c first to no effect).

At the next attempt I took the default keyboard (experience taught me to try defaults) but to no avail. I did see some warning messages fly up the screen but alas I could not make them out. I considered using a video camera to try and catch them but first I thought I would try parted (my assumption being that it may be a non graphical version).

(parted) print
Disk /dev/hda: 100GB
Sector size (logical/physical): 512B/512B
Partition table: msdos

Number	Start		End		Size		Type		File System	Flags
1			32.3kB	3150MB	3150MB	primary	fat32
2			3150MB	51.4GB	48.2GB	primary	fat32			boot, lba
3			51.4GB	100GB		48.6GB	extended					lba
5			51.4GB	100GB		48.6GB	logical	fat32

(parted) resize 2 3150MB 20GB
(parted) rm 3
(parted) print
Disk /dev/hda: 100GB
Sector size (logical/physical): 512B/512B
Partition table: msdos

Number	Start		End		Size		Type		File System	Flags
1			32.3kB	3150MB	3150MB	primary	fat32
2			3150MB	20.0GB	16.9GB	primary	fat32			boot, lba

So far so good... But then I got cocky! The 'help' showed a command named 'mklabel' and 'help mklabel' showed "mklabel LABEL-TYPE : create a new disk label (partition tabel)" and "sun" was listed as a valid type. So I entered 'mklabel sun'. The net result was that my working msdos label was over-written with a new blank partition table! Thankfully there is also a rescue command so I entered 'mklabel msdos' and then used 'rescue' to recover (at least that is what I thought) my previous partitions using the information above.

But how then should I proceed now? It occurs to me that I don't really know what Solaris is expecting or indeed wants from the partition table. I assume that Solaris will allow me to create logical partitions within a partition that I create for it... I really want to ring-a-friend but then that isn't in my rules of engagement so I'm just going to assume thats the case. But before I do anything else I'm going to boot windows to make sure its still happy:

(parted) quit
root % reboot
...
F2 (and reconfigure BIOS to boot from disk)
F10 (save config)
...

Nada, nothing, nil, except back-light blackness....

OK, so I'll have to start again... I rebooted with the System Rescue CD and setup the partition thus:

(parted) mkpartfs primary fat32 32.3kb 40GB
(parted) mkpart primary sun-ufs 40GB 100%
(parted) print
Disk /dev/hda: 100GB
Sector size (logical/physical): 512B/512B
Partition table: msdos

Number	Start		End		Size		Type		File System	Flags
1			32.3kB	40.0GB	40GB		primary	fat32			boot, lba
2			40.0GB	100GB		60GB		primary
(parted) quit
root % reboot

And I insert the Acer recovery DVD! Well, I thought I'd give that a go. The laptop booted a windows shell and the Acer recovery DVD asked for confirmation to restore the factory settings which I opted for. Alas the system failed to come back. I booted from another Windows XP DVD that I own into the recovery console and used diskpart, chkdsk, fixboot, fixmbr and exit... Ejected the DVD and Windows started its virgin voyage (it booted) Phew! Looking back I wonder if the rescue attempt before would have worked if I have tried fixmbr on that (as I believe that is what the problem was).

Next, I insert the Solaris DVD and reboot....

Stace

Tag:

So without to much looking I very quickly discover many notes from other folks that have trodden this path before. Notably a number on Acer machines (no that was not a surprise to me).

In no particular order then:

  • Multi-Booting the Solaris 10 OS, Linux, and Microsoft Windows on a Laptop by Ifeyinwa Okoye
    Interesting. I don't intend to use Linux at the moment, though I may try BrandZ later on. One thing I most certainly will do is provide an alternative Solaris partition so that I can continue to use live upgrade once the initial installation is complete. I also don't have Partition Magic and so intend to use an alternative product...
  • Richard Friedman's blog and specifically his Partitioned entry.

    Same hardware. Same requirements and Same low-budget thoughts and link to System Rescue CD which includes QtParted; a Linux GUI disk partitioning tool.

    Perhaps now is a good time to mention that currently Solaris does not include a non-Solaris disk partitioning tool (if you hadn't already guessed).

    Richard has also put together a useful set of links on the BigAdmin site entitled Resources for Running Solaris OS on a Laptop. which I'm going to go and read now while the ISO image of System rescue CD v0.3.02 downloads...

    Stace

    Tag:
  • I have worked with Solaris on Sparc for over twelve years, and while I did install Solaris 2.6_x86 on a home PC back in 1998 (or there abouts) I can honestly say I don't remember much about it. Applying of course that I do remember something and that something is booting from a floppy disk (there, I don't remember what that floppy was called) and having to configure the mouse and VDU via some configuration GUI thereafter installation. Then having installed it I never actually used it, as I had a Sparc 10 after-all. I must also confess that I have Solaris running on LX50's and v40's in the Lab. But for these machines I simply installed via jump-start and cared for nothing else except for nfs and ssh access which the jump-start took care of for me. Oh, and I sometimes use the x86 SunRay server....

    So having got myself an Acer Ferrari 4000 (which doesn't have a floppy disk drive) I now intend to run the latest release of Solaris Nevada on it and share with you my experience as I do so. I also intend at first to limit myself to using only public information and to keep the pre-installed operating system intact. The caveat at this time is that I will use a yet unreleased version of Nevada which may soon be made available as a Solaris Express Developer release, as that is what I've been asked to install.

    Thus I now start to gather information from blogs.sun.com and OpenSolaris.org...

    Stace

    Tag:

    This blog copyright 2009 by ace