Menu

Recompile kernel

Help
Skanky
2008-08-26
2013-04-05
  • Skanky

    Skanky - 2008-08-26

    Hello,

    I have some boot problems with clonezilla and I need to recompile the kernel for - clonezilla-live-1.1.0-8 (booted from a USB memory stick)

    My motherboard have a CF IDE adapter that doesn't support DMA, The nodma boot option doesn't solve my problem.

    According to this post:
    http://groups.google.se/group/linux.debian.user/browse_thread/thread/cc0a3b8c13ae6f85/475a8820e050df75?hl=en&lnk=st&q=opcode+dma+hda+nodma#475a8820e050df75

    The kernel must be rebuilt with the CONFIG_IDEDMA_PCI_AUTO option turned off.

    How can I do this? Can anyone tell me how to rebuild the kernel or help me out? Is it possible to replace the kernel in my clonezilla?

    Many thanks :)

    Skanky

     
    • Steven Shiau

      Steven Shiau - 2008-08-27

      Maybe it's easier to use the experimental Clonezilla live:
      http://free.nchc.org.tw/clonezilla-live/experimental/ubuntu-based/
      It's based on Ubuntu 8.10, so the kernel is 2.6.26 which might support your hardware.
      All the clonezilla programs are the same with that in the testing branch, only the OS is different.

      If you really want to recompile the kernel, you need to be familiar with remastering the iso file, and the squashfs tools.

       
    • Skanky

      Skanky - 2008-08-27

      Hi Steven,

      Thank you for your response. The ubuntu version of clonezilla did not work for me. The graphic chipset of my device doesn't like X so I got no screen :(

      I guess I have to recompile the kernel, or find someone who can help me out.

      Can I recompile the kernel from the live dist booted up via USB or do I need to have a debian system to do that?

      Skanky

       
      • Steven Shiau

        Steven Shiau - 2008-08-27

        You can prepare your compiled kernel like this:
        1. vmlinuz and initrd are in /live/
        2. /lib/modules/$YOUR_KERNEL is inside /live/filesystem.squashfs, therefore you have to mount it, copy all the files to another working dir, put your own /lib/modules/$YOUR_KERNEL, then use squashfs tools to generate your new filesystem.squashfs.

        Remember to modify /isolinux/isolinux.cfg if you change the name of kernel and initrd. Also your kernel must support aufs and squashfs.

        Good luck.

         
    • Skanky

      Skanky - 2008-09-04

      Hi Steven,

      Thank you for your help.

      I am not very good at this but are trying my best :)
      This is the steps I took.

      * Installed Debian 40.1a on my device.
      * Downloaded linux kernel source 2.6.24.6 and compiled with squashfs and  aufs support
      * Edited kernel source to turn off autodma. edited linux/drivers/ide/ide.c 
          changed       int noautodma = 0;               to        int noautodma = 1;
      * Compiled source
        - make-kpkg clean
        - fakeroot make-kpkg --revision=custom.1.0 kernel_image
        - dpkg -i linux-image-2.6.24.6_custom.1.0_i386.deb
        - cd /boot/
        - mkinitrd -o /boot/initrd.img-2.6.24.24 2.6.24.6

      * Copied /boot/vmlinuz from debian installl to clonzillas /live/vmlinuz1
      * Copied /boot/initrd from debian install to clonzillas /live/initrd1
      * Mounted filesystem.squashfs
      * Copied /lib/modules/2.6.26.6 from debian install to clonzillas /lib/modules/
      * Rebuilt the filesystem.squashfs

      When I try to boot I get the following error.

      umount: devfs: not mounted
      mount: unknown filesystem type 'type'
      ymount: devfs: not mounted
      pivot_root: No such file or directory
      /sbin/init: 432: cannot open dev/console: No such file
      Kernel panic - not syncing: Attempt to kill init!

      I don't know much about kernel compiling. I'm just an linux novice trying my best :(

      Can you tell me what I am doing wrong or if anyone is willing to help me compile a clonezilla kernel with the noautodma = 1; set?

      Is the .config file for clonezilla kernel available anywhere?

      Many thanks for your help.

      Skanky

       
    • Skanky

      Skanky - 2008-09-04

      ymount = mount

      :)

       
    • Skanky

      Skanky - 2008-09-04

      argh!! should be umount

      sorry

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.