From owner-freebsd-arm@FreeBSD.ORG Sat Dec 6 17:23:58 2014 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 954FCCC1 for ; Sat, 6 Dec 2014 17:23:58 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68593ADB for ; Sat, 6 Dec 2014 17:23:57 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XxJ5C-000L3U-LQ; Sat, 06 Dec 2014 17:23:50 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id sB6HNnXU016058; Sat, 6 Dec 2014 10:23:49 -0700 (MST) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+LPith2pxGOWvxZmxVhMHY X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: single user mode? From: Ian Lepore To: Luiz Otavio O Souza In-Reply-To: References: <201412051306.sB5D6otZ007591@mech-as221.men.bris.ac.uk> Content-Type: text/plain; charset="us-ascii" Date: Sat, 06 Dec 2014 10:23:49 -0700 Message-ID: <1417886629.1064.96.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: "freebsd-arm@freebsd.org" 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: Sat, 06 Dec 2014 17:23:58 -0000 On Sat, 2014-12-06 at 10:53 -0200, Luiz Otavio O Souza wrote: > On 5 December 2014 at 11:06, Anton Shterenlikht wrote: > > Is it possible to enter a single user mode > > on arm 10.1-release? > > > > My disk, well.. the sd card, got corrupted, > > so wanted to run fsck on it, but cannot > > enter a single user mode. I ended up putting > > the sd card into a laptop and running fsck there. > > This fixed lots of panics, but is it possible > > to enter the single user mode on arm, and > > run fsck directly there? > > If you are using RPi with official or crochet images then yes, you can > force it to boot in single user mode and run fsck, but (and there > always a but) you can only do that from serial console, the vt > framebuffer starts too late to allow you to break into loader prompt. > > And as others have said it is not clear if the semi-known bug affects > armv6 (we can't yet say if is safe to fsck your disk on arm). We need to not let this fsck problem grow into a bogus myth. There is ABSOLUTELY NO EVIDENCE that there's anything wrong with fsck on armv6. Quite the opposite, I tested it extensively trying to find a problem, using sdcard, usb thumb drives, SSD drives and hard drives in a USB dock, and on md(4) filesystems. I couldn't get a single failure of any kind on armv6, even when purposely creating filesystem corruption (such as pulling the usb cable while doing rsync to copy tons of files to the drive). fsck always correctly fixed any problems. The only known problem with fsck on arm happens on armv5, and more specifically on Marvell Kirkwood/Sheeva chipsets. Maybe it happens on other armv4/v5 systems, but I haven't been able to prove that yet. The recipe to create that problem is simple and 100% reproducible for me: mdconfig -a -t malloc -s64m newfs -U /dev/md0 fsck -tffs /dev/md0 The filesystem is now corrupted. fsck will report that it is "fixing" errors on the newly-formatted filesystem, but in fact it corrupts the clean filesystem. Please lets not blow this up into 'fsck is broken on armv6' without actual evidence of that. BTW, I haven't yet in this thread seen the most straightforward answer to the original question. To force a boot to single user mode, interrupt the boot countdown in ubldr and do set boot_single=1 boot You can do likewise with boot_verbose=1, and there are similar flags for the other thing you're using to entering at the boot2 prompt on x86. -- Ian