From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 10 03:52:30 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6573106566B for ; Tue, 10 Jan 2012 03:52:30 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from qmta08.emeryville.ca.mail.comcast.net (qmta08.emeryville.ca.mail.comcast.net [76.96.30.80]) by mx1.freebsd.org (Postfix) with ESMTP id C7DC68FC0A for ; Tue, 10 Jan 2012 03:52:30 +0000 (UTC) Received: from omta04.emeryville.ca.mail.comcast.net ([76.96.30.35]) by qmta08.emeryville.ca.mail.comcast.net with comcast id KfnX1i0040lTkoCA8fsWVs; Tue, 10 Jan 2012 03:52:30 +0000 Received: from damnhippie.dyndns.org ([24.8.232.202]) by omta04.emeryville.ca.mail.comcast.net with comcast id KfsV1i00G4NgCEG8QfsVsY; Tue, 10 Jan 2012 03:52:30 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q0A3qRXL025820; Mon, 9 Jan 2012 20:52:27 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: =?iso-8859-2?Q?=A3ukasz?= Kurek In-Reply-To: <192396d2.4ca0430d.4f0baa06.40411@o2.pl> References: <192396d2.4ca0430d.4f0baa06.40411@o2.pl> Content-Type: text/plain; charset="iso-8859-2" Date: Mon, 09 Jan 2012 20:52:27 -0700 Message-Id: <1326167547.2199.54.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.26.0 FreeBSD GNOME Team Port Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@freebsd.org Subject: Re: backup BIOS settings X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2012 03:52:31 -0000 On Tue, 2012-01-10 at 04:01 +0100, Łukasz Kurek wrote: > Hi, > Is it possible to backup BIOS settings (CMOS configuration) to file and restore this settings on the other machine (the same hardware configuration and the same BIOS)? > > I try do it for this way: > > kldload nvram > > dd if=/dev/nvram of=nvram.bin (backup) > > dd if=nvram.bin of=/dev/nvram (restore) > > > but this way always load default BIOS settings, not my (probably there is some kind of error). Examine the contents of the nvram.bin file with hexdump. If every byte has the same value, I just posted a patch to this list earlier today (subject is "trouble with atrtc") that will fix the problem. Many new RTC chipsets have more than the original 114 bytes of nvram. The nvram driver doesn't currently provide access to the extra banks. I'm not sure whether the BIOS would store anything in those other banks, but if so, failing to save and restore those values might cause the behavior you see. Also, it's not directly related to your question, but I notice the nvram(4) manpage says the driver does nothing about the checksum, but looking at the driver code, it does recalculate the checksum when it writes to nvram. -- Ian