Linux

Restoring GRUB after Windows Blows It Away

If you make the mistake of installing Windows after Linux, it will rewrite your MBR, killing GRUB. Some might argue simply installing Windows on your computer is a mistake, but let's fix the MBR and worry about that later. ;-)

0
Your rating: None

List installed packages in Ubuntu

I found this over at the Ubuntu Forums, but since it took me forever to find, I'm dropping notes here.

In RPM-based distros, you can do 'rpm -qa > somefile.txt'. In Debian/Ubuntu, do this:

dpkg --get-selections > machineA.txt

In true apt fashion, if you then want to have machine B have all the software machine A has, do this:

dpkg --set-selections < machineA.txt && dselect

Enjoy!

0
Your rating: None

Use NetworkManager to launch scripts based on Network Location

NetworkManager is fast becoming the de facto network provider in desktop Linux distributions. The reason it's so popular is that it "does the right thing" 99% of the time. However, there's not many examples out there that extend that functionality. NetworkManager provides hooks in which you can have scripts launch when network settings change. In today's post, I will show you how to launch the Synergy client whenever you plug into your corporate network.

5
Your rating: None Average: 5 (3 votes)

Use LVM on an installation of Ubuntu

RHEL/CentOS has had support for LVM in setup for quite some time now, but for whatever reason, Ubuntu has been slow at adopting support for LVM at installation. Usually, I just grumble and move on with ext3 -- not today. Convinced that I couldn't be the only person wanting LVM support, I set out to do just that. Luckily, it wasn't hard at all!

5
Your rating: None Average: 5 (3 votes)

Create CD's from FLAC files with mp3cd

So, you store all your CD's as FLAC, and encode FLAC to MP3 on the fly. Now, you've gone and lost that CD, or in my case, your 3 year old daughter loses it for you. How do you regenerate a CD from your FLAC's?

mp3cd does just that. I was all set to code something up myself, but mp3cd is currently maintained, and even available in the Ubuntu repositories! It has a man page, and it even works -- why reinvent the wheel?

0
Your rating: None

Estimate time-to-completion with est

Like many of you other sysadmins, I run a lot of ad-hoc, long running jobs. Also like many of you, I have a full plate and can't stand to sit around watching things run. Often times, I will start such a job and forget to come back to it until the end of the day. I needed a way to find out quickly about how long these tasks would take to run so that I could make a mental note or set a reminder to check the task later.

0
Your rating: None

Convert FLAC to MP3 on the fly with MP3FS

I refuse to do DRM. If there's an album I want, I buy the CD. The first thing I do after opening a new disc is to rip the disc to FLAC. The second thing I do is to copy the disc so that the loader in my car doesn't do permanent damage to the master copy. The third thing I do is to put the album on my MP3 player. Now, my player runs Rockbox, so I can play FLAC files, but they eat up too much space. However, I hate to keep both an MP3 and a FLAC laying around when I only need access to the MP3 once. Enter MP3FS - a fuse filesystem that converts FLAC to MP3 on the fly.

4
Your rating: None Average: 4 (3 votes)

DVD to YouTube using MEncoder

Just a quick note for myself. We have a Sony HandyCam that burns video to DVD's. I recently needed to upload a video of my daughter to YouTube to share with relatives. After a few iterations, here's what I settled on:

mencoder -ovc xvid -oac mp3lame -af resample=44100:0:0 -xvidencopts \
bitrate=2200 -o MyVideo.avi dvd://${TITLE} -chapter ${CHAPTER}

If anyone else has any settings that work better, please share!

0
Your rating: None

Backup LAMP Stacks with LVM Snapshots

I've done a lot with LVM in the past, but up until now had never really played around with LVM snapshots. I recently used LVM snapshots to implement a "hot backup" of my LAMP stack running this blog. I quote "hot backup" because, while mysql is indeed running, I do have to place a read lock on all tables for a second or two. You don't need to do this if you're using Innodb, but you do if you use the MyISAM engine (which Drupal does by default).

4
Your rating: None Average: 4 (1 vote)

Bringing your linode home with you

Linode is, in my opinion, the best webhost out there. I recently switched this site from Wordpress to Drupal. In preparation for this switch, I wanted to be able to start with a clean slate - wipe the O/S and all, and install Drupal on top of that. Since I'm a sysadmin, I hate downtime! Read on to learn how I made my Linode portable.

5
Your rating: None Average: 5 (1 vote)
Syndicate content