LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 10-09-2024, 08:57 PM   #46
rd2play
Member
 
Registered: Sep 2003
Location: Arizona
Posts: 71

Original Poster
Rep: Reputation: 1

Well, the kernel headers are a different version from the kernel I built. The headers are the same as the original Ubuntu kernel version, 6.8.0-45, and the kernel I downloaded is 6.8.12.

I got the code with 'apt source linux-image-unsigned-$(uname -r)', but it didn't download the 6.8.0-45 code, which was my kernel at the time. I'm not familiar with how the different distros work, but I guess somewhere there is a discrepancy.

I finally found the 6.8.12 headers, although they are 6.8.12-common. I'll build the kernel again and hopefully the new headers will be used. It looks like they are installed

Quote:
apt search linux-headers-$(uname -r)
Sorting... Done
Full Text Search... Done
linux-headers-6.8.12-common/now 6.8.12-1 all [installed,local]
Common header files for Linux 6.8.12

Last edited by rd2play; 10-09-2024 at 09:57 PM.
 
Old 10-09-2024, 10:41 PM   #47
rd2play
Member
 
Registered: Sep 2003
Location: Arizona
Posts: 71

Original Poster
Rep: Reputation: 1
I built the kernel with the new kernel headers and I still can't insmod ext4.ko. I don't know... I give up.

Going forward I'll simply build the entire kernel after each code change and that's that. I'm not modifying anything else, so the kernel builds pretty quickly.

It's far from ideal, building the kernel every time I make a code change and then rebooting. Building ext4 alone and using it as a module would have been so much quicker. Maybe over time I'll find a better solution.
 
Old Yesterday, 06:04 AM   #48
rd2play
Member
 
Registered: Sep 2003
Location: Arizona
Posts: 71

Original Poster
Rep: Reputation: 1
Ok, latest findings in case anybody ever searches for this issue. I still can't load the ext4 module alone, but at this point it's irrelevant. I found a way to not rebuild the kernel and reboot after each code change.

1. Make sure ext4 is not loaded with lsmod | grep ext4. If it is, run 'modprobe -r ext4'.
(If step 1 is skipped and the ext4 module is still loaded, the kernel will keep using the old version after steps 2 and 3. You'll wonder why you don't see the code changes in dmesg.)
2. Build ext4.ko in the source code directory ('make --debug=v -C /home/linux-6.8.0 M=/home/linux-6.8.0/fs/ext4')
3. Run 'make modules_install' (this will put the newly built ext4.ko in the /lib/modules/kernel version/kernel directory)

Now the new ext4 is available to modprobe and mount and the printk output displays in dmesg. Maybe I'll find out some day why ext4 can't be loaded as a standalone module, but that's just for my curiosity.
 
  


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: *** No targets specified and no makefile found. Stop. Maryam Sajedi Linux - Newbie 4 08-07-2012 05:34 AM
[SOLVED] Installing libjpeg-turbo,make: *** No targets specified and no makefile found. Stop. Lumify Linux - Software 2 02-14-2012 07:15 AM
make: *** No targets specified and no makefile found. Stop. amritpalpathak Linux - Software 5 12-21-2011 02:27 AM
automake, makefile, makefile.in and makefile.am Fond_of_Opensource Linux - Newbie 1 09-12-2006 08:35 PM
what is the meaning of Makefile,Makefile.am,Makefile.in cynthia_thomas Linux - General 3 12-08-2005 05:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

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

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
Open Source Consulting | Domain Registration