"cannot mount root, error = 79"

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

"cannot mount root, error = 79"

Kentaro KAWAMOTO
Hi,

I have two NetBSD machines: one with NetBSD 5.99.16 (amd64), the other
with NetBSD 5.0.1 (i386).
I cross-compiled a new kernel on the amd64 machine for the i386,
and copy the binary (netbsd) to the i386 machine.

When booting with the new kernel, it printed the following message.
---
...
wd0 at atabus0 drive 0: <INTEL SSDSA2MH080G1HP>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 76319 MB, 155061 cyl, 16 head, 63 sec, 512 bytes/sect x 156301488 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd0(piixide0:0:0): using PIO mode 4, Ultra-DMA mode 6 (Ultra/133) (using DMA)
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio1 at pad0: half duplex
hpqlb0: registering on wskbd0
boot device: wd0
root on wd0a dumps on wd0b
no file system for wd0 (dev 0x0)
cannot mount root, error = 79
root device (default wd0a): ubt0 at uhub2 port 1
ubt0: Broadcom Corp HP Integrated Module, rev 2.00/1.00, addr 2

dump device (default wd0b):
---

Why does it fail to find a file system on wd0.
It must exist because it can boot with the older kernel (NetBSD 5.0.1).

I followed the instructions at
http://www.netbsd.org/docs/guide/en/chap-build.html

Thanks in advance.

--
Kentaro KAWAMOTO
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: "cannot mount root, error = 79"

Markus Kilbinger
>>>>> "Kentaro" == Kentaro KAWAMOTO <[hidden email]> writes:

    Kentaro> Hi, I have two NetBSD machines: one with NetBSD 5.99.16
    Kentaro> (amd64), the other with NetBSD 5.0.1 (i386). I
    Kentaro> cross-compiled a new kernel on the amd64 machine for the
    Kentaro> i386, and copy the binary (netbsd) to the i386 machine.
    Kentaro> [...]
    Kentaro> no file system for wd0 (dev 0x0) cannot mount
    Kentaro> root, error = 79 root device (default wd0a):

    Kentaro> Why does it fail to find a file system on wd0. It must
    Kentaro> exist because it can boot with the older kernel (NetBSD
    Kentaro> 5.0.1).

In case you are running a MODULAR kernel:
Did you update kernel modules, too?

Markus.
Reply | Threaded
Open this post in threaded view
|

Re: "cannot mount root, error = 79"

Martin S. Weber-4
On Sat, Sep 19, 2009 at 05:47:09PM +0200, Markus W Kilbinger wrote:

> >>>>> "Kentaro" == Kentaro KAWAMOTO <[hidden email]> writes:
>
>     Kentaro> Hi, I have two NetBSD machines: one with NetBSD 5.99.16
>     Kentaro> (amd64), the other with NetBSD 5.0.1 (i386). I
>     Kentaro> cross-compiled a new kernel on the amd64 machine for the
>     Kentaro> i386, and copy the binary (netbsd) to the i386 machine.
>     Kentaro> [...]
>     Kentaro> no file system for wd0 (dev 0x0) cannot mount
>     Kentaro> root, error = 79 root device (default wd0a):
>
>     Kentaro> Why does it fail to find a file system on wd0. It must
>     Kentaro> exist because it can boot with the older kernel (NetBSD
>     Kentaro> 5.0.1).
>
> In case you are running a MODULAR kernel:
> Did you update kernel modules, too?

I have the impression this is becoming a FAQ item ...

Q: "Why do I get 'cannot mount root, error = 79' when booting?"
A: You have been bitten by modules. Please make sure you install the
   correct version of the modules next to the kernel. Note that after
   a version bump of the kernel you need to update modules too. If
   you feel you can't be bothered and like the wise old-school way of
   having your own damped down kernel, start with MONOLITHIC as
   a template instead of GENERIC.

-Martin
Reply | Threaded
Open this post in threaded view
|

Re: "cannot mount root, error = 79"

Kentaro KAWAMOTO
Thank you, all.

I have never installed any modules.
No wonder it doesn't work.

I read "The NetBSD Guide"
( http://www.netbsd.org/docs/guide/en/index.html )
again, but couldn't find anything about making kernel modules.

I tried building ones using build.sh, but in vain.
---
$ cd /usr/src
$ ./build.sh -a i386 modules

ERROR: MACHINE_ARCH 'i386' does not support MACHINE 'amd64'
*** BUILD ABORTED ***
---

Please let me know how to build kernel modules,
or some documents about that.

--
Kentaro KAWAMOTO
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: "cannot mount root, error = 79"

Martin S. Weber-4
On Sun, Sep 20, 2009 at 01:31:11AM +0900, Kentaro KAWAMOTO wrote:

> Thank you, all.
>
> I have never installed any modules.
> No wonder it doesn't work.
>
> I read "The NetBSD Guide"
> ( http://www.netbsd.org/docs/guide/en/index.html )
> again, but couldn't find anything about making kernel modules.
>
> I tried building ones using build.sh, but in vain.
> ---
> $ cd /usr/src
> $ ./build.sh -a i386 modules
>
> ERROR: MACHINE_ARCH 'i386' does not support MACHINE 'amd64'
> *** BUILD ABORTED ***
> ---
>
> Please let me know how to build kernel modules,
> or some documents about that.

Uh, this seriously isn't documented yet? People, that sucks. What did
you *use to* say about comitting features without documentation??

Kentaro:
Check your destdir, there should be a stand/ subdir. Place its contents
into /stand before booting the new kernel
(e.g., rooty, cp -pR ${DESTDIR}/stand /). The stand dir used to be
part of the base.tgz set but I think it was recently changed to some
other random set (where it should be really part of kern-XXX.tgz !).
I'll better shut up now, I loathe modules and it begins to show. Good luck.

-Martin
Reply | Threaded
Open this post in threaded view
|

Re: "cannot mount root, error = 79"

Kentaro KAWAMOTO
I built kernel modules as well as kernel itself by
$ sudo ./build.sh -m i386 kernel=MYKERNEL modules
and copied them to the i386 machine.

The situation, however, hasn't changed.

Are there any other things I should try?
I can self-build kernel and modules on the i386 machine,
but it's Atom N270 so it will take very long...

--
Kentaro KAWAMOTO
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: "cannot mount root, error = 79"

Kentaro KAWAMOTO
haad,

On Tue, Sep 22, 2009 at 5:31 PM, haad <[hidden email]> wrote:
> On Tue, Sep 22, 2009 at 7:04 AM, Kentaro KAWAMOTO
> <[hidden email]> wrote:
>> I built kernel modules as well as kernel itself by
>> $ sudo ./build.sh -m i386 kernel=MYKERNEL modules
>> and copied them to the i386 machine.
>>
>> The situation, however, hasn't changed.
(snip)
> What have you copied to testing machine. kernel + modules or only
> kernel. You need to copy a kernel file and destdir/stand/i386/modules
> to destination machine.

I copied kernel and modules (/stand/i386/5.99.18/*).
But it doesn't work anyway.

I cannot tell the kernel load modules successfully or not,

Are there any way to know that?
There are no signs in /var/log/messages.

--
Kentaro KAWAMOTO
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: "cannot mount root, error = 79"

Kentaro KAWAMOTO
In reply to this post by Kentaro KAWAMOTO
Jason,

On Tue, Sep 22, 2009 at 2:08 PM, Jason Mitchell <[hidden email]> wrote:
>   Have you tried compiling a kernel that doesn't use modules? I believe
> someone said that the config file MONOLITHIC would do the trick. That's
> probably not the best solution, but it might get you going in the meantime.

Thanks. I tried MONOLITHIC kernel and it worked!
Judging from that, the kernel was built fine and modules were not.

Now the problem is why the modules don't work.
I want kernel dump more messages about loading modules.
Can I do that by modifying some kernel config parameters?

--
Kentaro KAWAMOTO
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: "cannot mount root, error = 79"

Jukka Ruohonen-3
In reply to this post by Kentaro KAWAMOTO
On Wed, Sep 23, 2009 at 12:54:50AM +0900, Kentaro KAWAMOTO wrote:
>
> I copied kernel and modules (/stand/i386/5.99.18/*).
> But it doesn't work anyway.
>

AFAIR, you need to also copy the boot program, /usr/mdec/boot, to the new
system.[1]

I agree with Martin S. Weber earlier in the thread: it should be urgent to
document all this.

- Jukka.


[1] http://mail-index.netbsd.org/current-users/2008/11/21/msg006167.html
Reply | Threaded
Open this post in threaded view
|

Re: "cannot mount root, error = 79"

Kentaro KAWAMOTO
On Wed, Sep 23, 2009 at 1:57 AM, Jukka Ruohonen <[hidden email]> wrote:
> On Wed, Sep 23, 2009 at 12:54:50AM +0900, Kentaro KAWAMOTO wrote:
>>
>> I copied kernel and modules (/stand/i386/5.99.18/*).
>> But it doesn't work anyway.
>>
>
> AFAIR, you need to also copy the boot program, /usr/mdec/boot, to the new
> system.[1]

I'm sorry, I didn't mention that I am using GRUB, not boot(8) as bootloader.
(Because I have Linux system in the same i386 machine, too.)
When using GRUB, /usr/mdec/boot has nothing to do with boot process, doesn't it?

Anyway, I tried copying /usr/mdec/* to the i386 machine.
As expected, it didn't work...

--
Kentaro KAWAMOTO
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: "cannot mount root, error = 79"

David Lord-5
On 23 Sep 2009 at 3:36, Kentaro KAWAMOTO wrote:

> On Wed, Sep 23, 2009 at 1:57 AM, Jukka Ruohonen <[hidden email]> wrote:
> > On Wed, Sep 23, 2009 at 12:54:50AM +0900, Kentaro KAWAMOTO wrote:
> >>
> >> I copied kernel and modules (/stand/i386/5.99.18/*).
> >> But it doesn't work anyway.
> >>
> >
> > AFAIR, you need to also copy the boot program, /usr/mdec/boot, to the new
> > system.[1]
>
> I'm sorry, I didn't mention that I am using GRUB, not boot(8) as bootloader.
> (Because I have Linux system in the same i386 machine, too.)
> When using GRUB, /usr/mdec/boot has nothing to do with boot process, doesn't it?

I thought it did

> Anyway, I tried copying /usr/mdec/* to the i386 machine.
> As expected, it didn't work...

I have a mix on different systems of Lilo, Grub or
NetBSD as main bootloader.

Whatever, you still need to ensure your NetBSD partition
is bootable and just copying the required file to / isn't
enough, and of course I've not had to do this for ages and
forgotten the magic.

from "man installboot"

copy /usr/mdec/boot.MACHINE or /usr/mdec/boot to root
directory

use installboot to install primary bootstrap program
/usr/mdec/bootxx_fstype into filesystem

There are some examples for various MACHINE types.

eg NetBSD/i386 and NetBSD/amd64:
cp /usr/mdec/boot /boot
installboot -v -o timeout=5 /dev/rwd0a /usr/mdec/bootxx_ffsv1


David

Reply | Threaded
Open this post in threaded view
|

Re: "cannot mount root, error = 79"

Kentaro KAWAMOTO
In reply to this post by Kentaro KAWAMOTO
Thanks, David, haad.

Finally, I successfully boot the i386 machine with 5.99.18 kernel (and modules).
I didn't understand thathwas
kernel binary (/netbsd) itself doesn't load modules, but
boot loader does.

What I did this time was...

$ cp /usr/mdec/boot /boot
$ installboot -v -o timeout=5 /dev/rwd0a /usr/mdec/bootxx_ffsv1

and to change grub configuration from
---
title NetBSD
root (hd0,1,a)
kernel /netbsd
---
to
---
title NetBSD
root (hd0,1,a)/netbsd
chainloader +1
boot
---


Thanks again.
Is there anything I can do to update the documentation?
I don't think I'm the only one who confuses this updating process.


On Wed, Sep 23, 2009 at 3:57 PM, haad <[hidden email]> wrote:

> Hi,
>
> On Tue, Sep 22, 2009 at 8:36 PM, Kentaro KAWAMOTO
> <[hidden email]> wrote:
>> On Wed, Sep 23, 2009 at 1:57 AM, Jukka Ruohonen <[hidden email]> wrote:
>>> On Wed, Sep 23, 2009 at 12:54:50AM +0900, Kentaro KAWAMOTO wrote:
>>>>
>>>> I copied kernel and modules (/stand/i386/5.99.18/*).
>>>> But it doesn't work anyway.
>>>>
>>>
>>> AFAIR, you need to also copy the boot program, /usr/mdec/boot, to the new
>>> system.[1]
>>
>> I'm sorry, I didn't mention that I am using GRUB, not boot(8) as bootloader.
>> (Because I have Linux system in the same i386 machine, too.)
>> When using GRUB, /usr/mdec/boot has nothing to do with boot process, doesn't it?
>
> Aha this is the cause of your problems, because NetBSD bootloader is
> loading modules for us. Can you install NetBSD bootloader to your
> NetBSD partition and just load it from grub.
>
>
>
>
> --
>
>
> Regards.
>
> Adam
>



--
Kentaro KAWAMOTO
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: "cannot mount root, error = 79"

Kentaro KAWAMOTO
haad,

On Wed, Sep 23, 2009 at 5:35 PM, haad <[hidden email]> wrote:
> Just write what you have done in a sane way and ask on www@ if they
> can help you with committing your stuff into the guide.

Thanks. I'll try when I have time, maybe in one or two weeks.

BTW,

>> Finally, I successfully boot the i386 machine with 5.99.18 kernel (and modules).
>> I didn't understand thathwas
>> kernel binary (/netbsd) itself doesn't load modules, but
>> boot loader does.

I can boot default netbsd kernel for i386 with grub only, no boot(8) used.
Is that mean the default kernel was built with MONOLITHIC option?

By 'default netbsd kernel," I mean the kernel installed with install CDs.

--
Kentaro KAWAMOTO
[hidden email]