February 2009 Archives

Boot Loader Polka

Last month I tried unsuccessfully to setup GRUB on my shiny new Slamd64 box. As most devout slackware users will attest, LILO works just fine and is the default bootloader on the Slackware distro. The only reason I decided to delve into GRUB was Dann Washko of TLLTS, and also the fact I'm insanely curious. I'm of the opinion that you never stop learning, so I set out to begin preparing for a GRUB install.

As stated previously, GRUB is not the default bootloader for Slackware, but you can obtain it within /extra on any Slackware mirror. So, once I finished my slamd64 install I chose not to setup LILO configuration. I knew that I could always boot from my install CD and drop down into telinit 1 (single user), so that I could fix things if stuff broke.

As luck would have it, I was not able to get beyond stage 1.5, as the bootloader would dump me into the GRUB shell. Not so bad I thought. The dreaded error 28 - not enough memory to perform this function. Since this box has 4GB of RAM, I was somewhat confused as to why I was getting this error. After poking around and several reboots, I decided to re-install GRUB.

Actually, I began to get a different error after re-installing GRUB. This time Error 15 and it would just hang the system. Quite annoying. I spent a fair amount of time trolling #grub, #slamd64, and of course #lottalinuxlinks. Interestingly, some of the people forewarned me about grub on a 64bit platform. I was even advised to use grub2. Of course grub2 is not yet available slackware-current or any slamd64 repositories. In general, it does seem that grub is not the bootloader of choice for many slackware users. After this experience I can understand why ;-)

Finally, I booted with the slamd64 install CD and was able to get into single-user mode and then discovered that the root partition was thoroughly munged and could not be mounted without my intervention. Apparently the superblock had become corrupted, and could not be read. It is likely that I created this condition while repeatedly removing/installing grub on the MBR. Who knows the root cause (no pun intended). All I know is that I never had this sort of problem with trusty and well understood LILO. I don't care how outdated it is or its limitations. It just works when you install it. It was funny to read the comments in IRC as I was learning about GRUB. Of course, I had to setup chroot environment so that I could modify the appropriate partitions, which were obviously not mounted by the install CD. The rootfs of the install CD certainly was not area of focus here ;-) Hence chroot was required. Well beyond what grandma moses or the average user would be doing..

Back to those IRC comments -- Stuff like "Wow, do you really need to do this with a modern OS?" Yes, I am a glutton for punishment, but at the end of the day I am not a masochist. The whole point of installing grub was to learn about a new bootloader. Nothing more, nothing less. I suppose the corrupted superblock spoiled my interest in going any further.
Try as I might, I was not able to recover all of the missing superblocks. I tried '/sbin/dumpe2fs /dev/sda3', so that I could actually see the missing superblocks and the associated inode allocations. For those who run other OSes.. Think of corrupt superblock as a badly fragmented filesystem on a hard disk. Every OS offers tools to defrag a disk, well Linux offers several fairly robust tools. e2progs is one of the more complete set of tools. I was able to confirm the block size of the inode 'tune2fs -l /dev/sda3'
Another nifty trick was to backing up all of the pertinent missing superblocks temp file. Running '/sbin/mkfs.ext2 /tmp/foo' essentially backed up superblocks to a temp file called foo. For the experienced Linux user, you'll wonder why ext2fs is used in this instance, as it turns out I'm actually using ext3 filesystem, but it makes no difference.
Unfortunately, running 'e2fsck -y -b ' didn't yield favorable results. The '-y' switch was particularly helpful though, as it simply spared me from having to acknowledge the e2fsck script by pressing y after each superblock was identified and repaired. After all I had at least 20 missing superblocks. I eventually cried uncle and re-installed slamd64 and setup LILO as I should have done in the first place :-)

All works well now, and I cannot honestly blame grub for the problems. However, I suppose that I confirmed the old adage, if it ain't broke don't fix it.

links for 2009-02-16

links for 2009-02-12

Promise NS4300N - Inexpensive NAS

I do not typically crack under peer pressure, but I was talking to friend last Summer. He and I were lamenting on our inability to store the ever growing digital content in our private lives. Why the sheer size of the video files that you store from your favorite bittorrent client can be enormous. Not to mention the frightening prospect of hard disk failure. Though, the cost of modest hard drive is roughly $0.10 - $0.50 cents per GB, the cost of NAS is still not available at commodity pricing.

He mentioned that he'd purchased a device from Fry's at a price point of $299. Yes, the price was tempting enough, but what sold me on the NS4300N was the fact that it ran a customized Linux kernel under the hood. The heavy lifting is handled by open or well understood protocols NFS, FTP, SMB, and rsync. Additionally it is capable of RAID 1, 5 and 10. Regardless of the temptation, I was really torn between building my own Linux RAID box and deploying software RAID and taking the lazy route (ie turn-key) and purchasing a box like the NS4300N.

I spent time perusing the local LUG mailing list and most folks warned me against a pure hardware RAID solution, as you become beholden to a hardware OEM. I suppose their warnings fell upon deaf ears because I decided that saving a few hours was more valuable than freedom. Geez, did I just say thought? RMS and Eben Moglen would not be happy ;) Strike One.

So, I did a few hustles and saved up enough loot to purchase four 1TB Samsung SATA drives.
Once I finally got time to setup the box, I discovered two critical gotchas.

As trivial as it sounds the plastic carrier trays should have directional arrows on them. Took me about 5 - 10min to figure out how the HD should be installed in the orange carrier trays.
Secondly, the most annoying gotcha is the fact that Promise forces you to use Windows to setup the NS4300N. Huh? Maybe I missed something, I thought it was running a Linux kernel under a thin layer open protocols? Why on Earth would you force me to use a proprietary OS to run an install program? Surely, there must be simple install scripts that you could place on CD.

This is the age old problem that I have I ranted about here in previous entries. Because the GPL v2 is fairly liberal (certainly not as liberal as BSD licenses), companies have been able to skate by and essentially disregard Linux desktop users. The irony is that the device would be virtually useless and certainly much more expensive if they were not using Linux kernel under the hood. Some folks would call this Tivoization.

I suppose this is the price you pay if you want turn-key. Promise offers no "official" means of accessing the root account on the box, nor do they really want you to open the device. After taking a look on back panel, I noticed it had some weird torque style fasteners. However, I have done more extensive digging and discovered that many folks have been hacking this device and adding greater value to the NS4300N. Methinks, Promise could learn a lesson from Linksys and begin to embrace the idea that people are going to create value where it didn't exist previously.

Rants aside, I was able to setup the appliance fairly easily. Although the setting up RAID 5 seemed take the better part of 1hr, to set it up and install latest firmware

After scanning the box, I discovered the following services

21/tcp open ftp
80/tcp open http
111/tcp open rpcbind
139/tcp open netbios-ssn
443/tcp open https
445/tcp open microsoft-ds
515/tcp open printer
657/tcp open unknown
658/tcp open unknown
670/tcp open unknown
1026/tcp open LSA-or-nterm
2049/tcp open nfs
MAC Address: xxxxxxx (Promise Technology)

So, you can see NFS, Samba, and https services running just to name a few. The device is also capable of serving as a print server. I understand that Promise provided telnet in earlier firmware revisions, which folks reverse engineered to access the root account. Probably the reason that service was removed in the latest firmware release. You'll also note that ssh does not appear to be running either. However, I think Promise is running a bit of obfuscation, I believe the service is probably running on a obscure port. It will eventually be discovered.

While the box is fairly capable of behaving as a backup device for my network, I will give it a thumbs down until I have sufficiently hacked it.

NFS doesn't seem to work as advertised. If I can't ssh into the box and access the CLI, then it is useless to me. IMHO, Samba is only marginally useful for an exclusive Linux environment. I don't own any windows machines. The office loaner notebook computer doesn't count. I will never understand why companies decide to dumb down technology for ease of use. I understand that Promise was responsible for many advances in RAID technology. I'm sure that some that knowledge found its way into the Linux community, but I have no idea they would be so protective of this NS4300N. The price point is excellent and quite competitive. Only problem is the execution and delivery. They've crippled the device for the sake of intellectual property which they partially own. I simply wanted a back-up device and means to gain much needed redundancy for the data on my network. I report back as I peel the onion.

Interroperability rears its ugly head

A couple weeks ago I spent time installing a new kernel and re-configuring file and print services for a pseudo-client. Samba is the always the preferred tool for getting M$ clients to play nice with *Nix machines. In this case, I was also asked to configure a Windows Vista machine for use with the file server. During this exercise, I discovered the most annoying feature of Vista. The highly irritating UAC.
Apparently it was designed to annoy you.

Perhaps the most interesting aspect of playing with Vista is that in typical fashion, with each new Windows release, common administration tools get removed or slightly modified so that they cannot be easily discovered. I probably spent 10-15 minutes looking for the application to provide me with a dos shell. For whatever reason, it Redmond engineers have decided to remove the 'run' command from Start Menu.

Not sure what benefit is gained by changing the administration interface, but I would imagine that some software focus group deemed it necessary. Anyway, after performing the ubiquitous GOOG search, I was able to figure out how to restore the 'run' command to the Start Menu. I needed this run command, so that I could launch DOS shell window. The DOS shell window is my most trusted tool when working working on network problems on M$ boxen.

I was able to ping the other machines on the network, but was not able to make this Vista notebook map shares on the Linux server. After doing a bit more digging, I discovered that Redmond engineers once again modified the security policy on their network stack. The unfortunate consequence is that Vista boxes will not communicate with common SMB protocol based machines. The oddity is SMB (aka CIFS) is a Redmond invention, go figure. on Vista. Hmmm, I wonder why they would do such a thing?

Apparently, you can modify the secpol.msc to something that samba server can understand. Modifying the registry is the only solution to this problem.

The entire evolution took much too much time. I eventually had to give the Vista machine back to its rightful owner. It is apparent that Vista was an unmitigated disaster, one need not look any further than the Windows 7 hype machine that is brewing, just 1yr after Vista launched.

Backward compatibility and playing nice with other computers on the network should be high priority for Redmond; however, the "we're open source too" rhetoric seems to much of the same ole crap from the woolly mammoth.

links for 2009-02-02

Monthly Archives


OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.25

About this Archive

This page is an archive of entries from February 2009 listed from newest to oldest.

January 2009 is the previous archive.

March 2009 is the next archive.

Find recent content on the main index or look in the archives to find all content.