Monday, January 25, 2010

sun e250: just getting garbage from ttya, get proper login text from rsc

I found an old e250 on the side of the road. someone had placed it out as trash. i want to play with this new toy, perhaps set up a lan file server for media. i intend to install debian on it. that's what i'm most familiar with.

anyway, the machine is headless, no keyboard, and i don't have enough money to purchase a sun type 4/5 keyboard. so i am trying to gain serial access thru ttya. i built a null modem cable. the cable works fine with the built in rsc (i get the rsc post and a login request). but when hooked up to ttya all i get thru hyperterminal, minicom or gtkterm is garbage. lots and lots of weird ascii characters. i'm sure my home grown cable works because rsc displays correctly. all terminals are set 9600,8n1,no flow control. when using the rsc connection i do get full echo of what i type. i'm pretty sure my cable is put together right.

i tried removing the rsc "card" (which is really less of a card and more like expansion ports with a ribbon cable going to the main board) and hooking the null modem cable to ttya, still just garbage on hyperterminal. i read more than one place that once the rsc card is removed the e250 should default to ttya. that didn't help me tho. i even tried working thru the garbage and hitting ctrl-break, ctrl-b in gtkterm. once or twice i was fast enough to get what might have been an ok prompt written in garbage. so i tried typing a few commands i found posted on this forums and others, but i never made any progress on that front.

I built my cable off the following chart:

Connect Pin to Pin on each end.
 
    25-pin           25-pin
     2 --------------- 3
     3 --------------- 2
     4 --------------- 5
     5 --------------- 4
     7 --------------- 7
     6 ---+
          +----------- 20
     8 ---+
               +--- 6
     20 ----------+
               +--- 8

obtained from this website: http://www.softpanorama.org/Solaris/Startup_and_shutdown/serial_console_on_solaris.shtml

i'm using a db25 to db9 converter to connect to my windows laptop or linux desktop.

this machine being foreign to me, i have no interest in trying to get rsc working, i am perfectly happy using ttya. Does anyone have any ideas on where i went wrong?

Saturday, January 2, 2010

trying to check out the new Chromium OS from Google

Well, I saw the webcast of Google's announcement of ChromeOS today.  I have to say, I was impressed.  Since the release of Chrome, I have been relying on web apps more and more.  Simply put, they are faster in Chrome than native apps under VectorLinux.  Vector is fast, that's why I use it.  But, I am easily impressed by speed.  I was instantly interested in something that claimed to be fast.  I just had to try out ChromeOS.

EDIT:  As of right now, ChromiumOS does not successfully run in Qemu.  You can download and install binaries of Sun's VirtualBox here.


The initial alpha release is by the Chromium Project and named ChromiumOS. Vector has Qemu in the repository, I like using apps already in the repo. I have installed other virtual machines but not on the currant machine.  Rather than going through my notes here and here, I chose to simply install Qemu. Qemu of course needs KQemu in order to run with any kinda real speed, so, I had to install kqemu.  That required a SlackBuild from Connie's Slackware site. You will need the following files:


http://connie.slackware.com/~alien/slackbuilds/qemu/build/50-kqemu.rules.new
http://connie.slackware.com/~alien/slackbuilds/qemu/build/kqemu.SlackBuild
http://connie.slackware.com/~alien/slackbuilds/qemu/build/kqemu-1.4.0pre1.tar.gz
http://connie.slackware.com/~alien/slackbuilds/qemu/build/kqemu.slack-desc


Qemu has to be installed first.  Then chmod 755 kqemu.SlackBuild.  Once The new package was built, I installed it with:
installpkg kqemu-1.4.0pre1_2.6.27.7_smp-i486-2alien.tgz


modprobe kqemu


Now, trying to run qemu finds that /dev/kqemu is not accessible due to permissions.  I used a dirty hack to get instant access to the device:


chown user1:user1 /dev/kqemu


Better to add $USER to the kqemu group, I think.  Just didn't want to spend the research to figure it out.  Once done, I was able to boot the vmdk image i got from here.  Running:

bunzip2 chromiumos.vmdk.bz2

will expand the archive. I found this page useful for setting up and running a virtual machine in VirtualBox.

 I looked at the QuickStart guide for Qemu to find out the best way to boot the image.  After reading that page I came up with the following command.  I saved it as a shell script:


qemu -hda chromiumos.vmdk -m 1024 -soundhw sb16 -net nic,model=ne2k_pci -net user

The root login for this particular image is: chrome.  The regular user login is your Google login.  My Google login is actually my Yahoo email addy, I found that if you don't include the entire email addy, ChromeOS will fill in with "@gmail.com"  So it is important to use your entire email addy.  Here are screenshots I captured during my experience:

EDIT:  I installed Sun's VirtualBox and writing this edit from ChromiumOS.  I'll post some new screenshots in a lil bit.












ChromiumOS running in Qemu...

Please remember this is while running in Qemu... first try!  I will continue working with ChromiumOS in Qemu until I get the video issue worked out.  My VM is using   -m 1024, the host machine is an intel P4 @ 2.0 GHz running VectorLinux Standard Gold 6.0.





You can find the webcast I reviewed here:



Another web video of ChromiumOS's fast boot capabilities here:



Friday, January 1, 2010

google chrome slackware and vectorlinux scripts updated!!

recently google made a beta release of chrome.  their method of release has broken my install and update scripts for google chrome.  i spent a few hours today making some bug fixes that take into account the recent changes.  please remember the scripts will still crash xfce.  you will have to reboot after running either of the scripts, then things will return to normal.  for the life of me I can't figure out why the scripts crash xfce.


install-chrome.sh
Code:
#! /bin/bash
# Title: install-chrome
# Author: BroknDodge
# License: BSD
# Version: 0.0.5
#
# Special thanks to the following Vectorians for their help and suggestions:
# Daniel stretchedthin uelsk8ts
# hata_ph rbistolfi MOE-lnx
#
# Very Special thanks to the folks at Chromium.org and Google
# without whom there wouldn't be anything to install
#


#------------------------------------------#
# Setting up the Environment


enablePlugins="$1"
tmp="/tmp"
release="0"
chromeURL="http://dl.google.com/linux/deb/"


nssURL="http://connie.slackware.com/~alien/slackbuilds/mozilla-nss/pkg/12.2"
nssPackage="mozilla-nss-3.12.3-i486-1alien.tgz"


#------------------------------------------#
# Making sure the system is sane


if [ $UID != 0 ]; then
echo "You must run this script as root."
exit 1
fi


if [ -d "$tmp/install-chrome" ]; then # check for and create temp dir
# Will enter here if dir doesn't exist
rm -R $tmp/install-chrome # hope you didn't have anything
mkdir $tmp/install-chrome # stored there
else
mkdir $tmp/install-chrome
fi


#------------------------------------------#


function trim() # function for trimming white space from my arrays
{
trimmed=$1
trimmed=${trimmed%% }
trimmed=${trimmed## }


echo $trimmed
}




function dotests {


echo Running tests...
#------------------------------------------#
# check for lzma


haveLZMA=`which lzma` # check for and getting lzma
if [ "$haveLZMA" == "" ]; then
slapt-get --install lzma
fi


#------------------------------------------#


#------------------------------------------#
# check for nss = 3.12.3


nssInstalled=`slapt-get --search nss-3.12.3` # I really need to check the version
nssInstalled=${nssInstalled#*=} # as well, but this build seems to
nssInstalled=${nssInstalled%]*} # work best with 3.12.3


if [ "$nssInstalled" != "yes" ]; then
installnss
fi
#------------------------------------------#


#------------------------------------------#
# check for GConf


gconfInstalled=`slapt-get --search GConf-2.22.0` # VL-Light doesn't ship with GConf
gconfInstalled=${gconfInstalled#*=}
gconfInstalled=${gconfInstalled%]*}


if [ "$gconfInstalled" != "no" ]; then
slapt-get --install GConf
fi


}
#------------------------------------------#




function simlinks {
cd /usr/lib
if [ ! -f "libnspr4.so.0d" ]; then
ln -s libnspr4.so libnspr4.so.0d
fi


if [ ! -f "libnss3.so.1d" ]; then
ln -s libnss3.so libnss3.so.1d
fi


if [ ! -f "libnssutil3.so.1d" ]; then
ln -s libnssutil3.so libnssutil3.so.1d
fi


if [ ! -f "libplc4.so.0d" ]; then
ln -s libplc4.so libplc4.so.0d
fi


if [ ! -f "libplds4.so.0d" ]; then
ln -s libplds4.so libplds4.so.0d
fi


if [ ! -f "libsmime3.so.1d" ]; then
ln -s libsmime3.so libsmime3.so.1d
fi


if [ ! -f "libssl3.so.1d" ]; then
ln -s libssl3.so libssl3.so.1d
fi




}


function installnss {


cd $tmp/install-chrome
wget $nssURL/$nssPackage
if [ ! -f "$nssPackage" ]; then
echo "For some reason wget didnt pull nss from Connies"
echo "slackware site"
return 1
fi
installpkg $nssPackage


rm $nssPackage


}


function installchrome {


cd $tmp/install-chrome
wget http://dl.google.com/linux/deb/dists/stable/main/binary-i386/Packages.gz
gunzip Packages.gz
rm -f Packages.gz
IFS='
'


declare -a fn=( `grep 'Filename:' Packages` ) # assign grep output to a variable
for i in 0 $((${#fn[@]} - 1))
do
fn[$i]=$(trim "${fn[$i]#*:}")
done


chromeFilename="${fn[$release]}"
chromePackage="${chromeFilename##*/}"


wget $chromeURL$chromeFilename


if [ ! -f "$chromePackage" ]; then # quit running if wget failed
echo "Something went wrong while retrieving" # and kick out a sane error msg
echo "Google Chrome"
return 1
fi


echo "Unpacking the deb file"
ar -x $tmp/install-chrome/$chromePackage


if [ ! -f "data.tar.lzma" ]; then # quit running if ar failed
echo "Something went wrong while unpacking" # and kick out a sane error msg
echo "the .deb file"
return 1
fi


echo "Extracting Google Chrome"
lzma -d data.tar.lzma
if [ ! -f "data.tar" ]; then # quit running if lzma failed
echo "Something went wrong while extracting" # and kick out a sane error msg
echo "Google Chrome"
return 1
fi


cd /
echo "Installing Google Chrome"


tar xf $tmp/install-chrome/data.tar
if [ ! -f "/opt/google/chrome/google-chrome" ]; then # let me know if chrome wasn't
echo "Installation failed while moving files" # installed correctly
echo ""
return 1
fi
echo "Installation Complete!"


}


function main {
echo
echo "WARNING WARNING WARNING WARNING WARNING"
echo "This script may severely damage your system"
echo "Dont say I didnt WARN you"
echo
echo "Are you sure you want me to Monkey with your System? [yes/no]"
echo "[for your safety you must type yes to proceed]"
echo


read YN
if [ "$YN" = "yes" ]; then
if [ -d "/opt/google/chrome" ]; then
echo "Looks like Google Chrome is already installed"
echo "Do you want to remove it and reinstall? [yes/no]"
read yn
if [ "$yn" = "yes" ]; then
rm -R /opt/google/chrome
rm /usr/share/applications/google-chrome.desktop
dotests
simlinks
installchrome
else
return
fi
else
dotests
simlinks
installchrome


fi
elif [ "$YN" = "no" ]; then
return
else
main
fi


}


main


update-chrome.sh
code:
#!/bin/bash
# Title: update-chrome
# Author: BroknDodge
# License: BSD
# Version: 0.0.1


# http://dl.google.com/linux/deb/dists/stable/main/binary-i386/Packages.gz
# http://dl.google.com/linux/deb/dists/pool/main/g/google-chrome-unstable/google-chrome-unstable_3.0.196.0-r22005_i386.deb


#----------------------------------------#
# Settings


url="http://dl.google.com/linux/deb/"
tmp="/tmp"
declare -a ChromePackages


#----------------------------------------#


#----------------------------------------#
# Testing the Environment


if [ $UID != 0 ];then # test for root
echo "You must run this script as root."
exit 0
fi


if [ ! -d "$tmp/update-chrome" ]; then
# Will enter here if dir doesn't exist
mkdir $tmp/update-chrome
fi


cd $tmp/update-chrome


if [ -f "Packages" ]; then
#checking to see if Packages exists
mv Packages Packages.installed
fi


#----------------------------------------#


function check-update {
wget http://dl.google.com/linux/deb/dists/stable/main/binary-i386/Packages.gz
gunzip Packages.gz


if [ ! -f "Packages.installed" ]; then
update
fi


IFS='
'
declare -a version=( `grep 'Version:' Packages` )
for i in 0 $((${#version[@]} - 1))
do
version[$i]=$(trim "${version[$i]#*:}")
done


declare -a VersionInstalled=( `grep 'Version:' Packages.installed` )
for i in 0 $((${#VersionInstalled[@]} - 1))
do
VersionInstalled[$i]=${VersionInstalled[$i]#*:}
done


if [ "$version[0]" == "$VersionInstalled[0]" ]; then
echo Google Chrome is Up to Date
rm Packages
return
else
echo $VersionInstalled[0] is installed, but $version[0] is available
echo Updating
update
fi


}


function update {
IFS='
'


declare -a fn=( `grep 'Filename:' Packages` ) # assign grep output to a variable
for i in 0 $((${#fn[@]} - 1))
do
fn[$i]=$(trim "${fn[$i]#*:}")
done


filename="${fn[0]}"


mkdir tmp
cd tmp
wget $url$filename


rm -R /opt/google/chrome # get rid of the previous install
# don't worry settings are stored in $HOME dir
cd $tmp/update-chrome/tmp


echo Unpacking the deb file...
ar -x ${filename##*/}
echo Extracting Google Chrome...
lzma -d data.tar.lzma
cd /
echo Updating Google Chrome...


tar xf $tmp/update-chrome/tmp/data.tar
cd $tmp/update-chrome
mv Packages Packages.installed
declare -a VersionInstalled=( `grep 'Version:' Packages.installed` )
for i in 0 $((${#VersionInstalled[@]} - 1))
do
echo ${VersionInstalled[$i]}
VersionInstalled[$i]=$(trim "${VersionInstalled[$i]#*:}")
echo "${VersionInstalled[$i]}"
done


echo "Google Chrome updated to version" ${VersionInstalled[0]}
rm -R tmp


return
}




function trim() # function for trimming white space from my arrays
{
trimmed=$1
trimmed=${trimmed%% }
trimmed=${trimmed## }


echo $trimmed
}




function main {
check-update
return
}


main