Date: Sun, 18 Jan 2015 19:29:51 +0100 From: Michael Tuexen <tuexen@freebsd.org> To: Daisuke Aoyama <aoyama@peach.ne.jp> Cc: freebsd-arm <freebsd-arm@freebsd.org> Subject: Re: Raspberry Pi stability improved Message-ID: <DB7CB7F1-79A7-4F0D-8C99-8A62AFC74D6A@freebsd.org> In-Reply-To: <B1DA56CBB1774BB4ACE66D69BB9A662F@ad.peach.ne.jp> References: <DE1783C0-C19F-448D-92EF-A51826D7FE2B@freebsd.org> <B1DA56CBB1774BB4ACE66D69BB9A662F@ad.peach.ne.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
On 18 Jan 2015, at 16:51, Daisuke Aoyama <aoyama@peach.ne.jp> 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: > <UNUSED> > The data for partition 4 is: > <UNUSED> >=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: > <UNUSED> > The data for partition 4 is: > <UNUSED> >=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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DB7CB7F1-79A7-4F0D-8C99-8A62AFC74D6A>