Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, all: A naive question: First, my environment: Ubuntu 12.04, with kernel 3.2.0-29-generic-pae Code: peijia:~$ uname -a Linux peijia 3.2.0-29-generic-pae #46-Ubuntu SMP Fri Jul 27 17:25:43 UTC 2012 i686 athlon ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2006
    Location
    Surrey, BC, Canada
    Posts
    5

    Compile Kernel 3.5.2 on Ubuntu 12.04 with Kernel 3.2.0-29-generic-pae?


    Hi, all:

    A naive question:


    First, my environment:
    Ubuntu 12.04, with kernel 3.2.0-29-generic-pae
    Code:
    peijia:~$ uname -a
    Linux peijia 3.2.0-29-generic-pae #46-Ubuntu SMP Fri Jul 27 17:25:43 UTC 2012 i686 athlon i386 GNU/Linux
    Now, I'm trying to build kernel 3.5.2 on this machine:
    Code:
    $ make xconfig
    $ make
    $ make bzImage V=1
    Nothing wrong!!
    However, when I tried to make initrd...

    Code:
    peijia:~/Downloads/Kernel/linux-3.5.2$ mkinitramfs -o initrd-3.5.2 3.5.2
    grep: /boot/config-3.5.2: No such file or directory
    WARNING: missing /lib/modules/3.5.2
    Device driver support needs thus be built-in linux image!
    WARNING: Couldn't open directory /lib/modules/3.5.2: No such file or directory
    FATAL: Could not open /lib/modules/3.5.2/modules.dep.temp for writing: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/3.5.2/modules.dep: No such file or directory
    It seems /lib/modules/3.5.2/modules.dep doesn't exist. In fact, I don't even have such a folder /lib/modules/3.5.2
    1) Manually created folder /lib/modules/3.5.2
    2) Then, copy modules.dep under folder 3.2.0-29-generic-pae to folder 3.5.2. Namely:
    Code:
    peijia:/lib/modules/3.2.0-29-generic-pae$ cp ./3.2.0-29-generic-pae/modules.dep ./3.5.2/
    The, move forward
    Code:
    peijia:~/Downloads/Kernel/linux-3.5.2$ mkinitramfs -o initrd-3.5.2 3.5.2
    grep: /boot/config-3.5.2: No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/hid/usbhid/usbhid.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/hid/hid-apple.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/hid/hid-cherry.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/hid/hid-logitech.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/hid/hid-microsoft.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/hid/hid-a4tech.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/hid/hid-belkin.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/hid/hid-chicony.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/hid/hid-cypress.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/hid/hid-ezkey.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/hid/hid-gyration.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/hid/hid-monterey.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/hid/hid-petalynx.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/hid/hid-pl.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/hid/hid-samsung.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/hid/hid-sony.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/hid/hid-sunplus.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/hid/hid-tmff.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/hid/hid-zpff.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/fs/btrfs/btrfs.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/fs/ext2/ext2.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/fs/isofs/isofs.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/fs/jfs/jfs.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/fs/nfs/nfs.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/fs/reiserfs/reiserfs.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/fs/udf/udf.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/fs/xfs/xfs.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/fs/fat/vfat.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/fs/nls/nls_cp437.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/fs/nls/nls_iso8859-1.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/message/fusion/mptfc.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/message/fusion/mptsas.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/message/fusion/mptscsih.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/message/fusion/mptspi.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/message/i2o/i2o_block.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/firewire/firewire-ohci.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/firewire/firewire-sbp2.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/hv/hv_vmbus.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/hv/hv_utils.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/net/hyperv/hv_netvsc.ko': No such file or directory
    FATAL: Could not read '/lib/modules/3.5.2/kernel/drivers/scsi/hv_storvsc.ko': No such file or directory
    However, now, where to find the folder kernel?Under the folder kernel of source code of kernel 3.5.2, there is no such a subfolder drivers; what's more, even if I copied the subfolder drivers of 3.5.2 source under the folder kernel, there are still a lot of such No such file or directory errors !!!

    Then, my qeustion, how to build initrd for kernel 3.5.2 successfully, under Ubuntu 12.04 with kernel 3.2.0-29-generic-pae?


    Best Regards
    Pei

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    I don't know about Ubuntu-specific caveats to compiling the kernel, but in general, it looks as though you've skipped "make modules" and "make modules_install" steps.

    At least this is true in the 2.6.x series of the kernel, haven't compiled a 3.x kernel yet.

Posting Permissions

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