NetBSD Problem Report #58204
From www@netbsd.org Sat Apr 27 15:42:51 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 93B161A923B
for <gnats-bugs@gnats.NetBSD.org>; Sat, 27 Apr 2024 15:42:51 +0000 (UTC)
Message-Id: <20240427154250.6D2231A923C@mollari.NetBSD.org>
Date: Sat, 27 Apr 2024 15:42:50 +0000 (UTC)
From: hashikaw@mail.ru
Reply-To: hashikaw@mail.ru
To: gnats-bugs@NetBSD.org
Subject: Problem preparing evbppc disk on i386 (mount -o log)
X-Send-Pr-Version: www-1.0
>Number: 58204
>Category: install
>Synopsis: Problem preparing evbppc disk on i386 (mount -o log)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: install-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Apr 27 15:45:00 +0000 2024
>Last-Modified: Sun Apr 28 15:00:02 +0000 2024
>Originator: Kouichi Hashikawa
>Release: NetBSD-current, 10
>Organization:
>Environment:
>Description:
I create root filesystem for OpenBlocks266, on i386 with usb-ide and ide-msata adapter.
i386# fdisk (my OpenBlocks266 kernel has options EVBPPC_HAS_MBR)
i386# disklabel -B be -R disk disklabel.backup
i386# newfs -O2 -B be /dev/rwd0a
i386# mount -o log /dev/wd0a /mnt
i386# cd /mnt
i386# tar xpzf 10.0-evbppc/sets/base.tgz
i386# cd /
i386# umount /mnt
and, ide-msata board to OpenBlocks266's IDE, and boot,
...
[ 5.0703736] root file system type: ffs
[ 5.0703736] kern.module.path=/stand/evbppc/10.0/modules
[ 5.1899287] init: copying out path `/sbin/init' 11
[ 5.5999796] panic: init died (signal 0, exit 11)
[ 5.5999796] cpu0: Begin traceback...
[ 5.5999796] 0x07e33d60: at vpanic+0x160
[ 5.5999796] 0x07e33d90: at panic+0x58
[ 5.5999796] 0x07e33dd0: at exit1+0x4bc
[ 5.8301966] 0x07e33e90: at sys_exit+0x4c
[ 5.8799604] 0x07e33eb0: at syscall+0x348
[ 5.9299657] 0x07e33f20: user SC trap #1 by 0xfdd90574: srr1=0xc030
[ 5.9299657] r1=0xfffeba90 cr=0x84000484 xer=0 ctr=0xfdd9056c esr=0x800000 pid=0x3
Then, I recreate disklabel, newfs, tar xpzf under ide-msata board on OpenBlocks266, using OpenBlocks266 installer kernel, /sbin/init can start.
What is the problem?
mount -o log is not compatible with i386 and ppc405, like endian issue? (but man wapbl is not described about endian, or move disk to other machine.)
on OpenBlocks266 installer kernel, mount -o log /dev/wd0a /mnt is
failed.
whole disk is partition d on i386, c on evbppc, this diffrence is cause?
>How-To-Repeat:
>Fix:
>Audit-Trail:
From: mlelstv@serpens.de (Michael van Elst)
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: install/58204: Problem preparing evbppc disk on i386 (mount -o log)
Date: Sat, 27 Apr 2024 19:07:35 -0000 (UTC)
hashikaw@mail.ru writes:
>I create root filesystem for OpenBlocks266, on i386 with usb-ide and ide-msata adapter.
>i386# fdisk (my OpenBlocks266 kernel has options EVBPPC_HAS_MBR)
>i386# disklabel -B be -R disk disklabel.backup
>i386# newfs -O2 -B be /dev/rwd0a
>i386# mount -o log /dev/wd0a /mnt
>i386# cd /mnt
>i386# tar xpzf 10.0-evbppc/sets/base.tgz
>i386# cd /
>i386# umount /mnt
>and, ide-msata board to OpenBlocks266's IDE, and boot,
>...
>[ 5.0703736] root file system type: ffs
>[ 5.0703736] kern.module.path=/stand/evbppc/10.0/modules
>[ 5.1899287] init: copying out path `/sbin/init' 11
>[ 5.5999796] panic: init died (signal 0, exit 11)
>[ 5.5999796] cpu0: Begin traceback...
>[ 5.5999796] 0x07e33d60: at vpanic+0x160
>[ 5.5999796] 0x07e33d90: at panic+0x58
>[ 5.5999796] 0x07e33dd0: at exit1+0x4bc
>[ 5.8301966] 0x07e33e90: at sys_exit+0x4c
>[ 5.8799604] 0x07e33eb0: at syscall+0x348
>[ 5.9299657] 0x07e33f20: user SC trap #1 by 0xfdd90574: srr1=0xc030
>[ 5.9299657] r1=0xfffeba90 cr=0x84000484 xer=0 ctr=0xfdd9056c esr=0x800000 pid=0x3
Just unpacking base.tgz is not sufficient to populate a boot image,
you need at least etc.tgz and you probably want misc.tgz and text.tgz.
The system panics, because there is no /dev/console after unpacking
just base.tgz. The device nodes are not part of base.tgz. You need
to create them, e.g. by running the MAKEDEV script. The MAKEDEV
script is part of the etc.tgz set
You can run the evbppc version of MAKEDEV on i386. E.g.
tar xpzf 10.0-evbppc/sets/etc:tgz
( cd dev && ./MAKEDEV all )
You may also want to prepare other things on the target disk
before booting.
- the etc/localtime symlink
- etc/fstab
- etc/rc.conf
From: Kouichi Hashikawa <hashikaw@mail.ru>
To: gnats-bugs@netbsd.org
Cc: install-manager@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: install/58204: Problem preparing evbppc disk on i386 (mount -o log)
Date: Sun, 28 Apr 2024 20:53:46 +0900
Thank you for your reply.
> Just unpacking base.tgz is not sufficient to populate a boot image,
> you need at least etc.tgz and you probably want misc.tgz and text.tgz.
Sorry. I make a mistake to write, I unpacked base, comp, etc, games, gpufw, m=
an, misc,=20
modules, rescue,=20
text, xbase, xcomp, xetc and xserver.
(firmware loads kernel via tftp.)
and sorry I forgot to write,=20
After panic, boot with OpenBlocks266's INSTALL kernel, and run fsck,
found unref file. Following example is /, but I have /usr, /var, /home,=20
I got same result. Is this UNREF i386's wapbl log, diffrent from powerpc??
# fsck /dev/wd0a
fsck: Cannot open `/etc/fstab': No such file or directory
** /dev/rwd0a
** File system is already clean
** Last Mounted on /mnt
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
UNREF FILE I=3D3 OWNER=3D0 MODE=3D100000
SIZE=3D1048576 MTIME=3DApr 26 05:08 2024 =20
RECONNECT? [yn] y
NO lost+found DIRECTORY
CREATE? [yn] y
** Phase 5 - Check Cyl groups
FREE BLK COUNT(S) WRONG IN SUPERBLK
SALVAGE? [yn] y
SUMMARY INFORMATION BAD
SALVAGE? [yn] y
1521 files, 84933 used, 156818 free (74 frags, 19593 blocks, 0.0%=20
fragmentation)
***** FILE SYSTEM WAS MODIFIED *****
After fsck, I can mount filesystem and can ls -al, but after reboot, same=20=
result.
Then, I create filesystem on OpenBlocks again, I can boot system.
--=20
Kouichi Hashikawa
From: Martin Husemann <martin@duskware.de>
To: Kouichi Hashikawa <hashikaw@mail.ru>
Cc: gnats-bugs@netbsd.org
Subject: Re: install/58204: Problem preparing evbppc disk on i386 (mount -o
log)
Date: Sun, 28 Apr 2024 15:12:26 +0200
Can you verify the partition start + size are identical in both environments?
Also can you try to run dumpfs on the OpenBlocks266 on the image created
on the PC?
Martin
From: mlelstv@serpens.de (Michael van Elst)
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: install/58204: Problem preparing evbppc disk on i386 (mount -o log)
Date: Sun, 28 Apr 2024 14:56:31 -0000 (UTC)
hashikaw@mail.ru (Kouichi Hashikawa) writes:
>Sorry. I make a mistake to write, I unpacked base, comp, etc, games, gpufw, m=
>an, misc,=20
>modules, rescue,=20
>text, xbase, xcomp, xetc and xserver.
>(firmware loads kernel via tftp.)
Hello,
the error message still tells that
a) kernel has been loaded from that filesystem
b) init has been loaded and started from that filesystem
c) init cannot access /dev/console
c leads to your panic.
>After panic, boot with OpenBlocks266's INSTALL kernel, and run fsck,
>found unref file. Following example is /, but I have /usr, /var, /home,=20
>I got same result. Is this UNREF i386's wapbl log, diffrent from powerpc??
i386 is little endian, powerpc is big endian.
I can see code to handle the "wrong" endianess, but not for the
data fields referencing the journal file. If I'm not mistaken this prevents
the journal from being found, inode 3 is then treated as a regular file.
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.