LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-16-2005, 10:24 PM   #1
welery
LQ Newbie
 
Registered: Jan 2005
Posts: 22

Rep: Reputation: 15
kernel building with fat32


I'm using Ubuntu and I'm trying to rebuid the kernel so that my tv card works. I did get it to build and the tv card worked but my windows drive isn't mounting. The windows drive is fat32 format. I looking in /lib/modules of the current kernel i am using and i noticed that in /lib/modules/2.6.10-5-386/kernel/fs there are directories fat and vfat which have modules in there. I'm guessing these are used for the fat32 file systems. In the kernel i just built these directories aren't there. I build the kernel by doing:

make clean
--applied patch for tv card
make mrproper
make oldconfig
make gconfig (enabled tv card drivers)
make all
make modules_install
then copied the kernel to /boot
used mkinitrd to create init img
then modified grub bootloader

Can someone please tell me what I am doing wrong?
Should i have the fat and fat32 modules in the lib/modules/kernelversion/kernel/fs directory?

Last edited by welery; 04-16-2005 at 10:26 PM.
 
Old 04-16-2005, 10:35 PM   #2
Thoreau
Senior Member
 
Registered: May 2003
Location: /var/log/cabin
Distribution: All
Posts: 1,167

Rep: Reputation: 45
If you added vfat to the kernel itself, then they wouldn't be there. If you added vfat as a module then it would be there. If your didn't make modules, then none of it would be there. And you didn't make modules, so there you are. Isn't that super!

Here is a short tutorial:

rm -f /usr/src/linux
mv linux-X.X.X.tar.gz /usr/src
cd /usr/src
tar -zxvf linux-X.X.X.tar.gz
mv linux linux-X.X.X
ln -s linux-X.X.X linux
cd linux

Ok. Now we have the kernel source unpacked and placed in the directory /usr/src/linux where we want it. We are ready to start building the kernel now. *The following steps must be executed in the same order that they are listed here. make mrproper; make menuconfig; make dep; make clean; make bzImage; make modules; make modules_install

# make mrproper - Removes any old build files. If this is a new source tree, there shouldn't be any, but it doesn't hurt to run this the first time you build a kernel.
# make menuconfig (or xconfig if you prefer a gui) - This step is the most difficult one. You need to step through *all* of the kernel options and make sure that you enable everything you need. Keep in mind to also disable options that you don't need, as a smaller kernel runs faster. Using modules is a good way to minimize your kernel. *Pay attention here, take your time and read the help section for the options that you don't understand.

# make dep - Builds all of the kernel dependencies
# make clean - purges any old builds from the build directory
# make bzImage - This step is what actually builds your kernel. When this step completes, you will have a file called /usr/src/linux/arch/i386/boot/bzImage . This is your new kernel!
# mv bzImage /boot/vmlinuz-X.X.X-new - put the new kernel into the boot directory, making sure not to over-write any old kernels (we want to save the old in case our new kernel doesn't boot)

If you are using modules, you will need to run the following two commands to build and install your modules.
# make modules - builds kernel modules
# make modules_install - installs kernel modules in /lib/modules/X.X.X

Now our new kernel is built and in place, all we have to do is add the new kernel to lilo or whatever boot loader you use. I will only cover lilo (LInux LOader) here.

Using your favorite editor (I like vi), add the following lines to /etc/lilo.conf

image=/boot/vmlinuz-X.X.X-new
label=new
root=/dev/hda1
read-only

Now run the command /sbin/lilo to get lilo to reread its config file. It should output something like:

[root@localhost linux]# /sbin/lilo
Added linux *
Added new
 
Old 04-16-2005, 10:44 PM   #3
welery
LQ Newbie
 
Registered: Jan 2005
Posts: 22

Original Poster
Rep: Reputation: 15
I did do "make all". I assumed that does do a make modules?
 
Old 04-18-2005, 12:45 AM   #4
Thoreau
Senior Member
 
Registered: May 2003
Location: /var/log/cabin
Distribution: All
Posts: 1,167

Rep: Reputation: 45
I guess that's a bad assumption. This is a kernel build, not an app.
 
  


Reply



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
Building Kernel spaaarky21 Fedora 0 02-06-2005 07:50 PM
Building kernel module from multiple source file in 2.6 kernel yogeshwar_s Programming 1 12-20-2004 09:31 AM
Problems building a simple kernel module for kernel 2.6.7 atticman Linux - Software 2 12-13-2004 03:35 PM
Building a Kernel DB03 Linux - Newbie 6 06-12-2004 08:41 AM
Building kernel mods for an existing kernel ugenn Linux - Software 2 10-06-2003 01:25 PM

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

All times are GMT -5. The time now is 03:30 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