LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-27-2003, 11:13 PM   #1
Zeebro
LQ Newbie
 
Registered: Jun 2003
Distribution: RH9
Posts: 25

Rep: Reputation: 15
'make mrproper' problems




Hello I'm just starting out with Linux using the current Slaxkware distro (28/06/03) and I'm having difficulty attempting to create a custom kernel. I'm using 'Slackware Linux Essentials' as a guide, I am istructed to:

"cd /usr/src/linux"

however, on attempting to do this I will receive "...No such file or directory...". After moving through the latter dirs one by one I find that the 'linux' dir does not exist and only /rpm is present in the /src dir. After trying to create this dir manually then using the

"make mrproper"

command I simply receive

"make: *** No rule to make target 'mrproper'. Stop"

What is going wrong here, me? I have tried to re-install the scsi.s kernel from the Slack CD but this makes no difference. I have read a few posts on the net that say this is caused by a corrupt makefile however, as the 'linux' dir does not even exist I have doubts, please help

Last edited by Zeebro; 06-27-2003 at 11:15 PM.
 
Old 06-28-2003, 09:29 AM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
The problem is that you are trying to compile a kernel without having any of the kernel source code.

If you burned your own Slackware installation CD, odds are it didn't have the kernel source on it (most places leave it off their iso to save space). If you got all the Slackware CDs, the source package is going to be on one of the additional CDs.

So you can do one of three things:
1)Load the source package from your CD (if you have one)
2) Download the package from your favorite Slackware mirror (it should be in the k directory)
3) (my favorite option) Get it from kernel.org (get the 2.4.x series, 2.5.x is the development series and can be troublesome)

If you get the Slackware package, it should install into /usr/src/linux and if you get it from kernel.org you'll have to install it there yourself.

Once you have the source installed then you should be on the way to compiling your own kernel.

And just for kicks, give DaOnes thread on kernel compiling a read.
 
Old 07-03-2003, 03:53 AM   #3
Zeebro
LQ Newbie
 
Registered: Jun 2003
Distribution: RH9
Posts: 25

Original Poster
Rep: Reputation: 15
Thanks immensely for your reply. I suspected that my error was in something kinda simple such as not actually having the kernal source in place to begin with. I've since read the guide you directed me to and many others and a logical path is slowly building in my head 8). I think I've got everything in place now such as editing lilo correctly, issueing the correct commands and so on.

My remaining problem however is now that after rebooting the system, lilo will begin loading the kernel but then after the lilo screen I have nothing but a blank monitor and there appears to be no disk activity what so ever. Rather than the parameters I've specified in menuconfig, I'm assuming that vmlinuz is pointing in the wrong direction as I cannot boot the old kernel which was working fine. I don't know though, I am but a noob. I've included the contents of the lilo.conf that i have written to a floppy and attempted to boot with.

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/fd0
message = /boot/boot_message.txt
prompt
timeout = 1200
# Override dangerous defaults that rewrite the partition table:
change-rules
reset
# VESA framebuffer console @ 1024x768x256
vga = 773
# Normal VGA console
# vga = normal
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# End LILO global section
# DOS bootable partition config begins
other = /dev/hda1
label = Wins
table = /dev/hda
# DOS bootable partition config ends
# New Linux bootable partition config begins
image = /vmlinuz
root = /dev/hda9
label = Linux
read-only
# New Linux bootable partition config ends
# Old Linux bootable partition config begins
image = /vmlinuz.old
root = /dev/hda9
label = Linux.old
read-only
# Old Linux bootable partition config ends

Also I am still able to boot this installation with my old lilo diskthe only differences with this config being that the image names point to /boot/vmlinuz & /boot/vmlinuz.old. I had the same results trying to boot a previous cutom kernel build with this lilo disk although the original installs (vmlinuz.old) boots fine.

Lastly as a reference to what I am actually doing here, on my previous attempt I followed the guide to compiling a custom kernel within the 'Official Guide To Slackware Linux' book which can be found at slackware.com. Any further help is greatly appreciated and if I can provide any more information just tell me so. Thanks
 
Old 07-03-2003, 09:18 AM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
What would be helpful here is if you could list the exact steps you took when you compiled and installed your kernel. This information is really needed because the direction to start trouble shooting depends upon how you installed your newly compiled kernel.

That said, there are some things in your lilo.conf that have me confused. Do you really boot from a floppy? Note that you have boot=/dev/fd0. In my lilo.conf I have boot=/dev/hda since that is where my /boot is and I don't use a floppy to boot. Similarly, your image statment image = /vmlinuz suggests that the vmlinuz file is in the / directory. That's fine if that is where you put it (or if you are booting from a floppy, I think), but most installations end up with the kernel in /boot on a hard drive. In my lilo.conf that line is image=/boot/vmlinuz
 
Old 07-03-2003, 10:31 AM   #5
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Quite often, a symlink is put in / to /boot indicating which kernel image to boot. That way they can be given simple names in / and meaningful names in /boot. This could be the problem that zeebro is experienceing. You may need to change the symlink in /. Although I couldn't quite discern that from your data above. I agree with Hangdog42 about listing the exact steps you took to compile and boot your kernel.
 
Old 07-03-2003, 06:28 PM   #6
Zeebro
LQ Newbie
 
Registered: Jun 2003
Distribution: RH9
Posts: 25

Original Poster
Rep: Reputation: 15
Ok firstly yes I ambooting from a floppy. My boot partitiion is FAT 32 and contains entries for win98, XP and 2003 Server. When I run liloconfig and attempt to install it to the boot drive, along with references to the win installs, I receive an error. I can't remember what it is but this situation doesn't reallybother me because it works basically.

Your referance to the vmlinuz situation, a Kernal Howto that I read said that if installing on a slackware system I should use /vmlinuz in appropriate commands as opposed to /boot/vmlinuz. The Slackware guide book also instructs me to enter mv /vmlinuz /vmlinuz.old & cat arch/i386/boot/bzImage > /vmlinuz. I do find this confusing firstly because I would get a 'dir does not exist' error when I first tried this and also because the one version of Slack that i can boot right now (orig install) refers to /boot/vmlinuz.

Anyways never mind, here's how I've done things so far.

First attempt on clean install:
1) cd /usr/include
# rm -fr asm linux
ln -s /usr/src/linux/include/asm asm
ln -s /usr/src/linux/include/linux linux

2) cp linux-2.4.21.tar.gz /usr/src
3) cd /usr/src
4) tar -xvzf linux-2.4.21.tar.gz
5) cd /usr/src/linux-2.4.21
6) make mrproper
7) make menuconfig
8) make dep
9) make clean
10) make bzImage
11) mv /boot/vmlinuz /boot/.vmlinuz
12) cp /usr/src/linux-2.4.21/arch/i386/boot/bzImage /boot/vmlinuz

Please note the guide I'm using never includes the /boot part of these commands, only the /vmlinuz. I had to put these in because I got the "dir doesn't exist error".

13) I now edit /etc/lilo.conf to include the links that I have configured above.
14) lilo

Now I attempt a reboot. The new linux lilo entry begins loading ie the "..." start tracking across the screen and then I'm just taken to a blank monitor, notihing happens even when left for ages. The old entry refering to /boot/.vmlinuz will boot normally.

After this failure I make another attempt following this guide word for word. One thing that struck me herewas that the mv /vmlinuz /vmlinuz.old worked this time witout having to include /boot.

Once again thanks for your attention.

PHEW!!!
 
Old 07-03-2003, 07:10 PM   #7
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
Cool. Phew is right.

I'm betting that lilo isn't finding the new kernel. If you look at your step 12, you're copying the new kernel to /boot, but your lilo is pointing to /. Now adz is correct about the possibility of a link in / and you can easily check if it is there. If it is you might want to delete it and create a new one. The other thing to try would be to change the image entry to /boot/vmlinuz, rerun lilo and see if it finds the new kernel then.


As an extreme last resort (and personally, I would spend some serious quality time with your lilo first), you can use make install. make install will rename your old kernel to vmlinuz.old, copy your new kernel and appropriately update lilo. Since Slackware is a pretty vanilla distro this tends to work well.

You do want to have a good kernel named something other that vmlinuz.old if you do this however since you can easily end up with two bad kernels if you run make install twice in a row. However, since you've got one called .vmlinuz, you're probably safe.
 
Old 07-03-2003, 07:57 PM   #8
Zeebro
LQ Newbie
 
Registered: Jun 2003
Distribution: RH9
Posts: 25

Original Poster
Rep: Reputation: 15
Yeah but I have done 2 different kernel installs using two different lilo's, one including /boot/vmlinuz and one just vmlinuz. Also I#ve already covered the symlink in step 1 of my last post. I think I'm gonna try this make install, seems there's little left to do.
 
Old 07-03-2003, 10:37 PM   #9
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
I noticed that you didn't do a "make modules" and "make modules_install". I asume that means that you didn't compile any of you kernel as modules...

Secondly, it is customary to call the kernel images in /boot something meaningful. For example vmlinuz-2.4.21 (for the original one) and vmlinuz-2.4.21-custom (for the one you compiled). Then you make a couple of symlinks in / pointing to it. Example: type (in the / directory) "ln -s /boot/vmlinuz-2.4.21 vmlinuz.old" and "ln -s /boot/vmlinuz-2.4.21-custom vmlinuz". Then once you modify lilo by adding the lines:

image=/vmlinuz.old
label=LinuxOld
read-only

And running "lilo", when you choose to boot "Linux" from you boot prompt, you'll boot your custom kernel and when you choose to boot "LinuxOld" it will boot your old (and stable) kernel. You keep this as is until you get you own kernel running reliably then you can remove it. The good thing is that once you get lilo booting the kernels (even if they crash later) then you'll never have to update lilo.conf again until you wish to get rid of your old kernel.

With regards to booting windows from lilo, the lines should look like:

other=/dev/hdax #this obviously points to your windows partition
label="Windows"

You just have to make sure your windows partition is the correct one. If you're not entirely sure, type "fdisk -l" and it's the one that has "Win95 FAT32" in the system column. This should stop you from having to boot from floppies all the time.
 
Old 07-04-2003, 01:18 AM   #10
Zeebro
LQ Newbie
 
Registered: Jun 2003
Distribution: RH9
Posts: 25

Original Poster
Rep: Reputation: 15
Thanks man, I'll give it a go. I did actually make modules on the last attempt, just forgot to include that part in my expalnation, sorry.

I just read in the 2.4.21 kernal README which says that I should not tar the source package to /usr/src. It said something about incomplete libraries and somewhere like /home would be a more appropriate location.

I'm gonna try again however I have a question first. In my 3rd post to this thread I include the steps I have taken in previous compile attempts. I'm wondering what the symlinks I have created in step 1) are actually for. On working out what symlinks are, out of curiosity I looked in the /usr/src/linux/include directories to see if maybe this was creating a problem. In this dir i see the /linux dir however i see no /asm dir, only /asm-generic, /asm-i386 and so on. So is the asm link I've created incorrect and what is it intended to do anyway?

Thanks so much again for your help here. I understand how tedious this may be for you and i appreciate your efforts.

Last edited by Zeebro; 07-04-2003 at 01:21 AM.
 
Old 07-06-2003, 03:27 AM   #11
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
To be honest, I don't know what those symlinks are for. The only link you need (that I know of) is the one called "linux" in /usr/src pointing to your kernel source. It's done that way for compatibility. Whenever programs search for the kernel source, they always look in /usr/src/linux first.
 
Old 07-06-2003, 05:44 AM   #12
Zeebro
LQ Newbie
 
Registered: Jun 2003
Distribution: RH9
Posts: 25

Original Poster
Rep: Reputation: 15
Ok cheers man. I still can't get the custom kernel to boot, I'm just gonna leave this on the side for now. thanks for the input everyone though it has helped me see things more clearly.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
make mrproper needed? Samoth Linux - General 5 11-28-2005 08:07 AM
make mrproper error pazkaw Linux - Newbie 1 04-02-2005 12:19 PM
Use of 'make mrproper' and 'make clean'.... fenice1976 Linux - Software 6 05-25-2004 06:18 PM
lfs 5.0 make mrproper error meadowfair Linux From Scratch 5 10-25-2003 03:40 AM
'make mrproper' - make bzImage options. liguorir Linux - Software 4 06-26-2003 07:48 PM


All times are GMT -5. The time now is 02:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration