sourcecode

Friday, July 13, 2012

How to compile a kernel on Ubuntu 10.04


  • sudo apt-get install fakeroot kernel-wedge build-essential makedumpfile kernel-package libncurses5 libncurses5-dev
Then an error occurs:
The following packages have unmet dependencies: build-essential: Depends: g++ (>= 4:4.3.1) but it is not going to be installed
Solution: Update ubuntu with all packages using update manager.

  • Under ~/src/linux-2.6.32, using command
$make menuconfig
    I don't know how to change... so I didn't change anything.
    • I forgot to use this command line below the first time:
    sudo update-initramfs -c -k 2.6.32.11+drm33.2-alpha
     Then I got an unbootable kernel :(

    Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    • And  I had to make a live CD and boot from CD-ROM
    https://help.ubuntu.com/community/BurningIsoHowto
    http://askubuntu.com/questions/41930/kernel-panic-not-syncing-vfs-unable-to-mount-root-fs-on-unknown-block0-0

    Create two folders under /mnt : /mnt/dev and /mnt/proc
    Start with a livecd, open a a terminal
    sudo fdisk -l
    sudo mount /dev/sdax /mnt
    sudo mount --bind /dev /mnt/dev
    sudo mount --bind /proc /mnt/proc
    sudo chroot /mnt 
    

    with the new root folder, cd under /boot and find all the kernel versions.
    $update-initramfs -u -k 2.6.32.59+drm33.24-alpha
    $update-grub

    • After boot up, use $uname to verify the booted version.

    /**************END******************/



    No comments: