From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 27 19:03:40 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28EE11065676; Tue, 27 Mar 2012 19:03:40 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 763178FC1A; Tue, 27 Mar 2012 19:03:39 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so300826bkc.13 for ; Tue, 27 Mar 2012 12:03:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:subject:date:content-type :content-transfer-encoding:in-reply-to:references:x-mailer; bh=14sUgDQ3IyPGCcqp5AQXpWgviKCu+T3ygKxmgnG0Yt8=; b=oKtyBLaOxSDmjifFwvCAtG3GHfSrw9CJC7cRQdQOrJEC5bgj3tCBMVQCa+gBqIfvdm VQ8ynJKts1xu72pPK3Qod/M4Sd2TkMjEqxGzbyyjfqc86qMtIwFOtxB99DATjZwkDkhO 1hMy4m+gThA8/DwCb1XJaZ6zHvCjpCyj5QpsGOqTA2jz+MPvsWSLqNWrxPlIwX4Vzr71 JXRfvzyZEvG23J1I97NzIDWVnpw67/EXDSyyxTg6gajtZv7tf9eQAlCdZ8kxa9S1PhRg sCEnGiSZn+P9dLOuDfK+QpshCc6K8J2Nq4fpdo4meXF1ErCGXjcqA6vs0KhWOr91pJJD 03Jg== Received: by 10.204.154.139 with SMTP id o11mr10490224bkw.4.1332875018515; Tue, 27 Mar 2012 12:03:38 -0700 (PDT) Received: from DOMYPC ([82.193.208.173]) by mx.google.com with ESMTPS id u14sm1450624bkp.2.2012.03.27.12.03.26 (version=SSLv3 cipher=OTHER); Tue, 27 Mar 2012 12:03:37 -0700 (PDT) Message-ID: <20120327.190337.361.2@DOMY-PC> From: rank1seeker@gmail.com To: "John Baldwin" , hackers@freebsd.org Date: Tue, 27 Mar 2012 21:03:37 +0200 Content-Type: text/plain; charset="Windows-1250" Content-Transfer-Encoding: quoted-printable In-Reply-To: <201203261629.58303.jhb@freebsd.org> References: <20120325.150506.135.2@DOMY-PC> <201203261017.41420.jhb@freebsd.org> <20120326.180253.607.2@DOMY-PC> <201203261629.58303.jhb@freebsd.org> X-Mailer: POP Peeper (3.8.1.0) Cc: 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 19:03:40 -0000 ----- Original Message -----=0D=0AFrom: John Baldwin = =0D=0ATo: rank1seeker@gmail.com=0D=0ACc: = hackers@freebsd.org=0D=0ADate: Mon, 26 Mar 2012 16:29:58 = -0400=0D=0ASubject: Re: BUG: REL 9.0 - 'boot0cfg' fails with providers of = non 512 byte sectorsize=0D=0A=0D=0A> On Monday, March 26, 2012 2:02:53 pm = rank1seeker@gmail.com wrote:=0D=0A> > ----- Original Message -----=0D=0A> = > From: John Baldwin =0D=0A> > To: = freebsd-hackers@freebsd.org=0D=0A> > Cc: rank1seeker@gmail.com, = hackers@freebsd.org=0D=0A> > Date: Mon, 26 Mar 2012 10:17:41 -0400=0D=0A> = > Subject: Re: BUG: REL 9.0 - 'boot0cfg' fails with providers of non 512 = byte =0D=0A> sectorsize=0D=0A> > =0D=0A> > > On Sunday, March 25, 2012 = 11:05:06 am rank1seeker@gmail.com wrote:=0D=0A> > > > I've created a = vnode image (md0) with sectorsizes of 8192 and 4096=0D=0A> > > > =0D=0A> = > > > After installing MBR's bootcode '/boot/boot0', in provider 'md0' I = did:=0D=0A> > > > # boot0cfg -o noupdate -m 0xc md0=0D=0A> > > > = boot0cfg: read /dev/md0: Invalid argument=0D=0A> > > > # boot0cfg -v = md0=0D=0A> > > > boot0cfg: read /dev/md0: Invalid argument=0D=0A> > > > = =0D=0A> > > > If custom sectorsize isn't specifed(512 bytes), then both = above CMDs =0D=0A> will =0D=0A> > > work.=0D=0A> > > =0D=0A> > > MBR = bootstraps (such as boot0) assume a 512 byte sector. They won't boot = =0D=0A> > > correctly on media with a different sector size. So even if = you "fixed" =0D=0A> > > boot0cfg, you wouldn't have a bootable = system.=0D=0A> > > =0D=0A> > > -- =0D=0A> > > John Baldwin=0D=0A> > > = =0D=0A> > =0D=0A> > =0D=0A> > Is it so?=0D=0A> > This is also true for = '/boot/mbr' file?=0D=0A> =0D=0A> Yes.=0D=0A=0D=0A=0D=0ASo If in above = image with custom sector size (4k for 4k HDD) with slices and bsdlabels = and world + kernel=0D=0AIf I would 'dd' it to BIOS bassed PC and then = power on, it wouldn't boot?!=0D=0A=0D=0A> =0D=0A> > Well, majority of = PC's are still BIOS bassed so MBR scheme is still around =0D=0A> and = there are also now HDD's with 4b sector sizes and SSD's with 4b and 8k = =0D=0A> sector sizes.=0D=0A> > =0D=0A> > So how does things work in those = cases, without GPT?=0D=0A> =0D=0A> The BIOS still emulates 512 byte = sectors.=0D=0A> =0D=0A=0D=0AIn above example sector has a size of = 4k=0D=0AMBR of 512 bytes is written to it, so there are empyt 3,5k of = sector 0.=0D=0AWhat happens upon power on?=0D=0A=0D=0A=0D=0ADomagoj = Smol=E8i=E6=0D=0A