Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15
I'm trying to rebuild the kernel for 2.6.10 on debian sarge. I managed to configure the kernel to what I think my needs are and install it I suppose using ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2005
    Location
    Maryland
    Posts
    67

    Kernel Rebuild Nightmare


    I'm trying to rebuild the kernel for 2.6.10 on debian sarge. I managed to configure the kernel to what I think my needs are and install it I suppose using dpkg. I used this guide with a few mods.

    But when it boots I get the following errors:
    Code:
    VFS: Cannot open root device "hda4" or unknown-block(0,0)
    Please append a correct "root=" boot option
    Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    In my kernel I was sure to build in, not as modules, EXT2, EXT3, INITRD, and ramfs support, since those are the file types I'm using. As far as I can tell the IDE driver is included in my kernel. Am I missing something stupid?

    Partion table:
    Code:
    1 - boot         [ext2]
    2 - swap        [ext3]
    3 - unknown  [extended]
    4 - root          [ext2]
    5 - home        [ext2]
    Config file for IDE sections (not completely sure about).
    Code:
    # ATA/ATAPI/MFM/RLL support
    #
    CONFIG_IDE=m
    CONFIG_BLK_DEV_IDE=m
    
    #
    # Please see Documentation/ide.txt for help/info on IDE drives
    #
    # CONFIG_BLK_DEV_IDE_SATA is not set
    CONFIG_BLK_DEV_HD_IDE=y
    CONFIG_BLK_DEV_IDEDISK=y
    # CONFIG_IDEDISK_MULTI_MODE is not set
    CONFIG_BLK_DEV_IDECD=m
    CONFIG_BLK_DEV_IDEFLOPPY=m
    # CONFIG_BLK_DEV_IDESCSI is not set
    # CONFIG_IDE_TASK_IOCTL is not set
    
    
    # IDE chipset support/bugfixes
    #
    CONFIG_IDE_GENERIC=m
    # CONFIG_BLK_DEV_CMD640 is not set
    # CONFIG_BLK_DEV_IDEPNP is not set
    CONFIG_BLK_DEV_IDEPCI=y
    # CONFIG_IDEPCI_SHARE_IRQ is not set
    # CONFIG_BLK_DEV_OFFBOARD is not set
    CONFIG_BLK_DEV_GENERIC=m
    # CONFIG_BLK_DEV_RZ1000 is not set
    CONFIG_BLK_DEV_IDEDMA_PCI=y
    # CONFIG_BLK_DEV_IDEDMA_FORCED is not set
    CONFIG_IDEDMA_PCI_AUTO=y
    .
    .
    .
    CONFIG_BLK_DEV_VIA82CXXX=m
    # CONFIG_IDE_ARM is not set
    CONFIG_BLK_DEV_IDEDMA=y
    # CONFIG_IDEDMA_IVB is not set
    CONFIG_IDEDMA_AUTO=y
    From what I can tell it uses the VIA driver. LSPCI output:
    Code:
    0000:00:00.0 Host bridge: VIA Technologies, Inc. VT8363/8365 [KT133/KM133] (rev 02)
    0000:00:01.0 PCI bridge: VIA Technologies, Inc. VT8363/8365 [KT133/KM133 AGP]
    0000:00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 22)
    0000:00:07.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 10)
    0000:00:07.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 10)
    0000:00:07.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 10)
    0000:00:07.4 Bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev 30)
    0000:00:07.5 Multimedia audio controller: VIA Technologies, Inc. VT82C686 AC97 Audio Controller (rev 20)
    0000:00:12.0 Ethernet controller: National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller
    0000:01:00.0 VGA compatible controller: nVidia Corporation NV5M64 [RIVA TNT2 Model 64/Model 64 Pro] (rev 15)

  2. #2
    Linux Enthusiast puntmuts's Avatar
    Join Date
    Dec 2004
    Location
    Republic Banana
    Posts
    562
    On my system every logical partition will start as the 5th partition, so are you sure /dev/hda4 is your root ?
    I\'m so tired .....
    #200472

  3. #3
    Just Joined!
    Join Date
    Jan 2005
    Location
    Maryland
    Posts
    67
    In all honesty, I'm not sure. I didn't write down on which partition I did which because I didn't think I'd really care that much, which apparently I do. I'm basing my assumtion off my grub menu.lst file and fdisk printouts.

    The recovery mode one works and is the one I boot off now, but the kernel and initrd location are on my /home partition because I ran out of space on my /boot partition which I know is the first partition. Swap is most definatly second, and I believe I put my root directory on my largest partition. Since the second option works I set the root= to the same thing.
    Code:
    title           Debian GNU/Linux, kernel 2.6.10-20040119
    root            (hd0,0)
    kernel          /vmlinuz-2.6.10-20040119 root=/dev/hda4 ro
    savedefault
    boot
    
    title           Debian GNU/Linux (recovery mode)
    root            (hd0,4)
    kernel          /dave/kernel/backup/vmlinuz-2.6.8-1-k7 root=/dev/hda4 ro single
    initrd          /dave/kernel/backup/initrd.img-2.6.8-1-k7
    savedefault
    boot
    Fdisk printout.
    Code:
       Device Boot      Start         End      Blocks   Id  System
    /dev/hda1   *           1          20       10048+  83  Linux
    /dev/hda2              21        1060      524160   82  Linux swap
    /dev/hda3            1061       13543     6291432    5  Extended
    /dev/hda4           13544       77545    32257008   83  Linux
    /dev/hda5            1061       13543     6291400+  83  Linux

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer
    Join Date
    Nov 2004
    Location
    home
    Posts
    796
    Check the output of the mount command (no arguments), it will show you which partitions are mounted where. Whichever partition it says is mounted on / is your root one.

  6. #5
    Just Joined!
    Join Date
    Jan 2005
    Location
    Maryland
    Posts
    67
    Yes my root partition is on hda4.
    Which now leads me to believe it is a problem in the kernel it self?

  7. #6
    Linux Guru loft306's Avatar
    Join Date
    Oct 2003
    Location
    The DairyLand
    Posts
    1,666
    er... just a thought ...did you cp (copy) the kernel to /boot?

    Code:
    mount /boot
    if it is not mounted and paste the output of
    Code:
     ls -a /boot
    here
    also paste the output of
    Code:
    cat /etc/fstab
    also dose recovery mode boot? if that boots then try changing in grub.conf or menu.lst whichever you use
    Code:
    title           Debian GNU/Linux, kernel 2.6.10-20040119
    root            (hd0,0)
    kernel          /vmlinuz-2.6.10-20040119 root=/dev/hda4 ro
    savedefault
    boot
    to
    Code:
    title           Debian GNU/Linux, kernel 2.6.10-20040119
    root            (hd0,4)
    kernel          /vmlinuz-2.6.10-20040119 root=/dev/hda4 ro
    savedefault
    boot
    and most of all this is a grub thing not finding the kernel! it is not a kernel issue
    (ih8 grub at times like this)...me thinks it will just be a syntax error

    also you can boot to the splash screen and get your self a grub prompt then type find </path/to/kernel/kernel_name_exactly .....and that will tell you the grub root part
    last Q... what grub part was the last kernel on? and did u put the new kernel is the same place?
    ~Mike ~~~ Forum Rules
    Testing? What's that? If it compiles, it is good, if it boots up, it is perfect. ~ Linus Torvalds
    http://loft306.org

  8. #7
    Just Joined!
    Join Date
    Jan 2005
    Location
    Maryland
    Posts
    67
    I didn't copy the kernel to /boot because I used dpkg, but it is on my /boot partition.
    Code:
    dave@debian&#58;~$ ls -a /boot
    .                  System.map-2.6.10-20040119  lost+found
    ..                 backup                      vmlinuz-2.6.10-20040119
    System.map         config-2.6.10-20040119
    System.map-2.6.10  grub
    The output of cat /etc/fstab
    Code:
    dave@debian&#58;~$ cat /etc/fstab
    # /etc/fstab&#58; static file system information.
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    defaults        0       0
    /dev/hda4       /               ext2    defaults,errors=remount-ro 0       1
    /dev/hda1       /boot           ext2    defaults        0       2
    /dev/hda5       /home           ext2    defaults        0       2
    /dev/hda2       none            swap    sw              0       0
    /dev/hdd        /media/cdrom0   iso9660 ro,user,noauto  0       0
    /dev/hdc        /media/cdrom1   iso9660 ro,user,noauto  0       0
    /dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0
    Recovery mode works but the backup kernel and initrd are on my /home partition because I ran out of room on my /boot partition. They are the original kernel and initrd from right after installation.

    find /boot/vmlinuz-2.6.10-20040119 gives me
    Code:
    Error 15&#58; File not found
    even though it is on my /boot partition.

    The last kernel was in the same location as the new one is now. I moved my old kernel to /home/dave/kernel/backup and now boot of that for the recovery mode.

  9. #8
    Just Joined!
    Join Date
    Jan 2005
    Location
    Toronto, ON, Canada
    Posts
    79
    Here is another forum about the topic.

    http://kerneltrap.org/node/970

    I would highlight the following entry !!

    For IDE Disks, *must* have CONFIG_BLK_DEV_IDEDISK=y
    Comment posted by Anonymous on Saturday, November 15, 2003 - 10:41
    I just had this same problem on kernel 2.6.0-test9, only to find that the kernel option 'CONFIG_BLK_DEV_IDEDISK' ("Include IDE/ATA-2 DISK support") was not set at all = kernel can't talk to an IDE disk to boot from it!

    Perhaps this used to default to 'y' in earlier kernels?

    For the linux kernel to find the IDE hard disks and partitions on those hard disks it seems sufficient to have the correct IDE chipset driver installed (eg CONFIG_BLK_DEV_GENERIC or a chipset specific driver).
    However, to actually boot of an IDE device you must have 'CONFIG_BLK_DEV_IDEDISK=y' and then either 'CONFIG_BLK_DEV_GENERIC=y' or a chipset specific IDE driver such as what I have for my AMD-768 based motherboard 'CONFIG_BLK_DEV_AMD74XX=Y'.

    It seems that for the original poster, they didn't have an chipset specific IDE driver or the Generic PCI IDE driver. Perhaps the lba32 option of LILO is relevant too, but I know for sure that you have to compile in support for your hardware to be able to use it.


    --------------------------------------------------------------------------------

    I hope this helps someone else, I'm off to recompile 2.6.0-test9 on my Debian Sarge box... hopefully 3rd time lucky!

    P.S. Note that using initrd support by creating a /boot/initrd.img and configuring LILO should allow you to have all modules you need (such as IDE and/or SCSI disk & chipset modules) to mount your real root device... but ofcourse you still need them compiled in or as modules! (It was a really dumb oversight of mine to not notice that the IDE Disk code wasn't going to be compiled into my new 2.6.0-test9 kernel.)

  10. #9
    Linux Enthusiast
    Join Date
    Jun 2004
    Location
    Windsor, CO
    Posts
    656
    1. Compile support for the VIA chipset in directly, not as a module, as well as ext3 and the other stuff. That way, you won't need to mess with initrd, just the kernel image and modules.
    2. try configuring with "make menuconfig" I found it a LOT less confusing to use.
    3. Always enable experimental drivers, trust me on this. I swear half the drivers in the kernel are under this catagory.
    4. (hd0,4) is NOT /dev/hda4. Grub zero-indexes the drives, so (hd0,4) is actually /dev/hda5
    Emotions are the key to the soul.
    Registered Linux User #375050

  11. #10
    Just Joined!
    Join Date
    Jan 2005
    Location
    Maryland
    Posts
    67
    afrolinux I have built in CONFIG_BLK_DEV_IDEDISK, and CONFIG_BLK_DEV_GENERIC as well as the driver for my hard drive.

    Quote Originally Posted by Stormblazer
    1. Compile support for the VIA chipset in directly, not as a module, as well as ext3 and the other stuff. That way, you won't need to mess with initrd, just the kernel image and modules.
    2. try configuring with "make menuconfig" I found it a LOT less confusing to use.
    3. Always enable experimental drivers, trust me on this. I swear half the drivers in the kernel are under this catagory.
    4. (hd0,4) is NOT /dev/hda4. Grub zero-indexes the drives, so (hd0,4) is actually /dev/hda5
    1)Recompiled all the VIA chipset support directly into the kernel not as a modules, and there was no change. Ext2 and Ext3 are built into the kernel.
    2)I do use menuconfig, but just post part of the .config file for reference.
    3)Will do. No change though.
    4)Yes I relize this. The reason that the second one is 4 because the backup kernel is on my /home partition which is /dev/hda5. I ran out of room on my /boot partition.

    This is starting to really bother me now.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •