LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Kernel Compile help (https://www.linuxquestions.org/questions/slackware-14/kernel-compile-help-617926/)

Bruce Hill 02-06-2008 12:08 AM

Originally posted by okos:
Quote:

Guys, thanks for all of the help. Bruce, I appreciate all of the details.

I started reading the book Linux Kernel In a Nutshell last night. Im on chapter 6.


Actually I followed the link provided by perry. However, I had pretty much no clue on all of the choices in setting up the config.

Bruce, that Kernel Rebuild Guide (link removed) is now working. I could not get it last night.

I will finish the book and the the rebuild guide before getting started.

Thanks again
Dennis
Dennis,

That guide you linked above (provided by perry) has some steps which are inconsistent with both the Linux Kernel in a Nutshell book, and the instructions that come with the Linux kernel source in it's README file. I'd compare those before following it verbatim in the future. From reading it a little I can see why you might have had problems with that kernel recompile.

The reason you couldn't get the 2.6-kernel-build.txt last night is probably because my bandwidth there was used up for the day. That's why I'll be removing it from there and just leaving it here.

I'm glad you're being helped by the details. Post if you have more questions ... there are plenty of other guys here more experienced than I, so you should surely get the help you need.

hellasyoda 02-10-2008 02:02 AM

My kernel panic
Code:

No filesystem could mount root tried
kernel panic - not syncing.vfs  unable to mount root fs on unknown - block (22,1)

tnanks

Bruce Hill 02-10-2008 03:17 AM

Quote:

Originally Posted by hellasyoda (Post 3052167)
My kernel panic
Code:

No filesystem could mount root tried
kernel panic - not syncing.vfs  unable to mount root fs on unknown - block (22,1)

tnanks

From post #5:
Quote:

NB: In the configuring of your kernel, if you include support for your root filesystem and hard disk controller as built-in (Y or a check mark), rather than as a module (M or a dot), then you don't need an initrd image. If you have the support for your root filesystem or controller as a module, you should also build an initial ram disk image (initrd). To do this, change to the /boot directory by issuing "cd /boot" and follow the instructions in the file "README.initrd" before proceeding to the next step.
You must have support for your / (root) filesystem built into the kernel. Looks like you don't. That's the most common mistake most of us make when we first start building new kernels.

Boot into your default kernel, and issue:
Code:

df -hT
which will tell you which partitions are mounted where with which filesystems. Such as:
Code:

mingdao@silas:~$ df -hT
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda5      jfs    9.3G  4.0G  5.4G  43% /
/dev/sda6      jfs    93M  22M  72M  24% /boot
/dev/sda7      jfs    3.8G  39M  3.7G  2% /var
/dev/sda8      jfs    24G  6.3G  18G  27% /home
/dev/sda1    ntfs    15G  8.4G  6.4G  57% /Windows
/dev/sda2    vfat    19G  13G  6.1G  68% /Shared
192.168.1.11:/home
              nfs    28G  18G  11G  61% /serverhome
192.168.1.11:/backup
              nfs    233G  230G  3.0G  99% /server1
192.168.1.11:/backup2
              nfs    233G  224G  9.0G  97% /server2
mingdao@silas:~$

The / (root) partition, /dev/sda5, on that box is using the JFS filesystem. So in my kernel:
Code:

mingdao@silas:~/kernel/linux-2.6.24.1$ cat .config | grep -i jfs
CONFIG_JFS_FS=y
# CONFIG_JFS_POSIX_ACL is not set
CONFIG_JFS_SECURITY=y
# CONFIG_JFS_DEBUG is not set
CONFIG_JFS_STATISTICS=y

support for JFS is built in (CONFIG_JFS_FS=y).

Rather than rebuild the kernel, you can make an initrd (initial ramdisk) image and use that instead. Then your kernel will boot without you having to rebuild it. Read the instructions in /boot/README.initrd if you want to do that.

hellasyoda 02-11-2008 05:31 AM

Quote:

Rather than rebuild the kernel, you can make an initrd (initial ramdisk) image and use that instead. Then your kernel will boot without you having to rebuild it. Read the instructions in /boot/README.initrd if you want to do that.
i used this method
Thanks for help my new kernels works :)

Bruce Hill 02-11-2008 11:54 AM

You are welcome ... so glad you got your first new kernel working!

okos 02-11-2008 11:07 PM

Few questions about kernel settings.
 
I have a dell inspiron 5150 laptop, 512 ram, 60 gb Toshiba disk. nVidia GeForce FX 5200 64M, Mobile Pent 4
I was wondering about a few kernel settings.
1. ACPI or APM or neither.
2. High Resolution Timer support? Y or N
3. SLAB or SLUB

Bruce Hill 02-13-2008 03:45 AM

1 - ACPI
2 - HIGH_RES_TIMERS and NO_HZ and HZ_1000
3 - SLAB

okos 02-14-2008 11:10 PM

Quote:

Originally Posted by Bruce Hill (Post 3055404)
2 - HIGH_RES_TIMERS and NO_HZ and HZ_1000

Hi
Im not sure what you are saying here "NO_HZ and HZ_1000". I assume you are talking about either un-checking the timer frequency or selecting 1000 HZ. It seems that I only have the option of selecting one of the speeds 100,250, 300, or 1000. I dont have the option to deselect timer frequency.

FYI I found lshw quite helpful in finding my computer hardware.

Thanks for your help Bruce Hill

okos

gr8scot 02-18-2008 05:58 AM

You want 'make oldsilentmenuconfig'
 
Quote:

Originally Posted by shadowsnipes (Post 3043363)
The big difference with menuconfig and xconfig versus the plain config/oldconfig/silentoldconfig is that with the first two you can look at groups of stuff and in particular look at things in a non-linear fashion. I'm sure most people reading this are thinking "thanks, Captain Obvious", but the point is that it would be nice to have the old config options grayed out (a toggle-able feature, mind you) so the NEW options stand out more. That way it is easier to see how they fit into the groups. In addition, it would be nice to have a "group"/tab/whatever where you see only the NEW options. All of this is only useful in the context of an interface that allows you to change/view config settings in a non-linear fashion. Otherwise, yes, silentoldconfig is the way to go. Personally, I dislike the vanilla config and oldconfig because I don't typically configure a kernel in a completely linear fashion. Sometimes I even change my mind about things during the process...

I hope that clarified what I was going for.

It was clear. What's working well at the moment for me is to try 'make' with output to a file:
'make > ../out'

Besides reading as 'makeout', this causes all the 'works, OK' output to a text file one directory above the working directory, so only errors are displayed in the terminal. This way I don't have to dig through hundreds of rows of uneventful messages to find the few problems I want to fix by running 'make gconfig' again. IMO it's better as-is than 'greying out' options I might just decide I want to change, for example because I notice that I want to add support for a peripheral I forgot I had, until I saw an error message from a neighboring directory. Or, what have you. It's just another mundane example of giving us more options, and how that works better as you become aware of more of your options.

Now, please excuse me, I'm going to go check whether, after fixing a problem in drivers/net, there are any other errors in the 'make' command that was running when I started this reply.

okos 02-18-2008 11:37 PM

Quote:

Originally Posted by gr8scot (Post 3061213)
It was clear. What's working well at the moment for me is to try 'make' with output to a file:
'make > ../out'

It sounds like a great idea. Could you show the entire command? Please understand Im quite new to Linux.

okos

duryodhan 02-19-2008 03:31 AM

people do make > /dev/null so that only errors are display iirc.

gr8scot 02-21-2008 10:39 AM

/dev/null
 
Quote:

Originally Posted by duryodhan (Post 3062238)
people do make > /dev/null so that only errors are display iirc.

Chuckle, you're so right! I actually wanted to store the output for review because I was getting warnings but not FATAL errors, and didn't think of the obvious answer to that question at the time. Funny.

gr8scot 02-21-2008 10:45 AM

> /directory/filename
 
Quote:

Originally Posted by okos (Post 3062104)
It sounds like a great idea. Could you show the entire command? Please understand Im quite new to Linux.

okos


Sure thing.

In general, you can use the symbol '>' after any command to redirect the output of that command from the terminal to a file, whose location you specify just after '>' so in this case, to mimic the 'C:\...\Desktop\file.txt' you're probably accustomed to in that other operating system, the form is:

[command] > /home/[yourusername]/Desktop/file

Note: Extensions are not generally necessary in Linux. I believe there are a couple exceptions, in software ported from Windows, but native Linux apps associate programs to files by the content, not the filename extension, so you can call log files confusing-error.log, or log.frustrating, or dear.diary, if it's that kind of a log. Welcome to Linux.

okos 02-22-2008 11:21 PM

Thanks a bunch for the response and the learning lesson;).
okos

okos 02-23-2008 12:54 AM

After two weeks on working to configure my new kernel I ran into a slight snag. For some reason I don't have the option to boot the new kernel in lilo. Here is my lilo.conf file.

Quote:

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/hdc
#compact # faster, but won't work on all systems.
prompt
timeout = 300
# 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
# ramdisk = 0 # paranoia setting
# End LILO global section
# Linux bootable partition config begins
#my linux kernel
image = /boot/vmlinuz-2.6.24
root = /dev/hdc5
label = Slack-2.6.24

#Slack distribution kernel
image = /boot/vmlinuz
root = /dev/hdc5
label = Slack
read-only # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
# Windows bootable partition config begins
other = /dev/hdc1
label = XP
# map-drive = 0x80
# to = 0x81
# map-drive = 0x81
# to = 0x80
table = /dev/hdc
# Windows bootable partition config ends
I followed Bruce Hill's instructions on installing a new 2.6 kernel.


All times are GMT -5. The time now is 12:27 PM.