Compile Kernel 2.6 under Debian Sarge

Discussion in 'Kernel Questions' started by falko, Apr 21, 2005.

  1. falko

    falko Super Moderator Howtoforge Staff

    Do you see any error message?
     
  2. coolvik

    coolvik New Member

    Hi,

    yes I do.


    when booting up this is written right before it stops:
    Code:
    mkdir: cannot create directory '/devfs/VG': Read-only file system
    mount: unknown filesystem type 'devfs'
       Unable to find volume group 'VG'
    unmount: /dev: not mounted
    unmount: devfs: not mounted
    mount: unknown filesystem type 'devfs'
    JFS: nTxBlock = 8192, nTxLock = 65536
    unmount: devfs: not mounted
    pivot_root: No such file or directory
    /sbin/init: 432: cannot open /dev/console: No such file
    Kernel panic - not syncing: Attempted to kill init!
    
    And after that it hangs, I've to reset the server.
     
  3. falko

    falko Super Moderator Howtoforge Staff

  4. coolvik

    coolvik New Member

    Last edited: Apr 4, 2006
  5. unkn0wn

    unkn0wn New Member

    i flllow the instructions i remote recompile 2.6.14 with grsec but achine dont respond :)

    but i can ping it.
    i think 2.6 change run level to some other mode with minimal network?

    your ideas?

    ok
    i check there is no error (on first look) system is booting corectly
    i log on machnine (not remote) normaly but sshd is notstarted simple there is no services?? i try /etc/initd.d/ssh but there is no output??? just back me to prompt
     
    Last edited: Apr 11, 2006
  6. falko

    falko Super Moderator Howtoforge Staff

    Anything in the logs? Any errors in the output of
    Code:
    dmesg
    ?
     
  7. unkn0wn

    unkn0wn New Member

    i compile it again with same steps.
    but i put in /etc/fstab /sys sysfs and now its working :)
     
  8. Jamesk5

    Jamesk5 New Member

    I've got a problem - I'm new to debian, and did an apt-get upgrade to upgrade stuff that needed to be done.
    It upgraded the kernel, and now I can't boot - I've got the same error as some others, where it wont find /dev/hda1.
    Here's a copy of my menu.lst
    # menu.lst - See: grub(8), info grub, update-grub(8)
    # grub-install(8), grub-floppy(8),
    # grub-md5-crypt, /usr/share/doc/grub
    # and /usr/share/doc/grub-doc/.

    ## default num
    # Set the default entry to the entry number NUM. Numbering starts from 0, and
    # the entry number 0 is the default if the command is not used.
    #
    # You can specify 'saved' instead of a number. In this case, the default entry
    # is the entry saved with the command 'savedefault'.
    # WARNING: If you are using dmraid do not change this entry to 'saved' or your
    # array will desync and will not let you boot your system.
    default 0

    ## timeout sec
    # Set a timeout, in SEC seconds, before automatically booting the default entry
    # (normally the first entry defined).
    timeout 5

    # Pretty colours
    color cyan/blue white/blue

    ## password ['--md5'] passwd
    # If used in the first section of a menu file, disable all interactive editing
    # control (menu entry editor and command-line) and entries protected by the
    # command 'lock'
    # e.g. password topsecret
    # password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
    # password topsecret

    #
    # examples
    #
    # title Windows 95/98/NT/2000
    # root (hd0,0)
    # makeactive
    # chainloader +1
    #
    # title Linux
    # root (hd0,1)
    # kernel /vmlinuz root=/dev/hda2 ro
    #

    #
    # Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

    ### BEGIN AUTOMAGIC KERNELS LIST
    ## lines between the AUTOMAGIC KERNELS LIST markers will be modified
    ## by the debian update-grub script except for the default options below

    ## DO NOT UNCOMMENT THEM, Just edit them to your needs

    ## ## Start Default Options ##
    ## default kernel options
    ## default kernel options for automagic boot options
    ## If you want special options for specific kernels use kopt_x_y_z
    ## where x.y.z is kernel version. Minor versions can be omitted.
    ## e.g. kopt=root=/dev/hda1 ro
    ## kopt_2_6_8=root=/dev/hdc1 ro
    ## kopt_2_6_8_2_686=root=/dev/hdc2 ro
    # kopt=root=/dev/hda1 ro

    ## default grub root device
    ## e.g. groot=(hd0,0)
    # groot=(hd0,0)

    ## should update-grub create alternative automagic boot options
    ## e.g. alternative=true
    ## alternative=false
    # alternative=true

    ## should update-grub lock alternative automagic boot options
    ## e.g. lockalternative=true
    ## lockalternative=false
    # lockalternative=false

    ## additional options to use with the default boot option, but not with the
    ## alternatives
    ## e.g. defoptions=vga=791 resume=/dev/hda5
    # defoptions=

    ## altoption boot targets option
    ## multiple altoptions lines are allowed
    ## e.g. altoptions=(extra menu suffix) extra boot options
    ## altoptions=(recovery mode) single
    # altoptions=(recovery mode) single

    ## controls how many kernels should be put into the menu.lst
    ## only counts the first occurence of a kernel, not the
    ## alternative kernel options
    ## e.g. howmany=all
    ## howmany=7
    # howmany=all

    ## should update-grub create memtest86 boot option
    ## e.g. memtest86=true
    ## memtest86=false
    # memtest86=true

    ## ## End Default Options ##

    title Debian GNU/Linux, kernel 2.6.15-1-486
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.15-1-486 root=/dev/hda1 ro
    initrd /boot/initrd.img-2.6.15-1-486
    savedefault
    boot

    title Debian GNU/Linux, kernel 2.6.15-1-486 (recovery mode)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.15-1-486 root=/dev/hda1 ro single
    initrd /boot/initrd.img-2.6.15-1-486
    savedefault
    boot

    ### END DEBIAN AUTOMAGIC KERNELS LIST


    This is probably going to make me sound like a real n00b, but I haven't changed the initrd from the .img-2.6.15......... to 16, because there is no img file in /boot for the new kernel.
    Any advice?? Like I said, I can't boot into debia, so I'm in pretty unfamilular territory now, except for a trusty knoppix boot disk.
     
  9. falko

    falko Super Moderator Howtoforge Staff

    I don't see a 2.6.16 kernel in your menu.lst...
    Anyway, you can create a ramdisk like this:

    Code:
    cd /boot/
    mkinitrd -o /boot/initrd.img-2.6.8.1 2.6.8.1
    (this example is for a 2.6.8.1 kernel, adjust it to your needs).
     
  10. Jamesk5

    Jamesk5 New Member


    Can I make a RAM disk outside of being in Debian - If so, will knoppix work, and do I just use the usual bash prompt?
    Also, what kernel number should I use, I'm not sure what it updated to - is there any way I can find out in system logs or something??

    Thanks heaps!
     
  11. falko

    falko Super Moderator Howtoforge Staff

    You should make it on the system where you installed the new kernel.

    Have a look at the /boot directory - you should find your new kernel there.
     
  12. Jamesk5

    Jamesk5 New Member

    What am I looking for in the /boot directory of the drive that holds Debian (As I said, I can't boot into Debian therefor I have to mount the drive in a knoppix session to see the contents of the drive)

    In the /boot directory I have:
    System.map-2.6.15-1-486
    vmlinuz-2.6.15-1-486
    config-2.6.15-1-486
    initrd.img-2.6.15-1-486
    grub/

    My /boot/grub/menu.lst points to the /boot/initrd..... (initrd) and /boot/vmlinux..... (kernel) files and yet still wont boot.
     
  13. falko

    falko Super Moderator Howtoforge Staff

    You only have a 2.6.15-1 kernel in /boot, but there's already an initrd.img for it...
     
  14. nrundle

    nrundle New Member

    Cannot get 2.6.8 kernel to work

    I installed Debian 3.1r2 today and wanted to upgrade the kernel (2.4.27) to (2.6.8). Tried a kernel image from the Debian dist with the resulting error

    Code:
    pivot_root: No such file or directory
    /sbin/init: 432: cannot open dev/console: No such file
    Kernel panic: Attempted to kill init!
    
    I tried following your walkthrough to compiling a kernel. I even loaded my config for 2.4.27 to start from and it comes up with same error. Some output I noticed just prior to the error looks like this:

    Code:
    RAMDISK: cramfs filesystem found at block 0
    RAMDISK: Loading 3580 blocks [1 disk] into ram disk... done.
    VFS: Mounted root (cramfs filesystem) readonly.
    Freeing unused kernel memory: 204k freed
    initrd-tools: 0.1.81.1
    NET: Registered protocol family 1
    SCSI subsystem initialized
    Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
    ide: Assuming 33MHz system bus speed for PIO modes; override with idebux=xx
    ide0: I/O resource 0x1F0-0x1F7 not free.
    ide0: ports already in use, skipping probe
    hdc: SONY DVD+/-RW DW-Q58A, ATAPI CD/DVD-ROM drive
    Using anticipatory io scheduler
    ide1 at 0x170-0x177,0x376 on irq 15
    
    It appears like it can't find the primary hd when loading the 2.6.8 kernel, but works fine under 2.4.27.

    Any ideas what I need to do differently?
     
  15. falko

    falko Super Moderator Howtoforge Staff

    Why don't you install Sarge with a 2.6.8 kernel right from the beginning? When you boot from the install CD, type linux26 at the boot prompt, and Debian will be installed with kernel 2.6.8.
     
  16. nrundle

    nrundle New Member

    Ok I tried installing with linux26 and think I've come to the real problem. During the installation I get this error:

    An excerpt from the syslog (during installation) reveals this:
    Any ideas why it won't seem to detect my hd properly under 2.6.8 but it works fine with 2.4.27?
     
  17. falko

    falko Super Moderator Howtoforge Staff

    Is it some kind of exotic hard disk?
    Make sure it's connected properly.
     
  18. nrundle

    nrundle New Member

    No this is not 'some kind of exotic' hard disk. It is a Hitachi HTS541060G9AT00 60 GB Ultra-ATA laptop hard drive. In a Dell Inspiron 6000. Like I said before, it loads up fine using kernel 2.4.27, but I need at least 2.6.8. I read somewhere the the 2.6 kernels went to ide-core instead of the ide-mod, ide-probe-mod and all that. I see that the ide-core module loads fine but it still doesn't explain why the I/O resource for the ide0 is busy when trying to detect hardware.

    I am not sure what else to try. I've tried passing boot parameters such as hd=116280/16/63 to describe the CHS of the hd.
     
  19. nrundle

    nrundle New Member

    There must be a bug in the 2.6.8 kernel. I downloaded and compiled the 2.8.16.11 kernel and it loaded up fine. Searching the internet I found a lot of people had the same problem with the Dell Inspiron 6000 and the 2.6.8 kernel.
     
  20. nithin

    nithin New Member

    partial compilation

    hi,
    Is there a way to compile just the updated files ? I know that in the vanilla kernel, doing a make compiles just the updated files and builds the kernel. However, under my sarge, doing a:

    fakeroot make-kpkg --initrd --revision=custom.1.0 kernel_image

    does not have the same behaviour.

    - Nithin
     

Share This Page