After installing a new Kernel in Ubuntu 14.04, rebooting takes me to busybox initramfs. How do I mount a filesystem after that?

549

You have missed two steps before the make install, which installs the required drivers. Before make install do make modules and make modules_install in that order. This installs drivers based on your .config files.

The error can also happen due to improper configuration in the .config file and hence some missing drivers. So here is a hackish way to do the kernel compilation. One of the best ways to get the right configuration is to copy a working configuration from the /boot directory to your .config in kernel source code folder. Your working kernel config file is

/boot/config-`uname -r`

Then do the compilation with make . make will prompt for some configurations, which are not in the .config file, because this .config file may be corresponds to an old kernel and does not have the some configurations in the new kernel you are trying to compile. Just type in Enter for the all the configuration prompts - which will select default configurations. Then do make modules, make modules_install and finally make install . This must solve your issues.

This way of compilation is not suitable for a professional, but will help newbies without much knowledge of different configuration options to get started with kernel compilation.

Share:
549

Related videos on Youtube

Normand
Author by

Normand

Updated on September 18, 2022

Comments

  • Normand
    Normand over 1 year

    I'm a newbie in ruby, just began to study. Can't find a solution to read from a file a square matrix in a two-dimensional array.

    file graph.txt:

    0 3 0 0 10 0 0
    0 0 9 0 0 0 0
    0 0 0 3 0 0 15
    0 0 0 0 0 0 10
    0 0 0 0 0 8 0
    0 0 0 0 0 0 0
    0 0 0 0 15 0 0
    

    My code:

    n=7
    Arr = Array.new(n).map!{Array.new(n)}
    text = ''
    tx = File.readlines("graph.txt")
    text = tx.join
    i=0
    text.each_line do |line|
            Arr[i] = line.split(/\n/)
            i+=1
    end
    
    p Arr
    

    result:

    [["0 3 0 0 10 0 0"], ["0 0 9 0 0 0 0"], ["0 0 0 3 0 0 15"], ["0 0 0 0 0 0 10"], ["0 0 0 0 0 8 0"], ["0 0 0 0 0 0 0"], ["0 0 0 0 15 0 0"]]

    need result:

    [[0, 3, 0, 0, 10, 0, 0], [0, 0, 9, 0, 0, 0, 0], [0, 0, 0, 3, 0, 0, 15], [0, 0, 0, 0, 0, 0, 10], [0, 0, 0, 0, 0, 8, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 15, 0, 0]]

    • penguin359
      penguin359 almost 10 years
      You are probably missing the kernel modules for your Disk controller. Is it using SATA or IDE? Try modprobe ahci and see if /dev/sda shows up. If so, you can just type exit and let the boot continue;
    • sdn404
      sdn404 almost 10 years
      @penguin359 : Thanks for responding. I ran modprobe ahci and it returned nothing. Also, i am not sure how to check whether the disk controller uses SATA or IDE. How do I do that?
    • penguin359
      penguin359 almost 10 years
      modprobe won't return anything if it's successful, but it would have created devices under /dev for the SATA disks if it found them. All you have to do after modprobe is type exit if the correct devices were found. If you have IDE drives, you should try to modprobe ide-disk. You can safely modprobe both and one or the other will most likely create the appropriate /dev files. One modprobe is complete, try typing exit.
    • bsd
      bsd almost 10 years
      What are you using for host OS? Which VM hypervisor?