Debian


January 8, 2009: 9:34 pm: MatthewDebian, Linux Misc, MythTV, Technical, Ubuntu

So we had a power outage at our house, and I had to shut down my Myth backend server for the duration, and decided to try and fix its sometimes-spotty NIC at the same time.  Every so often I got a completely dead response so trying to scp something there was painful… so I swapped the hardware.  Unfortunately, when it came up, the machine realized the card was a new one (3c905, they’re still astoundingly reliable) and complained.  First it told me it was the wrong MAC address, then it gave up and assigned it eth1.  Unfortunately, all my settings were bound to eth0 and when I changed the /etc/network/interfaces to reference eth1 instead, some parts still didn’t work… mysql complained, and mvpboot just was unwilling to do anything.

Bad news.

I finally found a thread about replacing a NIC in (I think) Ubuntu 8 but when I tried the solution, the file they referred to (

/etc/udev/rules.d/70-persistent-net.rules

) didn’t exist.  Back to Google.

Next I found an older forum exchange about ubuntu 6.06 NIC replacement breaking the network, and I was able to find that file:

/etc/iftab

and in it was the old MAC address.  Commented the line out, restored the settings to be eth0, rebooted, and bingo I’m back in business.  Wish I had found it last night…

May 22, 2007: 4:12 pm: MatthewDebian, Linux Misc, Pushing the Envelope, Technical

A quick article about the problems of Linux packaging (specifically the cross-distribution incompatibilities and the multiple option confusion), which is really only interesting because of its reference to a writeup of Conary, a package manager with revision control built in. That addresses my major gripe which is that you can’t roll back a package (RPM, DEB, etc) to a previous state and that is ridiculous in this day and age! Even Windows OS patches have uninstalls that revert back to how the system was before… and they even work more often than not!

I wonder how it will tie in with another distro than rPath Linux…

May 1, 2007: 10:30 am: MatthewDebian, Linux Misc, Technical

with settings and all…
from a Slashdot discussion comment thread:

20 minutes
(Score:4, Informative)
by iusty (104688) on Thursday April 05, @11:28AM (#18624189)
Let’s see:
– copy old /home/username dir
– “debconf-get-selections” on old computer and pipe to “debconf-set-selections” on new one
– “dpkg -l |grep ^ii” on old computer and replicate the package list
– go drink some tea while the apt-get proceeds
– done!

I carried my home dir with its settings across about three or four new computers in the last eight years or so, and I didn’t have to tweak things very much. Only upgrading major components require some maintenance, but other than that, it’s simple.

*
Re:20 minutes
(Score:5, Informative)
by umeboshi (196301) on Thursday April 05, @11:45AM (#18624481)
For replicating the package list, try this:
dpkg –get-selections > packages.txt on old machine,
then do:
dpkg –set-selections packages.txt on new machine,
then do:
apt-get dselect-upgrade on new machine.

January 24, 2007: 7:33 am: MatthewDebian, Linux Misc, Technical

So I had a hardware (onboard NIC) failure and had to change my network configuration. The darn OS (Debian Sarge) wouldn’t actually disable the onboard NIC so I had to give it a goofy address in order to make it work… but what I neglected to think about was how packets were going to get off the box. Since the ETH0 interface had a default gateway, I left it there… which was my mistake. I should have removed the gateway since the server thought it was multihomed, but instead I ended up finding the problem by dumping the ROUTE table and then removing the second default route. It only took me a bit more than an hour for a fix that should have been about 10 minutes.

Lessons: (1) I hate onboard equipment and (2) never forget your routing!

January 6, 2007: 6:40 pm: MatthewDebian, Technical

So I was trying to install a new package and it very cleverly decided somewhere in the Debian dependencies that I didn’t need a kernel. Thankfully, APT noticed and screamed loudly so that I would stop the insanity! However, a few packages had already been ripped out of the system and I had to do emergency repairs. ‘apt -f install’ does wonders.

However, it pulled out php4 and php4-mysql, as well as wordpress and gallery2. When I reinstalled and tried going to my sites, they all were screaming at me. For example, Wordpress 2 said:

Your PHP installation appears to be missing the MySQL which is required for WordPress.

but I knew it was blasted well installed. After pounding on the system to ensure it was there, restarting every service that could have been affected, logging into mysql, checking the config files, and searching the web, I remembered having a problem when I installed php4-mysql… so I used a little magic trick that (thank goodness!) worked.
dpkg-reconfigure php4-mysql
All I had to do was tell it to activate the php-mysql connection, and we were back. Jiminy, what a scare, though!

August 26, 2006: 2:38 pm: MatthewDebian, Technical, Tips and Tricks

So the secondary hard drive in my kids’ Linux game computer died, with the click of death.  Sigh.  Fortunately, I had built it with software RAID1 and could easily get it fixed, right?

Well, it was my first time.  So no it wasn’t that easy.  Actually, it was way easier than I had any right to expect, but I had to read some stuff.

The most annoying thing?  The Linux Documentation Project Software RAID HOWTO does not tell you how to add a device.

OK, on with the story.  So I found out which drive was failing (I didn’t label which was the master and slave, so I used the very technical method of turning it off and unplugging each until the clicking stopped) and then removed it.  I found another drive laying around that was about as big… 6448mb instead of 6449.  Oh, for want of one megabyte… but little did I know.

So I got it hooked up and then booted.  I made my way into ‘cfdisk’ and couldn’t see the second disk.  I had a hissy until I realized I needed ‘cfdisk /dev/hdb’ and then it was there (boy I can be dumb)…

I partitioned the disk as closely as I could to the same sizes, but I couldn’t quite make them match… the sectors were counted differently across manufacturers.  Had I been smart in the original build, I would have put in mismatched disks so I wouldn’t then depend on an exact sector match.  Oh well.

Then, I used the information in a md RAID reconstruction thread and a Debian Sarge RAID1 article to get the mirrors re-added…
mdadm –add /dev/md0 /dev/hdb1
mdadm –add /dev/md2 /dev/hdb3

but mdadm –add /dev/md1 /dev/hdb2 didn’t work, since the partition was off by just a bit.  Thankfully that is my swap partition (ok so I’m not always dumb) and it will just have to run without a mirror.  If the machine goes down and loses the first hard drive, I’ll reconstruct the swap partition in a new md device and the we’ll be fine even with a new, different-size drive.  The handy tip offered was watching the reconstruction with:
watch -n 6 cat /proc/mdstat

which made me feel better because I could see it being fixed.

Thanks to the folks who wrote up their experiences… I now have a working computer (and did I mention I really am glad the first machine to fail was the kids’ computer?) again and will not be as concerned the next time I lose a drive.

Technorati Tags: ,

April 24, 2006: 12:03 pm: MatthewDebian, Linux Misc, SQL, Technical

Potentially useful?

How To Set Up A Load-Balanced MySQL Cluster | HowtoForge – Linux Howtos and Tutorials

January 20, 2006: 11:27 am: MatthewDebian, Technical

So I should have mentioned this a while back, but the new Debian installer lets you set up software RAID pretty smoothly. Now I’m happy!

October 29, 2005: 11:46 am: MatthewDebian, Linux Misc, Political, Software Development, Technical

I’m pondering a move of some of my dev machines to Ubuntu since it is getting such favorable press and seems to have a fast-out-of-the-gate goal, which is the one issue I had with Sarge/Sid. It’s darn hard to get consensus on anything, and with releases waiting can really slow you down…

But the Ubuntu folks have a couple of scary pictures on their site… it’s a bit more kumbaya than I expect from techie types…

September 2, 2005: 9:21 pm: MatthewDebian, Technical

A number of handy tips pages, especially packaging.
Quick-start guide
and of course the apt-howto

For pinning or default releases, see this conversation
One that keeps popping up although I haven’t used it much… the Debian Grimoire
Debian repository HOWTO and commentary on it with hints

General dpkg/apt tips from the Debian FAQ

Creating Debian packages with Checkinstall.

Specific tips as well…
Fix an X install
dpkg-reconfigure xserver-xfree86

/etc/apt/apt.conf useful settings
APT::Cache-Limit 10000000; # for apt crashing with too much data after update
APT::Default-Release “stable”; # to target a release and yet have others available

Next Page »