Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Feb 2017 10:47:34 -0800
From:      "Tony Hain" <tony@tndh.net>
To:        <freebsd-arm@freebsd.org>
Subject:   Fatal kernel abort (was: r313878M builds mmcsd0s2 as read-only & /etc/fstab is missing)
Message-ID:  <155401d28ba9$ccdc28c0$66947a40$@tndh.net>

next in thread | raw e-mail | index | archive | help
Update:
> 
> FreeBSD 12.0-CURRENT #0 r313878M: Fri Feb 17 11:26:27 PST 2017
> 
> 
> U-Boot SPL 2017.01-rc3 (Jan 31 2017 - 08:26:19) Trying to boot from
> MMC1MMC partition switch failed
> *** Warning - MMC partition switch failed, using default environment
> 
> reading u-boot.img
> reading u-boot.img
> 
> 
> U-Boot 2017.01-rc3 (Jan 31 2017 - 08:26:19 +0000)
> 
> CPU  : AM335X-GP rev 2.1
> I2C:   ready
> DRAM:  512 MiB
> MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
> *** Warning - bad CRC, using default environment
> 
> <ethaddr> not set. Validating first E-fuse MAC
> Net:   cpsw, usb_ether
> Press SPACE to abort autoboot in 2 seconds switch to partitions #0, OK
> mmc0 is current device
> SD/MMC found on device 0
> reading boot.scr
> ** Unable to read file boot.scr **
> reading uEnv.txt
> 0 bytes read in 3 ms (0 Bytes/s)
> Loaded env from uEnv.txt
> Importing environment from mmc0 ...
> switch to partitions #0, OK
> mmc0 is current device
> Scanning mmc 0:1...
> Found FreeBSD U-Boot Loader (bin)
> reading ubldr.bin
> 231544 bytes read in 20 ms (11 MiB/s)
> ## Starting application at 0x82000000 ...
> Consoles: U-Boot console
> Compatible U-Boot API signature found @0x9df30c58
> 
> FreeBSD/armv6 U-Boot loader, Revision 1.2 (Fri Feb 17 11:26:35 PST 2017
> tony@)
> 
> DRAM: 512MB
> Number of U-Boot devices: 3
> U-Boot env: loaderdev not set, will probe all devices.
> Found U-Boot device: disk
>   Probing all disk devices...
>   Checking unit=0 slice=<auto> partition=<auto>... good.
> Booting from disk0s2a:
> /boot/kernel/kernel data=0x6097e8+0x1a2818
> syms=[0x4+0x89ba0+0x4+0x9e2fb]
> 
> Hit [Enter] to boot immediately, or any other key for command prompt.
> Booting [/boot/kernel/kernel]...
> /boot/dtb/am335x-bonegreen.dtb size=0x8219 Loaded DTB from file
> 'am335x-bonegreen.dtb'.
> Kernel entry at 0x82200100...
> Kernel args: (null)
> ARM Debug Architecture not supported
> KDB: debugger backends: ddb
> KDB: current backend: ddb
> Copyright (c) 1992-2017 The FreeBSD Project.
> Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
>         The Regents of the University of California. All rights reserved.
> FreeBSD is a registered trademark of The FreeBSD Foundation.
> FreeBSD 12.0-CURRENT #0 r313878M: Fri Feb 17 11:26:27 PST 2017 ...
> Trying to mount root from ufs:mmcsd0s2 []...
> warning: no time-of-day clock registered, system time will not be set
> accurately Growing root partition to fill device
> GEOM_PART: mmcsd0s2 was automatically resized.
>   Use `gpart commit mmcsd0s2` to save changes or `gpart undo mmcsd0s2` to
> revert them.
> gpart: Read-only file system
> growfs: /dev/mmcsd0s2: Operation not permitted
> /etc/rc: WARNING: hostid: unable to figure out a UUID from DMI data,
> generating a new one Setting hostuuid: 696c1f73-f547-11e6-91d8-
> 884aeaf5a20e.
> Setting hostid: 0xfd5e4d57.
> eval: cannot open /etc/fstab: No such file or directory No suitable dump
> device was found.
> eval: cannot open /etc/fstab: No such file or directory
> fstab: /etc/fstab:0: No such file or directory Warning! No /etc/fstab:
skipping
> disk checks.
> fstab: /etc/fstab:0: No such file or directory
> mount: mmcsd0s2: Operation not permitted Mounting root filesystem rw
> failed, startup aborted
> ERROR: ABORTING BOOT (sending SIGTERM to parent)!
> Feb 17 19:29:34 init: /bin/sh on /etc/rc terminated abnormally, going to
single
> user mode Enter full pathname of shell or RETURN for /bin/sh:
> # random: unblocking device.
> # mount
> mmcsd0s2 on / (ufs, local, read-only, nfsv4acls) devfs on /dev (devfs,
local) #
> # df
> Filesystem 512-blocks    Used  Avail Capacity  Mounted on
> mmcsd0s2      1826232 1726488 -46352   103%    /
> devfs               2       2      0   100%    /dev
> # gpart list mmcsd0
> Geom name: mmcsd0
> modified: false
> state: OK
> fwheads: 255
> fwsectors: 63
> last: 62333951
> first: 63
> entries: 4
> scheme: MBR
> Providers:
> 1. Name: mmcsd0s1
>    Mediasize: 33546240 (32M)
>    Sectorsize: 512
>    Stripesize: 4194304
>    Stripeoffset: 32256
>    Mode: r0w0e0
>    attrib: active
>    rawtype: 12
>    length: 33546240
>    offset: 32256
>    type: !12
>    index: 1
>    end: 65582
>    start: 63
> 2. Name: mmcsd0s2
>    Mediasize: 31880380416 (30G)
>    Sectorsize: 512
>    Stripesize: 4194304
>    Stripeoffset: 524288
>    Mode: r2w1e1
>    rawtype: 165
>    length: 31880380416
>    offset: 34078720
>    type: freebsd
>    index: 2
>    end: 62332927
>    start: 66560
> Consumers:
> 1. Name: mmcsd0
>    Mediasize: 31914983424 (30G)
>    Sectorsize: 512
>    Stripesize: 4194304
>    Stripeoffset: 0
>    Mode: r2w1e2
> 
> #
> 
> 

After adding fstab manually, mounting mmcsd0s1 caused a kernel fault:
...
Starting file system checks:
/dev/mmcsd0s2: NO WRITE ACCESS
/dev/mmcsd0s2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
Automatic file system check failed; help!
ERROR: ABORTING BOOT (sending SIGTERM to parent)!
Feb 18 07:16:52 init: /bin/sh on /etc/rc terminated abnormally, going to
single user mode
Enter full pathname of shell or RETURN for /bin/sh: random: unblocking
device.
#
# mount
mmcsd0s2 on / (ufs, local, read-only, nfsv4acls)
devfs on /dev (devfs, local)
# cat /etc/fstab
# Custom /etc/fstab for FreeBSD embedded images
/dev/ufs/rootfs   /       ufs     rw      1       1

# mount -t msdosfs /dev/mmcsd0s1 /boot/msdos
g_vfs_done():mmcsd0s1[WRITE(offset=512, length=4096)]error = 30
g_vfs_done():mmcsd0s1[WRITE(offset=512, length=4096)]error = 30
g_vfs_done():mmcsd0s1[WRITE(offset=512, length=4096)]error = 30
fsync: giving up on dirty 0xc305c7e0: tag devfs, type VCHR
    usecount 1, writecount 0, refcount 7 mountedhere 0xc2f72a00
    flags (VI_ACTIVE)
    v_object 0xc3026780 ref 0 pages 5 cleanbuf 4 dirtybuf 1
    lock type devfs: UNLOCKED
        dev mmcsd0s1
mount_msdosfs: /dev/mmcsd0s1: Read-only file system
# ls /boot/msdos
# Fatal kernel mode data abort: 'Translation Fault (L1)' on read
trapframe: 0xdce54c30
FSR=00000005, FAR=2e776f7c, spsr=60000013
r0 =00000004, r1 =00000000, r2 =c06e4aa1, r3 =000000ad
r4 =2e776f6c, r5 =c06e4aa1, r6 =2e776f7c, r7 =00000000
r8 =000000ad, r9 =c06fe8a2, r10=2e776f7c, r11=dce54ce8
r12=c0950ab8, ssp=dce54cc0, slr=c033ffb0, pc =c0398e50

[ thread pid 21 tid 100057 ]
Stopped at      __mtx_lock_flags+0x44:  ldr     r0, [r10]
db> 
db> show geom
class: DISK (0xc07d3f48)
  geom: mmcsd1 (0xc2a81d00), rank=1
    provider: mmcsd1 (0xc2a81c80), access=r0w0e0, flags= (0x0020)
      consumer: 0xc2f8e340 (mmcsd1), access=r0w0e0, flags=0x0030
      consumer: 0xc2f8e380 (mmcsd1), access=r0w0e0, flags=0x0030
      consumer: 0xc2f8e440 (mmcsd1), access=r0w0e0, flags=0x0030
  geom: mmcsd0 (0xc2a7f680), rank=1
    provider: mmcsd0 (0xc2a7f700), access=r2w1e2, flags= (0x0020)
      consumer: 0xc2f8f1c0 (mmcsd0), access=r0w0e0, flags=0x0030
      consumer: 0xc2710080 (mmcsd0), access=r2w1e2, flags=0x0030

class: PART (0xc07d4f28)
  geom: diskid/DISK-01CCEE1C (0xc2a81b00), rank=3
    provider: diskid/DISK-01CCEE1Cs1 (0xc2a81700), access=r0w0e0, flags=
(0x0030)
      consumer: 0xc2f8e080 (diskid/DISK-01CCEE1Cs1), access=r0w0e0,
flags=0x0030
    consumer: 0xc2f8e240 (diskid/DISK-01CCEE1C), access=r0w0e0, flags=0x0030
  geom: mmcsd1 (0xc2cb9680), rank=2
    provider: mmcsd1s1 (0xc2a81b80), access=r0w0e0, flags= (0x0030)
      consumer: 0xc2f8e280 (mmcsd1s1), access=r0w0e0, flags=0x0030
      consumer: 0xc2f8e2c0 (mmcsd1s1), access=r0w0e0, flags=0x0030
    consumer: 0xc2f8e440 (mmcsd1), access=r0w0e0, flags=0x0030
  geom: mmcsd0s2 (0xc2a7f880), rank=3
    provider: mmcsd0s2a (0xc2cba080), access=r0w0e0, flags= (0x0030)
      consumer: 0xc2f8ecc0 (mmcsd0s2a), access=r0w0e0, flags=0x0030
    consumer: 0xc2f8f0c0 (mmcsd0s2), access=r1w1e1, flags=0x0030
  geom: mmcsd0 (0xc2a7f580), rank=2
    provider: mmcsd0s2 (0xc2a7f900), access=r2w1e1, flags= (0x0030)
      consumer: 0xc2f8e040 (mmcsd0s2), access=r1w0e0, flags=0x0030
      consumer: 0xc2f8ef00 (mmcsd0s2), access=r0w0e0, flags=0x0030
      consumer: 0xc2f8f0c0 (mmcsd0s2), access=r1w1e1, flags=0x0030
    provider: mmcsd0s1 (0xc2a7f800), access=r0w0e0, flags= (0x0030)
      consumer: 0xc2f8ed40 (mmcsd0s1), access=r0w0e0, flags=0x0030
      consumer: 0xc2f8f100 (mmcsd0s1), access=r0w0e0, flags=0x0030
    consumer: 0xc2710080 (mmcsd0), access=r2w1e2, flags=0x0030

class: LABEL (0xc07d4638)
  geom: mmcsd0s1 (0xc303ed80), rank=3
    provider: msdosfs/BOOT (0xc2cba300), access=r0w0e0, flags= (0x0030)
      consumer: 0xc2f8f140 (msdosfs/BOOT), access=r0w0e0, flags=0x0030
    consumer: 0xc2f8ed40 (mmcsd0s1), access=r0w0e0, flags=0x0030
  geom: mmcsd1s1 (0xc2a81880), rank=3
    provider: ext2fs/BOOT (0xc2a81800), access=r0w0e0, flags= (0x0030)
      consumer: 0xc2f8e100 (ext2fs/BOOT), access=r0w0e0, flags=0x0030
    consumer: 0xc2f8e2c0 (mmcsd1s1), access=r0w0e0, flags=0x0030
  geom: mmcsd1 (0xc2a81a00), rank=2
    provider: diskid/DISK-01CCEE1C (0xc2a81980), access=r0w0e0, flags=
(0x0030)
      consumer: 0xc2f8e180 (diskid/DISK-01CCEE1C), access=r0w0e0,
flags=0x0030
      consumer: 0xc2f8e240 (diskid/DISK-01CCEE1C), access=r0w0e0,
flags=0x0030
    consumer: 0xc2f8e380 (mmcsd1), access=r0w0e0, flags=0x0030

class: VFS (0xc07d4518)
  geom: ffs.mmcsd0s2 (0xc2a81580), rank=3
    consumer: 0xc2f8e040 (mmcsd0s2), access=r1w0e0, flags=0x0030

class: DEV (0xc07d3d68)
  geom: msdosfs/BOOT (0xc2cba200), rank=4
    consumer: 0xc2f8f140 (msdosfs/BOOT), access=r0w0e0, flags=0x0030
  geom: diskid/DISK-01CCEE1Cs1 (0xc2a81780), rank=4
    consumer: 0xc2f8e080 (diskid/DISK-01CCEE1Cs1), access=r0w0e0,
flags=0x0030
  geom: ext2fs/BOOT (0xc2a81900), rank=4
    consumer: 0xc2f8e100 (ext2fs/BOOT), access=r0w0e0, flags=0x0030
  geom: diskid/DISK-01CCEE1C (0xc2a81600), rank=3
    consumer: 0xc2f8e180 (diskid/DISK-01CCEE1C), access=r0w0e0, flags=0x0030
  geom: mmcsd1s1 (0xc2a81c00), rank=3
    consumer: 0xc2f8e280 (mmcsd1s1), access=r0w0e0, flags=0x0030
  geom: mmcsd1 (0xc2a81a80), rank=2
    consumer: 0xc2f8e340 (mmcsd1), access=r0w0e0, flags=0x0030
  geom: mmcsd0s2a (0xc2cba180), rank=4
    consumer: 0xc2f8ecc0 (mmcsd0s2a), access=r0w0e0, flags=0x0030
  geom: mmcsd0s2 (0xc2cb9f00), rank=3
    consumer: 0xc2f8ef00 (mmcsd0s2), access=r0w0e0, flags=0x0030
  geom: mmcsd0s1 (0xc2a7f780), rank=3
    consumer: 0xc2f8f100 (mmcsd0s1), access=r0w0e0, flags=0x0030
  geom: mmcsd0 (0xc2cba480), rank=2
    consumer: 0xc2f8f1c0 (mmcsd0), access=r0w0e0, flags=0x0030

class: MD (0xc07c2340)

class: SWAP (0xc07fe538)

db>






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?155401d28ba9$ccdc28c0$66947a40$>