I am sure you agree – at least after watching the video on Brendan’s blog entry about I/O performance analysis on the Sun Storage 7000 series. The direct link is here.
Happy New Year to everyone!
I am sure you agree – at least after watching the video on Brendan’s blog entry about I/O performance analysis on the Sun Storage 7000 series. The direct link is here.
Happy New Year to everyone!
A while after I published my blog entries on Multibooting Solaris and Windows XP and on Multibooting Solaris, Ubuntu, and Windows XP, I thought it was time for some instructions on multibooting OpenSolaris 2008.11, Kubuntu 8.10, and Windows XP.
On my laptop, a Fujitsu-Siemens S6120D (Pentium M 1.4 GHz, 512 MB RAM, 40 GB IDE disk), I wanted to replace my old Solaris Nevada installation by the new OpenSolaris 2008.11, and then also an old Ubuntu 6.10 by Kubuntu 8.10.
After the OpenSolaris installation, I could boot into OpenSolaris and Windows XP just fine. But when I installed Kubuntu (using ext3 as the / filesystem), with the default install options, the grub that had been installed by OpenSolaris had been overwritten by Kubutu’s grub. Even after adding old OpenSolaris entries to the new grub, booting into OpenSolaris failed. After installing OpenSolaris again, that problem was solved, but I could not boot into Kubuntu! The following message was shown on screen:
Booting 'Ubuntu 8.10, kernel 2.6.27-7-generic' root (hd0,6) Filesystem type is ext2fs, partition type 0x83 kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=69585a5b-ba20-43da-984c-148c40f82a7e ro quiet splash Error 2: Bad file or directory type Press any key to continue...
Apparently, neither of the two grub installations could read the root filesystem of its “opposite” operating system. The solution for this problem in my case was to chainload the Linux grub from the Solaris grub. I used the following procedure after installing OpenSolaris:
Start by choosing the installer’s language:
Select a city close to your desired time zone:
Select a keyboard layout:
In the Prepare disk space screen, a proposal like the following might be shown:
Select the manual partitioning feature to overwrite the old Linux partition:
The Prepare partitions screen is shown, for example:
Customize that screen according to your needs, like the following:
Enter data into all required fields of the Who are you? screen:
The Ready to install screen is shown. Please DO NOT CLICK on the Install button at this point in time. Instead, click on Advanced:
This will show up the following screen:
Change the default Device for boot loader installation to the device name of the Linux partition as shown in the partitioning screen (in my case /dev/sda7). This is to install the boot manager not in the master boot record but in the partition in which Kubuntu is installed.
Press OK to continue, and then Install in the screen that was shown before (Step 6 of 6). This will install Kubuntu.
menu Kubuntu 8.10 root (hd0,6) chainloader +1
Note that (hd0,6) corresponds to partition number 7 of the first disk (=device /dev/sda7 in my case).
If it doesn’t work (e.g. if you installed the Kubuntu grub boot manager to the master boot record), you do not have to install Solaris again. Just do the following to overwrite the Kubuntu grub by the Solaris grub:
Some remarks:
This is how the two FAT partitions look like after mounting them in OpenSolaris:
/dev/dsk/c3d0p0:1 55958 34547 21411 62% /p/sda1 /dev/dsk/c3d0p0:2 8481752 7093052 1388700 84% /p/sda8
These are the /etc/vfstab entries for mounting the two FAT partitions from OpenSolaris:
/dev/dsk/c3d0p0:1 /dev/rdsk/c3d0p0:1 /p/sda1 pcfs 2 yes - /dev/dsk/c3d0p0:2 /dev/rdsk/c3d0p0:2 /p/sda8 pcfs 2 yes -
This is how my partition table looks like, from a Linux fdisk /dev/sda point of view:
Disk /dev/sda: 40.0 GB, 40007761920 bytes 255 heads, 63 sectors/track, 4864 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xbb88bb88 Device Boot Start End Blocks Id System /dev/sda1 * 1 7 56196 6 FAT16 /dev/sda2 8 1224 9775552+ bf Solaris /dev/sda3 1225 4864 29238300 5 Extended /dev/sda5 1225 3100 15068938+ 7 HPFS/NTFS /dev/sda6 3101 3164 514048+ 82 Linux swap / Solaris /dev/sda7 3165 3806 5156833+ 83 Linux /dev/sda8 3807 4864 8498353+ b W95 FAT32
Please back up all your files before installing a new OS to your system! And as always in my blog, no guarantee, warranty, or similar, for anything! This is just a (hopefully error-free) documentation of how things worked for me. Maybe you’ll find it useful.
After Alfred mentioned my blog entry on installing multiple versions of Firefox on Solaris using pkgadd instead of tar, I tested the package renaming script with Firefox 3.1b2 and found that I cannot extract the version number just from the pkginfo output. Instead, I had to use the VERSION line of the pkginfo -l output.
So I uploaded a changed version of the rename-firefox-pkg script (under its old name, as I only changed one line, and the script still works as before with older packages like Firefox 3.0.5 and Firefox 2.0.0.19).
Just a list of OpenSolaris packages I often install (using the pkg install command or the Package Manager, or the “Add More Software” icon) after OpenSolaris 2008.11 installation:
Package name | Contents |
openoffice | OpenOffice |
SUNWgnome-img-editor | GIMP, the image manipulation program |
SUNWvncviewer | VNC Viewer |
SUNWtvnc | Tight VNC |
SUNWcurl | Curl |
SUNWgnome-config-editor | The Gnome configuration editor |
SUNWj6dev | Java 6 SDK |
sunstudioexpress | Sun Studio (Compiler and Tools) |
SUNWgcc | GNU Compiler |
SUNWgnome-common-devel | Gnome Development Tools |
SUNWapch22 | Apache 2.2 web server |
amp | AMP (Apache, MySQL, PHP) development kit |
amp-dev | AMP development cluster |
SUNWgnu-mc | GNU Midnight Commander |
For unattended zones installation, some more packages should be installed if the zone locale is not “C”: This is done in file /usr/lib/brand/ipkg/pkgcreatezone. I added the following lines after line 179:
# # Get some locale and language packages: # pkglist="$pkglist SUNWloc SUNWlang-enUS"
Up to now, in cases where I had to use multiple versions of Firefox on the same Solaris system, I installed the latest version as pkgadd, and the other versions as tar, for example in /usr/local. This is because the Solaris contributed builds always are published under the same name (which is probably OK for most users).
But it is also possible to install multiple versions of Firefox (3.0.5, 3.0.4, 2.0.0.19, and so forth) on the same system, after extracting and then changing each package before installation. Here’s how it works:
Here’s how it looks like after the installation:
/tmp# ls -ald extr* drwxr-xr-x 3 root root 188 2008-12-23 22:11 extracted-firefox-20081223-221103 drwxr-xr-x 3 root root 188 2008-12-23 22:15 extracted-firefox-20081223-221529 drwxr-xr-x 3 root root 190 2008-12-24 12:02 extracted-firefox-20081224-120152 /opt/sfw/lib# pkginfo | grep MOZ application MOZfirefox-20019 firefox 2.0.0.19 for Solaris 10 application MOZfirefox-304 firefox 3.0.4 for Solaris 11 application MOZfirefox-305 firefox 3.0.5 for Solaris 11 /opt/sfw/lib# ls -l drwxr-xr-x 13 root bin 46 2008-12-24 12:02 firefox-20019 drwxr-xr-x 13 root bin 47 2008-12-23 22:15 firefox-304 drwxr-xr-x 13 root bin 47 2008-12-23 22:15 firefox-305
I wrote a script which performs all these steps (except installation). I have tested it on various Solaris releases from Solaris 10 to OpenSolaris. So far, I have not seen any errors.
As always: No guarantee or similar. Please back up your files before using the script.
These are the direct links for downloading the latest versions of Firefox for Solaris (thanks to everyone involved for making them avaiable!):
Version | x86 | SPARC |
---|---|---|
Firefox 3.0.5 OpenSolaris | pkg | tar | pkg | tar |
Firefox 3.0.5 Solaris 10 | pkg | pkg |
Firefox 2.0.0.19 Solaris 10 | pkg | tar | pkg | tar |
Firefox 2.0.0.19 Solaris 8 | pkg | tar | pkg | tar |
After my posting about a new zone for a web server, I did some more tests with the sysidcfg file and found that the following entries work (thanks, Jerry, for sending me a simple sample sysidcfg file):
system_locale=C
works fine.
system_locale=en_US.UTF-8
works after I added the following to file /usr/lib/brand/ipkg/pkgcreatezone in the global zone (after line 179) before starting the installation of the zone:
# # Get some locale and language packages: # pkglist="$pkglist SUNWloc SUNWlang-enUS"
I found out the packages by looking into /usr/share/locale and /usr/lib/locale and searching for locales using (for example):
$ pkg search en_US.UTF-8
An example of a package that contains several languages is: SUNWinstall-l10n.
root_password=(short password string from Solaris 10’s /etc/shadow file)
works fine. The old password string will be put into the new /etc/shadow file of the 2008.11 zone but can later be changed from the command line (using the passwd command) and will then be replaced by a long string.
keyboard=...
is apparently not needed, as the terminal and keyboard works fine for me even without that parameter.
name_service=NONE
works fine.
name_service=DNS {domain_name=domain.TLD name_server=DNS_IP_ADDR_1,DNS_IP_ADDR_2 search=domain.TLD }
works fine as well. In case the system cannot verify some of the information, it displays just one confirmation screen (as usual, after configuring the same settings by hand) and after choosing “No” to not enter the information again and using <esc>-2, the rest of the sysidcfg configuration remains intact and will not be asked again, and shortly afterwards the login prompt is displayed.
terminal=xterms
works fine.
I chose the Intel D945GCLF board with an Intel Atom processor 230 with a TDP of just 4W. The northbridge/GPU apparently needs more power, so it is cooled with a fan whereas the CPU does not need one. Unfortunately, the fan is really loud. The following picture shows the original configuration with an additional case fan for CPU and RAM:
I looked at various northbridge coolers (for example the Zalman ZM-NBF47, mentioned in this blog entry by Matthias Pfützner) but then found a much cheaper and very elegant solution: I just removed the existing northbridge/GPU fan and installed a standard 80mm quiet fan (about 1000/min) on top of the cooler, using just one of the two cooler holes by mounting the fan with a 3mm screw and nut:
I also added a small part of a plastic packaging to the fan so more air would flow downwards towards the CPU cooler (this reduced the CPU temperature by 2 to 3 degrees Celsius):
The whole PC with 2 GB RAM and DVD-ROM drive needs just 30W which is OK, I think.
For the OpenSolaris 2008.11 installation, my first attempt was to install it on an external 200GB USB drive. But contrary to my installation experience on my Intel D201GLY2A (see my other blog entry), this time the USB ports got renamed at every next cold boot attempt, so I had to try all USB ports until the disk drive was found. Which is really funny if your USB disk has two connectors (an additional one for extra power). The good thing was that the power supply of the case had an additional SATA power outlet. And as the D945GCLF mainboard has two SATA connectors, and my external USB disk was a SATA type disk drive, I could remove the disk from its USB case and install it inside the computer case. As it only has 5.25″ and 3.5″ drive bays, I attached an additional u-shaped sheet of metal in the 5.25/3.5″ drive bay so that the 2.5″ disk is supported from below and has a solid, flat metal surface to lay on, and the two mounting screws on just one side of the disk are sufficient to keep it in place:
Installation went smoothly from the OpenSolaris 2008.11 CD. Network and Sound worked right from the start. Up to now, I only had a problem with printing from Firefox: The fonts were either pixel fonts with a very coarse resolution or the font hinting was not implemented (the spaces between characters did not look correctly). I have not yet analyzed that problem so far.
For installing OpenSolaris 2008.11 on a USB stick (installation on a 250 GB USB drive worked fine for me), please be aware of bug 4755 which leads to a GRUB> prompt after attempting to boot from a newly installed OpenSolaris 2008.11 USB stick.
Here’s how it worked for me, on a Intel D201GLY2A system with 1 GB RAM:
For those of you that want to install a web server in an OpenSolaris 2008.11 zone (e.g. for separating a web server from a file server while using the same hardware), here’s a short howto. The procedure is a bit different from previous OpenSolaris releases as the zone files are not immediately available after the zone is installed – might have something to do with the new ipkg zone brand. The zone installation is now much faster than before. Here’s how I got it installed:
$ cat > /var/tmp/webserv-z.cfg create set zonepath=/zones/webserv-z set autoboot=true add net set address=192.168.0.20/24 set physical=ADAPTER set defrouter=192.168.0.1 end verify commit exit
Please replace ADAPTER by the name of your network adapter (can be seen in the output of ifconfig -a | nawk '!/^[\t]/&&!/lo/{gsub (":", "");print $1}' or just ifconfig -a, for example). In my case, it was sfe0 on one system and bge0 on another.
Then, configure the new zone:
$ zonecfg -z webserv-z -f /var/tmp/webserv-z.cfg
$ zoneadm -z webserv-z install A ZFS file system has been created for this zone. Authority: Using http://pkg.opensolaris.org/release/. Image: Preparing at /zones/webserv-z/root ... Cache: Using /var/pkg/download. Installing: (output follows) Refreshing Catalog 1/1 opensolaris.org Creating Plan / DOWNLOAD PKGS FILES XFER (MB) SUNWPython 6/52 213/7862 1.71/72.41 Completed 52/52 7862/7862 72.41/72.41 PHASE ACTIONS Install Phase 3637/12939
$ cat > /zones/webserv-z/root/etc/sysidcfg system_locale=C timezone=Europe/Berlin terminal=xterms security_policy=NONE timeserver=localhost root_password=PASSWD_STRING name_service=dns {domain_name=DOMAIN.TLD name_server=DNS_IP_ADDR_1,DNS_IP_ADDR_2 search=DOMAIN.TLD } network_interface=primary {hostname=webserv-z ip_address=192.168.0.20 netmask=255.255.255.0 protocol_ipv6=yes default_route=192.168.0.1 } nfs4_domain=dynamic
Before proceeding, please replace the placeholders DOMAIN.TLD, DNS_IP_ADDR_1, and DNS_IP_ADDR_2 by the names or addresses of your choice! For PASSWD_STRING (root_password parameter), you may use the old (short) password string from a Solaris 10 /etc/shadow file. If you do not use the root_password parameter in the sysidcfg file, you will be asked for the root password during initial zone boot.
root@soly:/# zlogin -C webserv-z [Connected to zone 'webserv-z' console] Loading smf(5) service descriptions: 27/68 ... 68/68 Reading ZFS config: done. Mounting ZFS filesystems: (5/5) Creating new rsa public/private host key pair Creating new dsa public/private host key pair Configuring network interface addresses: sfe0.
After a while, a series of screens will be displayed which ask you to select missing system configuration information. Use the <F2> key or <esc> 2 to go from one screen to the next. After that, a login prompt will be displayed, and you can login to the newly created zone:
webserv-z console login: root Password: Dec 8 10:12:14 webserv-z login: ROOT LOGIN /dev/console Sun Microsystems Inc. SunOS 5.11 snv_101b November 2008
The output of the df -k command should display the following file systems (probably with slightly different values in the "used" column and totally different values in the "avail" column (depends on your disk and swap space size):
root@webserv-z:~# df -k Filesystem kbytes used avail capacity Mounted on / 0 240451 186876163 1% / /dev 0 0 0 0% /dev proc 0 0 0 0% /proc ctfs 0 0 0 0% /system/contract mnttab 0 0 0 0% /etc/mnttab objfs 0 0 0 0% /system/object swap 775608 196 775412 1% /etc/svc/volatile /usr/lib/libc/libc_hwcap1.so.1 187116614 240451 186876163 1% /lib/libc.so.1 fd 0 0 0 0% /dev/fd swap 775412 0 775412 0% /tmp swap 775420 8 775412 1% /var/run root@webserv-z:~#
$ pkg install SUNWapch22 root@webserv-z:~# pkg install SUNWapch22 Refreshing Catalog 1/1 opensolaris.org Creating Plan \ DOWNLOAD PKGS FILES XFER (MB) SUNWapch22 0/4 0/1342 0.00/5.85 SUNWperl584core 3/4 913/1342 4.21/5.85
Note: If you need to clean up the configuration, I suggest using the following commands:
$ zoneadm -z webserv-z uninstall -F
$ zonecfg -z webserv-z delete -F
$ zfs destroy -r rpool/zones
Be careful! These commands perform uninstall, delete or destroy actions without confirmation!. The zfs destroy command shown will also destroy all other zfs file systems that were created for other zones with zone root path starting with /zones!