2

I was trying to compile Linux kernel from source file i.e. 3.19.3 kernel version I ran the following commands for compilation

first I extracted

tar -xvf linux-3.19.3.tar.xz

changed to its directory

cd linux-3.19.9

sudo make menuconfig

Didn't change anything

sudo make -j4
sudo make install-modules install

I was following instructions given here

after reboot it is giving following message and dropping to initrafms

Gave up waiting for root device. common problems:

  • Boot args (cat /proc/cmdline)
    • Check rootdelay= (did the system wait long enough?)
    • Check root= (did the system wait for the right device?)
  • Missing modules (cat /proc/modules; ls /dev) ALERT! /dev/disk/by-uuid/50ec5956-06a0-41b1-9315-0a68fd15270a doesnot exist.

Dropping to shell!

Busybox...

I am getting this screen. what should I do? And how should I compile the kernel to avoid this kind of error

  • Have you executed the command depmod -a ? – SHW Apr 10 '15 at 6:41
  • @SHW no i havent used depmod -a – theoneabhinav Apr 11 '15 at 8:24
  • Then execute the command – SHW Apr 13 '15 at 4:46
  • @SHW i tried depmod -a and then did sudo make install-modules install it is working now. thanks. i think your solution should be in answers. – theoneabhinav Apr 13 '15 at 21:48
0

After kernel compilation, one must execute the command depmod -a to refresh the module order in directory /lib/modules/<kernel_version>

0

I take it that you changed into linux-3.19.3 directory before running the make commands. And it seems that this version of the kernel that was running before you compiled and installed.

Try to boot into an older kernel using grub (the same kernel with rescue will probably not work).

Using a vanilla source on an Ubuntu system has never worked for me. It might work, but I suggest you started with the sources of the Ubuntu kernel:

sudo apt-get source linux-image-3.19.3 
sudo apt-get build-dep linux-image-3.19.3

and rebuild and install that as a package to keep a kernel more compatible with the rest of your installation.

Change to the root of the installed source tree and do:

fakeroot debian/rules clean
fakeroot debian/rules binary-headers binary-generic

This gives you a debian package that you can install with dpkg.

Details can be found here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.