Welcome 
to Orb Designs

Home

Graffiti

About

Sitemap

Visual

DevWork


Email Brian Bilbrey

Email Brian

GPG Key

GRAFFITI -- February 13, 2006 thru February 19, 2006

>> Link to the Current Week <<

Last Week << Mon   Tues   Wed   Thu   Fri   Sat   Sun >> Next Week


Search this site :

Welcome to Orb Graffiti, a place for me to write daily about life and computers. Contrary to popular belief, the two are not interchangeable.     About eMail - I publish email sometimes. If you send me an email and you want privacy or anonymity, please say so clearly at the beginning of your message.

Ron Paul in 2008

Creative Commons License

Read LinuxGazette, get a clue.

MONDAY    Tues    Wed    Thu    Fri    Sat    Sun   
February 13, 2006

0648 - Good morning. It's funny, isn't it, how lucky Friday the Thirteenth falls on the day before Saint Valentine's Day, no matter which day of the week that might be. It's one of those ominous foreshadowing things that good writers, and some good horror writers understand well - it's time once again for Men to be afraid. Repeat after me: "Oh, don't get me anything!" is a more heinous lie than the weatherdude telling you that tomorrow is bound to be a perfect day for a picnic. So I did the only thing I could ... I bought myself computer parts for an early Valentine's present. Then I can be so busy that it's not my fault I didn't get anything, just as she asked! Do you think that'll work? No, me neither.

Computer parts include an Asus A8N-E, an AMD64 X2 440+, a couple of gig of Crucial DDR400, a pair of WD 250G SATA-2 drives and a PNY nVidia 6600 PCIe card. All of that has Gentoo AMD64 layered on top of it. The drives are software mirrored (for boot, root and home partitions) booting using Grub. I still need to setup the fall-back kernel, but I'll document all of that here Real Soon Now. After much grief and false starts (due as much to my not having used Gentoo recently, as to trying new stuff just because) I've now got X running, XMMS playing tunes through the pre-existing Creative SBLive! card, and a couple of key applications running under Crossover Office Pro 5.0.1. I left the digital camera software a-building overnight, followed by the rest of KDE - it's all done now, and I'll integrate it tonight.

Time for work. Have a great Monday. Pictures of dogs, computers and snow tomorrow, with any luck!

Top  /  Email Brian


Mon    TUESDAY    Wed    Thu    Fri    Sat    Sun   
February 14, 2006

0646 - Good morning. Here's a few snaps from events of the last few days. Image title/alt tags tell the story. I've got to run...

The new computer, cabled and ready for electrons Snow on the deck, furniture. Snow burdens the trees
Lucy after a facial snow-scrub Molly bounding around. Snow on tree in front Moonrise through the trees

Top  /  Email Brian


Mon    Tues    WEDNESDAY    Thu    Fri    Sat    Sun   
February 15, 2006

0652 - Good morning. Eric Raymond writes about Stalinist memes in a post entitled Gramscian damage. I think it's worth reading. I want to read it again, follow up on some references, and write some more about the topic here, later.

Happy Birthday to SWMBO! As she noted in her post the other day, she really didn't want presents this time. I'm supposed to be saving up for something big and gaudy to please the magpie in her, for our tenth anniversary. Um, okay...

Here's two one-liners for burning DVD's under Linux from the command line. You'll need to have growisofs installed (generally as part of a package called dvd+rw-tools), and cdrtools (to get the mkisofs utility installed). First, when you've got a DVD-sized ISO image, and you just want it to end up on the blank DVD+R in the burner, type this:

growisofs -dvd-compat -Z /dev/dvd="<filename>"

When directory contents need burning, you can use this variant on the theme:

growisofs -dvd-compat -Z /dev/dvd -R -J "&lt;directory_name&gt;"

The quotes around the directory (or file) name are especially important if you've got spaces embedded. While that sort-of-works in some contexts, I generally find it better to name directories and files with the '_' (underbar) character in place of space characters in the strings. Then there's no quoting required to avoid confusing the shell.

Time for work. Have a great day!

Top  /  Email Brian


Mon    Tues    Wed    THURSDAY    Fri    Sat    Sun   
February 16, 2006

0658 - Good morning. So, AMD64, Gentoo, software RAID and Grub: I promised a quick walkthrough. How did I make it work? Here's a rough guide (well, not rough, but a bit ragged around the edges, although true in all respects):

I make no promises that by following the steps hereafter, your children will grow up normally, your llama farm will prosper, or that your data will survive. RAID setups only help you survive the loss of a spindle due to failure of some type. It doesn't help in the case of fire, theft or PEBKAC. RAID does not replace good backups. RAID does not replace good backups. RAID does not replace good backups. What I tell you three times is true.

I learned most of what I needed from Michael Martucci's post to the LinuxSA mailing list, back in 2003, and the HOWTO Gentoo Install on Software RAID ... document on the Gentoo-wiki. I had a couple of hitches because of the way that drives were enumerated in my system. There are two system drives, Western Digital 250G SATA-II drives (3 Gbit transfer rate), and I have an IDE NEC burner, and on installation, also a 160G IDE Seagate drive. The latter contained the data from the old system, easier to transfer from there (I thought) than to restore via rsync from the backup/server machine. The other hitch I ran into was getting confused about which Gentoo I was installing (AMD64 vs 32bit), and installing from one, but using the Stage-3 tarball from the other. Finally got it all straightened out. So here are the steps, and comments along the way:

First, after booting into the Gentoo AMD64 installation disc, I set the password and started the OpenSSH server running, so I could work from another machine, and have browser + cut and paste capabilities.

$ passwd
New UNIX password:
Retype new UNIX password:

$ /etc/init.d/sshd start
blah blah blah
blah

Using cfdisk, I setup identical partition configurations on both system drives found as /dev/sda and /dev/sdb. Here's what a partition listing from one of those looks like:

$ cfdisk -P s /dev/sda
Partition Table for /dev/sda

               First       Last
 # Type       Sector      Sector   Offset    Length   Filesystem Type (ID) Flag
-- ------- ----------- ----------- ------ ----------- -------------------- ----
 1 Primary           0      257039     63      257040 Linux raid auto (FD) None
 2 Primary      257040    39327119      0    39070080 Linux raid auto (FD) None
 3 Primary    39327120    43230914      0     3903795 Linux swap / So (82) None
 4 Primary    43230915   488392064      0   445161150 Linux raid auto (FD) None
 

Then I fired the raid1 module into the kernel and setup each of the raid partitions following the assorted directions loosely (changing targets and devices to match my setup):

$ modprobe raid1

$ mknod /dev/md0 b 9 0
$ mknod /dev/md1 b 9 1
$ mknod /dev/md2 b 9 2

$ mdadm --create /dev/md0 --level=1 \
    --raid-devices=2 /dev/sda1 /dev/sdb1
    
$ mdadm --create /dev/md1 --level=1 \
    --raid-devices=2 /dev/sda2 /dev/sdb2
    
$ mdadm --create /dev/md2 --level=1 \
    --raid-devices=2 /dev/sda4 /dev/sdb4

Then I built the filesystems appropriately for the two swap, /boot, /, and /home partitions that I just made:

$ mkswap /dev/sda3

$ swapon /dev/sda3

$ mkswap /dev/sdb3

$ swapon /dev/sdb3

$ mke2fs /dev/md0
blah blah blah
blah

$ mkreiserfs /dev/md1
blah blah blah
blah

$ mkreiserfs /dev/md2
blah blah blah
blah

During installation, I setup the /dev/mdN devices again in the target partition, once it was mounted and setup, so that I could address the partitions from within the chroot environment of the installer. In the fstab, the two swap partitions get equal priority so that they get used in a round-robin manner. It doesn't buy me much, but in the best case it behaves more like striping than setting them to different priorities. So that part of the /etc/fstab looks like this:

/dev/sda3   none   swap    sw,pri=1     0 0
/dev/sdb3   none   swap    sw,pri=1     0 0

When building your kernel, build in (or make as a module RAID1 (or whatever type of raid you're using)). Make sure to have that module included in the initrd if the latter. I much prefer building into the kernel those things needed at boot (like filesystem types, RAID capabilities, encryption, etc.)

Finally, we're at the Grub (bootloader) point in this program. Now here's where I had much grief, because even though the SATA drives were set first in boot priority in the BIOS, Grub saw the temporary IDE drive as first in chain (that is, as hd0), and meant that what I thought I was doing, wasn't working right. Once I got past that, I got everything going right enough to boot into the system, tar | tar copy the data off of the old drive, then power down and take that out of service. Then I re-did the Grub dance (as follows) and all was right with the world:

$ grub

grub> root (hd0,0)	
  Filesystem type is ext2fs, partition type 0xfd
 
grub> setup (hd0)
  blah blah blah
  blah
  
grub> root (hd1,0)	
  Filesystem type is ext2fs, partition type 0xfd
 
grub> setup (hd1)
  blah blah blah
  blah
  
grub> quit

There I've setup so that grub will boot from either drive, so that if one fails or disappears, then the other will still run. Then setup the /boot/grub/menu.lst file (aka grub.conf, depending on your distro) as you like, but with a default entry that boots to one of the two mirrored drives, and a fallback that boots to the other (following the setup we did in the previous step):

# Which listing to boot as default. 0 is the first, 1 the second etc.
default 0
# fallback to the entry for the second drive, in case the first is failed out
fallback 1
# How many seconds to wait before the default listing is booted.
timeout 10
# Nice, fat splash-image to spice things up :)
# Comment out if you don't have a graphics card installed
#splashimage=(hd1,0)/boot/grub/splash.xpm.gz

# Entry 0
title=Gentoo Linux 2.6.15-gentoo-r4 (primary)
# Partition where the kernel image (or operating system) is located
root (hd0,0)
kernel /boot/vmlinuz-2.6.15-gentoo-r4 root=/dev/md1

# Entry 1
title=Gentoo Linux 2.6.15-gentoo-r4 (secondary)
# Partition where the kernel image (or operating system) is located
root (hd1,0)
kernel /boot/vmlinuz-2.6.15-gentoo-r4 root=/dev/md1

I would suggest that if you do multiple RAID types, that you do ONLY mirroring for your boot partition. I do not believe that you can usefully do the above trick with striping (RAID0) or parity (RAID5). Grub needs contiguous data to get things going right. Save those other RAID choices for your root, home, and other partitions.

Also you'll want to install mdadm at the same time as you do your filesystem tools. While the RAID will run without it, you need mdadm for any RAID administrative tasks, and run from init.d as a monitor to keep an eye on the running system.

That's all there is to it. Please let me know if you have modifications or additions to suggest, I'll be pleased to back-post them here to make this a better reference.

Top  /  Email Brian


Mon    Tues    Wed    Thu    FRIDAY    Sat    Sun   
February 17, 2006

0640 - Good morning. First, a correction. Some (most?) DVD players happily play discs burnt with growisofs as shown above (on Wednesday). But some player software on other platforms (I'm thinking MacMini at this point) seem to really want the disc in udf format. That doesn't cause us any problems, so why not? Replace the "-R -J" with "-udf", and that does the trick, at least for me.

growisofs -dvd-compat -Z /dev/dvd -udf "&lt;directory_name&gt;"


Friday at last, and a three-day weekend coming up, too. How lovely. Oh, all the snow melted in a quick succession of days in the 50's and 60's. Now we're plummetting back into the thirties for high temperatures, with snow showers expected on Sunday and Monday. Out in California, I could start thinking about planting hardy vegetables at this time of year. I've got three months yet to wait, here. That's okay, we have indoor projects to work on. But the last working day of the week first. Have a great day!

Top  /  Email Brian


Mon    Tues    Wed    Thu    Fri    SATURDAY    Sun   
February 18, 2006

1541 - Good afternoon. Current calming listening: Bonnie Raitt. And everything's back on the rails again. Last night one of the mirror drives on Vroomfondel (the homeserver) failed for the second time in as many weeks. I'll do diagnostics on it and get the RMA process later, but I hared off this morning to pick up a replacement and get the RAID partitions rebuilt. That's done, and while I was at it I picked up a replacement Logitech MX-1000. It's a good mouse for me: Laser means high quality tracking, less surface dependent than LEDs. The size is good for my hand. But I'm tough on mices, and I'm heavily dependent on middle-button click for my overall web-experience. The middle-button click function failed on my first MX-1000 about a week ago. I swapped back to an Intellimouse explorer, but it's just not the same. So that's done, too.

I'm installing Solaris 10 x64 in VMware as we speak. Well, I think I'm installing Solaris 10. But just getting to the point in the installer where some meaningful input is required takes longer than a whole Xandros install! Ten minutes in, and I've got some text in the screen about stuff that Solaris is skipping, and a madly-blinking DVD drive. We had some redundant crap-old Sun gear at work, I could have brought some of that gear home and setup a little Solaris on Sparc lab here. But the gear weighs a bomb, and sucks a not-inconsiderable amount of juice. I logged into my account at Sun.com and pulled the latest Update install set for Solaris 10 X86/X64, assembled and burnt the DVD, and here I am. Ah, got the GUI bit configured and now the installer's running.

Tonight we're going out to the Sly Horse Tavern to celebrate Marcia's birthday again. That'll be fun. Now back to getting some of this larger data organized onto DVDs. Happy Weekend!

Top  /  Email Brian


Mon    Tues    Wed    Thu    Fri    Sat    SUNDAY  
February 19, 2006

No Post.......

Top  /  Email Brian


Last Week << Mon   Tues   Wed   Thu   Fri   Sat   Sun >> Next Week


Visit the rest of the DAYNOTES GANG, a collection of bright minds and sharp wits. Really, I don't know why they tolerate me <grin>. My personal inspiration for these pages is Dr. Jerry Pournelle. I am also indebted to Bob Thompson and Tom Syroid for their patience, guidance and feedback. Of course, I am sustained by and beholden to my lovely wife, Marcia. You can find her online too, at http://www.dutchgirl.net/. Thanks for dropping by.

All Content Copyright © 1999-2011 Brian P. Bilbrey.

Creative Commons License
Except where otherwise noted, this site is licensed under the
Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.