LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   can't tell what i'm running (https://www.linuxquestions.org/questions/linux-software-2/cant-tell-what-im-running-130861/)

wedgeworth 01-02-2004 11:10 AM

can't tell what i'm running
 
ok trying to update kernel....or anything for that matter. and i'm new at and using apt-get to do it. so i do this and these are the results:

# apt-get install kernel
Reading Package Lists... Done
Building Dependency Tree... Done
Package kernel is a virtual package provided by:
kernel-smp#2.4.20-27.7 2.4.20-27.7
kernel-smp#2.4.20-24.7 2.4.20-24.7
kernel-debug#2.4.18-27.7.x 2.4.18-27.7.x
kernel-bigmem#2.4.20-27.7 2.4.20-27.7
kernel-bigmem#2.4.20-24.7 2.4.20-24.7
kernel-BOOT#2.4.20-27.7 2.4.20-27.7
kernel-BOOT#2.4.20-24.7 2.4.20-24.7
kernel#2.4.20-27.7 2.4.20-27.7
kernel#2.4.20-27.7 2.4.20-27.7
kernel#2.4.20-27.7 2.4.20-27.7
kernel#2.4.20-24.7 2.4.20-24.7
kernel#2.4.20-24.7 2.4.20-24.7
kernel#2.4.20-24.7 2.4.20-24.7
kernel-smp#2.4.18-3 2.4.18-3
kernel-debug#2.4.18-3 2.4.18-3
kernel-bigmem#2.4.18-3 2.4.18-3
kernel-BOOT#2.4.18-3 2.4.18-3
kernel#2.4.18-3 2.4.18-3
kernel#2.4.18-3 2.4.18-3
kernel#2.4.18-3 2.4.18-3
You should explicitly select one to install.
E: Package kernel has no installation candidate


so i'm thinking i just need to choose one and i choose the "kernel#2.4.20-24.7 2.4.20-24.7" one and i get this:


# apt-get install kernel#2.4.20-27.7
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
modutils
The following packages will be upgraded
modutils
The following NEW packages will be installed:
kernel#2.4.20-27.7
1 packages upgraded, 1 newly installed, 0 removed and 109 not upgraded.
Need to get 13.3MB of archives.
After unpacking 32.1MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://ayo.freshrpms.net redhat/7.3/i386/updates modutils 2.4.18-3.7x [209kB]
Get:2 http://ayo.freshrpms.net redhat/7.3/i386/updates kernel#2.4.20-27.7 2.4.20-27.7 [13.1MB]
Fetched 13.3MB in 30s (438kB/s)
Executing RPM (-ivh)...
Preparing... ########################################### [100%]
1:kernel ########################################### [100%]
Executing RPM (-Uvh)...
Preparing... ########################################### [100%]
1:modutils ########################################### [100%]


so i'm thinking it worked. so i test it out with this command:

# rpm -q kernel
kernel-2.4.18-3
kernel-2.4.20-27.7

which use to only read "kernel-2.4.18-3" now it says both. which one am i really running? after trying uname i get this:

# uname -r
2.4.18-3smp



which is telling me that the old one is still running. what did i do wrong? which one is running? why didn't apt-get work and trump the old one....what exaclty did apt-get do? if anyone could help me out here....i'd appreciate.

afunke 01-02-2004 11:16 AM

You need to boot the new kernel. (this is one of the few instances a Linux system requires a reboot, which is much less frequent than that other popular MsOS 9.x...)

You may open /etc/lilo.conf (or /boot/grub/menu.lst if your system uses GRUB instead of LILO) in a text viewer (like "less") or in a text editor (like kwrite or vi) to make sure there are entries for both the old and the new kernels, should anything go wrong while booting the new one... And you may also learn whether the new kernel is now the default one.

wedgeworth 01-02-2004 01:42 PM

ok that makes sense...and i probably knew that....however there is still a problem....i checked the boot files you mentioned. lilo.conf did not have the new version of the kernel added. so i added the last entry. here is what it looks like now.

prompt
timeout=50
default=linux
boot=/dev/sda
map=/boot/map
install=/boot/boot.b
message=/boot/message
linear

image=/boot/vmlinuz-2.4.18-3smp
label=linux
initrd=/boot/initrd-2.4.18-3smp.img
read-only
root=/dev/sda6

image=/boot/vmlinuz-2.4.18-3
label=linux-up
initrd=/boot/initrd-2.4.18-3.img
read-only
root=/dev/sda6

image=/boot/vmlinux-2.4.20-27.7
label=linux-up
initrd=/boot/initrd-2.4.20-27.7.img
read-only
root=/dev/sda6



and the boot file even mentions it. i'm assuming i need to change the label on the new kernel to linux and make it where both the old ones say linux-up.....so it will recognize the new one as the default....nothing hard. however my question is....am i missing a file here......should i have a smp file like the old kernel did....

# cd /boot/
# ls initrd-2.4.18-3*
initrd-2.4.18-3.img initrd-2.4.18-3smp.img


and reference both in the lilo.conf file....like the old kernel did....i'm assuming no since apt-get didn't download it...just checking though. not really sure what that file is or what it is doing there.....sorry.

afunke 01-02-2004 03:27 PM

Actually one initrd (initial ramdisk) per kernel should be more than enough, if needed at all!

Usually "smp" kernels are required by multi-processor (more than one CPU) machines...

You are also correct, the labels must be different for each entry, so please change one of the "linux-up" entries to something insightful like "linux-new" for the newest entry...

***** VERY IMPORTANT *****

DON'T FORGET TO RE-RUN /sbin/lilo AFTER EDITING /etc/lilo.conf !!!!!!!

root@localhost root # /sbin/lilo
Added linux *
Added failsafe
Added ...

(the program will perform modifications in the actual bootloader according to the configuration it finds in that text file, and you'll be notified if it succeeded or not, reporting any obvious mistakes it may find like, you may have already have guessed, 2 entries with the same label, or the lack of required options,...).

DON'T FORGET TO LOOK AT /BOOT TO SEE IF THE ACTUAL KERNELS ARE INDEED THERE
Run ls -l /boot
Check the file sizes (sizes of each kernel should be comparable)
Check also any symlinks like vmlinuz -> vmlinuz-2.4.22

!!!

wedgeworth 01-02-2004 03:42 PM

actual i'm running dual processor, but like i said it (2.4.20-27.7 smp file) wasn't downloaded during the installation.....are you saying i need to go get that and install manual?

anyway i've run the lilo command and i did get errors. which is confusing. this is what happened:


# /sbin/lilo
Added linux-up
Added linux-up1
Fatal: Kernel /boot/vmlinux-2.4.20-27.7 is too big


which is curious b/c after looking at the sizes.

# ls -la vmlin*
-rwxr-xr-x 1 root root 2835238 Apr 18 2002 vmlinux-2.4.18-3
-rwxr-xr-x 1 root root 3176626 Apr 18 2002 vmlinux-2.4.18-3smp
-rwxr-xr-x 1 root root 2993917 Dec 11 15:11 vmlinux-2.4.20-27.7

the new one (vmlinux-2.4.20-27.7) is smaller than the old smp (vmlinux-2.4.18-3smp) and the old one adds just fine. according to:

# /sbin/lilo
Added linux-up
Added linux-up1
Fatal: Kernel /boot/vmlinux-2.4.20-27.7 is too big

below is my lilo.conf file. hopefully this will help. now you knowing that i have a dual processor and exactly what the lilo command is doing. thanks again.


prompt
timeout=50
default=linux
boot=/dev/sda
map=/boot/map
install=/boot/boot.b
message=/boot/message
linear

image=/boot/vmlinuz-2.4.18-3smp
label=linux-up
initrd=/boot/initrd-2.4.18-3smp.img
read-only
root=/dev/sda6

image=/boot/vmlinuz-2.4.18-3
label=linux-up1
initrd=/boot/initrd-2.4.18-3.img
read-only
root=/dev/sda6

image=/boot/vmlinux-2.4.20-27.7
label=linux
initrd=/boot/initrd-2.4.20-27.7.img
read-only
root=/dev/sda6

afunke 01-02-2004 06:56 PM

Sorry for not replying earlier, I was away from the computer for several hours, and have noticed your reply just now... I hope it isn't too late...

If your machine has more than one CPU, then indeed you need to install the SMP kernel (the non-smp kernel will still work but slower, because it will use just one CPU...). So you need to run the following commands, as root:

apt-get remove kernel#2.4.20-27.7
apt-get install kernel-smp#2.4.20-27.7

Then check /etc/lilo.conf and /boot again...

OTOH, the "too big" error message is perplexing... I have already experienced a similar error message related to the filename or the label, but not with the actual kernel size as this error message seems to be... Anyway, that kernel will (hopefully) be uninstalled by apt, and if we are lucky, the new SMP kernel will install and run beautifully!

Andreas

Gill Bates 01-02-2004 07:51 PM

make the new kernel by hand, and put more modules in it vs having them permanently in the kernel, modules over come this problem of having a kernel thats to large

wedgeworth 01-05-2004 08:42 AM

thanks guys that worked. the reason we were getting the the "too big error" was because i was using the wrong file.


image=/boot/vmlinux-2.4.20-27.7
label=linux
initrd=/boot/initrd-2.4.20-27.7.img

should have been:

image=/boot/vmlinuz-2.4.20-27.7smp
label=linux
initrd=/boot/initrd-2.4.20-27.7smp.img
read-only
root=/dev/sda6

i was using vmlinux-2.4.20-27.7 instead of vmlinuz-2.4.20-27.7, which is a much larger file. anyway we are working now. the install kernel-smp worked fine, and once i realized i was editing the lilo file wrong by one letter, everything turned out fine. thanks for the help guys. sorry i'm just now getting back to you....i haven't been to the office since friday afternoon.....so i just got it working this morning.

***UPDATE****
when i run uname -r i get this:

# uname -r
2.4.20-27.7smp

which i should. however when i run an rpm query i get this:

# rpm -qa | grep kernel
kernel-2.4.18-3
kernel-smp-2.4.20-27.7
kernel-smp-2.4.18-3

which makes me question.....should i remove...do a apt-get remove on the old kernel stuff....or should i leave it there.....or what?....should i do nothing? what should i do with the old kernel files?

afunke 01-05-2004 09:16 AM

Well, in theory you could remove them, but I think that unless you're running out of room in your HD, perhaps you could leave those files there, just in case you need, for some reason, boot the older kernel... Don't try to fix a system that is not broken...

Andreas


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