Go Back   openSUSE Forums > Archives > SLS Archives > ARCHIVES - Linux Tweaks > ARCHIVES - HowTos Discussions
Forums FAQ Members List Search Today's Posts Mark Forums Read


ARCHIVES - HowTos Discussions Have any questions about any HowTo found at the wiki? Post in here!

 
Page 1 of 10 1 23 Last »
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 26-Mar-2005, 21:24
broch
Guest
 
Posts: n/a
Default

I pulled together information available from the internet about building custom kernel. I was using these notes when I was building kernels. Because my notes are quite chaotic, I tried to make them more readable for pourpose of this howto. In case of errors please let me know if you find some inconsistencies, or not finished thoughts. I tried to clean the mess but it is possible that something may be still not clear.

Custom kernel can be patched by MM, AC, CK or nitro patches. Con Kolivas (CK) and nitro patches never worked for me, although these looks quite interesting.

I used grsecurity patch. It is about.... security of course. This patch makes it easy to enhance kernel/system security. If you are using X, then remember that some options will stop X from working, however even if you are using X you can select other options which will not breake X and still enhance security.

I was able to cut memory usage tremendously: from 138MB (kernel + KDE) to ~115MB. If your kernel is taking more RAM than default and is slower then I suggest to work more on the optimization.

Plan what devices you need, what network configuration and so on. If you dont use NFS then remove it, if you are using it, do you need NFS3 and NFS4? So planning is most importand part, the rest is really easy

This howto was made based on my experiences with SuSE 9.2 64-bit, however it will apply to other SuSE/linux distros too. It may need some small adjustments, that is all.

I have not added my .config file but you can use default config file located (in case of SuSE) in /boot

remember however that this config file is not optimized, it contains all options needed to boot most of the hardware condifurations.
So use default config only as a sort of guideline.

If you follow this howto carefully, then working, defautl kernel will never be overwritten. So in the case that new kernel fail to boot it should be easy to go back to old and trusty

I thought that pdf format would be easier to read, however because text format is preffered howto is saved in a text format
  #2 (permalink)  
Old 27-Mar-2005, 05:35
a1phaomega
Guest
 
Posts: n/a
Default

Title: HowTo: Build a custom kernel
Discription: For advanced users

http://forums.suselinuxsupport.de/in...howtopic=13704

Post any comments / questions / etc. in here.
  #3 (permalink)  
Old 30-Mar-2005, 15:01
masmer
Guest
 
Posts: n/a
Default

Quote:
Originally posted by a1phaomega@Mar 27 2005, 07:35 AM
Title:* HowTo: Build a custom kernel
Discription: For advanced users

http://forums.suselinuxsupport.de/index.ph...t=0#entry787004

Post any comments / questions / etc. in here.
[snapback]78702[/snapback]
Thank you for this informative, and in my case, very timely document. I've succesfully upgraded one of my 2.6.8 Suse 9.2 boxes to 2.6.11.4-20050323150210-default. However, I'm not having as much success with a second one. Some of its quirks are:

- it has a Sil 0680 ATA board for speedier hard drive access, while the DVD and CD-RW drives are using the two on board IDE channels.
- the root partition has its own Raiser partition, but the home directory is mapped into an LVM partition.

Again, this configuration is working under the latest kernel from Suse 9.2.

However, now when I try to boot under either the latest KOTD or the latest vanilla 2.6.11 kernel, I get the following page. I'm providing a snapshot, since I don't feel like typing it all in.



It seems to find the drives, even identifies them by their non-standard /dev/hde, /dev/hdg, /dev/hdh mappings, but something goes awry pretty quickly.

Any help on what is missing, not being found, broken, ... ?

I'm somewhat of a newbie, so be gentle if this is a stupid/obvious problem :blink:

Thanks
Michael Mast






s
  #4 (permalink)  
Old 30-Mar-2005, 15:08
a1phaomega
Guest
 
Posts: n/a
Default

isn't the /tmp directory now mounted in /etc/fstab as shared memory?
  #5 (permalink)  
Old 30-Mar-2005, 15:40
masmer
Guest
 
Posts: n/a
Default

I'm not sure what you mean? Are you responding to my post? My fstab looks like

Code:
/dev/hdg6 * * * * * */ * * * * * * * * * *reiserfs * acl,user_xattr * * * *1 1
/dev/hde1 * * * * * */boot * * * * * * * *ext2 * * * acl,user_xattr * * * *1 2
/dev/hde6 * * * * * */files * * * * * * * reiserfs * defaults * * * * * * *1 2
/dev/system/home * * /home * * * * * * * *reiserfs * defaults * * * * * * *1 2
/dev/hdg8 * * * * * *swap * * * * * * * * swap * * * pri=42 * * * * * * * *0 0
devpts * * * * * * * /dev/pts * * * * * * devpts * * mode=0620,gid=5 * * * 0 0
proc * * * * * * * * /proc * * * * * * * *proc * * * defaults * * * * * * *0 0
usbfs * * * * * * * */proc/bus/usb * * * *usbfs * * *noauto * * * * * * * *0 0
sysfs * * * * * * * */sys * * * * * * * * sysfs * * *noauto * * * * * * * *0 0
/dev/cdrecorder * * */media/cdrecorder * *subfs * * *fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/dvd * * * * * * /media/dvd * * * * * subfs * * *fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/fd0 * * * * * * /media/floppy * * * *subfs * * *fs=floppyfss,procuid,nodev,nosuid,sync 0 0
and a listing of /dev/shm is

Code:
drwxr-xr-x * 2 root root * *140 Mar 30 16:27 Desktop
and a listing of /dev/shm/Desktop is
Code:
-rw-r--r-- * 1 root root * 69 Mar 28 10:50 .directory
-rw-r--r-- * 1 root root 2409 Mar 28 10:49 Network.desktop
-rw-r--r-- * 1 root root *579 Mar 28 10:49 Office.desktop
-rw-r--r-- * 1 root root *646 Mar 28 10:49 Printer.desktop
-rw-r--r-- * 1 root root *421 Mar 28 10:49 SuSE.desktop
-rw-r--r-- * 1 root root *569 Mar 28 10:49 myComputer.desktop
-rw-r--r-- * 1 root root 4873 Mar 28 10:50 trash.desktop
What's supposed to mount(?) /dev/shm?
  #6 (permalink)  
Old 30-Mar-2005, 16:24
a1phaomega
Guest
 
Posts: n/a
Default

I'm trying to find it myself at the moment, but I noticed the shm errors on your screen cap -wonder if its relevant
  #7 (permalink)  
Old 02-Apr-2005, 14:03
Toniee
Guest
 
Posts: n/a
Default

Great tutorial Alpha.
  #8 (permalink)  
Old 02-Apr-2005, 14:35
a1phaomega
Guest
 
Posts: n/a
Default

Its Broch's tutorial - he did an excellent job on it...!
  #9 (permalink)  
Old 02-Apr-2005, 16:18
broch
Guest
 
Posts: n/a
Default

masmer,
sorry for the late response, maybe it is still not to late.

for suse kernel-of-the-day to work you need latest mkinitrd (take look at maintainer's notes)
you will have two problems here:
1. mkinitrd-1.2.8 (the latest) is incompatible with anyting below 2.6.11.
1a. installation of mkinitrd-1.2.8 will erease default kernel (but not custom kernel fom suse sources if you have changed kernel name (in .config). So in this case you will be left without kernel if you did not change (internal) names and symlinks. That is o.k. if you are 100% sure that a new kernel will work and you install it before re-boot.
2. mkinitrd is absolutely necessary work suse kernel-of-the-day to work, again maintainer's notes)
3. mkinitrd needs /boot formated in ext2

4. you should not use .config from 2.6.8 in 2.6.11. When you will close xconfig (menuconfig) you should see a lot of errors indicating that some options are not available.
5. there is no point of using original .config because you will have big/slugish kernel as the original one. This is not to blame SuSE. default kernel must be like that to accomodate as many hardware configurations as possible.

conclusions:

download latest 2.6.11.6 vanilla configure aind install (without initrd, but it is not needed here, you will lose splash screen. Personally I don't like it anyway because I want to know what is failing to start)

remember that if you have nvidia 3D, you will need nvidia drivers version 7167, earlier versions are incompatible with kernel 2.6.11.x

If you have SATA disk, then you need to find out how disk is recognized, all in my howto.

If you have more questions I will try to answer
  #10 (permalink)  
Old 02-May-2005, 21:59
[Yatta]
Guest
 
Posts: n/a
Default

From the HowTo: Building custom kernel
Code:
13.edit .config file (dot at the beginning)
scroll down to the line:
CONFIG_BLK_DEV_RAM_SIZE and change value to 128000
save file (this is SuSE setting)
14.at prompt issue the following commands:
export CHOST="x86_64-pc-linux-gnu" IF AMD_64 -> If not see below!
export CFLAGS="-march=k8 -O2 -funroll-all-loops -funit-at-a-time -fpeel-loops -ftracer -funswitch-loops -pipe -fomit-frame-pointer -fweb"
export CXXFLAGS="${CFLAGS}"
export MAKEOPTS="-j2"
notes if you have 32-bit processor then you can use -O3 optimization. Don't use more that -O2 id you have 64-bit processor because either kernel will not compile or what is worse will generate faulty kernel.

CHOST: x86_64-pc-linux-gnu” – amd64
CHOST: “i386-pc-linux-gnu”
CHOST: “i686-pc-linux-gnu” Athlon XP or Intel PIV
CHOST:”i586-pc-linux-gnu”
-march=k8 AMD64
-march=athlon-xp
-march=i686
-march=i586
-march=i386
MAKEOPTS= will set number of concurrent threads. I have 1GB of RAM so I can run MAKEOPTS=”-j6”
however with 256MB RAM and 1GHz CPU try “-j2”
The settings above in bold font are for AMD64 CPU
Since I don't have a 64 chip is this step really necessary???
Or am I on the wrong track here?
Or is that no matter what chip i have i should edit my .config accordingly.
 
Page 1 of 10 1 23 Last »

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2