Archive for category Operating Systems

NTLDR Missing – Fix

Last night I had a Windows 2003 web server become compromised. It appears the attacker deleted the boot.ini / NTLDR files to prevent the system from starting up. The problem was a little tricky to troubleshoot, but with the right tools I was able to resolve the issue relatively quickly. Incase anyone runs into the same problems below are a good set of steps to troubleshoot.

  • Test the hard drive. Often the source of a NTLDR error is simply that the files have been corrupted by a dead / dying hard drive. If this is the cause *pound head on desk*
  • To test the drive I recommend using Hiren’s BootCD. This is like the “killer appâ€? for any PC tech. It has a tool which will allow you to test any type of hard disk, and will also allow you to browse the NTFS partitions.
  • This would be a good time to copy any mission critical data off the server. Incase we’re unsuccessfully completely restoring the system you should be able to get your files off.
  • In this situation have a backup server is ideal. On backup server running Windows 2003, search for ntldr / ntdetect.com. Copy these to a floppy disk and move them to the root partition of your server using the Hiren’s BootCD
  • Now create a file called boot.ini with the following information in it, and move it to the root partition of the down server.

  • [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS

    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows Server 2003, Standard" /fastdetect

  • You should be able to reboot and the system will come back online as if nothing happened. At least that is how things went more me. Feel free to add comments about your experiences.
  • I believe I dodged a bullet here. The web server was still had all the site files, and all the data. The individual beyond this could have easy do more damage then they did.

    No Comments

    Vista Could Ship Earlier Than Expected

    UltimaGuy writes “With speculation of a ship date for Windows Vista ranging in the second part of 2006, word has surprisingly surfaced that it can be expected much earlier. BusinessWeek has received a copy of the internal blog of Chris Jones, who is a top Windows executive. The blog states that the code for Windows Vista will be completed by August 31, giving Microsoft the opportunity to place Vista on PCs for the 2006 Christmas season.”

    Sounds like there will be a huge increase in the number of computer sales for next christmas. If you want to run this new OS you’ll definately need a fast computer. According to eWeek – “Not all PCs will gain a full view of Windows Vista.”

    Although Microsoft has yet to finalize the minmum requirements, the OS will prefer high-end equipment for showing true colors. One of the biggest areas will be the graphics cards. Microsoft has already shown concern that some mobile computers, which tend to fall behind in graphics processing, will likely need to be upgraded or replaced. Microsoft has already said 128MB or 256MB will be enough system memory to run the new operating system, but recommended users leave room to upgrade their graphics card. Its likely computers running “Integrated Graphics” will need to use a legacy mode to operate. A final quote from Microsoft “As graphics support is still being finalized, customers who plan to purchase new PCs should consider specifying graphics cards with AGP or PCI Express interfaces, which are most easily upgraded.”

    As an system / network administrator I would love to see a “cut-down” version of the operating system. Most of the people in our office only use a small group of applications. We already change users to a basic Windows look. The extra graphics really only hurt productivity. If they want a “pretty” version of windows for home users, then only sell it to home users. A workstation shouldn’t look like it was designed by a 12 year old with crayons.

    No Comments

    HotSpot Solution NoCat

    After evaluating a number of products I found NoCat to be the best open source solution for building hot spots. We aren’t an ISP, but we often host seminars where techie clients need Internet access. To effectively isolate that traffic from our network we created a separate link off our head-end router, and connected it to a vanilla PC running NoCat + Redhat 9.0. Another advantage is advertising; we wanted to let everyone know who is providing this great service. NoCat lets you force users to read a disclaimer before they can access the Internet. This helps protect us legally, and ensures clients will see our logo every day.

    SPECS
    Compaq Desktop
    300MHz 64MB RAM
    10GB Hard Drive
    2 x Netgear FA311 NIC’s

    INSTALL
    Before installing NoCat we setup a DHCP server on the router. It turns out the installation for the DHCP server was more complicated then the hotspot! The process was very smooth and refined. These guys make it easy to quickly bring up a hotspot. The configuration was created automatically during installation. Because we run a cluster of access points we decided to just run two network cards, and do basically routing on the machine, if you only want one access point you can configure it with a wireless network card. We then connected three access point to a switch network behind the new “hotspot router� and everything worked prefect. As always we created some basic scripts to automatically start the services after a reboot and manage the servers log files since this was going to be an unmanaged solution.

    TESTING
    It worked exactly as expected. We configured the software to store users MAC addresses for 24 hours. Afterward the user would be forced to reread our splash page. The solution has been running for a full year now, and we’ve had no complaints.

    CONCLUSION
    We’d recommend this solution to anyone who is looking to launch a hotspot. The process is simple from beginning to end. All you need to do is install a vanilla version of your favorite Linux distribution, setup DHCP, setup NoCat, and your up and running. From the initial installation to launch the setup only took a few hours.

    No Comments

    CentOS 4.1 64-bit + CPanel

    After a horrible experience using Windows XP 64-bit, I decided to give Linux a chance to prove 64-bit technology is mature enough for production use. The server is going to be doing a “minimal� installation which should keep things fairly simple. However we’re going to install a copy of CPanel to continue to test control panels. This should add a little complexity to an otherwise vanilla installation.

    INSTALL OS
    The installation process is the same as it has always been. Things went very smooth, and it automatically dedicated my 3ware RAID controller. I am very happy with 3ware controllers because of their extensive support in Linux. For the most part we’ve standardized our office on 3ware for our RAID controller needs.

    INSTALL CPANEL
    Now things are starting to get interesting. According to the CPanel’s website they completely support 64-bit CentOS 4.1. Right…

    FAIL
    Support and work-out-of-the-box are two completely different things. It turns out there are a number of issues between dependences which cause specific pages from working in 64-bit. The only solution at this point is to remove the RPM’s which conflict and move on without them. The simple fix worked and we’re back in business. The RPM which conflicts was something which we didn’t need anyway… Stupid eh?

    TESTING
    Now that we have it up and running everything seems extremely quick! We’ve added a group of test domains to the server to get an idea how it will hold up on a mild load. Everything seems to work perfectly. We’ve used only small personal sites to test, but for the most part everything has been smooth sailing once we fixed the 64-bit RPM issue.

    SUMMARY
    It’s my opinion that Linux + 64-bit is here. Obviously some software has some catching up to do, but for a most the simple tasks a Linux server does 64-bit is a viable solution. With the prices on AMD64 chips fairly low it makes a great value server. I would recommend one of these chips to anyone looking for a high performance server, but unable to afford the traditional Xeon-class chips.

    1 Comment

    Log File UNIX Commands

    One of the biggest parts of my job is managing website log files. Our business is very “marketing-centric�, so missing log file data isn’t expectable. There have been a few situations were log files have been split or broken. Below are three nice little commands which have helped tremendously.

    Removes all log files with no data
    find /home/httpd/logs -size 0 -type f -print0 | xargs -0 rm –f
    This is a simple little command which helps keep things neat and organized. Once files rotate I’ve found a bunch of empty files on the folder. This really confuses some of the marketing people.

    Converts log files extention into logical month.
    for i in `dir /home/httpd/logs/*-access_log.1|sed s/\.1$//`; do mv $i.1 $i.feb; done
    A little more complicated. Again, the overall goal here is to make the log files more friendly for marketing people connecting into the FTP server. I am converting the *.1 extension file created by the log rotate into *.month. I use this single line to change the extension on 300+ files. Works fantastic!

    Combines log files with extentions .1.1 -> .1 and creates a new logical month.
    for i in `dir /home/httpd/logs/*-access_log.1|sed s/\.1$//`; do cat $i.1.1 $i.1 >$i.mar; done
    Here is the big daddy. One month because of a mistake the log files rotated mid-month. This would have been a nightmare to manually concatenate each file. This script above takes the files and combines them. Try to do this in windows!

    For the most part I’ve learned to hate access logs. They are a big, always changes, difficult to backup, and from a technical perspective somewhat useless. These little few commands above however make life a little easier.

    1 Comment

    Why I love Linux

    Airport Blue Screen of Death

    Enf’said.

    No Comments

    Control Panels and why they suck

    Over the weekend it appears my “play” FreeBSD / CPanel server decided it no longer wanted to “play”. Although it can still serve up webpage’s, it appears to have lost most of its shared libraries (breaking MySQL / CPanel). Rather then try and restore the machine I am just moving everything over to our core web server. It makes sense to keep everything in one place, right?

    This experience as taught me a very important lesson; although I know how to use FreeBSD it doesn’t makes sense to use it in a production environment until I really know it. With Linux I would have been able to get things running again much faster. In this odd situation I decided to call my CPanel vendor to see if they would be able to provide any insight. They were extremely helpful, but had limited experience with FreeBSD. Again a lot of pain could have been avoided had I just used Linux.

    I have most of the websites and databases moved over to another server, but right now I am trying to resolve to e-mail issue. CPanel handles e-mail differently then our current mail solution. If I want to completely cut out the CPanel server I’ll need contact people. I’ll probably post my experience making that switch over later. Talking to people sucks.

    CONCLUSION

    I’ve been playing with control panels for a about a year now, the idea sounds great, but implementing them effectively is another story all together. By giving end-users access to system resources you open up a bunch of stability issues. After careful consideration, the benefits of control panels simply don’t out weight the security / stability of keeping a tight lockdown.

    Then again, maybe I’m just bitter because mine crashed and burned.

    No Comments

    OpenBSD 3.7 – Project Avatar

    Approximately one week ago I was given an assignment to create a new dedicated server for a client. This would not be worth discussing in any normal situation, but as usual around here, this was a far from a normal situation. The client, who will remain nameless, wanted to host an advertisement splash page for an e-mail marketing campaign. Starting yesterday, they are planning to send out 60 million e-mails. To compound the matter I had no budget and three days to develop a robust, reliable solution. Needless to say I was concerned.

    OpenBSD Logo

    THE SOLUTION

    OpenBSD has long been a pillar of security and reliability in the IT community. Until now I have never needed to use it. I have had experience with FreeBSD, and of course extensive experience with Linux. OpenBSD has always been on my list of exciting projects, but I have never had the opportunity to install it. With no hardware firewall, pissing off 60 million people requires a fairly secure operating system. Also, with little time to secure the server, I wanted a solution which was relatively safe out of the box. Below is the specific equipment

    Dell OmniPlex GXPro
    Intel Pentium Pro 200Mhz
    256MB RAM
    4GB Hard Drive

    Yes that’s right, 60 million people are going to hit my old Pentium Pro. This might seem a little odd with the abundance of cheap equipment available. Frankly, I wouldn’t trust this project with anything else. This old workstation (around the office referred to as Old-Deller) is solid as a rock. Beside, it’s only going to be handing out two pages of static content. What could possibly go wrong?

    I’ll admit the initial installation was a bit intimidating. Any time the install software recommends a calculator, you should be concerned. After some research I found a very helpful setup guide. I did not follow this exactly, but it helped me get past some of the initial sticky points, and gave me some helpful tips. If you’re going to install OpenBSD for the first time I recommend you read this guide.

    Although the jury is still out, for now I can say this operating system truly rocks. Its fairly light weight so nothing get installed which you don’t need. If you like FreeBSD / Linux I recommend giving OpenBSD a try. It makes a prefect secure web server, firewall, or just about anything other mindless server job.

    Below is a fairly interesting review of the latest release of OpenBSD.
    http://os.newsforge.com/article.pl?sid=05/05/20/1426216&tid=8

    No Comments