Linux Server Diary

The trials and tribulations of a Linux newbie trying to setup a home server.

Friday, June 27, 2008

Power Outage

A couple of weekends ago, after a day trip with the family, we came home to a dark house after a strong storm. The electricity came back a couple hours later, so I started bringing up the servers. Unfortunately, the file server wasn't cooperating.

I've written before that this server will not hold the BIOS settings through a power off - despite changing the battery. Since it can likely be fixed only by replacing the motherboard, I've decided to live with it. Unfortunately, when I brought the box up, I forgot to reset the clock back to the current, so Linux decided to force a disk check. After about 25%, it froze. I gave it half an hour before giving up and bouncing the box.

After that, when it rebooted, it couldn't find a boot disk. Arrgh!

It was a week before I came back to it.

Since it still wasn't booting, I decided to reinstall grub as I have done several times before on different machines.
sudo grub
find /boot/grub/stage1
(this will return the drive name - mine is hd0,1)
root (hd?,?) (use the drive name returned in the previous step)
setup (hd0)
quit
Surprisingly, this worked! I'm back in business.

A side note, during my down week, I found the need to recover several files from the backup server, and I'm happy to report that all were successful. It's nice to know that the restore works not only in a test, but also when it is actually needed.

Now, here's the rub. When I thought the hard drive was toast and I was going to be tasked with recovering the entire thing, I looked through the BackupPC documentation and many Google searches, but I found no examples of someone who has done that. I'm tempted to setup a test box, back it up, and then try to recover it just to see if I can. Should be a fun weekend project.

Labels: ,

Saturday, February 23, 2008

Replacing the Hard Drive

As I mentioned in the last post, I've been having troubles with the hard drive on my server. After receiving a shipment from NewEgg, I'm ready to install a new drive. I found this page from Encodable Industries the other day that outlines a way to transfer the files and boot from the new drive.
I find it disturbing that I'm sometimes ables to access the drive without difficulty. Since the new drives arrived, I haven't seen an error on the old one. I hope that the drive is problem, and not something else that will continue to bother me once the replacement is complete. We'll see.
Anyway, I connected the new drive the same way I've used a CD ROM drive in the past, making the cable connections with the drive resting on top of the opened case. Not the most elegant solution, but it works.


Next, I booted to the old drive, and ran partman to partition the drive. I wish I would have documented what commands I ran, but I can say that I ended up with a large ext3 partition and a small swap partition. Just what I needed.
Interesting note: After a power reset following the partition, the machine wouldn't boot. The reason was that the BIOS was trying the boot from the first drive found, and the new drive is slave on the first IDE interface, while the old drive is primary on the second. A quick BIOS reconfiguration took care of it.
Next, it was time to mount the new drive. As root, I created a mount point
sudo mkdir /mnt/newdrive
And added a line to fstab to make the connection:
/dev/hdb1 /mnt/newdrive ext3 defaults 0 0
Finally, I remounted all connections
sudo mount -a
With both drives connected, operational, and mounted, it's time to copy the contents from old to new. The Encodable page linked above gave me this rsync command that will do the deed:
rsync -av --delete --exclude /mnt/newdisk / /mnt/newdisk
(Several hours later)

All of the files copied to the new drive without incident. Still, I'm worried that the old drive isn't really bad, and that something else is causing the problem. Finally, after a couple more hours of accessing the drive, I finally got a failure. Time to move on.

Next, I removed the ailing drive and replaced it with the new one. To boot to a CD, I connected an old CD ROM drive where the new drive had been hanging. After a little experimentation, I found the steps I needed to get things going.
Boot to a Ubuntu 7.04 Live CD
Open a Terminal Window
Fix GRUB using the method outlined in an earlier post
Mount the new drive
sudo mkdir /mnt/hd0
cd /mnt/hd0
sudo mount -t ext3 -o defaults /dev/hdc1 /media/hd0
(use your own partition name)
Get the UUID for the main partition
CD to /dev/disk/by-uuid and find the entry
Modify menu.lst and fstab to use the correct UUID
Do the same to update the UUID for the swap partition in fstab
Reboot and enjoy the new drive

I've been using it for the past several hours without incident. I'll let things burn in for a few days before calling it done.

Next time, we install the other new drive in the backup server. Stay tuned!

Labels:

Saturday, February 16, 2008

Hard Drive Troubles

The hard drive in my server (this blog's namesake) seems to be going down for the count. It works for a while, but then gives errors and requires a power off and on to come back to life.

It is times like these where a man learns if his backup procedures are sufficient. My grade on this exercise is maybe a B-. Here's the status:

The directories setup for each member of the family, plus the one containing photos are backed up fine. I was able to grab a second copy of all of this from the ailing disk that I put on some spare desktop space. This is the stuff that would be difficult to replace (although all of the photos - save the past month - are also backed up to DVD and stored offsite).

Our music files, some 15GB, are not included in the nightly backup because of disk space reasons. Most of the files that I've put there are backed up at work. Many others come from CDs in the house. Losing these files would not be horrible, but it would be a pain to reconstruct. Plus, my kids don't backup their music, so that stuff would be lost. (Most of their stuff wouldn't be a big loss, in my opinion) I was able to copy all of this to another location.

I'm also a podcast listener, and I have a big cache of unlistened to files. Since I don't really keep track of what I move to the MP3 player, I'd have to guess a new starting point for each podcast. Once again, I was able to suck these files off the injured soldier.

Amongst these podcasts are downloaded TV shows that I haven't yet watched. I'm trying to copy these now, but I've been through a couple of reboot cycles without getting them all. The fact that they are large files (250MB+) doesn't help.

Here's the tough part, the system files and configuration don't seem to be backed up. Not sure why I left that stuff out of the backup routine. While I have good notes in this blog on my decisions and steps, it will take a lot of time to reproduce once the drive is replaced. Hopefully, I'll be able to keep the old drive working long enough to copy the files over. I've found a website with instructions to help this process (recover disks, grub configuration, and UUID changes are involved). Of course, I may want to upgrade to a newer Ubuntu version. We'll see.

Labels:

Wednesday, May 23, 2007

Force Group

Still working on the Samba problem.

Tonight I decided to setup a new file share. Since the [homes] section works, I wanted to see if I could setup a share more like the one I was trying to fix. I followed the same steps, and found that the new one wasn't accessible either. This was actually a good thing, because it told me that the problem could be in the share definition. So, I commented the settings one by one until it worked, trying different combinations.

It turns out that it was the force group setting that was causing the trouble. With it commented, I can access the share just fine. It now works on all the client machines.

The goal of that setting was to have all new files be in the 'users' group so that all of us could access each others' files by default. Testing that will be tomorrow's assignment.

Labels:

Tuesday, May 22, 2007

Samba - More Playing Around

So, a couple of days ago, I started working on my Samba problem. In the log file /var/log/samba/log.smbd, I found these error messages repeating about every 30 minues:
[2007/05/22 20:23:14, 0] auth/auth_util.c:create_builtin_administrators(785)
create_builtin_administrators: Failed to create Administrators
[2007/05/22 20:23:14, 0] auth/auth_util.c:create_builtin_users(751)
create_builtin_users: Failed to create Users
Some Google research showed several theories as to why this would happen, although those having trouble didn't seem to be helped much. The most common explanation was that the user database was using the wrong (read: not the best) format. I messed around with the setting a little, to no avail.

Today at work I decided that I didn't have to diagnose and solve this problem. I don't need to file a bug report or try to fix the code. I just want it to work. Therefore, I've decided to uninstall Samba and all of its compainions, delete the configuration files (the entire /etc/samba/ folder), and start over. It only takes about 15 minutes for my entire Samba installation procedure. Why waste time trying to fix it? (Unless of course this doesn't work, and I'm back to the drawing board again.)

Anyway, here goes...

OK, so there's trouble right off the bat. I entered this command to remove the Samba stuff:
sudo apt-get install samba samba-doc libcupsys2 libkrb53 winbind smbclient cupsys-common samba-doc-pdf smbfs
And it also wants to remove the SSH components. I'm guessing it is one of the libraries that has a dependency for SSH. I'll try it without those.

Yup, it was libkrb53. I used this instead with better results:
sudo apt-get remove samba samba-doc libcupsys2 winbind smbclient cupsys-common samba-doc-pdf smbfs samba-common
After that was done, I removed all of the files from /etc/samba/. Is it that easy? Is it gone? I guess I'll try the reinstall.

  1. Install Samba
  2. Setup Configuration File
  3. Setup Other Users
  4. The Rest of the Setup


And ... it still doesn't work.

Something interesting though - I added a [homes] section to smb.conf and restarted Samba. Now, I can see and open my home folder via Samba, but still can't get to the files share. So that means Samba is working and the authentication is working.

Oh, and the 'Failed to create' error mentioned above is still showing up in the log.

I just don't get it.

Labels:

Saturday, May 19, 2007

Samba Problem Caused by 7.04 Upgrade

OK, so here's the description of the problem. Since I upgraded my server from Ubuntu Server 6.10 to 7.04, I can't connect to the Samba share from my client machines.

This machine only offers two services Samba and SSH, and SSH works fine.

When I try to connect to the Samba share, I'm asked for a password. If I enter the correct password, I get an error saying that the folder contents could not be displayed. A similar error is displayed from a Win XP client.

Now, here's the weird part, if I enter an invalid password, it asks me again. To me, this means that the client is communicating with the Samba service (the service is running, and there's not a firewall issue), and is validating when the correct password is entered, but it is after that validation that I'm being refused.

My Google searches on Samba problems after an upgrade have not yielded anything, but I'll keep looking.

Labels:

Booting the Server After Upgrade

You may remember last time that I was unable to boot after upgrade to Ubuntu 7.04. The error was:
Check root=bootarg cat /proc/cmdline
or missing modules, devices: cat /proc/modules ls /dev
ALERT! /dev/disk/by-uuid/7e6ada37-87a7-475b-9a12-53129119ea05 does not exist. Dropping to a shell!
I looked around quite a bit to find a solution. Some suggested that the uuid in /boot/grub/menu.lst didn't match the uuid of the drive. Unfortunately, from the initfs prompt, I couldn't get to the /dev/disk/by-uuid directory.

What I could do was mount the drive:
modprobe ide-disk
modprobe ide-generic
mount -t ext3 /dev/hda1 /root
and edit the grub menu:
chroot /root nano /boot/grub/menu.lst
I tried changing that file to point to a drive rather than a uuid (I can't find page anymore, so no example), but that didn't help. It only removed the uuid from the error message.

Finally, after over two weeks of this, I broke down and reconnected the CD-ROM to the server to boot from the install CD in rescue mode. Regular readers will remember that I don't have an optical drive on this machine, since I didn't think I would need it after installation, and that it requires a low profile drive that is a little pricey. (I may get a DVD burner someday for backups, although today I can't find one to link to.) So, I have to crack open the case and hang a full sized drive off the side of the chassis like this.

I was able to boot to the rescue disk and mount the main drive partition. A quick look in /dev/disk/by-uuid showed that the uuid on the drive did match the one entered in menu.lst and in fstab. So, after all of that work, I was still nowhere.

One more thing to try, this page suggested that I build a new initrd image file with this command:
dpkg-reconfigure linux-image-2.6.20-15-386 (substitute the name of your kernal as found in menu.lst)
And, wouldn't you know it, it worked! I can now boot to the server, and connect via ssh.

Still, there is now a new problem; I can't connect to the Samba share. All of the files are still there and the Samba configuration file haven't changed, but we're getting permission errors. The solution for this will be the subject of a later (hopefully not much later) post.

One more thing, the steps to connect the temporary CD drive reminded me that the BIOS settings still are not saved if the power cable is removed - even after I changed the battery. This is a problem only because the POST hangs on two errors: no keyboard connected and no floppy drive found. I don't know what to do about this, but every time the power goes off (around every three months), I have to reconnect a keyboard and monitor to get the server going again. I may have to take it to the local shop.

Labels:

Wednesday, May 09, 2007

Upgrading the File Server to 7.04

After having such great luck upgrading the backup server to 7.04, it's time to do the same to the file server.

At the beginning, things went as smooth as the first time, but when I ran the do-release-command, I was cautioned against using ssh to access the server during the process. The message said that if I continued a 2nd ssh daemon would be started on port 9004. (I have no idea why.) Anyway, since it worked fine the first time, I answered yes to continue. So far, it's still working.

...

I've had to answer a couple of questions about saving config files and such. No worries.

...

Just like last time, the reboot didn't work. I assumed it had something to do with the lack of a keyboard, or maybe the floppy disk setting in BIOS, so I attached a monitor to check. A pretty nasty message said that some long named file wasn't there, and it was dropping to a shell.

Like any well trained IT professional, I decided to power off and on. Now, after the BIOS screen comes and goes, I see "Starting up ... Loading, please wait..." No more disk activity, no change on the screen, nothing. It's hosed.

You don't think it was the ssh thing, do you?

Looks like I have something to work on this weekend.

UPDATE:

If I wait long enough, the error comes up again. Here is is:

Check root=bootarg cat /proc/cmdline
or missing modules, devices: cat /proc/modules ls /dev
ALERT! /dev/disk/by-uuid/7e6ada37-87a7-475b-9a12-53129119ea05 does not exist. Dropping to a shell!


UPDATE 2: The solution for this problem is here.

Labels:

Saturday, April 28, 2007

Enabling User Web Directories

I wanted to enable user web directories on the LAMP server. This thread in the Ubuntu forums held the answer:
sudo a2enmod userdir

I was then prompted to reload the server config with:
sudo /etc/init.d/apache2 force-reload

Now, I can use http://server/~username to access files in the /home/username/public_html directory.


NOTE: I found that the apachectl command referenced in the 2.2 docs is apache2ctl on this system.

Labels:

Tuesday, February 27, 2007

Made the Switch!

The other night, I switched over the drive mappings and copied all of the files from the old server to the new. My users (read: family) didn't notice.

Time for the next project: Backup!

Labels:

Saturday, February 24, 2007

Battery Installed

I was able to get out to Interstate Battery ("Every battery for every need") the other day to get a replacement cell for the motherboard, and I installed it this morning. That's the last thing on my checklist before moving this box into production.



I'm glad to be done messing inside the case. Not because I don't enjoy it, but because I'm worried about breaking something. I'm not the most skilled mechanic or electrician in town, and I tend to have trouble with these kind of things. (I mentioned the CD troubles last month; did I also write about cracking a motherboard once?) It is inevitable that I would lose a screw, strip some threads, short a connection, pull something loose, kill a component with static discharge, etc. I should be done until I decide to add a DVD burner.

Labels:

Wednesday, February 14, 2007

Software Installed and Configured

It took a little less than an hour to do the whole process. I'm getting good at this.

Most importantly, files are copying. Yeah!!

I'm going to mess with the server for a couple of days, and probably put it into service Saturday or Sunday.

Labels:

Such a Rookie Mistake!!

I've been fighting this server problem since December, and now, over 3 months later, I've found the problem. I was hoping that the solution would be failing hardware, or maybe a kernel incompatibility, but instead, it is my stupidity.

You may remember from yesterday that Fedora didn't like the IP address I was using. At the time, I just decided to use another and figure out that problem later. During today's experiment with Lormalinux, I didn't receive notice of a conflict and went back to my original choice. And, when I got things setup and began to copy files, the same error that has plagued me from the start cropped up again. After trying a new CAT5 cable with no change, I was looking for an old hub to setup an isolated network, in case it was one of my routers or another workstation causing the problem, but I couldn't find it.

Sitting in my easy chair this afternoon, I remembered the Fedora error, and it hit me. The address I've been using all this time is already in use - on the wireless access point. I changed the address on the Lormalinux server to an unused number, and it's working great. I'm such an idiot!!

Now that I know the problem, I'm going back to Ubuntu 6.10. Lormalinux is working OK, but I put in too much research on Ubuntu to not use that knowledge (plus there are so many more resources available). Since the Purdue/Indiana game was postponed tonight, I should be able to get the whole thing done before bedtime.

Labels:

Lormalinux

Lormalinux is touted as a distro tailored for the education field. What brought it to my attention was my Google search "linux distro preconfigured for samba". It was the first link returned.

Based on Slackware, they offer several configurations, including Samba server, Web/MySQL server, and LTSP server (no idea what that means). I downloaded the Samba version (beta 2) and gave it a try.

Right away, I was surprised by the harshness of the Slackware install. I've been spoiled by Mandrake (now Mandriva), Ubuntu, RedHat and Fedora and their handholding installs. I kind of laughed when, after reading on the web site that this distro is easy for newbies, the installation dropped to a login prompt telling me to partition the drives myself, and then start setup. Now, I've partitioned drives before, but I still had to spend a little time in the help files to figure out what they wanted (every distro seems to be different). I can't imagine a well-intentioned high school English teacher trying to setup a server for his classes being able to do this without help.

Anyway, I then was able to finish the install. In my role as the English teaching newbie, I took almost all defaults and installed the full distro as recommended. (Since I am a method actor, my grammar was impeccable throughout.)

A quick reboot, and I was presented with a character-based login (as I had hoped). I fired up the computer search in Windows and found the machine by hostname without incident, and was able to connect to the default share. After I modified smb.conf to update the workgroup, I could see it in the workgroup computers list.

Next, I fired up the WebAdmin interface included with the distro. It is found on port 10000. It has come up, and my next trick is to configure Samba for my use.

Wish me luck.

Labels:

Tuesday, February 13, 2007

Snow Day! (or My Adventure with Fedora)

The Blizzard of 2007 has started, so the family and I are all home today. Since I've been having zero luck with Ubuntu, I'm trying Fedora 6. Not a bad project to relieve cabin fever.

After seeing that this would be a 5 CD download and burn, I decided to try the network install instead. The first step was to find the elusive boot.iso - a less than 8MB CD image that will boot the system and pull the files from a mirror. This is located in the /os/images sub folder. I burned this and booted. I used the command linux text askmethod to force a text based install and to get the chance to enter the mirror info. It took a few tries to get the mirror definition correct (the path name must go all the way out to the /os/ folder). I answered a bunch of questions, including what software to install. I chose Windows File Server, editors, and a few others. No graphical or window manager stuff. It only took about half an hour.

After rebooting, it came up with a system agent. I unchecked sendmail from the startup list, added smb, but left the rest as is (I think I'll have to do a bunch of research to fine tune the box, but this will work for now).

I added myself as a user, and then looked around for instructions to setup a static IP. I found that the information is stored in /etc/sysconfg/network-scripts/ifcfg-eth0. I commented the line BOOTPROTO=dhcp and added:
BOOTPROTO= static
BROADCAST=192.168.254.254
(is this the gateway?)
IPADDR=192.168.254.1
NETMASK=255.255.255.0
NETWORK=192.168.254.0
(not sure what this is)

These commands stop and start the interface:
/sbin/ifdown eth0
/sbin/ifup eth0


I received an error saying that the IP address was already in use by another host, but I wasn't able to PING it from another machine. I changed it to .2 for now; I'll work on that later.

SSHD is already installed an running, so I was able to log in via PuTTY. The SSHD configuration file is /etc/ssh/sshd_config, and I modified it as outlined earlier.

The Samba configuration file smb.conf is located in /etc/samba/. I pasted in the same config file listed here, except I changed 'Ubuntu' to 'Fedora'. Continuing with the instructions on that page, I created the /export directory, and restarted Samba (using the first restart command listed).

And then, it gets difficult. When I browse the network from my Windows client, I can see the server and attempt to open it. After a long pause, I'm told that I don't have access to it, and the icon disappears from the workgroup devices list. Nothing short of a reboot of the server will bring it back (at least, nothing I know about). Restarting Samba doesn't help.

Well, the day is over, and I'm tired, so I'm putting this little experiment to bed (after about 12 hours of playing around). The most frustrating part has been relearning 'Linux'. I know that most of Linux is actually other software that runs on the kernel, but it can be tough when different distros store files in different places and configure things different ways.

Labels:

Monday, February 12, 2007

Mounting a Samba Share in Linux

Just for my own documentation, here's how I configured the Samaba share from the old server on the new server, courtesy of Tero Karvinen:

Edit $HOME/sambapass
nano /home/myusername/sambapass
username = windowsuser
password = windowspassword
domain = workgroupname
Create an empty directory (a mount point)
$ mkdir /mnt/files2
As root, edit /etc/fstab, add this line in the end (all on one line)
//windowsserver/share /home/tee/mymountpoint
smbfs credentials=/home/tee/sambapass,uid=myusername,gid=users,dmask=700,fmask=700 0 0
Mount everything
# mount -a

Labels:

Sunday, February 11, 2007

Building the New Server - Part 5 - Early Version

Today, I'm trying the 6.06 version of Ubuntu Server to see if the symptoms continue (see many earlier posts for details).

11:30 am
Let's start
11:58 am
Right off the bat, I see that I'll have to switch the kernel as mentioned in Part 2.
12:12 pm
Time to go through additional software installation and configuration - as outlined in Part 3.
12:33
OK, I didn't even get through those steps before SSH disconnected. I'm running out of options!

I may have to try another distro. Time for a break!

UPDATE:

OK, I decided to come back and finish the configuration, both to build a complete test bed and just for practice. I just want to say that my first server ran on Win95, and it worked great right out of the box!

Sorry, I'm venting a little - I didn't really mean that I would go back to that. Let's just continue.

12:58 pm
I'll finish the Samba and ntpdate steps.
Note that the cupsys-common package is apparently not used in this version
Also note that my syslog is filling up with messages looking for a file called /etc/printcap which doesn't exist. I created an empty file with touch /etc/printcap which stopped the entries.
1:17 pm
Done

Labels:

Building the New Server - Part 4 - The Problems

I've kept the tone of Parts 1 , 2, and 3 on the positive side and saved all of the frustrating issues for this post - mainly because they are not central to the building a server discussion. I'm documenting them here just to have a record of the symptoms and solutions (if any).

Problem 1: The Battery


Every time I unplug the power supply (which has been often), all of the BIOS settings go back to factory. It's not a big deal, except for clock reset back to January 2006, and the fact that the default expects a floppy drive. Fixing the time/date isn't a huge deal because of the ntpdate software, but without a floppy attached, I have to press F1 to continue. This will be a problem once I go 'headless', since there won't be a keyboard to use, and there won't be a monitor to even see the error. I guess I'll take the battery out and go to Interstate Battery for a replacement. I haven't yet looked to see how easy that will be.

Problem 2: The CD-ROM


I've been feeling bad about using the term 'ghetto' to describe the temporary CD-ROM setup, and the Political Correctness gods have decided to punish me by making it not work. I tried different cables and different CDs, but always came up with crc errors. But, I'm not ready to order a new drive that will fit in the case. This morning, I was venting to my son about it. He excused himself and returned with three old drives that he had been hoarding in his room. After hooking up the first one, I powered up the box and pressed the eject button. It was then when I remembered why I retired this drive; the drawer doesn't open without a little assistance from a paper clip. I dug one up (my wife seems to bring home dozens a week in her scrub top pockets) and gave it a little encouragement. Sitting in the tray was the Office XP Professional disk I've been missing for a year and a half! Anyway, I'm now back in business. I guess the first drive from last week didn't like being manhandled and gave up the ghost. One problem solved!

Problem 3: Still Doesn't Work!


This is the biggest of all. After spending the money on hardware, spending time on construction and installation, I still have the same problem I couldn't solve before - the network keeps disconnecting Samba and SSH (the only things I'm running on the box). I've tried a lot of things, and all I've proven is that it is an intermittent problem. I've used a Windows PC to connect to Samba, and tried mounting the old server's samba share directly on the new server. In both cases, a long copy job will eventually fail. From more than one machine, I've had SSH sessions drop. I've used different ports on different routers/hubs, and built an entirely new server. The only variable left is the software. My plan next is to try Ubuntu 6.06 LTS Server version. (Stay tuned.)

For those that love details, I captured log entries from my last copy attempt. This was the server-to-server path:
smbd[4198]: [2007/02/10 16:21:01, 0] lib/util_sock.c:write_data(557)
smbd[4198]: write_data: write failure in writing to client 192.168.254.160. Error Connection reset by peer
smbd[4198]: [2007/02/10 16:21:01, 0] lib/util_sock.c:send_smb(765)
smbd[4198]: Error writing 4 bytes to client. -1. (Connection reset by peer)

smbd[4199]: [2007/02/10 16:33:08, 0] lib/util_sock.c:read_data(529)
smbd[4199]: read_data: read failure for 4 bytes to client 192.168.254.160. Error = Connection reset by peer
smbd[4199]: [2007/02/10 16:33:08, 0] lib/util_sock.c:write_data(557)
smbd[4199]: write_data: write failure in writing to client 192.168.254.160. Error Broken pipe
smbd[4199]: [2007/02/10 16:33:08, 0] lib/util_sock.c:send_smb(765)
smbd[4199]: Error writing 75 bytes to client. -1. (Broken pipe)

This was about 3GB into a 15GB directory copy. It's important to note that I can copy the entire 60+GB contents of the file server to my backup partition on my desktop without incident, so I don't think the old server is the problem.

Labels:

Friday, February 09, 2007

Building the New Server - Part 3 - Configuring Everything

I reinstalled and configured software as outlined here, although I had to reverse the SSH and repository steps commenting out the CD as a source since I have no CD-ROM (more on that later). Also, I ran through the additional configuration steps here, here, and here.

While I was messing around, I installed ntpdate to automatically set the clock every hour.
Install the software
sudo apt-get install ntpdate
Run the script to set the clock
sudo /etc/network/if-up.d/ntpdate
Edit /etc/default/ntpdate to use your favorite time servers.
Mine are tick.cerias.purdue.edu and tock.cerias.purdue.edu.
Add the job to the CRON list.
crontab -e
Insert this text and save and close the file
@hourly /etc/network/if-up.d/ntpdate

Labels:

Thursday, February 08, 2007

Building the New Server - Part 2 - Installing the Operating System

A couple of weeks ago, I prepared a USB flash drive as bootable with the Ubuntu 6.10 Server install files ready to go. I tried it out on my Dell at work, and it booted. However, I wasn't able to get my son's computer (which has a USB boot option in the BIOS) to work with it, and this new computer had the same problem (and I think a very similar BIOS).

So, I had to go a little ghetto (is this an offensive use of the word?) and wire up an internal CD-ROM drive as an external.

Dog not included

Looks a little cheesy, but it worked.

The install went great. I used pretty much all defaults except for the hostname. Since the BIOS recognized the full disk drive size, I didn't have to do any special partitioning to see all of it.

The install finished, and I booted up the system for the first time. Well, at least I tried to. Soon after GRUB started, the box would reboot. How frustrating! I tried booting the CD-ROM again, and it came up no problem.

As usual, a quick Google search found both the problem and the solution. A guy named Joel posted this quick note that talks about the VIA processor not being fully 686 compatible, and how the Ubuntu server version uses a special kernel that calls the very instruction that the VIA can't handle. His easy instructions walked me through how to boot from the CD in rescue mode and switch the kernel with these two commands:

apt-get install linux-386
apt-get remove linux-server

Now, it boots, and I'm ready to start the configuration, again.

Labels: