Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: kernel compile - Unable to mount root fs

11 views
Skip to first unread message

Aioanei Rares

unread,
Jul 17, 2009, 3:00:21 PM7/17/09
to
Soren Orel wrote:
> debian lenny
>
> I download 2.6.30-1 source
> tar -xjf linux-2.6.30.1.tar.bz2
> cd linux-2.6.30.1
> cp /boot/config-2.6.26-2-686 ./.config
> apt-get install make gcc libncurses5-dev
> make menuconfig (replace M to *):
>
> Device Drivers - Multiple device support (RAID and LVM) - Device
> mapper support
> File systems - Ext3 journalling file system support
>
> time make -j2
> make modules_install install
> update-grub
>
> then...reboot...
>
> "VFS: Unable to mount root fs on"
>
> What am I missing? I still have to make more "modules to built-ins"?
>
> thank you... :\
Did grub made an entry in its menu allowing you to boot in single mode?
Try that please and report back. I've had the same problem a while ago
on testing/unstable.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Soren Orel

unread,
Jul 17, 2009, 3:00:24 PM7/17/09
to

Soren Orel

unread,
Jul 17, 2009, 3:10:12 PM7/17/09
to
trying in single mode:
http://img514.imageshack.us/img514/7868/screenshotsrf.png
trying in normal mode:
http://img219.imageshack.us/img219/6290/screenshot1u.png

I forget to tell, that this pc uses lvm :S

Don Quixote de la Mancha

unread,
Jul 17, 2009, 3:20:10 PM7/17/09
to
Did you build and install your initrd? You might need to load a
module to mount your root filesystem, and if so it should be in the
initrd.

The initrd also needs to be named in your grub entry.

It's not enough just to build and install the module, because those
are accessible only after your root fs is mounted!

--
Don Quixote de la Mancha
qui...@dulcineatech.com
http://www.dulcineatech.com

Soren Orel

unread,
Jul 17, 2009, 3:30:30 PM7/17/09
to
thank you for the quick replies :O

I just only did, what I mentioned in the starting mail:S

ls -la /boot:
http://pastebin.com/f7dc58737

cat /boot/grub/menu.lst
http://pastebin.com/f566152fc

Don Quixote de la Mancha

unread,
Jul 17, 2009, 3:40:10 PM7/17/09
to
In your Grub menu.lst file, there are some lines that look like this one:

initrd /initrd.img-2.6.26-2-686

You need a line like that just below the item for the kernel you're
trying to boot, except that you want the initrd version to match the
new kernel version.

initrd stands for Initial RAM Disk. It's a compressed archive that
contains the contents of a small initial root filesystem, with just
enough in it to to load the modules you're going to need to mount your
root filesystem. In particular it needs to have the modules for your
lvm and any RAID controllers.

I've never made an initrd on Debian, but on Fedora the command is mkinitrd.

Don Quixote

Aioanei Rares

unread,
Jul 18, 2009, 4:10:09 AM7/18/09
to
mkinitrd is a standard command on all linux systems, so you can check
its manual page. Maybe man update-initramfs can help too. Best of
luck.

Aioanei Rares

unread,
Jul 18, 2009, 4:20:07 AM7/18/09
to
And sorry for the top-post.

Soren Orel

unread,
Jul 18, 2009, 5:20:09 AM7/18/09
to
it works!

I just forget:

cp arch/x86/boot/bzImage /boot/vmlinuz-2.6.30-1


and:
mkinitramfs -o /boot/initrd.img-2.6.30-1 2.6.30.1


and to edit grub:
title kernel 2.6.30.1-barminev
root (hd0,1)
kernel /vmlinuz-2.6.30-1 root=/dev/hda2 ro
initrd /initrd.img-2.6.30-1

thank you!!! alias köszi! :D

Siggy Brentrup

unread,
Jul 18, 2009, 6:10:10 AM7/18/09
to
Sorry that I didn't see this thread earlier.

On Sat, Jul 18, 2009 at 11:17 +0200, Soren Orel wrote:
> it works!
>
> I just forget:
>
> cp arch/x86/boot/bzImage /boot/vmlinuz-2.6.30-1
>
>
> and:
> mkinitramfs -o /boot/initrd.img-2.6.30-1 2.6.30.1

% apt-get install kernel-package
% man make-kpkg

might have been useful.

IIRC this has been written in order not to forget
crucial steps after once bitten.

Regs
Siggy
--
Please don't cc: me when replying on the list.
bsb-at-psycho-dot-informationsanarchistik-dot-de
or: bsb-at-psycho-dot-i21k-dot-de

signature.asc

Soren Orel

unread,
Jul 18, 2009, 8:40:09 AM7/18/09
to
hmmm.. it works, but I have to hit Ctrl+D at every boot... :D

http://img149.imageshack.us/img149/5726/screenshotual.png

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkphnUoACgkQ94B/SGO8KQe2NQCgw4DTfS2iNHrzkbVjRhZftSOj
QrYAn13qZ/fsIDhdYJyxWeBPlhz1y8FN
=ACkV
-----END PGP SIGNATURE-----


Don Quixote de la Mancha

unread,
Jul 19, 2009, 4:20:06 AM7/19/09
to
On Sat, Jul 18, 2009 at 5:39 AM, Soren Orel<soren...@gmail.com> wrote:
> hmmm.. it works, but I have to hit Ctrl+D at every boot... :D

On some of your vmlinux lines in your menu.lst you have the word
"single". That boots you into single-user mode, that you exit from by
hitting Ctrl-D.

Remove just the word "single" and you should be good to go.

Siggy Brentrup

unread,
Jul 19, 2009, 7:10:13 AM7/19/09
to
On Sun, Jul 19, 2009 at 01:13 -0700, Don Quixote de la Mancha wrote:
> On Sat, Jul 18, 2009 at 5:39 AM, Soren Orel<soren...@gmail.com> wrote:
> > hmmm.. it works, but I have to hit Ctrl+D at every boot... :D
>
> On some of your vmlinux lines in your menu.lst you have the word
> "single". That boots you into single-user mode, that you exit from by
> hitting Ctrl-D.
>
> Remove just the word "single" and you should be good to go.
>
> Don Quixote

Lucky Don Quixote :), obviously you never have been hitten by fsck not
being able to cope with a broken FS. In such a situation the machine
automagically boots into single user mode.

Maybe it should be made clearer that you're at your own risk when
hitting C-d. I'd never do that on a production box or when the
FS contains valuable data.

signature.asc

Soren Orel

unread,
Jul 19, 2009, 7:20:11 AM7/19/09
to
It only brings up this error message on a VirtualBox machine.. :D
I tried to compile the vanillia kernel on two other machines, and it worked, booted without error.. :)
The VirtualBox machine was only to try, how it works, thank you!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkpi/ksACgkQ94B/SGO8KQfxfgCfY+eQXjZOb9cpLslPyUNxzzbJ
vdQAn1HSWhJ7Rx5jAHlNk2IFXxJVa9Jw
=Finx
-----END PGP SIGNATURE-----


pob...@fuzzydev.org

unread,
Jul 19, 2009, 8:30:16 AM7/19/09
to
> hmmm.. it works, but I have to hit Ctrl+D at every boot... :D
>
> http://img149.imageshack.us/img149/5726/screenshotual.png
>

You got that error using make-kpkg, or just as a general kernel error?

pob...@fuzzydev.org

unread,
Jul 19, 2009, 8:30:19 AM7/19/09
to
> hmmm.. it works, but I have to hit Ctrl+D at every boot... :D
>
> http://img149.imageshack.us/img149/5726/screenshotual.png
>

You got that error using make-kpkg, or just as a general kernel error?


pob...@fuzzydev.org

unread,
Jul 19, 2009, 8:30:18 AM7/19/09
to
> On Sun, Jul 19, 2009 at 01:13 -0700, Don Quixote de la Mancha wrote:
>> On Sat, Jul 18, 2009 at 5:39 AM, Soren Orel<soren...@gmail.com> wrote:
>> > hmmm.. it works, but I have to hit Ctrl+D at every boot... :D
>>
>> On some of your vmlinux lines in your menu.lst you have the word
>> "single". That boots you into single-user mode, that you exit from by
>> hitting Ctrl-D.
>>
>> Remove just the word "single" and you should be good to go.
>>
>> Don Quixote
>
> Lucky Don Quixote :), obviously you never have been hitten by fsck not
> being able to cope with a broken FS. In such a situation the machine
> automagically boots into single user mode.
>
> Maybe it should be made clearer that you're at your own risk when
> hitting C-d. I'd never do that on a production box or when the
> FS contains valuable data.
>
> Siggy

This is OT, but I remember my first day away at school. I bought a new
EeePC months earlier, installed Debian on it, prepared my install for my
CS classes...then when I got to my first class, I booted up only to have a
jfs error. It took me an hour or so to figure out how to fix.

Tzafrir Cohen

unread,
Jul 20, 2009, 4:50:12 AM7/20/09
to
On Sun, Jul 19, 2009 at 01:06:51PM +0200, Siggy Brentrup wrote:
> On Sun, Jul 19, 2009 at 01:13 -0700, Don Quixote de la Mancha wrote:

> > Remove just the word "single" and you should be good to go.
> >
> > Don Quixote
>
> Lucky Don Quixote :), obviously you never have been hitten by fsck not
> being able to cope with a broken FS. In such a situation the machine
> automagically boots into single user mode.

No. Just append 'init=/bin/bash' (or /bin/sh) at the prompt. Or
'single', if you prefer.

--
Tzafrir Cohen | tza...@jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tza...@cohens.org.il | | best
ICQ# 16849754 | | friend

Amax

unread,
Jul 21, 2009, 3:30:13 PM7/21/09
to
This is a bug in the 2.6.30 source. The quick work-around for this is:

update-initramfs -c -k "uname"

"uname" being whatever you've named your custom kernel & do it without
the quotations.

Check to see if there is now an initrd-image file for your kernel in the /
boot directory & if there is do an "update-grub" & you're good to go.

~Amax~

--
A person needs only two tools: WD-40 and duct tape. If it doesn't move
and it should, use WD-40. If it moves and shouldn't, use the tape.
-- Red Green
================================
Registered Linux User No. 306834

0 new messages