Friday, September 16, 2011

Oracle/Sun Solaris 10 u10 8/11 published

This week arrived my latest toy, a Sun Blade 1500 Sparc workstation, but when I went to install Solaris on it (came with Debian Sparc linux) I wasn't able to find th DVD. I went to the Oracle web and found a new release from August.

You can download the DVD iso for Sparc and x86 systems from this page: Solaris 10 downloads.

And here you are the 'What's new' document as pdf.

More info about this workstation later.

P.D.: I bought this machine without power supply. This can be a big problem because the Sun Blade 1500/2500 workstation series need three plugs/connectors from the power supply: an standard ATX 20 & 4 pin plugs and an special 12 pin plug for supplemental power supply. I just installed an standard ATX power supply and the machine is booting and working correctly. I have to make extensive more checks to the hardware but nothing rare is happening without this connection.

Monday, July 18, 2011

Decompressing a tar.bz2 archive

Too many time without play with Linux machines!!!!! I forget how toi decompress a tar.bz2 archive. Posted to easy find it in a future:

# tar -jxvf myfile.tar.bz2

Speeding up ssh connections/logins

Very useful is to deactivate the DNS lookups in the ssh server. Another easy modification: add one line to the /etc/ssh/sshd_config file:


  1. Type: # pico /etc/ssh/sshd_config
  2. Add the line (green bold one): 
#PermitTunnel no

UseDNS no

# no default banner path

Cobalt RaQ 4: slow slow sloooooow ftp login

Hi guys,
this week I turned on on RaQ with the old Cobalt OS with all the Zeffie's updates (New updates appeared this year). I like the fast responese of the Cobalt servers with this old Operating System and I don't need the extra capabilities of the BlueQuartz or BlueOnyx systems.

But today I started to check if I can compile the latest 2.4 kernel but when I went to some upload files to the server I could not connect to ftp. Some search of the web to found the problem, the proftp server has some features enabled in the latest version that can be deactivated for us.

To do this just add this lines (green bold ones) to the /etc/proftpd.conf file just after the first configuration lines:

ServerName                      "ProFTPD"
ServerType                      inetd
DeferWelcome                    off
DefaultServer                   on
DefaultRoot                     / admin
DefaultRoot                     ~/../.. site-adm
DefaultRoot                     ~ !site-adm

UseIPv6                                off
UseReverseDNS                   off

And add one line to the GLOBAL subsection (green bold chars):
IdentLookups                    off
   AllowAll

# Report localtime, not GMT
TimesGMT                        off

Tuesday, April 12, 2011

Adding SATA storage to a Cobalt RaQ 4

UPDATED: 2011-05-05
Partition manage with fdisk.

Nearly three months without writing anything in this blog. I did a lot of unsuccessful tests, but nothing well until this week. From the last christmas I am trying to compile the 6.5.18 CentOS kernel for the Cobalt servers. I have a valid patch but the resulting rpm package is bigger than 30MB. I will check this before put on a server. I'm using a Sun LX50 with the latest BlueOnyx for this job.

But last week a new VIA chipset SATA card arrived and yesterday I did a new test. I had a lot of problems with my previous SIL3112 card, it was recognized but the hard disk was not. I tested various hd's and some of them were recognized but never with a good stability.




For this test I used my backup server, a RaQ 4i with a 80GB hd for boot the machine and a WD Raptor SATA 150GB as additional storage. It's a 10k disk but I don't have any other SATA hd at home with no use at the moment. This machine was instaled with a fully updated Strongbolt OS, with the 2.6.20 kernel from OSOffice.

The first part of the test was to install the latest kernel I published: 2.6.9-89.0.23-cobalt. Wow, near one year ago! I have o compile a new one...

With this kernel the SATA card and hard disk was correctly recognized as you can see in the next capture of the hardware information page.

This was the easy part. To use this hard disk as storage for BlueQuartz we need to move our /home partition to it. Here you can see how the first hard disk was before any change:


Now the not easy part:
  • Login to the server as root.
  • Check if the hard disk appears on fdisk. As you can see it was formatted with NTFS:
[root@cobalt ~]# fidsk -l
Disk /dev/hda: 80.0 GB, 80026361856 bytes




255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1         250     2008093+  83  Linux
/dev/hda2             251         500     2008125   83  Linux
/dev/hda3             501         625     1004062+  82  Linux swap
/dev/hda4             626        9729    73127880    5  Extended
/dev/hda5             626         875     2008093+  83  Linux
/dev/hda6             876        9729    71119723+  83  Linux
Disk /dev/sda: 150.0 GB, 150039945216 bytes
255 heads, 63 sectors/track, 18241 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1       18242   146521088    7  HPFS/NTFS
  •  Start fdisk:
[root@cobalt ~]# fdisk /dev/sda1
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

The number of cylinders for this disk is set to 18241.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
  • Create a new DOS label. Im not sure if in my cas was needed because the hard disk had one but... Use the 'o' command
Command (m for help):o
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

The number of cylinders for this disk is set to 18241.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
  • As you can see above fdisk reported an error reading the partition table but nothis was wrong here.
  • Delete existent partitions (if necessary) and create the new one and then change the system disk ID:
# fdisk /dev/sda1
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

The number of cylinders for this disk is set to 18241.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): d
No partition is defined yet!

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-18241, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-18241, default 18241):
Using default value 18241

Command (m for help): t
Selected partition 1
Hex code (type L to list codes):83

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
  • Here I rebooted the server.
  • Create the ext3 filesystem: # mkfs.ext3 /dev/sda1
  • Now we need to mount the new hard disk to a temporary folder:
# mkdir /tmpmnt
# mount /dev/sda1 /tmpmnt
  • Copy all files from /home to /tmpmnt: # cp -axv /home/* /tmpmnt
  • Unmount the new hard disk: # umount /tmpmnt
  • Create a backup of the old /home partition (I was not able to do that part last time because an error message: Files in use):
# mkdir /oldhome
# mv /home /oldhome

# mkdir /home
# mount -t ext3 /dev/sda1 /home
  • Now we have to modify the /etc/fstab file to make the new partition automount at boot time. Just change hda6 to sda1. My file is this:
  • And the last part is to reboot!!!!!! Here you can see the result, a near 150GB home partition in a SATA hard disk!


Now it's time to check if everithing is OK, a will boot up the server in a week or two and see what happens in a 24/7 work.

IMPORTANT NOTE: During these test I found some problems with fdisk. IF fdisk returns a WARNING when you type the command 'w' (write), usually the hard disk partition is not stored on the hard disk. This is the message
WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table
The new table will be used at the next reboot.
I had this problem until I was able to delete the NTFS partition with FDSIK (the firsts attempts fdisk didn't show the old partition table). Then you can check the results:
# fdisk -l

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 250 2008093+ 83 Linux
/dev/hda2 251 500 2008125 83 Linux
/dev/hda3 501 625 1004062+ 82 Linux swap
/dev/hda4 626 9729 73127880 5 Extended
/dev/hda5 626 875 2008093+ 83 Linux
/dev/hda6 876 9729 71119723+ 83 Linux

Disk /dev/sda: 150.0 GB, 150039945216 bytes
255 heads, 63 sectors/track, 18241 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 18241 146520801 83 Linux

Friday, January 21, 2011

Do you know XMing?

Sometime ago I was thinking to buy a Sun Sparc workstation. I always liked the Sun Blade 1000/2000 series but the last year the prices of Blade 1500/2500 were going down. Now you can buy a Sun Blade 2500 very cheap.

But before buy a new machine -and look for space at home- I decided to play a little more with my Sun Fire V120. I have a PGX32 VGA card for it and changued the fans for a new low noise ones but what I wanted to do is to connect to the server with an X server.

A quick search in the web and I found an small list of X servers for Windows (I have Vista on my laptop), most of them paid systems with a lot of functions. One of them is free: XMing. This is a very little tool but very useful. Just install XMing on your Window machine and you can connect to the server. More info here.

I didn't need any special cofiguration n the V120: it was reinstalled with the latest Sun Solaris -sorry, Oracle Solaris now- at the end of 2010 and nothing more was done.

The process of open a new connection is very easy:

 - Start XLaunch. At the first screen I choose 'One Window'. The display number must be 10.

  - At the second screen select 'Open session via XDMCP'.

 The next step is to indicate the server address. Type the ip address of  the server or select "Search" if you only have one.

  - I leave the "additional parameters" values as default.

  - Now you can save the configuration in a file to reuse it (I saved it on the desktop to use as a fast link).

And here you are my Solaris login screen on my laptop

This is not a fast way to work with an Sparc workstation but it's enough to play with Java desktop or CDE:

Wednesday, January 19, 2011

How to enable AWStats on Strongbolt

Today I started to play with my backup RaQ 4 server. It's loaded with Strongbolt and looking at the hard disk I found that AWStats is installed by default but pointing a web browser to www.myaddress.net/awstats only gave me an small box asking for a user and password but never I was able to log in.

I remembered there is a post in the Strongbolt forums but with no good solution. A new search and I found this on the closed Nuonce Forums. In fact Strongbolt has AWStats installed but is missing one perl library that is needed to authenticate users in the systems: perl-suidperl.

Just need to install this library and then you can log with the vsite admin password:
[root@web etc]# yum install perl-suidperl

Setting up Install Process
Setting up repositories
update        100% =========================    951 B 00:00
BlueQuartz 100% =========================    951 B 00:00
base           100% =========================   1.1 kB 00:00
addons       100% =========================    951 B 00:00
extras         100% =========================   1.1 kB 00:00
Reading repository metadata in from local files
Excluding Packages from CentOS-4 - Updates
Finished
Excluding Packages from CentOS-4 - Base
Finished
Excluding Packages from CentOS-4 - Addons
Finished
Excluding Packages from CentOS-4 - Extras
Finished
Parsing package install arguments
Resolving Dependencies
> Populating transaction set with selected packages. Please wait.
> Downloading header for perl-suidperl to pack into transaction set.
perl-suidperl-5.8.5-53.el    100% =========================    20 kB 00:00
> Package perl-suidperl.i386 3:5.8.5-53.el4 set to be updated
> Running transaction check

Dependencies Resolved

================================================================
Package                Arch            Version              Repository                 Size
================================================================
Installing:
 perl-suidperl         i386             3:5.8.5-53.el4    update                       112 k

Transaction Summary
================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 112 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): perl-suidperl-5.8.    100% =========================     112 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: perl-suidperl ######################### [1/1]

Installed: perl-suidperl.i386 3:5.8.5-53.el4
Complete!
[root@web etc]#
Remeber that lo log in the Statistics page tou need the vsite admin usr and password, not the server admin password!