OpenSolaris 2008.11 on Acer AspireOne (Part II: Installation & Exploring)

Welcome back to 2nd articles about reviewing of OpenSolaris & this could be the last one I share you. The first part of it you may view here. If you have tried the live CD yet & certainly to continue to installation session then you must be sure about on where disk the OS will be placed. Since the manual documentation about it not touching very deeply, so I thought that this wouldn’t be a big problem – it is a common way to set Unix OS families – but then I was wrong. There’s some facts I found regarding to it:

Can’t Install on Logical Partition
This is rules that hasn’t documented very well yet. OpenSolaris setup will reject the installation if your dedicated space located on logical partitions; this is a contrary way on Mac OS or Linux. I found this when I have my last partition tables on my AspireOne. Take a look at below picture:



The green box refers to target partition which is currently installed with Fedora 7 & located on logical partition (7GB). With this situation - which I thought it wouldn’t rise a problem - I determined to install it no matter what. I then insert the CD, plugged-in external DVD drives, turn on the netbook, switch BIOS to boot the CD & let the live CD to run, just like the 1st article did.

After live CD completely loaded, you may found an install shortcut on desktop or jack’s desktop directory in file browser. Just double click on it.



The install wizard will start to run, but it only shows primary partition on Disk wizard! You see that my target partition is behind on EXT LBA partition type (91GB).



Based on this, I then go back to Windows to re-make the partition so that 7GB logical partition becomes a primary. Below picture show you what my partition table look like now (see that yellow part defined as BF type partition):



Once again, I run the live CD to start the installation wizard & voila… it has no problem anymore since I select that 7GB primary BF partition as target. Anyway, installation goes on smoothly without creating any problem. An article show you a complete installation of 2008.05 version (similarly to 2008.11) from A to Z, just click here to see.



This installation running on AspireOne will take approximately about 45-50 minutes, but I don’t have question about that. After giving it a bit of patient – finally - my first login was really a good experience... a decent wallpaper, slim design, attractive look and feel. Everything was pretty great. A GNOME default desktop.



A Bit Differ File System
Now, let’s take a look around on file browser (GNOME Nautilus). On picture below, you may see that the file system structure is a bit differs than any Unix OS families. There’s an additional system directories such as export, kernel, net, platform, rmdisk, rpool & system. Well, we’ll figured it out some later. By the way, my pendrive (USB mass storage device) was automatically detected in the system, check out an icon on the left panel (1.0 GB Media).



A weird thing happened since I doubt to describe why it shows so. While I expressly run Disk Usage Analyzer & found that 29.1GB are held on OpenSolaris system. What is this? I then check on df command on terminal & see that those 29.1GB seems come from total size of mounted file system (6.4GB readable from 7GB mounted as root).



However, my others existing FAT32 logical partition must readable from OpenSolaris (Local Disk D: & E:). A mount command – a common command on Unix – will solve this, I though but actually, it’s not that easy since disk device node is different from Unix. The node on OpenSolaris is what they called disk number. To see the disk number available on system, switch to root first & issue format command.

#format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
0. c4d0 ["DISK NUMBER"]
/pci@0,0/pci103c,30d9@1f,2/disk@0,0
Specify disk (enter its number): Ctrl+C


WARNING: Press Ctrl+C here and not enter. Otherwise you may format you Solaris partition. Anyway, from command above, a disk number named as c4d0 exist on my AspireOne – a pretty weird name huh? Before continuing, create d & e directory under /mnt. To mount my both FAT32 partition (D: & E:), issued a command:

#mount -F pcfs /dev/dsk/c4d0p0:d /mnt/d
#mount -F pcfs /dev/dsk/c4d0p0:e /mnt/e


Notice that the partition number should be entered exactly by typing pX after disk number, which X refer to partition number (p0 means partition 0). To mount NTFS file system, you need to download ntfs-3g package & issue a same command above. Read this manual for more details. Later, you can edit /etc/vfstab file for enabling automatic mounting drives at boot.

Enabling Network
On OpenSolaris, you can’t find ethX (similar to Unix) on your system. But I found a weird – again – name, it called rge0. To practice it, I then plugged in Ethernet cable with DHCP environment from my current office, thus I connected my system to internet. The picture below show you before & after the DHCP activation.



Package Manager provides another impressive feature which enables you to download & install software in your system by using graphical window. Here you can search a package by name, select it and click install/update. It will resolve all dependencies (Installation of a package requires another packages), download all of them and install in your system. "opensolaris.org" is the default repository, you can add your own repository and create new package of your own.



While download process by Package Manager is running, I then try to run FireFox to surf my blog. Surprisely that OpenSolaris 2008.11 was fully equipped with FireFox version 3. The surfing access now more similar to others.



Also, I checked out messaging program which is Pidgin as default application. I then login to my account on yahoo & in short, it running & connected successfully.



Changes on GRUB
I was trying to edit the "menu.lst" from "/boot/grub/menu.lst" but found that "For zfs root, menu.lst has moved to /rpool/boot/grub/menu.lst". I need to edit it because I have to enabling boot menu for the AspireOne recovery disk accessible. And finally, here below is complete of menu.lst file:

splashimage /boot/grub/splash.xpm.gz
background 215ECA
timeout 5
default 1
#---------- ADDED BY BOOTADM - DO NOT EDIT ----------
title OpenSolaris 2008.11 snv_101b_rc2 X86
findroot (pool_rpool,3,a)
splashimage /boot/solaris.xpm
foreground d25f00
background 115d93
bootfs rpool/ROOT/opensolaris
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS,console=graphics
module$ /platform/i86pc/$ISADIR/boot_archive
#---------------------END BOOTADM--------------------

title Windows XP
rootnoverify (hd0,1)
chainloader +1

title AspireOne Recovery Disk
rootnoverify (hd0,0)
chainloader +1

# Unknown partition of type 15 found on /dev/rdsk/c4d0p0 partition: 3
# It maps to the GRUB device: (hd0,2) .

# title OpenSolaris 2008.11 snv_101b_rc2 X86 text boot
# findroot (pool_rpool,3,a)
# bootfs rpool/ROOT/opensolaris
# kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS
# module$ /platform/i86pc/$ISADIR/boot_archive


After made a reboot, here below picture of my boot GRUB splash:



Anything Else?
Actually, there’s more things to explore but I didn’t have much time to did it & share you to this blog. By now, it’s about hundreds of current title spread over the internet or you can find useful tips & trick by joining forum on opensolaris.org.May this article brief you a bit benefits.

Labels: , ,

  Post a Comment

OpenSolaris 2008.11 on Acer AspireOne (Part I: LiveCD)

Somehow, in early 2009, I’ve been interested exactly on rumors spread over the internet about latest version of OpenSolaris & finally I made an experiment on my AspireOne. Better late then never, this is my first experience to face with this free Sun OS product based on Unix family in x86 machine (UMPC), even not a truly SPARC one. But at least, I was too curious to try or need to figured it out & compared to others Unix based OS such as Linux or Mac OS.

OpenSolaris 2008.11 available for free download from solaris.org. It comes with single ISO’s CD (687MB). However, I was succeeded grabbed it for almost 2 days from my office computer. Actually, my first plan is try to create a portable LiveUSB, but obviously this method also offered from Belenix, another OpenSolaris distribution community. One else important things is, I was too sick to get different fresh USB ISO one. So, here I go, steady still with LiveCD instead.

At first, I wonder if I can make a way to boot the ISO from AspireOne without external CD/DVD drive. But unfortunately, none of my thought was did. The plan to bundled the ISO to USB flash has failed. Another plan to boot from an existing Fedora 7 partition with GRUB also didn’t worked. Last plan to load native ISO from GRUB was too far. So, I end up doing more crazy things with an external DVDRW plugged on it after burning the ISO on a blank CD. Pretty dumb to wasting too much times ha ha...



Anyway, in minutes, I’m ready to boot from LiveCD. This LiveCD completes with GRUB loader & nothing fails from hardware detection initializing. At the end of loading process which I thought it was completed to show a desktop, but it only show a text mode console login. So, where the hell is my desktop? It must be a trouble with VGA card, a common equal problem as Linux happened when startx failed to executed. From this point, I then login as user (user: jack & password: jack, default LiveCD user) & started to verify the log. I found that the trouble raised when LiveCD tried to load intel driver. If you meet the same problem as I did, then login as root to generate a representative xorg.conf to change the driver to vesa from intel.

$su
Password: (default password for root is opensolaris)
# /usr/X11/bin/Xorg –configure


This procedure should create /jack/xorg.conf.new. Edit this file using vi text editor, search for Device Section & modify the Driver line to:

Driver “vesa”


Still stay in root mode & try to lunch GNOME desktop manager (I couldn’t find any desktop manager except this on OpenSolaris LiveCD):

# /usr/X11/bin/xinit /usr/bin/dbus-launch gnome-session -- \/usr/X11/bin/Xorg –config /jack/xorg.conf.new :0


And… voila, here we’ll see the GNOME desktop. Until this, everything is much similar to Linux than Mac OS. LiveCD image looks fine, really decent and pretty impressive.



Check out a "Device driver Utility" icon on the desktop. If you think any of your hardware device is not working, check out from here that whether driver support for that device is available or not. For example below, my wireless on Acer AspireOne recognized but it need 3rd party driver to work properly. Though, I couldn’t resolve how to activate built-in webcam & both of MMC readers has failed when I tried to insert 1GB of SD Card.



Anyway, this is still “a work progress” since I have not yet finished the configuration of all devices. Come back soon for more detailed version.

Available General Hardware
























































Item
Hardware Components
Status
Notes
CPUIntel Atom 1.66Ghz - Chipset Intel Mobile 950
works
No problems
GraphicsIntel Graphics Media Accelerator 950
works
Using driver "vesa" as default, read above
LCD Panel8.9" WXGA 1024x600
works
Stick around with 1024x768 resolution
Disk StorageSATA 100 GB - 5400 RPM
works
With native OpenSolaris ZFS file system
EthernetBroadcom Corporation Netlink Tigon3 PCI Express 10/100/1000Base
works
Identified with rge0 as default
WirelessIntel PRO/Wireless 3945ABG - 802.11 a/b/g
Untested
Need 3rd party driver
SoundIntel Corporation 82801G - High Definition Audio
works
Good
Built-in Card ReaderMemory Stick reader, SDcard, Xd Card, MMC
Untested
Testing failed while I plugged in 1GB SD card


In a while, enjoy that root’s GNOME desktop for a bit. I’ll continue my next post for the installation process in a short.

Labels: , ,

  Post a Comment

JavaScript: Return Multiple Values in Count Between Dates Function

JavaScript is one of parts that can’t be separated with web programming. Sometimes we usually depend on it, although we can solve the problem with another technique but the use of JavaScript is much helpful to support dynamic runtime application. For example manipulating or counting math is possibly without refreshing the page. Therefore, it is much simpler than AJAX. This article purposely dedicated to my self & any newbies which want to learn JavaScript methods.

Just like my own experience improving a page counting difference between two dates, here I found something new & I’d like to archived for me then share to you. The web page project it self are related to MySQL date field type & based on PHP programming. The subject was, how to calculate the year & month difference by both dates after the page loaded & once the date object is changed? As usual, I set the date interface with JavaScript so it would generate an interesting GUI just like common date object on Win32 programming.



Those dates GUI are compatible with date type format in MySQL (yyyy-mm-dd). When the date icon clicked, it will show small interactive calendar panel. The first date object I named with date_start, the second is date_end & sequentially, the difference year & month is n_year & n_month. The core date subtract function need 2 parameter dates & I created as well as it will return more than one value (year & month). On JavaScript, the treatment is put it on array mode. Pick out a small portion below:

function selisihTgl(dateEnd,dateStart)
{

return [yearAge, monthAge];
}


Displaying returned both value from function in array are simply called the array variable just like any others programming which is 0 based in bracket.

function fSelisih(sender)
{

obj.n_year.value=selisih[0]
obj.n_month.value=selisih[1]
}


That’s it, kinda simple isn’t it? By the way – unfortunately -, when dates changed, the date GUI object doesn’t have trigger event to call the function. So, I take <FORM> tag with onMouseMove event. Pretty dumb, but it works fine. Below is complete script from A to Z, check this out:

// portion of PHP code to retrieve both dates value from MySQL database
...
//
<HTML>
<HEAD>
<TITLE>Your Title Please</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
</HEAD>
<script language="JavaScript">
function selisihTgl(dateEnd,dateStart)
{
var baru = new Date(dateEnd.substring(0,4),
dateEnd.substring(5,7)-1,
dateEnd.substring(8,10));

var yearBaru = baru.getYear();
var monthBaru = baru.getMonth();
var dateBaru = baru.getDate();

var lama = new Date(dateStart.substring(0,4),
dateStart.substring(5,7)-1,
dateStart.substring(8,10));

var yearLama = lama.getYear();
var monthLama = lama.getMonth();
var dateLama = lama.getDate();

yearAge = yearBaru - yearLama;

if (monthBaru >= monthLama)
var monthAge = monthBaru - monthLama;
else
{
yearAge--;
var monthAge = 12 + monthBaru -monthLama;
}

if (dateBaru >= dateLama)
var dateAge = dateBaru - dateLama;
else
{
monthAge--;
var dateAge = 31 + dateBaru - dateLama;

if (monthAge < 0)
{
monthAge = 11;
yearAge--;
}
}

return [yearAge, monthAge];
}


function fSelisih(sender)
{
var obj=sender;
var selisih = selisihTgl(obj.date_end.value,obj.date_start.value);
obj.n_year.value=selisih[0]
obj.n_month.value=selisih[1]
}
</script>
<BODY onLoad="fSelisih(this)">
...
<form action="path/to/save/or/ignore/it" method="post" name="form1" onMouseMove="fSelisih(this)">
...
</form>
...
</BODY>
</HTML>


Don’t forget to insert the function within onLoad event on <BODY> tag to automatically count them expressly when the page are fully loaded.



Done! Enough for now lesson & I’ll be back with another unique tips & trick programming.

Labels: , , , , , , , ,

  Post a Comment