LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-25-2005, 11:23 PM   #1
RedRaven
Member
 
Registered: Sep 2004
Distribution: Debian 3.1
Posts: 71

Rep: Reputation: 15
Kernel Compiled


Hi guys,

I just compiled kernel 2.6.13.4 from source from kernel.org. I compiled it to a .deb package. When I installed it and rebooted I got the following message:

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown block (0,0)

I looked around on google and found a lot of people with the problem but no concrete solution. My file system is ext so I tried to type:

dhcppc:/usr/src/linux# mkinitrd -c -k 2.6.10 -m jbd:ext3 -f ext3 -r /dev/hda2
/usr/sbin/mkinitrd: illegal option -- c

does anyone know how to fix this. Im sure its relatively easy I just cant put my finger on it.

Thanks,
 
Old 10-26-2005, 12:46 AM   #2
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
It could be one or more of the following:

1. Did you get the grub config right?
Make sure you get his right as it's an easy mistake to make. Grub uses a different naming system to the rest of linux in an effort to not have to specify whether the device is IDE, SCSI or SATA. You just have to specify a device number (starting from 0) and then a partition number (also starting from 0). An example would be the device "/dev/hda1" would be listed in /boot/grub/menu.lst as "(hd0,0)", "/dev/sdb3" would be "(hd1,2)" as so on. It may also be necessary to specify an initrd image here if you've created one.

2. Did you compile ext3 into the kernel and not as a module?
If not then the kernel would not be able to load the "ext3" module later since it would not be able to read the partition where the module is located.

3. Did you make an initrd image?
It may be necessary to create an initial RAM disk (check out man mkinitrd) to get the kernel over the "first hump" - so to speak - after which the kernel proper could take over. These are not always necessary and are a way to get around compiling all the filesystem drivers (ext3, for example) into the kernel.

Quote:
dhcppc:/usr/src/linux# mkinitrd -c -k 2.6.10 -m jbd:ext3 -f ext3 -r /dev/hda2
/usr/sbin/mkinitrd: illegal option -- c
Indeed the "-c" option does not exist. Check man mkinitrd for all the options. Additionally your "-m" option is likely unnecessary as the default config file (/etc/mkinitrd/mkinitrd.conf) will probably have a "MKIMAGE=<something or other>" line which will be sufficient in most cases. The "-r" command is also unnecessary for similar reasons. So a better command would be:
mkinitrd -o /boot/initrd.img-2.6.13.4 2.6.13.4

Last edited by adz; 10-27-2005 at 12:30 AM.
 
Old 10-26-2005, 08:13 AM   #3
RedRaven
Member
 
Registered: Sep 2004
Distribution: Debian 3.1
Posts: 71

Original Poster
Rep: Reputation: 15
Thanks for the response,

I just recompiled the kernel with ext3 support and ext2 support built into it. I then created the initrd file the way you specified. Checked out my grub:

title Debian GNU/Linux, kernel 2.6.13.4
root (hd0,1)
kernel /boot/vmlinuz-2.6.13.4 root=/dev/hda2 ro
initrd /boot/initrd.img-2.6.13.4
savedefault
boot

everything looks good here,

but when I rebooted I still got the same error:

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown block (0,0)

Any other ideas about what I could have forgotten to compile or what else i need to do to get this kernel working? Thanks
 
Old 10-26-2005, 08:22 AM   #4
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
What config did you start with? Did you use a previous one? The configs for debian kernels are called /boot/config-<kernel version>. Copy one of those into you kernel tree and call in ".config". Then do make <whatever>config. I'd suggest leaving as much of it in tact as you can and seeing if it boots. If it does, you have a platform to work from.
 
Old 10-26-2005, 12:03 PM   #5
RedRaven
Member
 
Registered: Sep 2004
Distribution: Debian 3.1
Posts: 71

Original Poster
Rep: Reputation: 15
hmm, that might be the problem, I started clean from scratch, after downloading the kernel. My previous kernel was 2.6.8-2, so I have to do the following steps:

1. copy config-2.6.8-2 to /usr/src/linux
2. rename it to .config
3. make xconfig and change the settings I need
4. recompile and reboot

Does that look like the corrent procedure then?
How is it that I can apply the 2.6.8 configuration to the 2.6.13 kernel source? isnt there new options that I can select and older options that are now obsolete?

Thanks in advance for the response
 
Old 10-26-2005, 05:41 PM   #6
RedRaven
Member
 
Registered: Sep 2004
Distribution: Debian 3.1
Posts: 71

Original Poster
Rep: Reputation: 15
I cant seem to use the old config scheme. everytime I use it I get the following errors:

.config:84: trying to assign nonexistent symbol X86_EMU486
.config:133: trying to assign nonexistent symbol PM_DISK
.config:175: trying to assign nonexistent symbol CPU_FREQ_PROC_INTF
.config:181: trying to assign nonexistent symbol CPU_FREQ_24_API
.config:334: trying to assign nonexistent symbol MTD_ELAN_104NC
.config:386: trying to assign nonexistent symbol PARPORT_PC_CML1
.config:391: trying to assign nonexistent symbol PARPORT_OTHER
.config:476: trying to assign nonexistent symbol IDE_TASKFILE_IO
.config:495: trying to assign nonexistent symbol BLK_DEV_ADMA
.config:586: trying to assign nonexistent symbol SCSI_MEGARAID
.config:629: trying to assign nonexistent symbol SCSI_PCI2000
.config:630: trying to assign nonexistent symbol SCSI_PCI2220I
.config:667: trying to assign nonexistent symbol MCD
.config:668: trying to assign nonexistent symbol MCD_IRQ
.config:669: trying to assign nonexistent symbol MCD_BASE
.config:700: trying to assign nonexistent symbol FUSION_ISENSE
.config:754: trying to assign nonexistent symbol NETLINK_DEV
.config:762: trying to assign nonexistent symbol IP_ROUTE_NAT
.config:764: trying to assign nonexistent symbol IP_ROUTE_TOS
.config:859: trying to assign nonexistent symbol IP_NF_NAT_LOCAL
.config:877: trying to assign nonexistent symbol IP_NF_COMPAT_IPCH

etc. etc.

and then when I try to compile the .deb package it throws me out with errors:

drivers/char/drm/drm_memory.h:123: error: redefinition of `drm_follow_page'
drivers/char/drm/drm_memory.h:123: error: `drm_follow_page' previously defined h ere
drivers/char/drm/drm_memory.h:151: error: redefinition of `drm_ioremap'
drivers/char/drm/drm_memory.h:151: error: `drm_ioremap' previously defined here
drivers/char/drm/drm_memory.h:163: error: redefinition of `drm_ioremap_nocache'
drivers/char/drm/drm_memory.h:163: error: `drm_ioremap_nocache' previously defin ed here
drivers/char/drm/drm_memory.h:174: error: redefinition of `drm_ioremapfree'
drivers/char/drm/drm_memory.h:174: error: `drm_ioremapfree' previously defined h ere
drivers/char/drm/gamma_drv.c:56:22: drm_proc.h: No such file or directory
drivers/char/drm/gamma_drv.c:57:20: drm_vm.h: No such file or directory
drivers/char/drm/gamma_drv.c:58:22: drm_stub.h: No such file or directory
drivers/char/drm/gamma_drv.c:59:25: drm_scatter.h: No such file or directory
drivers/char/drm/gamma_lists.h:161: warning: `DRM' defined but not used
drivers/char/drm/gamma_lock.h:36: warning: `DRM' defined but not used
drivers/char/drm/gamma_lock.h:69: warning: `DRM' defined but not used
make[4]: *** [drivers/char/drm/gamma_drv.o] Error 1
make[3]: *** [drivers/char/drm] Error 2
make[2]: *** [drivers/char] Error 2
make[1]: *** [drivers] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.13.4'


I even redownloaded the kernel package to make sure that some files werent broken. Do you know how I can fix this?
 
Old 10-26-2005, 06:32 PM   #7
ironwalker
Member
 
Registered: Feb 2003
Location: 1st hop-NYC/NewJersey shore,north....2nd hop-upstate....3rd hop-texas...4th hop-southdakota(sturgis)...5th hop-san diego.....6th hop-atlantic ocean! Final hop-resting in dreamland dreamwalking and meeting new people from past lives...gd' night.
Distribution: Siduction, the only way to do Debian Unstable
Posts: 506

Rep: Reputation: Disabled
make xconfig
head to this part;
drivers/char/drm/
and double check your entries to be correct.Or if they are there and you dont need them,untick them and then save and make
 
Old 10-26-2005, 08:14 PM   #8
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Quote:
I cant seem to use the old config scheme. everytime I use it I get the following errors:

.config:84: trying to assign nonexistent symbol X86_EMU486
.config:133: trying to assign nonexistent symbol PM_DISK
.config:175: trying to assign nonexistent symbol CPU_FREQ_PROC_INTF
...[snip]
This is nothing to worry about.

Quote:
[snip]...
make[4]: *** [drivers/char/drm/gamma_drv.o] Error 1
make[3]: *** [drivers/char/drm] Error 2
make[2]: *** [drivers/char] Error 2
make[1]: *** [drivers] Error 2
... [snip]
Like ironwalker said, go to the "drivers/char/drm" section and just disable anything you don't need.

Last edited by adz; 10-26-2005 at 08:17 PM.
 
Old 10-27-2005, 12:16 AM   #9
RedRaven
Member
 
Registered: Sep 2004
Distribution: Debian 3.1
Posts: 71

Original Poster
Rep: Reputation: 15
got it, thanks for the help guys
 
  


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
kernel compilation-From where it should be started for already compiled kernel b0nd Linux - Newbie 11 08-17-2005 01:08 PM
new kernel compiled successfully, but the kernel-source package is the same old? luqman Red Hat 2 03-03-2005 08:41 AM
compiled kernel 2.6.10 with slackware 10.0, kernel panic salviadud Linux - Newbie 1 02-09-2005 04:05 PM
How to transfer the compiled kernel to old kernel server ?? td0l2 Linux - Newbie 2 07-21-2004 01:22 AM
kernel panic on reboot of newly compiled kernel lyceum Linux - Newbie 4 09-09-2003 09:40 AM

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

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