From owner-freebsd-hackers Sat Mar 2 4:54:33 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from iguana.icir.org (iguana.icir.org [192.150.187.36]) by hub.freebsd.org (Postfix) with ESMTP id CD02337B419 for ; Sat, 2 Mar 2002 04:54:31 -0800 (PST) Received: (from rizzo@localhost) by iguana.icir.org (8.11.6/8.11.3) id g22CsVM45413; Sat, 2 Mar 2002 04:54:31 -0800 (PST) (envelope-from rizzo) Date: Sat, 2 Mar 2002 04:54:31 -0800 From: Luigi Rizzo To: hackers@freebsd.org Subject: a question about disklabels Message-ID: <20020302045431.A45398@iguana.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.23i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Maybe someone can comment on this ? I was hoping to be able to dump picobsd images (which are basically an image of a bootable FreeBSD "slice") straight into a disk "slice" (e.g. say /dev/ad0s2), and it took me a while to realize that both the loader (boot2) and the kernel itself expect to find in the label, in the "partition offset" field, the absolute offset (relative to the beginning of the disk) as opposed to the relative one (relative to the beginning of the slice), which is shown by "disklabel". This makes images a bit less portable, in that they need to be customized (though trivially) for the specific device they go into. Any idea on how hard would it be to remove this restriction (apart from backward compatibility issues) ? I was under the impression that any code in the kernel that works on a partition must also be told which partition/disk/slice to work on so from that information it should be easy enough to reconstruct the actual offset of the partition on the disk. thanks luigi ----------------------------------+----------------------------------------- Luigi RIZZO, luigi@iet.unipi.it . ICSI (on leave from Univ. di Pisa) http://www.iet.unipi.it/~luigi/ . 1947 Center St, Berkeley CA 94704 Phone: (510) 666 2927 ----------------------------------+----------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message