This is a few days stale. In all the excitement of starting a new job, I’m slow to get the good gossip!

From The Register:

The Linux kernel has been purged of a bug that gave root access to untrusted users – again.

The vulnerability in a component of the operating system that translates values from 64 bits to 32 bits (and vice versa) was fixed once before – in 2007 with the release of version 2.6.22.7. But several months later, developers inadvertently rolled back the change, once again leaving the OS open to attacks that allow unprivileged users to gain full root access.

For more information: RedHat Bugzilla page, RHEL patch info, Fedora patch info, CentOS patch info, SLES/openSUSE update info, Slackware ChangeLog info, Gentoo discussion thread.

 

You know what I hate? I hate producing XML that looks perfectly valid, validates with the schema checker, and doesn’t cause the parser to throw errors when actually processing it, yet completely fails to do what it’s supposed to do.

In case you’re interested, the difference between

<interfaces config:type=”list”>

and

<interfaces>

in an AutoYaST install profile is, the first configures your network interfaces for you, and the second says “Oh, this bit here with the nic card and the IP address? Naaaah…. don’t bother. I never liked the Internet anyways. Let’s just mess around with xfractint or something. Networking is for people who can’t make their own fun.”

Bah, humbug, AutoYaST. Bah, humbug.

 

I had to do something kind of weird the other day — I had to take my perfectly well mirrored disks and split up the raid volumes, because I wanted to start doing some testing on that server, and use the second disk for space. As it turns out, there are a great many tutorials on the vast googletrons to help you set up, manage, or break Linux raid mirrors, but not so many when it comes to wiping away all evidence that you’d ever entrusted your system to such a beast.

Well, on the bright side, at least that means I get material for a blog post out of it!

It turns out that it’s actually fairly easy to do, but a shade tricky. As you probably already know if you’ve ever had to boot off one raided disk after losing part of your mirror, there’s really nothing special about the partitions that you’ve put in your raid volumes — they’re still secretly ext3, or whichever filesystem type you’ve chosen. But the partition type is set to 0xfd, Linux raid, rather than 0×83, Linux. And the superblock is encoded with the fact that it’s a member of a raid set — which is the reason that even if you boot off alternate media with no config files or anything, it’ll see the slice’s raid information and happily treat them that way even if you are tearing your hair out with the effort to make the system see a partition as just a plain old partition.

So here’s the steps I was following to wash that raid right out of my hair:

  1. Used cfdisk -P r to dump out my disk partition information in case I accidentally trashed it.
  2. Saved my /proc/mdstat and df output so I knew which filesystems were on which partitions and wouldn’t have to bother guessing.
  3. Booted off alternate media. (I used a net boot server but you could use IPMI virtual media, a DVD, USB stick, etc.)
  4. mdadm /dev/mdX –fail /dev/sdbX to disable half of the mirror, then mdadm /dev/mdX –remove /dev/sdbX to remove it from the volume. Repeat for all slices on /dev/sdb. (I am not really certain if this step is truly necessary — but I did use it, so it’s here for completeness’ sake. If I get a chance to down-convert another raided host I’ll note this appropriately.)
  5. mdadm –stop /dev/md0 to stop the raid volume.
  6. mdadm –zero-superblock /dev/sdaX and mdadm –zero-superblock /dev/sdbX to remove the raid information from the filesystems.
  7. fdisk /dev/sda and fdisk /dev/sdb to change the partition types from 0xfd to 0×83.
  8. mount /dev/sda1 /mnt; mount /dev/sd0 /mnt/boot to mount the root and /boot filesystems from one half of the ex-mirror.
  9. Edit /mnt/etc/vfstab to have the new plain sdaX partitions instead of mdX volumes.
  10. Edit /mnt/boot/grub/menu.1st to have the appropriate devices as well.
  11. Fix any other references to /dev/mdX you might have littered around your system.
  12. Umount /mnt/boot and /mnt, and repeat for sdb as appropriate.
  13. Reboot!

It wasn’t that difficult, really. In fact, although it took me a while to bumble my way through it the first time (mostly since I wasn’t aware of the superblock aspect, and it was driving me nuts every time I’d boot up in some alternative fashion and it would resurrect my raid volumes from the should-have-been-dead), it would probably take me all of about 15 minutes to do now, and most of that would be time spent rebooting.

Of course, after all the fuss, we ended up not really using that machine as a test host after all, but at least it was a good learning opportunity. It’s not nearly often enough that you get the chance to potentially totally blow up all your filesystems with no consequences. :)

 

This is how I feel about a little shell script I threw together this morning:

Garfield

I wrote it, I ran it, it ran without error in test mode… it ran without error in a state where it didn’t have anything to do… it ran without error in a state where it had to fix something… I never write a shell script without at least screwing up one ” mark with a ‘ mark or something…

I KNOW I PUT A TYPO OR A BUG OR SOMETHING IN THERE SOMEWHERE, NOW WHERE IS IT?!?!?!

 

The Slacker Manager blog covered this topic several months ago in an article about a concept they named GEMO: “Good enough, move on”:

You work at something, you begin to run out of steam or you know more needs to be done but there are other projects and things that need to be done so you say, GEMO. You move on and you know you can come back to it and improve it later.

In the past few days, the thing all the cool kids are talking about is The Cult of Done Manifesto, which is a 13-rule list of things which boil down to, more or less, “do something, anything, whatever, it doesn’t matter — just do it.”

Continue reading »

© 2012 /etc/system Suffusion theme by Sayontan Sinha