Showing posts with label solaris. Show all posts
Showing posts with label solaris. Show all posts

Tuesday, February 24, 2009

Man page reading tip

I usually keep my ssh windows pretty small, but it makes them a pain to read man pages. The way I read man pages now is using Google and finding man pages posted online. That way, it's as easy as reading any other web page.

For Linux, I use the search string (minus the quotes) "man linux command", and it usually pulls up the appropriate man page on http://linux.die.net.

For Solaris, I'll use the search string (minus the quotes) "man sunos command", since the syntax or switches of the Solaris command may be slightly different than the Linux one.

Another bonus is that commands and configurations in the "SEE ALSO" section are usually hyperlinked to the corresponding web entry. There are probably browser plugins or toolbars that will accomplish the same thing, but this is universal and lightweight.

Monday, January 12, 2009

Deleting a Solaris RAID created with Volume Manager

It seems most of my "howto" posts recently have been Solaris related. The main reason for that is that my Solaris admin knowledge is weak, requiring me to look up Solaris-specifc tasks. And when I learn how to do something, I like to share with others the answer, just in case they didn't either.

We have a Solaris 10 host in the lab that we do software tests on, and I somehow have been tapped to admin and be in charge of its OS. The production hosts we create for clients use RAID-1 with two disks, so the orignal install steps specified using the Sun Volume Manager using the different "meta" commands (metadb, metainit, metattach). Without much warning, they've gone and changed the install steps to use the simpler "raidctl" command. My problem now is that I have to reinstall the lab test host, and setting up the RAID with raidctl. However, I have no idea how to delete the previous RAID configuration. Thankfully, I came across this. It appears all I had to do was run "metaclear -a".

Tuesday, January 6, 2009

My take on "Which Unix to learn"

I came across this post on TaoSecurity today, with Richard Bejtlich's suggestions for an "Introduction to Unix." Like text editors, the discussion about which distribution of Unix to learn can be considered a "religious" argument. If you're a regular reader of his blog, it's no surprise he suggests FreeBSD. He does clarify and say if you're running a server, he suggests FreeBSD; and if you're running a desktop, he now prefers Ubuntu. And if you're still adamant about running Linux as a server, he suggests Debian.

My opinion differs, depending mainly on "why do you want to learn Unix?" If the answer is related to increasing your work/resume skill sets, I would have to disagree about using FreeBSD or any of its other BSD derivatives (Net, Open, etc.). In my experiences of being an admin or some other support role, I have yet to encounter a *BSD server. I'd encourage someone to use a distribution that they would encounter in a corporate environment. The Unix server OS's I've had to support have been Red Hat (now Fedora), Red Hat Enterprise Linux (also known as RHEL), and Sun Solaris. To avoid having to pay licensing fees, you could substitute CentOS for RHEL.

If I were asked the question, I would suggest a "major" Linux distribution or Solaris/Open Solaris instead. I would think their device names, software packages, and file system organization would help with familiarity when trying to translate the knowledge learned to a corporate environment. Although this may be an unfounded opinion, I also think that there are more support options and supported software using them, rather than using *BSD. I do agree with Bejtlich that if you want to run a Unix distribution on the desktop, to stick with Ubuntu, since it seems to "just work" when installed and there are less configuration headaches. Or you can just use a Mac if you want a Unix desktop (troll... and yes Mac could be considered a BSD variant).

Monday, November 3, 2008

Should you learn vi?

There are so many arguments about which editor to use. Some people are quite passionate about their editor of choice. I came across this blog post today through Planet SysAdmin discussing why one person uses vi for system administration.

http://utcc.utoronto.ca/~cks/space/blog/sysadmin/WhyViForSysadmins

It pretty much sums up why it was stronly suggested to me to use vi at the beginning of my career. At that time, I only knew pico and a few commands in emacs; although now, I couldn't tell you how to edit a file in either. Over the years I've noticed the author's point is true. Almost any unix type system you encounter, it will have at least vi installed. It's definitely handy to have a basic proficiency with vi if you do any command line *NIX administration.

So, while you get your caffeine fix at work, this could come in handy as well.

http://www.thinkgeek.com/homeoffice/mugs/7bbe/

Friday, October 31, 2008

Howto Quickly wipe a disk in Solaris

I've had to wipe disks in Solaris because of re-installs or other reconfiguration. I was disappointed that using "format" would take hours. Obviously I'm using the wrong tool.

I came across this thread.

http://www.linuxquestions.org/questions/solaris-opensolaris-20/quick-format-a-hard-drive-496294/

It's strange, but I'm noticing people are posting Solaris questions on a Linux website. I wonder how Solaris admins would've felt 10 years ago if people were posting Linux questions on a Solaris site or Usenet group. But, I digress.

The response is to use "newfs" instead of "format", and it seems to work so far. Thankfully, I learn something new every day.

Tuesday, October 14, 2008

Using fvwm2 on Solaris 10

Since I don't like CDE, and the Java Desktop runs painfully slow and looks ugly on my Ultra5; I decided to install fvwm2. I found this site that makes adding fvwm2 fairly painless.

http://www.tiem.utk.edu/~peek/solaris/

Firefox still runs in it, but looks ugly because of the lack of colors. I thought I could get 16bit colors, but I haven't figured it out yet.

I'm debating making it a lab Jumpstart server since it has a 40GB drive. You could argue that I should junk my Ultra5 and it's just a waste of time. It's definitely not worth running as a workstation, since I can easily run VMware Server on my laptop if I want a Unix OS.

Tuesday, October 7, 2008

Segmentation faults when formatting a disk in Solaris

I've had an old Sun Ultra 5 under my desk since I've started at the current job. Instead of keeping it as my footstool, I decided to fire it up and see what happens. Needless to say, this has been a timesuck. I could go into all the details and other mistakes on my part, but it isn't very interesting.

What I didn't know would be a problem was trying to install Solaris 10 after I had impatiently installed NetBSD. Apparently the Solaris installer doesn't know how to recognize the disk formatted by NetBSD. When running "format", it just segfaults and dumps core.

After some Google searches, I came up on this thread.

http://groups.google.com/group/comp.unix.solaris/browse_thread/thread/8107078ff8e2174d?pli=1

after running

dd if=/dev/zero of=/dev/rdsk/c0t0d0s0 bs=512 count=4

I was able to run format on the disk, and run the Solaris 10 install.

Wednesday, October 1, 2008

Solaris Jumpstart server interference

I've been working on trying to install Solaris 10 via DVD and "boot cdrom" on a host in the lab. I've been wondering why the install keeps assigning it an IP address and hostname without me supplying one. Even after running "sys-unconfig", I was never prompted to put in a new IP address or hostname.

The problem was our Jumpstart server. We had jumpstarted this host in the past, testing some automation installs, and the server still had an entry in the ethers file. Apparently when the server starts up, it tries to be slick and configure its interfaces for you when it boots. It looks like the Jumpstart server was picking up the requests and saw it had a matching MAC address in its configuration. The Jumpstart server then passed the hostname and IP address to the server I was trying to install. After we shut down the Jumpstart server, the sys-unconfig worked as expected. I wish the "discovery of network card settings" was not the default behavior.

Wednesday, September 24, 2008

Sudo not included in default Solaris 10 installs

To my surprise, my "default installation" of Solaris 10 that seems to install every known package in the world (who needs Firefox on a server?!?!) does not include "sudo." Apparently, it's on the Companion DVD or available for download from

http://www.sun.com/software/solaris/freeware/

There are also a couple interesting twists with the default package install. One is that the package is installed in /opt/sfw. This includes the sudoers file, which is located and read from /opt/sfw/etc/. In my opinion, this is a pain, because it doesn't put sudo or visudo in the normal default $PATH=/usr/bin:/usr/sbin:/bin:/sbin. I ended up creating symlinks for /etc/sudoers, /usr/bin/sudo, and /usr/sbin/visudo to the appropriate locations in /opt/sfw.

Another strange twist is that after the install, you need to chmod the sudo command with "chmod 4111 sudo" because Solaris doesn't inherently trust the package and it's files. This is another annoyance, since obviously anyone installing sudo had to take extra steps to do so in the first place and obviously already trusts its integrity.

Chalk up another reason why I like Linux over Solaris.