LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Error `gave up waiting for root device`/ can't boot kernel (https://www.linuxquestions.org/questions/linux-newbie-8/error-%60gave-up-waiting-for-root-device%60-cant-boot-kernel-809671/)

Panceisto 05-23-2010 06:27 PM

Error `gave up waiting for root device`/ can't boot kernel
 
Hi all,

I needed to use CIFS for accessing a NTFS network share.

I decided to include CIFS in the kernel and tried compiling and installing it.

Now when I (try to) boot in my new kernel with CIFS support, I get the message: gave up looking for root device.

What do I do next?

Thanks

exvor 05-23-2010 06:38 PM

Need some more infotmation.

What distro are you running and what kernel did you try and recompile?

When you recompiled your kernel did you make a kernel image and a initramfs image as well or did you just make a single kernel image?

What boot loader are you using?

I have never personally seen this message before. I would have expected something like unable to mount root device blah blah blah but not this. Then again I am only familiar with using grub and not using lilo so that may be it I dunno. From just seeing this message I would guess that you do not have the module for hard drive / hardware compiled into your kernel.

Panceisto 05-24-2010 04:55 AM

Hi

I'm running Debian stable (including some unstable packages). The kernel I'm trying to get to work is 2.6.32.

Quote:

When you recompiled your kernel did you make a kernel image and a initramfs image as well or did you just make a single kernel image?
Following a tutorial I first issued these commands:

Code:

make modules modules_install bzImage install
I couldn't boot into the kernel. It said it couldn't find a file called modules.dep. However, this file did exist.

I saw I was missing an initrd file. Then I issued:

Code:

update_initramfs -c -k 2.6.32
I can't remember exactly, but at that stage I got this error:

`mounting none on /dev failed`.
To fix that one I changed a kernel option (CONFIG_DEVTMPFS=y) and reinstalled the recompiled kernel, only to get the error I mentioned in title.

Now when I delete the initrd file and dereference it from Grub's menu.lst, I get a couple of errors, of which this is the first one:

Root-NFS: no NFS server available, giving up

The computer then halts.

EricTRA 05-24-2010 05:06 AM

Hi,

In Debian you can use a 'simplified' solution to compile a kernel. I've done it on several occasions and has never failed me. Below is the procedure I follow normally which I found on the internet.

First prepare your Debian installation.
Code:

apt-get install kernel-package libncurses5-dev fakeroot wget bzip2
cd /usr/src
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.X.tar.bz2
tar xjf linux-2.6.X.tar.bz2
cd linux-2.6.X/
make menuconfig

where X is the kernel's minor version number.
It is normally a good idea to take the configuration of your existing (working!) kernel 2.6 as a starting point for the configuration of your new kernel. Usually the current kernel configuration is saved in a file under boot, e.g. boot/config-2.6.X.
Exit the menu and run the following:
Code:

make-kpkg clean
fakeroot make-kpkg --initrd --revision=custom.1.0 kernel_image

where you can change custom.1.0 to something else if you want it.
If the compilation exits with an error, run:
Code:

make clean
and start over again from the make menuconfig command.
If all finishes well then you can run:
Code:

dpkg -i kernel-image-2.6.11.7_custom.1.0_i386.deb
to install the new kernel and perform all necessary steps like changing initram, adding to Grub boot menu, etc. Reboot your system into the new kernel and check if the options you selected are available.

Kind regards,

Eric

exvor 05-24-2010 02:17 PM

Wow the build for the kernel in that system is strange. All I ever do is download the kernel unpack it then run make menuconfig exit the menu after configureing it then run make make modules_install and then copy the new kernel to the /boot with a special name like mainkern since grub boots that kernel first. Of course I always keep a backup of the old kernel around just in case.

Panceisto 05-25-2010 01:22 PM

Thank you Eric and Exvor for your reponses.

Eric, I followed your instructions and it's working. This time it took a lot longer for the kernel to compile.

Bart


All times are GMT -5. The time now is 07:07 AM.