From owner-freebsd-arm@FreeBSD.ORG Sun Jan 18 18:29:57 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CDC0376 for ; Sun, 18 Jan 2015 18:29:57 +0000 (UTC) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail-n.franken.de", Issuer "Thawte DV SSL CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5F531CCF for ; Sun, 18 Jan 2015 18:29:57 +0000 (UTC) Received: from [192.168.1.200] (p508F0C41.dip0.t-ipconnect.de [80.143.12.65]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id 16D911C0B3E6F; Sun, 18 Jan 2015 19:29:52 +0100 (CET) Subject: Re: Raspberry Pi stability improved Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: text/plain; charset=iso-8859-1 From: Michael Tuexen X-Priority: 3 In-Reply-To: Date: Sun, 18 Jan 2015 19:29:51 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Daisuke Aoyama X-Mailer: Apple Mail (2.1993) Cc: freebsd-arm X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 18:29:58 -0000 On 18 Jan 2015, at 16:51, Daisuke Aoyama wrote: >=20 > Hi Michael, >=20 > Did you use /etc/rc.d/autosize ("option AutoSize" in crochet-freebsd)? No, I used (for a year or so) the script from git://github.com/daveish/freebsd-arm-tools.git and did a manual resize after the system got up. But it is now very stable. Best regards Michael > If so, try to disable it and never boot official FreeBSD image before = resizing. > It will break the partition at first boot. It's a trap of the image. > Personally I didn't use autosize in my images. So not affect all my = images. >=20 > The main reason is gpart/fdisk/glabel/glowfs/newfs can't handle mixed = geometory. > Default crochet-freebsd uses CHS=3D(x,255,63) while creating but mmcsd = is not! > ---------------------------------------------------------------------- > #diskinfo -v mmcsd0 > mmcsd0 > 512 # sectorsize > 31674335232 # mediasize in bytes (29G) > 61863936 # mediasize in sectors > 4194304 # stripesize > 0 # stripeoffset > 20 # Cylinders according to firmware. > 377 # Heads according to firmware. > 8192 # Sectors according to firmware. <<< this = can't be handled > 4700C511 # Disk ident. > ---------------------------------------------------------------------- > This is a reson why I use USB card reader before booting at > = http://lists.freebsd.org/pipermail/freebsd-arm/2015-January/009935.html >=20 > For your reference, here is broken example of official image of > = ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/11.0/Free= BSD-11.0-CURRENT-arm-armv6-RPI-B-20150111-r276981.img.bz2 >=20 > Before booting via USB card reader: > = --------------------------------------------------------------------------= ------------ > [root@raspberry-pi ~]# diskinfo -v da0 > da0 > 512 # sectorsize > 15720251392 # mediasize in bytes (15G) > 30703616 # mediasize in sectors > 0 # stripesize > 0 # stripeoffset > 1911 # Cylinders according to firmware. > 255 # Heads according to firmware. > 63 # Sectors according to firmware. > # Disk ident. >=20 > [root@raspberry-pi ~]# gpart show da0 > =3D> 63 30703553 da0 MBR (15G) > 63 34776 1 !12 [active] (17M) > 34839 1918286 2 freebsd (937M) > 1953125 28750491 - free - (14G) >=20 > [root@raspberry-pi ~]# fdisk da0 > ******* Working on device /dev/da0 ******* > parameters extracted from in-core disklabel are: > cylinders=3D1911 heads=3D255 sectors/track=3D63 (16065 blks/cyl) >=20 > Figures below won't work with BIOS for partitions not in cyl 1 > parameters to be used for BIOS calculations are: > cylinders=3D1911 heads=3D255 sectors/track=3D63 (16065 blks/cyl) >=20 > Media sector size is 512 > Warning: BIOS sector numbering starts with sector 1 > Information from DOS bootblock is: > The data for partition 1 is: > sysid 12 (0x0c),(DOS or Windows 95 with 32 bit FAT (LBA)) > start 63, size 34776 (16 Meg), flag 80 (active) > beg: cyl 0/ head 1/ sector 1; > end: cyl 2/ head 42/ sector 63 > The data for partition 2 is: > sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > start 34839, size 1918286 (936 Meg), flag 0 > beg: cyl 2/ head 43/ sector 1; > end: cyl 121/ head 146/ sector 62 > The data for partition 3 is: > > The data for partition 4 is: > >=20 > Bootup: > ---------------------------------------------------------------------- > root@raspberry-pi:~ # uname -a > FreeBSD raspberry-pi 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r276981: Mon = Jan 12 09:04:54 UTC 2015 = root@grind.freebsd.org:/usr/obj/arm.armv6/usr/src/sys/RPI-B arm >=20 > root@raspberry-pi:~ # diskinfo -v mmcsd0 > mmcsd0 > 512 # sectorsize > 15720251392 # mediasize in bytes (15G) > 30703616 # mediasize in sectors > 4194304 # stripesize > 0 # stripeoffset > 20 # Cylinders according to firmware. > 187 # Heads according to firmware. > 8192 # Sectors according to firmware. > DB242AD3 # Disk ident. >=20 > root@raspberry-pi:~ # gpart show > =3D> 1 30703615 mmcsd0 MBR (15G) > 1 62 - free - (31K) > 63 34776 1 !12 [active] (17M) > 34839 30668777 2 freebsd (15G) >=20 > =3D> 0 30668777 mmcsd0s2 BSD (15G) > 0 105 - free - (53K) > 105 30668672 1 freebsd-ufs (15G) >=20 > root@raspberry-pi:~ # fdisk mmcsd0 > ******* Working on device /dev/mmcsd0 ******* > parameters extracted from in-core disklabel are: > cylinders=3D20 heads=3D187 sectors/track=3D8192 (1531904 blks/cyl) >=20 > Figures below won't work with BIOS for partitions not in cyl 1 > parameters to be used for BIOS calculations are: > cylinders=3D20 heads=3D187 sectors/track=3D8192 (1531904 blks/cyl) >=20 > Media sector size is 512 > Warning: BIOS sector numbering starts with sector 1 > Information from DOS bootblock is: > The data for partition 1 is: > sysid 12 (0x0c),(DOS or Windows 95 with 32 bit FAT (LBA)) > start 63, size 34776 (16 Meg), flag 80 (active) > beg: cyl 0/ head 1/ sector 1; > end: cyl 2/ head 42/ sector 63 > The data for partition 2 is: > sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > start 34839, size 30668777 (14974 Meg), flag 0 > beg: cyl 2/ head 43/ sector 1; > end: cyl 20/ head 7/ sector 0 <<< end is shrinked before = booting! > The data for partition 3 is: > > The data for partition 4 is: > >=20 > root@raspberry-pi:~ # dumpfs /dev/mmcsd0s2a > dumpfs: /dev/mmcsd0s2a: could not read superblock to fill out disk >=20 > ## your UFS partition is broken here ## > ---------------------------------------------------------------------- >=20 > Regards, > --=20 > Daisuke Aoyama >=20 >=20