Robot Has No Heart

Xavier Shay blogs here

A robot that does not have a heart

Gutsy upgrade

Just upgraded Ubuntu from feisty (7.04) to gusty (7.10). Was a bit touch and go for a moment … got a filesystem check failure on reboot. Miamoto_musashi, my knight in shining armour from #roro, saved the day. ls -l /dev/disk/by-id/ revealed that my HDs had been remapped from /dev/hd to /dev/sd. The gutsy upgrade had modified all of the standard partitions to use UUIDs, but had failed to update a custom mount I had (/data -> /dev/hdc1). Changed that over in /etc/fstab, reboot, hooray we have a winner.

Convert M4A to WAV in Ubuntu

1
mplayer -ao pcm:file=targetfile.wav sourcefile.m4a

No Audio in Ubuntu

Just a quick one – for some reason my sound stopped working in Ubuntu. To fix, right click volume icon (once you’ve re added it to the panel if it’s not usually there), select “Open Volume Control” and ensure that PCM is not muted.

Also, to allow sounds from multiple sources to play simultaneously, go to System -> Preferences -> Sound and select ESD for your output device and ensure “Enable Software Sound Mixing (ESD)” is selected. Not sure why this wasn’t working as a default for me.

Passwordless Login

I’ve been typing in SSH passwords for ever now. For some reason I just assumed it was a pain to setup passwordless login. Wrong! It took me about 10 minutes. Ubuntu already has all the tools you need.

1
2
3
ssh-keygen -t rsa -f ~/.ssh/id_rsa -C "xavier@home"
ssh-add ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub | ssh xavier@remote_host 'cat - >> ~/.ssh/authorized_keys'

Repeats steps 3 and 4 for each remote host.

It just works. And you know how much I like that.

Reference

RAMDISK: Ran out of compressed data

Getting the above error on boot is fairly scary. Thankfully, it’s not hard to fix. It probably means you have filled up your /boot partition. In my case, I had 4 kernels/configs stored on there and it was right on 100%. Simply clean out the old ones – I keep the latest (obviously) and the one before, assuming it works. Then if you’re on ubuntu, issue:

1
dpkg-reconfigure linux-image-`uname -r`

To regenerate your initrd file, because if /boot was full it was probably corrupt.

Do stupid things...

... stupid things happen.

Like running ubuntu dapper as your primary, despite an explicit, stickied recommendation against the practice on the forums. I just wanted to try out compiz…

So as of 10 o’clock this morning I can’t boot properly. It was working at 7:30 – should never have restarted. I can get in to safe mode (no GUI), but the work I need (Ent .NET) is on my virtual PC. So I need to revert to breezy, reconfigure nvidia drivers, reconfigure vmware, and hope to god nothing ridiculous happens. .NET assignment checkpoint due tomorrow. At the worst I’ve only lost 2 hours of work, hopefully will take a lot less time to recreate. Except I’ll have to do it in the lab. I hate working on any computer that isn’t mine. It’s just not right.

EDIT: We’re back in action now. dist-upgrade to the latest kernel version, had to manually grab the matching linux-restricted-modules since apt-get wasn’t finding it, re-install nvidia-glx, vmware-config.pl. YAY COMPUTER WORKS. In the process I also disabled my network shares in fstab, not sure if this had anything to do with it, but when trying to debug I found I couldn’t ls one of them. I never thought I’d hang ls, but it’s been done. I suspect if I’d left my comp for 5 minutes initially it would have eventually come up. You live, you learn. Although after all that I’m still running Dapper. In another stupid move I put my OS on the same partition as my home dir, so I need to find space on the server to back everything up for a reinstall. Including an 8Gb VM. I am such an idiot.

We’ve now added WSE to our .NET project and it’s starting to look rather fancy.

LDAP Authentication

Spent the better part of the evening setting up LDAP authentication for my boxen. The portage issue I mentioned prior was because I hadn’t updated portage for like 8 months … my bad. Slapd installed without a hitch on my gentoo server, and I was even able to set it up with an SSL certificate. The problems came getting pam_ldap setup on my ubuntu client. I’m not really sure what I did, but part of my problem was installing all the packages a few days ago, and then changing my mind on the configuration today but not reinstalling the packages. As such, I learnt a handy new command, to reconfigure without reinstall:

1
2
dpkg-reconfigure libpam-ldap
dpkg-reconfigure libnss-ldap

I’d also warn against using the libnss-ldap sample nsswitch.conf without a contigency plan – I wasn’t able to execute commands (ls, sudo) after using it, and my machine wouldn’t reboot properly, even in recovery mode. Moral of the story – Always have a LiveCD handy!

I’m at the point now where everything seems to work … except passwd. When changing my password I get “passwd: Authentication information cannot be recovered”. Posted something on the forums, hopefully someone helps me out.

A pretty flower Another pretty flower