[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Compiling the Kernel



On Monday 04 October 2004 17:31, Mark Maas wrote:
> Hi All,
>
> I've been trying to compile a kernel for a while now, followed some
> different routes, reinstalled the machine a couple of times to try
> booting in different FileSystems.
>
> I followed how-to's like this one:
> <http://www.desktop-linux.net/debkernel.htm> and others, But time
> and time again, i run into "Kernel Panic: unable to mount root fs."
>
> Well, my file system is ext3, and I compiled it into the kernel, not
> as a module or nothing. Actually it is the ONLY change I made in the
> whole kernel compile.
>
> I left everything else the way it was, and used the stock config
> file for kernels.
>
> I'm missing something, but searching with google, only tells me to
> compile the used file system in or to build a initrd image.
> <http://www.google.com/search?q=debian+compile+kernel++unable+to+mount+root
>+fs.&sourceid=firefox&start=0&start=0&ie=utf-8&oe=utf-8>
>
> Can anyone tell me what i'm missing, or perhaps show me howto's?
>
> Thanks,
> Mark

The link you found is close to my approach: 
( http://www.desktop-linux.net/debkernel.htm ).

A working .config for a new kernel series is gold, especially if it closely 
resembles your hardware.  Initially I had the same kernel panic error that 
you had, and it turned out to be because the 2.6 .config had defaulted to 
ide/ATA-2 drivers being installed as modules.

To rephrase, download the .config from the site above, 
into /usr/src/kernel-source-2.6.xx/ then run 'make oldconfig', to customise.  
As I mentioned, check the ide/ATA-2 drivers with 'make menuconfig': -
Device Drivers  --->
 ATA/ATAPI/MFM/RLL support  --->
    [*]  ATA/ATAPI/MFM/RLL support
    <*>   Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
    <*>     Include IDE/ATA-2 DISK support

Other suggestions:
-  Delete the kernel-source directory and untar the fresh source again.

-  Use a friend's working .config

-  Copy /usr/src/kernel-source-2.6.8/arch/i386/defconfig  
to /usr/src/kernel-source-2.6.x/.config then customise with 'make 
menuconfig'.

- My make-kpkg recipe:

# wget http://kernel.source.org/linux/2.6.0/linux-2.6.x.tar.bz2
# tar xvjf linux-2.6.x.tar.bz2
# cd linux-2.6.x
# make oldconfig (defaults seemed ok)
# make menuconfig :
  - You really have to enforce the ide-2 + ext2/3/reiser stuff.
  - checked ATAPI stuff was selected.
  - check devfs stuff:
  File Systems --->
   Psedo File Systems --->
    [*] devfs support (OBSOLETE)
    [ ] Automatically mount at boot (**unchecked**)

# ('make-kpkg clean' : if it was previously compiled)
# 'make-kpkg' (make dinner)
# 'vim Makefile' : 
   + extraversion = -mybox.date.1
   + gcc-3.4
   + CC = O3 -march=pentium4m

 AND/OR 

# vim debian/changelog (edit version to mybox.date.1)
# 
# make-kpkg kernel_image (make cup of tea)
# dpkg -i kernel-image-2.6.x_mybox.date.1_i386.deb

#  vim /boot/grub/menu.lst :  (then edit)
  #Kernel options
  kopt=root=0305 ro hdc=ide-cd vga=791
  groot=(hd0,1)

  title           Debian GNU/Linux, kernel 2.6.x-mybox.date.1
  root            (hd0,1) 
  kernel          /vmlinuz-2.6.x-mybox.date.1 root=/dev/hda5 ro
  savedefault
  boot

#  update-grub
# shutdown -r now


HTH.  YMMV depending on hardware.

The article above is correct when it mentions the nvidia modules, but I don't 
think this is your problem (yet).

And don't neglect /etc/fstab!
# filesystem  mountpoint  type  options  dump  pass
devpts  /dev/pts   devpts  gid=5,mode=620  0  0
tmpfs    /dev/shm  tmpfs   defaults,nosuid,nodev,size=500M,noatime  0  0
proc    /proc      proc    defaults        0  0
# From http://wiki.archlinux.org/index.php/UdevHowTo:
usbfs  /proc/bus/usb usbfs defaults   0  0
# Old devfs:
sysfs  /sys   sysfs    defaults   0   0

Attachment: pgpCRCVEaeTL4.pgp
Description: PGP signature


Reply to: