LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 01-21-2005, 06:48 PM   #1
fuzzhead85
Member
 
Registered: Aug 2003
Posts: 42

Rep: Reputation: 15
kernel 2.6.10 with no modules


i have an assignement for one of my classes to compile a kernel with no modules, and ive gotten that much done fine, but when i do a make install, it fails on mkinitrd, i dont know what the initrd file does, which may be the source of my problems. so i manually add the kernel i created to lilo, with no initrd entry, everything runs fine, till it gets to mandrakes interactive startup, where it tries to load modules that were not created, then im brought to the graphical login screen but none of my input works, any help would be appriciated, thanks.
-Ian
 
Old 01-21-2005, 10:00 PM   #2
sgrayban
Member
 
Registered: Nov 2004
Location: Spokane, WA
Distribution: Debian 6.0
Posts: 369

Rep: Reputation: 30
First you have to have atleast the fs mods and devfs mods compiled in or it will not boot.

Second using man to see what mkinitrd does I find:

MKINITRD(8) MKINITRD(8)

NAME
mkinitrd - creates initial ramdisk images for preloading modules
 
Old 01-22-2005, 05:47 AM   #3
bunnadik
Member
 
Registered: Jan 2005
Location: Övik, Sweden
Distribution: MDK 10.1
Posts: 450

Rep: Reputation: 30
If you compile your own kernel you have to include support for initrd (ram disk) or devfs.

MDK 10.1 uses udev instead of devfs, so if you want to be "pure" you have to have an initrd loading udev
to have some basic /dev entries before everything starts.
In this case you can take the existing /boot/initrd.img and do:
Code:
zcat /boot/initrd.img > /tmp/init.img
mkdir /tmp/init && mount -o loop  /tmp/init.img  /tmp/init
vi /tmp/init/linuxrc (remove all the "echo Loading.... and insmod... entries)
rm /tmp/init/lib/*
umount /tmp/init
gzip /tmp/init.img
mv /tmp/init.img.gz /boot/initrd-nomodules.img
Then add /boot/initrd-nomodules.img to your grub or lilo config.

The other (deprecated) way is to include devfs and make sure it's loaded at boot time.

- Peder
 
Old 01-22-2005, 01:30 PM   #4
fuzzhead85
Member
 
Registered: Aug 2003
Posts: 42

Original Poster
Rep: Reputation: 15
when i try to execute the zcat line, i get an error that initrd is not in gzip format?
 
Old 01-23-2005, 06:26 AM   #5
bunnadik
Member
 
Registered: Jan 2005
Location: Övik, Sweden
Distribution: MDK 10.1
Posts: 450

Rep: Reputation: 30
Weird.
/boot/initrd.img should be a symlink to the acctual initrd file (in the case of MDK 10.1 its usually initrd-2.6.8.1-12mdk.img).
And that file should be gzipped.

You can check with
Code:
file /boot/initrd.img (answer should be "symbolic link to ....")
file /boot/(whatever answer you got previously) (answer shoud be "gzip compressed data...")
If the answer to the second command is "Linux rev 1.0 ext2 filesystem data..." you can replace 'zcat' with 'cp'

- Peder
 
Old 01-23-2005, 12:42 PM   #6
fuzzhead85
Member
 
Registered: Aug 2003
Posts: 42

Original Poster
Rep: Reputation: 15
ah, i was trying to do it with the initrd for 2.6.10

now everything works fine up until the mount command, then it gives me a seg.fault, any ideas?
 
Old 01-23-2005, 12:47 PM   #7
fuzzhead85
Member
 
Registered: Aug 2003
Posts: 42

Original Poster
Rep: Reputation: 15
nevermind, must have been a typo or something
 
Old 01-23-2005, 01:13 PM   #8
fuzzhead85
Member
 
Registered: Aug 2003
Posts: 42

Original Poster
Rep: Reputation: 15
well all those steps worked well, but what does mandrake load after initrd, because whatever that step is, its trying to load usb modules and some other stuff, im not really familiar with linux's boot sequence so any help would be great
 
Old 01-24-2005, 01:36 AM   #9
sgrayban
Member
 
Registered: Nov 2004
Location: Spokane, WA
Distribution: Debian 6.0
Posts: 369

Rep: Reputation: 30
read the kernel docs -- its explained very well
 
Old 01-24-2005, 01:51 AM   #10
bunnadik
Member
 
Registered: Jan 2005
Location: Övik, Sweden
Distribution: MDK 10.1
Posts: 450

Rep: Reputation: 30
After boot it runs /etc/rc.sysinit, and after that in runs the S-files in /etc/rcX.d where X is the runlevel you have in /etc/inittab (which
in your case should be /etc/rc5.d and "id:5:initdefault:" )

- Peder
 
  


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
kernel: No module symbols loaded - kernel modules not enabled. Qucho Debian 9 05-26-2004 02:50 AM
Kernel Modules and modules.conf init Linux - General 0 02-20-2004 06:51 PM
new kernel (2.4.22 up from 2.4.20-6) - missing modules - use old modules? Simon Bridge Linux - Software 1 02-04-2004 05:52 AM
How to keep modules/drivers across kernel recompiles and kernel versions? Pisces107 Linux - General 5 01-21-2004 08:29 PM
Kernel modules: why are some kernel modules zipped? hampel Slackware 3 06-30-2003 06:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 07:01 PM.

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