LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Hmm... Kernel update. What packages do I need? I'm lost... (https://www.linuxquestions.org/questions/slackware-14/hmm-kernel-update-what-packages-do-i-need-im-lost-748825/)

halborr 08-19-2009 03:28 PM

[solved]Hmm... Kernel update. What packages do I need? I'm lost...
 
First off, let me introduce myself. I'm Jay, and I'm a slackware addict :-). I have been using slackware for probably 6 months now, so I'm really quite comfortable at a cli. However, this kernel stuff is scary. Does anyone perhaps have a link to a general tutorial?

I'm running a gateway box from '98, so I usually look for good ways to get a little more speed if I can without compromising useability a whole lot. Currently I'm running the 2.6.27.7-smp kernel. Considering the non-smp kernel is about half the size and I'm 99% sure this is a single core processor (were dual cores even out yet in 1998?), I would like to move to the generic one if it would grant me a little more speed. How do I do this?

I have upgraded the generic kernel package (via upgradepkg) but how do I switch over to that one instead of the generic-smp? What are modules anyway? What modules do I need? Where do I get them? I'm more than a little lost.

Also, I already ran mkinitrd. I never reboot this computer (I'm curious how long it can go without a reboot. I'm shooting for at least a month. It's already been 7 days, 3 hours, 25 minutes and still runs like a fresh boot. Awesome.), but would it boot back up in its current state? All mkinitrd did was create /boot/initrd-tree.

My gratitude to anyone willing to help.

brianL 08-19-2009 03:42 PM

This is what CHANGES_AND_HINTS.txt says about the non-smp kernels:
Quote:

If you decide to use one of the non-SMP kernels, you will need to follow the
instructions in /extra/linux-2.6.27.7-nosmp-sdk/README.TXT to modify your
kernel sources for non-SMP usage. Note that this only applies if you are
using the Slackware-provided non-SMP kernel - if you build a custom kernel,
the symlinks at /lib/modules/$(uname -r)/{build,source} will point to the
correct kernel source so long as you don't (re)move it.

onebuck 08-19-2009 03:56 PM

Hi,

You can reference for the kernel and other configuration details;


SlackwareŽ Essentials
SlackwareŽ Basics

Just a few more links;
Linux Documentation Project
Rute Tutorial & Exposition
Linux Command Guide
Linux Newbie Admin Guide
LinuxSelfHelp
Getting Started with Linux

These links and others can be found at 'Slackware-Links' .
More than just SlackwareŽ links!

Edit: You can also read all the text files for the version to get additional help. Look at the '/boot/README.initrd' to get help with the 'initrd'.

halborr 08-19-2009 04:08 PM

Alright, after the initial shock, I think I'm getting in control again. Thanks onebuck, I didn't realize there was a readme in /boot. That alone helps a ton.

EDIT: Do I need to change lilo.conf?

Code:

#Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/hda1
label = Slackware
read-only #Partitions should be mounted read-only for checking
#Linux bootable partition config ends


halborr 08-19-2009 04:47 PM

Also, which headers should I use? there is no generic-headers-2.6.27.31, only generic-headers-2.6.27.7 and generic-smp-headers-2.6.27.31 (or whatever the naming scheme is).

gegechris99 08-19-2009 05:07 PM

Quote:

Originally Posted by halborr (Post 3650045)
Also, which headers should I use? there is no generic-headers-2.6.27.31, only generic-headers-2.6.27.7 and generic-smp-headers-2.6.27.31 (or whatever the naming scheme is).

Please use the header package provided in the patch directory here.

We will also find answers to your question about lilo.conf in the README file in that directory

halborr 08-19-2009 05:50 PM

OK, troubleshooting time!

It failed to boot all the way. It loaded mbcache.ko, jbd.ko, and ext3.ko modules. Something tells me I needed more than that. It then failed to mount /dev/hd1 on /mnt (that's my / partition. What's going on here?(Or was / hd3? Crap. I can't remember.)) with a no such file or directory error. Then it came up with "ERROR: No /sbin/init found on rootdev (or not mounted.) Trouble ahead. You can try to fix it. Type 'exit' when thigns are done.
/bin/sh: can't access tty; job control turned off.
/$"
(sorry most of the error messages are paraphrased.)
That /sbin/init error reminds me of a sick text-based adventure game. Ugh. So, now what?

I have a feeling that I just hosed my install.

allend 08-19-2009 06:41 PM

Did you add a line like
Quote:

initrd = /boot/initrd.gz
to /etc/lilo.conf?
Did you run lilo after doing this?

Try this:
1. Boot from the Slackware install disk. Continue until just after the selection of the keyboard and you have a root login. (At this point you are running from the kernel on the install disk.)
2. 'mkdir /mnt/tmp'
3. 'mount /dev/hda1 /mnt/tmp'
4. 'chroot /mnt/tmp'
5. 'cd /boot'
6. Now you can rerun mkinitrd (I suggest that you run /usr/share/mkinitrd/mkinitrd_command_generator.sh to get the correct line) and edit /etc/lilo.conf
7. 'exit' - This gets out of the chroot
8. '/mnt/tmp/sbin/lilo -r /mnt/tmp'

The system should now boot correctly.

halborr 08-19-2009 07:40 PM

Ok, I tried that but /usr/share/mkinitrd/mkinitrd_command_generator.sh doesn't exist. How long is it? Maybe someone could post it up and then I could enter it manually.

I have a gut feeling that I didn't get the correct packages. Hmm... Maybe I could just re-install the correct kernel/headers/modules/whatever from the CD. At this point I would be happy just to get it running again without a reinstall. Should've researched this better.

EDIT: Yeah, I have run lilo after every change.

bgeddy 08-19-2009 07:53 PM

The generator you are looking for is in current and Alien Bob has a downloadable copy here.

halborr 08-19-2009 07:56 PM

Oh, excuse me. I forgot to mention slack 12.2. Whoops!

bgeddy 08-19-2009 07:58 PM

Quote:

Oh, excuse me. I forgot to mention slack 12.2. Whoops!
No worries - the kernel version gave that away in any case :)

halborr 08-20-2009 02:50 PM

Ugh. That script is really long to enter by hand... Ah well. I'll spend tomorrow debugging it (typos tend to be rampant...) and if I can't get it to work by then I'm just going to trash the install and reconfigure everything. (hmm... maybe I could put config files on a flash drive. That would save a lot of time.) At least I didn't have any actual valuable data on there.

NOTE: To anyone not sure about how to do the kernel upgrade: RESEARCH RESEARCH RESEARCH and then RESEARCH some more.

halborr 08-20-2009 03:14 PM

DUDE YOU GUYS ARE AWESOME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I hadn't thought about mounting a usb drive from the hacked startup (read the other kernel panic thread) so I actually got the script in its entirety and it worked! I'm now running the generic 2.6.27.31 kernel!

allend 08-20-2009 04:10 PM

Quote:

AWESOME!
No way, just practiced! :-D
Glad that you got it working.


All times are GMT -5. The time now is 11:10 AM.