From owner-freebsd-questions@FreeBSD.ORG Wed Feb 23 19:05:00 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E88EA16A4CE for ; Wed, 23 Feb 2005 19:05:00 +0000 (GMT) Received: from relay.pair.com (relay00.pair.com [209.68.1.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 4D3C643D54 for ; Wed, 23 Feb 2005 19:05:00 +0000 (GMT) (envelope-from alejandro@varnet.biz) Received: (qmail 59315 invoked from network); 23 Feb 2005 19:04:59 -0000 Received: from unknown (HELO ale.varnet.bsd) (unknown) by unknown with SMTP; 23 Feb 2005 19:04:59 -0000 X-pair-Authenticated: 200.115.214.206 Date: Wed, 23 Feb 2005 16:05:34 -0300 From: Alejandro Pulver To: freebsd-questions Message-ID: <20050223160534.6d3f3f8d@ale.varnet.bsd> X-Mailer: Sylpheed-Claws 0.9.12b (GTK+ 1.2.10; i386-portbld-freebsd5.3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Extracting boot sectors X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Feb 2005 19:05:01 -0000 Hello, I would like to know how to extract the MBR to a file, and how to restore it. Also I would like to know how to do the same with the partition boot sector and OS loaders. I think it is as follows (I remember this from somewhere): dd if=/dev/ of=/ bs=512 count=1 But I do not know: a) Is 512 the correct size for both (MBR and partition boot sectors)? b) How to extract/restore the OS loader (e.g. for WinNT/2K/XP, that is NTLDR)? c) What alternative commands are available for doing this (extact/restore)? I would also like to know more about boot sectors and OS loaders. I would appreciate some links. Thanks and Best Regards, Ale