Stop me before I kill (my computer) again
December 11, 2006 12:56 PM   Subscribe

Calling all Linux-minded MeFites: Please answer several questions related to kernels, upgrades, and Slackware 11. The last time I tried this I was left with a dead server. Help me do it right this time 'round.

The situation: Aging but serviceable Dell PowerEdge server, running Slack 10.2 and the 2.3.41 kernel. Currently serving as a web server and email backup (personal use only, if this is borked no one is harmed but myself). However, we need a departmental server, so I volunteered this machine. Wanted to upgrade it to Slack 11 prior to doing anything else. Followed the instructions on the upgrade README file. Read TFM as I went along. Now it is done, but I'm afraid to reboot.

Here's the issue: The system has a SCSI hard drive. CD-ROM is on the IDE channel, but I had scads of problems the last install just getting Slack to realize that the CD was on IDE0, and the HDD was on the SCSI card. After unsuccessfully trying to upgrade the kernel last time around (and several reinstalls just to get it going), I hadn't planned on doing anything with the current kernel. The install package had other ideas. The kernel is now installed. I can't go back to the 2.4.31 kernel as a boot option, as the mod files were removed during the upgrade.

So now I have a system - supposedly ready to reboot - but I'm afraid that rebooting it will result in an inability to load the SCSI HDD. I compiled a kernel that does have the SCSI drivers enabled - couldn't do zImage, had to bzImage the thing, but the vmlinux file is now in my boot directory - but (a) lilo complains the image is too big to use, and (b) I don't have a clue whether compiling the thing on my own is necessary - Does the default kernel have the SCSI drivers? Can I just stick with the default? Tried to do mkinitrd but again it is asking me for the 2.4.31 modules, and I would prefer the newer kernel if I can get it running.

As usual, I started by checking all of the relevant forum sites for answers, but with Linux it seems that the answers are either in cryptic "old bearded one" speak, which I am not l33t enough to decipher, or they have follow-ups along the lines of "oh nevermind I fixed it" rather than answers I can use.

Any advice here would be welcome. Short of wiping and reinstalling, what's the best way to get this thing happy with the new kernel? uname -a is still telling me I'm running 2.4.31, checked lilo to be sure the kernel was set (it is) but lilo -v first warns me that the 2.4.31 modules are missing (should I care?) and then seems to run fine without throwing any errors (what the hell?).

As with many things I have learned just exactly enough about Linux to know when I'm in trouble. Hoping the hive mind can help me get unstuck on this one.
posted by caution live frogs to Computers & Internet (13 answers total)
Best answer: The stock kernel that comes with Slack 11 doesn't seem to support SCSI drives:

As such, you'd have some difficulty making it recognize your ... SCSI drive. So, as you said, compiling your own is the way to go.

To get it booting, with a failsafe...

Do you still have the vmlinux file for the working 2.4.31 system? If so, you can add the new kernel to lilo.conf, but keep the old one in the menu, in case the new one doesn't work. Don't worry about the missing modules. The kernel must have everything necessary to access the root partition (in your case, SCSI and EXT2/3 or reiserfs drivers) compiled directly in. So, your sound card might not work, but you'll be able to get a shell and recompile your kernel again from 2.4.31 in case your 2.4.33 doesn't work.

Here's how to do that:

1. Copy the old image to /boot/vmlinux-2.4.31
2. Copy the new bzImage to /boot/vmlinux-2.4.33
3. Edit lilo.conf to have two image lines. For one, you might use

image = /boot/vmlinuz-2.4.31
root = /dev/sda1 [or whatever your root is]
label = linux-SAFE

The second image would start with

image = /boot/vmlinuz-2.4.33

4. Run lilo -v to make sure both images are installed

You probably want to have a "delay=50" line before the image lines to make sure lilo pauses to let you select what you want to boot.

Remember, you can always boot into your system, in case of bad things happening, with your Slackware boot CD.

Since you're on a SCSI system, you'd have to use one of the SCSI kernels (why this is on the boot CD but not as a package, I'll never know):

So you'd probably type:

scsi.s root=/dev/sda1

at the "boot:" prompt. This can help you in a jam, in case you completely mess LILO up.
posted by lalas at 1:22 PM on December 11, 2006

I see some good advice in the first comment, but I'll take another tack:

--given that Slackware is basically an expert's distribution, with none of the sharp edges filed off;
--and given that you aren't an expert;
--and given that you are now at a point where there is nothing important on the machine;
--therefore, I would suggest that you use a different distribution, one designed for less-than-experts.

I would wager a fair amount of money that you could download a Red Hat or Debian or Ubuntu .iso, burn it to CD, and install it on your system from that CD in less time than it will take you to upgrade Slackware for this machine. Further, it'll make maintenance easier for you in the future (need Samba? Need FTP? Need SSH? clickety-click, you're done).
posted by jellicle at 1:34 PM on December 11, 2006

Response by poster: lalas - thanks. Have already backed up the current kernel but was not sure what would happen without the modules. I do have the boot CD / disks if necessary, so that part is good. Will make a bootdisk from the CD and see what happens on restart.

jellicle - yes, and for the system I usually play around with work-wise, I have been running Ubuntu Edgy - because I need that computer to work. However, the whole point of playing with the Slack server was to get better at Linux administration. Computers are like cars - you don't learn anything about them of they work. I know squat about cars, really, but aside from the kernel issues I've had no real problem with compiling packages, doing day-to-day maintenance, etc. on the Slack server - it's not user friendly but it is damn stable once I get it running.

I'm not completely new to this - I've had a Slack server running since Slack 9 (and started with RedHat). I chose Slack specifically because I wanted to get better at command line usage. Compiling a kernel, though, is new to me. The upgrade to 10 coincided with acquisition of the Poweredge to replace a Pentium 166 (and even that old beast is still a reliable, dedicated web server). My major issue is the hardware: Were this not a weird setup with a SCSI disk, I wouldn't be worrying about the kernel in the first place - but the last experience doing the install of 10.2 on the current machine was painful.
posted by caution live frogs at 2:05 PM on December 11, 2006

You shouldn't really be using lilo anymore, grub is a much better boot loader and doesn't have the limitations of lilo.

Also, as long as you can boot from the CD, you can rescue any situation, so don't be afraid to reboot!
posted by knave at 2:09 PM on December 11, 2006

Use a modern Linux distribution for *?{}£'s sake. There's no need to install the whole GUI shebang if you don't want to & you can keep all that yummy command-line chewyness that you love so much.

Personally, I'd install Debian etch (grab a release candidate installer from here)
which has just frozen in the lead up to it's release, but that's just me.

Trust me, it'll be right up your street if you want to stick to the command-line world. It will also almost certainly work out of the box on your hardware without needing to compile a custom kernel.
posted by pharm at 2:47 PM on December 11, 2006

> Use a modern Linux distribution for *?{}£'s sake.

Slackware 11.0 was released in October of this year! That's not modern enough?

Granted, slack does tend to be a bit conservative with upgrades (2.4 is still the standard kernel, etc.), and I don't mean to start a distribution war, but... some people like it.

And, for what the poster intends to do -- get more experience with system administration -- I think it's a good choice.
posted by lalas at 3:15 PM on December 11, 2006

Best answer: "(why this is on the boot CD but not as a package, I'll never know)"

The Slack 11 setup program will allow you to install any kernel from the boot CD. Just select scsi.s from the list of kernels presented during the install process.

"Help me do it right this time 'round."

Boot your CD. Install Slack, selecting the 2.4.31 scsi.s kernel during the install process. Let LILO do its thing. You will now have a functioning, bootable machine. Note that you don't have to install any Slackware packages to do this. The Slack installer is perfectly capable of walking you through only the installation of a kernel from the boot CD.

Download pristine source for Linux 2.4.33, untarring it into /usr//linux-2.4.33

make menuconfig
Set things up the way you want them.
make && make modules
be sure that your /boot partition is mounted.
sudo make install
Let LILO do its thing
sudo make modules_install
sudo shutdown -r now

Enjoy your machine configured to your exact specifications. Don't worry about all those people talking smack about LILO. It's a perfectly good bootloader and has the advantage of not requiring you wrap your head around something new for the sake of something new.

(I'll caution you, however, that if you don't know what you're doing during the kernel configuration, build, and install process, it's much smarter to stick to the distribution kernel. The nature of some of your questions and some of the things that are confusing you very strongly suggests you shouldn't be trying to use a custom kernel. As a single example of something that tells me you're out of your depth, mkinitrd doesn't enter into the process of installing a production kernel in any but the most esoteric environments. You don't make it clear why you're mucking about with it, and I don't see the terms "LVM" or "devicemapper" in your post. You're better off just compiling that stuff into the monolith rather than fooling around with stuffing modules into an initrd anyway.)
posted by majick at 4:06 PM on December 11, 2006

Response by poster: ...and that's what you get when a whole generation grows up expecting that the install program will do it all for you. Thanks all - I have the system waiting for me to muck with it again tomorrow, and I expect that installing the scsi.s kernel is what I want to do.

Having read through all of the above, I can say just for the record: Yes, the Edgy install on my work machine was MUCH less painful. Yes, it does annoy me on the Slack box that I still can't get X to realize that my monitor is capable of 1024x768 when I do start KDE. And yes, Slackware is not a good choice for a novice - but in the end when I do figure something out (with or without help) I seem to get more satisfaction out of making it work.

(I mean, I have a friggin' doctorate. After spending all this time doing neuroscience research you'd think figuring out an OS wouldn't be that bad.)
posted by caution live frogs at 7:46 PM on December 11, 2006

I'm not entirely sure how I managed to mangle "/usr/" into "/usr//" up there, but hopefully you caught the gist of it rather than my broken specifics.

As to the rest of you: I'm something of a debian stable zealot myself -- to the point of being horrified that things like Ubuntu and Etch are being suggested for production use -- but the guy already has an installed Slack. "Nuke it and start over" merely from not having the proper files in /boot and /lib/modules is a very irksomely Windowsesque mentality that really shouldn't apply in these cases, with the size of installations being what they are these days. The guy's got a few megs of file to change and you want him to reinstall a couple of gigs of system from zilch and pick up on a completely different administration method?

Oh, and don't let me disparage the use of an initrd utterly. There are some situations for which it's rather handy -- making rescue CDs and such -- but monkeying around with it on a single, stable, standalone machine and getting pivot_root to do what you think it ought to do is more trouble than it's worth unless you're doing madness like bringing up the root filesystem over iSCSI.
posted by majick at 9:21 PM on December 11, 2006

Slackware 11.0 was released in October of this year! That's not modern enough?

To me, a modern linux means a linux distribution which has a decent packaging system with proper support for a full description of package dependencies.

I had my fill of compiling tarballs & resolving package dependencies by hand in the 90s frankly.

posted by pharm at 3:38 AM on December 12, 2006

Response by poster: Success! In the end two things work against me:
1) SCSI HDD, Adaptec interface. After a moment of feeling stupid I suddenly realized why the plain scsi.s kernel wouldn't mount sda1 - and once I dropped the adaptec.s kernel in, I was able to mount my root drive.
2) Weirdness with the CD-ROM. Slack setup can't find the CD-ROM, and I recall this being a huge part of the reason why I had so much trouble in the last install. Sometimes it sees the drive, sometimes it doesn't - some strange interaction between whatever Dell used to put the thing together I guess. I recall that forcing it to mount manually rather than using auto-detect makes it work once in a while (really strange as it boots from CD just fine). I gave up and just transferred the necessary files via floppy.

...and pharm, I do understand the frustration - Ubuntu has a much nicer package handling system - but when it comes down to it, I've had many fewer system and program crashes on this old Slackware box over the past three years than I have had on a new system running Edgy over the past three weeks. There's something to be said for being conservative with implementing every new thing under the sun. (It would be nice if Slack finally included Apache 2 by default though.)
posted by caution live frogs at 3:17 PM on December 12, 2006

Each to their own :)

Incidentally, ISTR some issues with Linux and IDE CDROMs with the jumpers set to 'cable select'. Set the CDROM to 'master' or 'slave' (as appropriate) and everything's fine, but set it to 'cable select' and you get the problems you're reporting.
posted by pharm at 2:29 AM on December 14, 2006

Response by poster: Eh, could be the issue - but it's an ATAPI drive, on IDE1, so when it is detected it shows up as hdc. IDE0 is empty (which may be contributing to the problem). The weird thing is that booting from sda, everything works fine, it's only when I boot from CD or floppy that the CD drive isn't recognized (and how do I end up booting from a drive that doesn't exist? Strange.)

Even more fun: I did manage to build a custom kernel (my problem: trying to use the uncompressed kernel after build rather than the compressed bzImage) to enable both the adaptec SCSI and multiprocessor support. I just used the existing adaptec.s config file, and ran makemenuconfig to change to enable SMS. Hooray, two penguins on boot. I don't have this set as the default boot kernel yet; need to add the kernel modules for this. Once I'm sure it works as expected I'll set this image as the default (and keep the single processor kernel as a backup).
posted by caution live frogs at 6:22 AM on December 14, 2006

« Older Media criticism   |   Inland Empire. What was THAT about? Newer »
This thread is closed to new comments.