Archive

Posts Tagged ‘Linux’

Short on storage? fdupes to the rescue!

September 22nd, 2009 Zordrak No comments

I don’t know why I haven’t come across this before.. but sometimes you just don’t realise until you realise. I have a lot of data to take care of and space is always at a premium. I spend a decent amount of time looking for places to save space and better organise data. Well, when you deal with as much data as I do, you are almost certainly going to find yourself with duplicate copies of data in different places that you have forgotten about or never realised were duplicates in the first place.

fdupes to the rescue!

fdupes is a reasonably efficient program for checking directories for duplicate files based on checksums – so it will tell you if there are two identical files even if they have different names. It’s available in the SlackBuilds repository and thoroughly useful. It’s also interesting to discover files you had no idea might be duplicates all over the place.

Categories: Linux Tags: , , ,

Magic SysRQ: REISUB

August 31st, 2009 Zordrak No comments

Ok, so your box is completely locked up, nothing you do with the keyboard and mouse does anything with the OS. You’re about to hold in the power button for a forced reset..

WAIT!



Try the Magic SysRq key. All the Slackware default kernel have it compiled-in.

It’s not easy finger-wise, but hold down Alt and the SysRq key and while doing so, type in the following in order:

R E I S U B


Fingers crossed you just rebooted your machine without breaking it.

For more information:
http://en.wikipedia.org/wiki/Magic_SysRq_key

Categories: Kernel, Linux Tags: , ,

Compiling Your Own Slackware Kernel

August 31st, 2009 Zordrak 3 comments

Ok, so I’ve made clear how I feel about using an initrd to boot your generic kernel. I also think that running the huge kernel on a permanent basis is equally insane. So I guess I’d better tell you about the alternative: compiling your own kernel.

I should make it clear straight away that by no means do I consider the kernel an easy topic for most people to deal with, nor do I think I have a full grasp on every nuance myself; but I do think that the best thing you can ever do for your system is to build your own. Needless to say there are already a million billion kernel compilation guides out there, but they all make such a big deal out of what is an unbelievably simple process, especially in Slackware.

So.. give me five minutes of your time and I will show you the process I follow for each and every Slackware box I administer that gives me a generic kernel, no initrd, and endless options for customisation should I choose to take them. It’s simple, trust me.


Compiling your own kernel in Slackware Linux in 10 easy steps…

Categories: Kernel, Linux Tags: , , , ,

The Evil of InitRD

August 30th, 2009 Zordrak No comments

I understand that there are rare situations in which an initrd can be useful. For example, when hardware is constantly being swapped out, or when you absolutely must have an identical kernel image, or if you are using LUKS for your / partition. However, in general an initrd is, in my opinion, a completely pointless level of complexity that you are better off without.

I’m currently managing in excess of 15 completely different Slackware installs across lots of different hardware and not one of them is running a “huge” kernel, or an initrd. If a module is absolutely essential to your system’s ability to boot, why in hell haven’t you compiled it into your kernel? It’s like having a your starter-motor in your car disconnected from the battery, but having a relay on its own mini-battery connect it up when you turn the ignition.. why would you do it? What’s the point? The car will not start without it, why is it not hard wired into the system? It’s the same for the kernel. If the system won’t start without it, compile it into the kernel. Don’t play about with an injection system you don’t even need.

Ok, so your root device is inside RAID & LVM on a GPT partition. So, compile in mdadm support for your RAID level, LVM support and GPT partition support; job done.

For the less experienced, it’s also a good way to learn the basics of kernel compilation without needing to do much more than follow a standard process. All you need to do is use the config from the generic kernel you were going to boot anyway, and knowledge of what filesystem your root device is installed with and what storage controller your disk uses. Go into the kernel config, add them in [*], make, make modules_install, move and symlink the new kernel, update lilo, reboot. Once you’ve done it twice, it becomes so routine and easy you’ll wonder why you haven’t been doing it forever.

Then, once you’re more familiar with the process, you can start removing other parts of the kernel you don’t need, especially hardware controllers for hardware you don’t have, with each step making your kernel smaller and your system leaner and faster.

Have kernel, will compile.

Post followed-up by:
Compiling your own Slackware kernel

Categories: General, Kernel, Linux, Rant Tags: , , , ,