Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Sorry to have double-posted, but I'm not really sure what to do or where to ask.
Linux isn't running too well on my machine right now, and among other things, I am wanting to recompile my kernel.
Someone gave me some detailed instructions in another thread, but I can't seem to do what they suggested. Maybe because they're using Slack, as I am running RedHat 9. Or maybe not. Here's what I get following their instructions in the first couple of lines.
[root@Penguine CD_Burn]# cd /usr/src
[root@Penguine src]# ls -1
debug
linux-2.4
linux-2.4.20-8
redhat
[root@Penguine src]# cd /usr/src/linux
bash: cd: /usr/src/linux: No such file or directory
Does this mean I don't have a kernel installed? If so, how could it even run? And what should I do? I have downloaded linux-2.4.21-tar.bz2, but don't know what to do with it.
My objective is to remove services, or packages, or whatever that aren't needed. I'm at the point of reinstalling and choosing everything again, also to change my bootloader to use Grub to choose - right now I have to change boot devices in bios.
You may not have the kernel sources but you've definitely got the kernal. *g* And, yeah, to recompile, you need the source. Just unzip that massive tarball in /usr/src and it'll create a Linux-blah-blah directory. 'cd' into that and have fun.
Oh yeah - and make a symlink called 'Linux' to the Linux-blah-blah in /usr/src. (I think I remember that right.)
bunzip2: Data integrity error when decompressing.
Input file = linux-2.4.21.tar.bz2, output file = linux-2.4.21.tar
It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.
You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.
bunzip2: Deleting output file linux-2.4.21.tar, if it exists.
Do I need to download it again?
I have many *little problems* now. Too many procs running, too slow on boot, too slow running in Linux, some packages (such as pico) that I had before are gone, sound plays only through mic jack, I don't have dual boot setup in Grub (but change boot dev in bios to switch between RH & doze).
I am ready to format this hdd (Linux on one, Windoze on another) and do a new installation.
When this is done, I want to use the i686 version instead of i386, but can't find that anywhere.
There's actually 4 other dir in /usr/src/
debug, linux-2.4 (in italics with one green refresh type arrow), linux-2.4.20-8, and redhat.
The debug dir is empty.
The redhat dir has BUILD, RPMS, SOURCES, SPECS and SRPMS.
RPMS has athlon, i386, i486, i586, i686 and noarch. These last 6 are all empty.
I downloaded linux-2.4.21.tar.gz
Any suggestions?
Last edited by Bruce Hill; 07-14-2003 at 03:46 AM.
Did you download the kernel source in Windoze? If so, what browser? Often that can corrupt the file you are downloading, or at least decompress it.
Compare the size of your linux-2.4.21.tar.bz2 file with the stated size on the download site. Or better yet, go here: http://www.kernel.org/signature.html for information about verifying the kernel source files.
When or if you have the correct file, use the command:
tar -xjvf linux-2.4.21.tar.bz2
to decompress it. That will do the bunzip2 and untar in one operation and it will preserve the original file.
Oh, one other thing, in the command 'ls -l' the option is a lower case L, not a one. 1 is the number of columns in the listing, l (lower-case L) is for Long listing, and will give you more info about the files in the directory.
That's weird. I don't know why it couldn't find the directory if it was there. Either the symlink's screwed or the directory has root-only permissions or something. If you want to use the newer kernel, just unpack it and make sure the symlink points to it. f you want to use the source you've already got, make sure the symlink is pointing to it, instead, and make sure /usr/src/linux/etc. all has the right permissions. You wouldn't be allowed to cd if you didn't have execute permissions and would be told it didn't exist even though it does. Or you might be told 'permission denied'. And if, say, make couldn't find it, it would be because the symlink was pointing at, say, kernel 2.4.16 or something. *g* Of course, it could be something else, but those two seem the likeliest to me. As long as you unpack the new one as user and create the symlink, the new one should be correct.
Originally posted by digiot That's weird. I don't know why it couldn't find the directory if it was there. Either the symlink's screwed or the directory has root-only permissions or something. If you want to use the newer kernel, just unpack it and make sure the symlink points to it.
That was one problem. Did this to fix the ownership problem, but I don't have a clue how to do anything about symlink, though I believe it's okay now.
The bz2 was downloaded with windoze - and I was using the lower case L. I couldn't get to the site in either Mozilla or Knoqueror through Linux, or IE6 in Windoze. Finally, thinking it was blocked from here, I went behind a transparent proxy server in Windoze and got to the link - after 4 days of unsuccessful tries. That's why it was downloaded through doze - don't have stunnel setup in Linux - yet.
Okay. Now I will try again. But what I want to do is use the new kernel (linux-2.4.21.tar.gz) instead of the old one that's already there. I have a good set of instructions on building the kernel, but I am only guessing about how to use the new one versus the old one. Can you tell me how to do this, please?
For a link, ln -s Linux-2.4.20-8 Linux should do it - or use mc, which is what I do beccause I can never remember which comes first. *g* That symlink is named Linux-2.4 and I think that's the problem. It should be just Linux.
To make a new one point to the new source, just do 'ln -s Linux-2.4.21 Linux. I'm not clear what other parts you need help with. I mean, you go through the configure process, compile, copy the kernel into boot, edit lilo.conf (if you use LILO) to point to the new kernel as default with the old one as a second choice (for backup), rerun LILO, reboot, and your new kernel should start. Precise details are fuzzy for me but should be in the docs.
I will try and recompile now. Is renaming of the existing symlink to blah-blah.old necessary before I start, or will it be rewritten by the do 'ln -s Linux-2.4.21 Linux'? And isn't that file name case sensitive?
Maybe I should take that sig off. *g* If people don't know about them, they can be ignored like they should be. SCO is the Santa Cruz Operation (think that's what it stands for) which is the group claiming that IBM stole Unix code and stuck it in Linux and further claimed that Linux would suck if they hadn't done so. Which is pretty damned insulting to all the Linux hackers out here. There's a lot more to it than that, but that's one thing that particularly annoyed me.
I'm not sure - I believe the command will just replace the old symlink. If not, just delete the old one and make the new one. And, yeah, it's definitely case-sensitive. I don't have any kernel source on this particular system so I'm not sure but I think it's capitalized. Check the docs on that - the kernel source is *full* of documentation - and there should be something about that. Or maybe someone here can add to this. I'm about to wake up with keyboard face so I need to go get some sleep. Good luck!
I'm sitting down to dinner here, and will try it in a little bit. Afterwards, I'm going to reinstall, also. I got too many little things to iron out, and I want to get the bootloader right, too. But first, I will recompile so that when I do it right after the reinstall, I'll know what's going to happen.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.