Wednesday, September 30, 2009

Autologon

Go to /etc/X11/gdm/custom.conf and manually modify the required fields in the [daemon] section and add the following;

[daemon]
AutomaticLoginEnable=true
AutomaticLogin=<username>
Note: You cannot auto-logon as root.

Bare in mind that I’m not concerned about security at this point as the box is not exposed to the open world, and is somewhat protected by the fact it lives on a “private” LAN. (i.e. my home lan)

If you want to run something automatically on logon you can put the commands into the /etc/profile file. Since I’ve been looking for a way to autostart virtualbox machines this will be the place i do it. (mainly because it is one of the easiest way to do it)
(source: http://sigtar.com/2009/01/29/open-solaris-autologin/)

Monday, September 28, 2009

Wireless using WUSB54GC (usb13b1,20)

At first I had a WUSB54GC based on Ralink RT3070 chipset recognized as usb1737,77 but so far no driver exists so I swapped it for the well-known older version being usb13b1,20 which uses the rum driver

It was now quite easy to get it up and running

If no wired link is available, a scan for wireless LANs is done, and the resulting list offered via a GUI popup window prompts the console user to select a preference. If a successful connection is made, the WLAN in question is stored in the plain text file /etc/nwam/known_wifi_nets and the daemon may connect to any WLAN in that list without prompting the user again. If a user wishes to add other preferences or revoke existing ones, he can do so by bringing up the NWAM Manager menu with right-click on the icon, and then selecting "Manage Favorite Wireless Networks...". A user can also edit the known_wifi_nets file directly. This interface is volatile and might change in a future release

admin@opensolaris:/etc/nwam# more known_wifi_nets
denver 0:18:39:ad:ce:36

Note: My network was recognized after I enabled broadcast again on the wireless modem and choosing the option within the Gui of NWAM to put wireless as preferred connection.

/etc/nwam/llp contains:
admin@opensolaris:/etc/nwam# more llp
bge0 static 10.0.0.4/24
rum0 static 10.0.0.10/24

In order to have wireless standard as preferred put rum0 first in llp after bge0

Helpful commands:
ifconfig -a
dladm show-wifi
dladm scan-wifi
dladm show-secobj
(Note: I removed all the profiles with dladm delete-secobj)
svcadm restart nwam

Sunday, September 6, 2009

Initial startup of remote Desktop for OpenSolaris

I've not used the xvnc-inetd service on OpenSolaris, but I have been using the vino-server without issue, which is a vnc server. The only gotcha on that is that it requires the keyring password upon first connect to the desktop, so you have to be AT the desktop at least once to "approve" the connection. To get around this and effectively dissociate the vino-server from the keyring, here is a procedure I stole from another web site. This works for me on several installations from 2008.05 on up to 2008.11. Someone may have a more efficient process than this.

Procedure:
First, enable Vino by going to System...Preferences...Desktop Sharing
0. Once you've configured Remote Desktop, go to the
System...Administration...Keyring Manager. Enter your keyring
password when prompted and let it have access to itself if prompted
(!).
1. Highlight the key that contains "vino" in it. Delete that key. Yes.
2. Start gconf-editor
3a. Navigate to desktop...gnome...remote_access.
3b. Click in the empty field to the right of "vnc_password" (the
"value" column). Enter your base64 encoded password from above.
That's it. Don't need to log out. Just connect to the system with a
VNC viewer on display "0" if you didn't change the port number.

Boot sequence with IDE and SATA Disk

Originally set in bios boot section to boot from sata disk. I had my IDE disk which was originally my boot device disconnected.

I want to mirror my boot disk so use both IDE and SATA disk when I connected the power again and tried to boot up It didn’t wanted to boot. Although it still sees my SATA disk as first boot device It apparently wants to boot from IDE no matter what.

In order to boot from SATA and having the IDE disk powered and connected It was mentioned I should disable the device in the main menu where it was recognized by BIOS auto detection. I changed the value into Not installed.

That did the trick, If I do a format the disk is seen by Solaris. So now I can setup the disk as mirror for my boot drive.

Find missing zpool

I replaced my OS disk and now only the rpool was visible using zpool status. In order to see other existing pools run zpool import without options:

# zpool import
  pool: dawpool
    id: 8233866255479348343
state: ONLINE
status: The pool was last accessed by another system.
action: The pool can be imported using its name or numeric identifier and
        the '-f' flag.
   see: http://www.sun.com/msg/ZFS-8000-EY
config:

        dawpool     ONLINE
          raidz1    ONLINE
            c8t0d0  ONLINE
            c8t1d0  ONLINE
            c8t2d0  ONLINE
        spares
          c8t3d0

There it is again my raidz pool ready to be imported

Remote Desktop from windows to OpenSolaris

I was looking for some software to take over the whole desktop as in windows with remote desktop. Funny thing is it is already built in OpenSolaris.
On your Solaris box goto System –> Preferences –> Desktop Sharing and set the following:

Yes I know it is not very secure but in my case this will become a NAS server with no connection to the outside world. Now you can start a browser session http://<hostname>:5800 and it will give you RDP like you are used to in Windows.

After shutdown and restart I could not start this remote session http://<ip-address>:5800. Checked the desktop on Solaris and it mentions the Gnome-keyring-daemon-wrapper.

To turn it off:
go to System->Preferences->Sessions and uncheck
>>> GNOME Keyring Daemon Wrapper in the Startup Programs

Saturday, September 5, 2009

WUSB54GC wireless USB stick (usb1737,77)

In order to get wireless working I tried several things, so far not successful.
According to other bloggers I have a new version based on Ralink RT3090
Information I gathered so far:

To find out which usb devices are connected run as root:
# echo ::prtusb | mdb -k
INDEX DRIVER INST NODE VID.PID PRODUCT
1 ehci 0 pci1043,82e2 0000.0000 No Product String
2 ehci 1 pci1043,82e2 0000.0000 No Product String
3 ohci 0 pci1043,82e2 0000.0000 No Product String
4 ohci 1 pci1043,82e2 0000.0000 No Product String
5 usb_mid 0 device 413c.2003 DELL USB Keyboard
6 hid 2 mouse 046d.c03d USB-PS/2 Optical Mouse
7 usb_mid 1 device 1737.0077 802.11 g WLAN

> 7 usb_mid 1 device 1737.0077 802.11 g wlan
Hmm, this device is new version, which is a Ralink 3090 chipset,


#modinfo
#devfsadm -i
#dmesg | grep Ralink

SUNWural
Package SUNWural didn't work so I removed package
SUNWrum
Also tried with SUNWrum package (rum driver) but no.
# update_drv -a -i "usb1737,77" rum
# ifconfig rum0 plumb

From Ubuntu Forum: Problem solved! idea
I have to rename /etc/Wireless/RT3090STA to /etc/Wireless/RT2860STA
Although it is a RT3090 driver, it uses RT2860 as its internal reference. confused2
Anyway, I can connect to the Internet with no problem now.

#iwconfig to configure it

nwam will configure interface automatically (NetWork Auto Magic = Standard on opensolaris)
Note that in auto-magic mode, there is a limitation that only one link is active at a time. This mode is thus not recommended for machines which use more than one link at once. For machines with wired and wireless links, wired is preferred by default, although this can be adjusted by altering the order of the lines in the plain text file /etc/nwam/llp. Note, however, that this interface is Volatile and may change in a future release.

===============================================
By hand:

export PAGER='less'
man dladm

cat > /tmp/mykey
mykey123
^D (Ctrl + D / EOF)

create-secobj -c wpa -f /tmp/mykey mykey
scan-wifi
connect-wifi -e myap -s wpa -a open -m g -k mykey
dladm show-wifi
dladm disconnect-wifi
==================================================
# Linksys WUSB54GC
DEVICE=wlan0
BOOTPROTO=none
HWADDR=xx:xx:xx:xx:xx:xx
ONBOOT=yes
TYPE=Wireless
USERCTL=yes
PEERDNS=yes
NETMASK=255.255.255.0
IPADDR=192.168.1.4
GATEWAY=192.168.1.254
ESSID=xxx
CHANNEL=1
MODE=Master

And my wpa_supplicant.conf:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
ap_scan=1

network={
ssid="xxx"
bssid=xx:xx:xx:xx:xx:xx
mode=0
key_mgmt=WPA-PSK
proto=WPA
auth_alg=OPEN
pairwise=TKIP
psk="xxx"
}

Asus M4N78pro with MCP78S connect to the internet with nge

I was having problems as well on how to get to the internet using this board (MCP78S [GeForce 8200] Ethernet) and opensolaris 2009.06 because the NIC was not recognized.
To get out of this "catch 22" you can use nge as the driver for the NIC.
For this you don't need a compiler. After you are connected to the internet you can download gcc compiler and the preferred nfo driver.

Lets inform the system to let nge handle the device

#pfexec update_drv -a -i "pci10de,760" nge
(or add nge "pci10de,760" to /etc/driver_aliases)
#pfexec ifconfig nge0 plumb
#ifconfig -a showed nge0

nge needs just a little tweaking to work
your ethernet address is probably reversed (it's what I have)
so do as root
#ifconfig nge0 ether
ether 5:3c:db:21:19:0

now just reverse the order of the words delimited by : (do not totally reverse character by character)
and restart dhcp
#ifconfig nge0 ether 0:19:21:db:3c:5
#ifconfig nge0 dhcp start

I decided to use static IP:
echo "10.0.0.138" > /etc/defaultrouter (IP of your router)
echo "10.0.0.0 255.255.255.0" > /etc/netmasks
edit /etc/resolv.conf (DNS from your provider)
nameserver 195.121.1.34
nameserver 195.121.1.66

Switch to using the DNS servers...
dawbckup:/etc# cp nsswitch.conf nsswitch.conf.original
dawbckup:/etc# cp nsswitch.dns nsswitch.conf
dawbckup:/etc# svcadm restart svc:/network/dns/client:default

Step 4: Switch to a static IP
# vi /etc/nwam/llp
change the 'nge0 dhcp' to 'nge0 static 10.0.0.3/24'

svcadm restart svc:/network/physical:nwam

step5.
edit /etc/hosts
add 10.0.0.3 dawbckup

Do a restart (init 6) and you should be able to connect to the internet after you reverse the ip adress again

ifconfig nge0 ether 0:19:21:db:3c:5

Now you can get your gcc compiler and download the nfo driver.