From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 27 21:23:48 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 430B11065674 for ; Tue, 27 Mar 2012 21:23:48 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 173838FC21 for ; Tue, 27 Mar 2012 21:23:48 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 719ACB925; Tue, 27 Mar 2012 17:23:47 -0400 (EDT) From: John Baldwin To: rank1seeker@gmail.com Date: Tue, 27 Mar 2012 17:19:13 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <20120325.150506.135.2@DOMY-PC> <201203261629.58303.jhb@freebsd.org> <20120327.190337.361.2@DOMY-PC> In-Reply-To: <20120327.190337.361.2@DOMY-PC> MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1250" Content-Transfer-Encoding: 7bit Message-Id: <201203271719.13196.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 27 Mar 2012 17:23:47 -0400 (EDT) Cc: hackers@freebsd.org Subject: Re: BUG: REL 9.0 - 'boot0cfg' fails with providers of non 512 byte sectorsize 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, 27 Mar 2012 21:23:48 -0000 On Tuesday, March 27, 2012 3:03:37 pm rank1seeker@gmail.com wrote: > ----- Original Message ----- > From: John Baldwin > To: rank1seeker@gmail.com > Cc: hackers@freebsd.org > Date: Mon, 26 Mar 2012 16:29:58 -0400 > Subject: Re: BUG: REL 9.0 - 'boot0cfg' fails with providers of non 512 byte sectorsize > > > On Monday, March 26, 2012 2:02:53 pm rank1seeker@gmail.com wrote: > > > ----- Original Message ----- > > > From: John Baldwin > > > To: freebsd-hackers@freebsd.org > > > Cc: rank1seeker@gmail.com, hackers@freebsd.org > > > Date: Mon, 26 Mar 2012 10:17:41 -0400 > > > Subject: Re: BUG: REL 9.0 - 'boot0cfg' fails with providers of non 512 byte > > sectorsize > > > > > > > On Sunday, March 25, 2012 11:05:06 am rank1seeker@gmail.com wrote: > > > > > I've created a vnode image (md0) with sectorsizes of 8192 and 4096 > > > > > > > > > > After installing MBR's bootcode '/boot/boot0', in provider 'md0' I did: > > > > > # boot0cfg -o noupdate -m 0xc md0 > > > > > boot0cfg: read /dev/md0: Invalid argument > > > > > # boot0cfg -v md0 > > > > > boot0cfg: read /dev/md0: Invalid argument > > > > > > > > > > If custom sectorsize isn't specifed(512 bytes), then both above CMDs > > will > > > > work. > > > > > > > > MBR bootstraps (such as boot0) assume a 512 byte sector. They won't boot > > > > correctly on media with a different sector size. So even if you "fixed" > > > > boot0cfg, you wouldn't have a bootable system. > > > > > > > > -- > > > > John Baldwin > > > > > > > > > > > > > Is it so? > > > This is also true for '/boot/mbr' file? > > > > Yes. > > > So If in above image with custom sector size (4k for 4k HDD) with slices and bsdlabels and world + kernel > If I would 'dd' it to BIOS bassed PC and then power on, it wouldn't boot?! It would load the first sector fine (i.e. BIOS would read first 512 bytes off the disk and start executing it), but it would not be able to properly parse the MBR table layout so it would probably blow up when it tried to find boot1 to boot it, yes. -- John Baldwin