rebuild
This weekend I had decided I would add another partition to my MacBook Pro, to install Windows on. I had recently started running Ubuntu as my main OS and figured it would be good to get that “other OS” on there as there always seems to be some need for it.
Kind of like the item you know is cursed in the D&D adventure but you pick it up anyway, knowing fully that the DM is going to put you in a situation where you have to use it and then *BAMF* you are the opposite gender.
I do Macs spiffy repartition at the command line and then list them out as my final setup. At this point the rugrats swarm around my legs, bite my ankles and I have to take some time out to go tie them firmly back down. Once I sit down again I back up a couple commands to list out my partitions, only I don’t hit list Instead I hit the repartition command again which goes through and Bjorks my system. I felt a million bit cry out as though they’d just been crushed. I’d just installed OSX 10.5 a week or so ago and I had a fresh backup, thus my data loss was minimal. I decided this was a good time to do the install the way I really wanted, which was a small OSX and small Win partition and big Ubuntu partition since I was using it as my main OS.
When I had finished getting this to work Kate had asked how I would relate the story to my friends at work, to which I of course replied that I would tell them “I rebuilt my system this weekend.” She pointed out that comment sounded very techy, but it didn’t relate the true story. The true story was that I spent the better part of two days going through a few FAQs on proper triple boot install procedures, to which I initially tried my own twists and ended in about three more messed up system installs. In the end on the fourth try I finally got it to work by
- Partioning my disk first ( Mac Install disk, command line, Leopard 40G – Linux 60G – Windows 50G )
- Install OSX like normal on second partition (the first is EFI)
- Add rEFIt into OSX
- Install Ubuntu on third partition.
- During Ubuntu install tell it to format the fourth partition as FAT so windows will recognize it.
- Tell it to install grub on (hda0,2) under the advanced button on the last Ubuntu screen.
- Install windows on the last partition.
I didn’t go with a swap partition in Ubuntu as I’ve got 3G of RAM and I wanted to see how well things would run without it.
In the end I my MacBook Pro is rebuilt and I’m typing this entry from Firefox under Ubuntu Gutsy. I’ve also got all the compiz goodies enabled as well as my hardware working pretty well due to these instructions.
Thanks go out to Kate for putting up with my obsessive, “this damn computer will not get the best of me”, attitude this weekend.
Time Management
Last week as my Valentine’s Day present from Kate, I had her get me a book called Time Management for System Administrators. Over the last few weeks I’ve been feeling very swamped and in order to make my day less hectic and better handle all the requests coming in I realized I needed to find some way to become better organized. I had looked over a few things before I got this book and had actually read some of it on Safari. The book itself really isn’t anything ground breaking, it does bring to light many of those things that you already know but don’t seem to want to acknowledge. One of the simplest ideas I’ve taken from the book is to write things down. Your brain thinks it’s smart and can remember everything, but it can’t, most people have a very limited amount of items they can keep in mind. So I’ve purchased a Franklin Planner and having started to write things down I’ve noticed my stress load lighten. Once I write it down I don’t always have that nagging feeling that I’m forgetting something and when I close my planner at the end of the day I know what projects I’ve pushed to the next day and I’ve recorded which ones I’ve finished. Other sections of the book I found that were helpful included documentation, when to automate, and there is even a section on managing your boss. In the beginning of the book they recommend the book for system administrators and not for programmers, I would change that to it not being recommended for programmers with one job task. If you are a programmer that is spreading yourself over multiple projects, doing maintenance as well as support this would be a great book for you too.
I’d give this book five stars and I would say the most similar book on an entirely different subject matter would be The Richest Man in Babylon.
Scripting Games
Damn I wish I’d read about this earlier. There is a Microsoft Scripting Games and this year they added a perl division. Gabe has taken over my desktop and I’ve only got one Windows server at work but it would have been fun to code up a few solutions. Right now it’s almost halfway over though and I don’t have an environment setup where I can test the stuff, I’ll have to keep my eye out for this next year.
visual bell
Having a visual bell in my terminal is my new conversation piece. It takes about 30 seconds of typing in a session before people ask me, “Why the hell is your screen doing that?”
user @INC
Add to @INC at the user level
export PERL5LIB=/usr/local/perlib/modules
Perl Cookbook (perl programmers bible)
rhel5 packages
On a default install of RHEL5 (Redhat Enterprise Linux 5) the “Office/Productivity” and “Games and Entertainment” packages are enabled. While entirely understandable that they would be there in your standard install I just find it funny these two ideas that representing polar opposites are enabled. In all truth though this is an operating system generally aimed at going on servers, so I’m not sure what either would be enabled from the get go. I think Ubuntu server handles this a bit better with the “you don’t get jack” by default install and then you add on from there.
media wiki and servers
One thing I hate is having to do something over and over again and usually my laziness gets me into doing more work up front. This afternoons project was getting my server scan to post to our wiki. Cron’d to run once a week is a nmap scan of my servers (replace your ip set for 1.2.3.4 of course)
/usr/bin/nmap -sP -oG /usr/local/perlib/sysadmin/servers.txt 1.2.3.4/24
This puts out a nicely formatted list from nmap to servers.txt. From there I wrote a piece to reformat that list into some nice MediaWiki tables and print the output. One set is IPs to Hostnames and another is Hostnames to IPs and the final table is something I slapped together so if I want I can copy and paste from the wiki page to a hosts file to resolve most of the internal IPs. Todays task was to simply add on something to push it up to our MediaWiki automatically and I first looked at the module MediaWiki but decided CMS::MediaWiki was easier and put it in there. The code can be seen here:
listing your gems
getting a list of gems becomes very important when you are running multiple servers with mongrel instances on them. Our environment I’ve been trying to go with a Beta, Stage and Prod environment for everything and Rails gets really mad when your module version doesn’t match what it expects, backwards compatibility doesn’t seem to be the rule. So I need to list out modules on each server and match them to the next server.
gem list --local
which pix is active
When you have two pixs acting in failover you can determine whom is active and whom in the failover role with:
show failover