Jump to content

config

I have been trying to recompile the Linux kernel in kali but when I get do the <make menuconfig> command it throws me this error:

<make menuconfig make: *** No rule to make target 'menuconfig'.  Stop.>

I have been following instructions from the Kali Linux site and have changed the command for the new release of the kernel: https://www.kali.org/docs/development/recompiling-the-kali-linux-kernel/#install-build-dependencies

 

Link to comment
Share on other sites

Link to post
Share on other sites

...did you get any other errors along the way?

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

19 hours ago, swabro said:

I have been trying to recompile the Linux kernel in kali but when I get do the <make menuconfig> command it throws me this error:

<make menuconfig make: *** No rule to make target 'menuconfig'.  Stop.>

I have been following instructions from the Kali Linux site and have changed the command for the new release of the kernel: https://www.kali.org/docs/development/recompiling-the-kali-linux-kernel/#install-build-dependencies

 

Are you on the correct folder?

FX6300 @ 4.2GHz | Gigabyte GA-78LMT-USB3 R2 | Hyper 212x | 3x 8GB + 1x 4GB @ 1600MHz | Gigabyte 2060 Super | Corsair CX650M | LG 43UK6520PSA
ASUS X550LN | i5 4210u | 12GB
Lenovo N23 Yoga

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, igormp said:

Are you on the correct folder?

Yes I was on the kernel directory 

Link to comment
Share on other sites

Link to post
Share on other sites

11 hours ago, Sauron said:

...did you get any other errors along the way?

No I just had to change the version listed from 4.9 to 6.0 and copy it to the .config folder it was a relatively easy thing to do

Link to comment
Share on other sites

Link to post
Share on other sites

27 minutes ago, swabro said:

No I just had to change the version listed from 4.9 to 6.0 and copy it to the .config folder it was a relatively easy thing to do

.config should be a file, not a folder

FX6300 @ 4.2GHz | Gigabyte GA-78LMT-USB3 R2 | Hyper 212x | 3x 8GB + 1x 4GB @ 1600MHz | Gigabyte 2060 Super | Corsair CX650M | LG 43UK6520PSA
ASUS X550LN | i5 4210u | 12GB
Lenovo N23 Yoga

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, igormp said:

.config should be a file, not a folder

Oh sry I meant to say That it was a path I could copy it too( /.config)

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Chunchunmaru_ said:

Do you have the makefile in that folder?

I don’t understand what u mean by that

Link to comment
Share on other sites

Link to post
Share on other sites

22 hours ago, swabro said:

/.config

Erm, you shouldn't storing your kernel config in /

Personally, extracting tarballs in /usr/src/ and running operations from /usr/src/linux[whatever] as root is fine; you are configuring the ostensibly lowest level part of your OS, doing so as root is fine (also some 3rd party modules expect to find the current kernels source in /usr/src/linux, so using uname at boot to have /usr/src/linux as a symlink that points to the running kernel source can be a good (re:applied laziness) idea.

 

1 hour ago, swabro said:
2 hours ago, Chunchunmaru_ said:

Do you have the makefile in that folder?

I don’t understand what u mean by that

So, this is a bit abstract from kernel specific compilation, but "make" as a command expects to find a file in it's invoking directory, literally named "Makefile".

This file tells the make command how to handle specific "targets" (nothing also being a "target"), targets being parts of the software you are trying to configure/compile, and said Makefile is normally in the root directory of the source/submodule you are trying to work with.

 

When compiling a kernel, the targets "[something]config" all deal with the (possibly complex) process of configuring the kernel before compiling it. For make to complain a "target" is missing means you have misspelled something in your command, or you are not in the correct "source root" directory to be running make on that target.

 

The problem with the guide you are following is that it tells you what to do, but not why you are doing it, all the way down to packaging your kernel as a .deb when a simple "make install && make modules_install && grub-mkconfig >/boot/grub/grub.cfg && reboot" does everything you need. Also copying /boot/config-[version] to /usr/src/linux/.config is possibly flawed, when zcat /proc/config.gz >/usr/src/linux/.config will always copy the latest running config and isn't prone to human error (useful after it becomes necessary to make mrproper).

 

Long and short, make sure you are actually in the kernel source root before running make [anything].

Link to comment
Share on other sites

Link to post
Share on other sites

On 12/21/2022 at 11:25 AM, Ralphred said:

Erm, you shouldn't storing your kernel config in /

Personally, extracting tarballs in /usr/src/ and running operations from /usr/src/linux[whatever] as root is fine; you are configuring the ostensibly lowest level part of your OS, doing so as root is fine (also some 3rd party modules expect to find the current kernels source in /usr/src/linux, so using uname at boot to have /usr/src/linux as a symlink that points to the running kernel source can be a good (re:applied laziness) idea.

 

So, this is a bit abstract from kernel specific compilation, but "make" as a command expects to find a file in it's invoking directory, literally named "Makefile".

This file tells the make command how to handle specific "targets" (nothing also being a "target"), targets being parts of the software you are trying to configure/compile, and said Makefile is normally in the root directory of the source/submodule you are trying to work with.

 

When compiling a kernel, the targets "[something]config" all deal with the (possibly complex) process of configuring the kernel before compiling it. For make to complain a "target" is missing means you have misspelled something in your command, or you are not in the correct "source root" directory to be running make on that target.

 

The problem with the guide you are following is that it tells you what to do, but not why you are doing it, all the way down to packaging your kernel as a .deb when a simple "make install && make modules_install && grub-mkconfig >/boot/grub/grub.cfg && reboot" does everything you need. Also copying /boot/config-[version] to /usr/src/linux/.config is possibly flawed, when zcat /proc/config.gz >/usr/src/linux/.config will always copy the latest running config and isn't prone to human error (useful after it becomes necessary to make mrproper).

 

Long and short, make sure you are actually in the kernel source root before running make [anything].

I think I figured out the problem because of what u said about the makefile it meant the filenname(make[filename]) and not just literally typing out makefile

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×