From owner-freebsd-questions@FreeBSD.ORG Sun Mar 6 18:02:40 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 BB9E216A4CE for ; Sun, 6 Mar 2005 18:02:40 +0000 (GMT) Received: from relay03.pair.com (relay03.pair.com [209.68.5.17]) by mx1.FreeBSD.org (Postfix) with SMTP id 4374543D39 for ; Sun, 6 Mar 2005 18:02:40 +0000 (GMT) (envelope-from alejandro@varnet.biz) Received: (qmail 39320 invoked from network); 6 Mar 2005 18:02:39 -0000 Received: from unknown (HELO ale.varnet.bsd) (unknown) by unknown with SMTP; 6 Mar 2005 18:02:39 -0000 X-pair-Authenticated: 200.115.214.206 Date: Sun, 6 Mar 2005 15:03:19 -0300 From: Alejandro Pulver To: freebsd-questions Message-ID: <20050306150319.49fddd98@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: Moving a slice 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: Sun, 06 Mar 2005 18:02:40 -0000 Hello, I have two IDE hard disks, the first has W2K and WXP, the second has a GNU/Linux Debian Sarge (for booting purposes only) and a FreeBSD 5.3. The Linux slice is the number 1, but the FreeBSD slice is number 4. There is a long story behind this, when I was looking for UNIX like Operating Systems (I had two Linux and one Linux Swap slices, but I removed them). At the end I choose FreeBSD. Here is my slice layout: # fdisk -s /dev/ad2: 79656 cyl 16 hd 63 sec Part Start Size Type Flags 1: 63 20466747 0x83 0x00 4: 40949685 38909430 0xa5 0x80 # fdisk ******* Working on device /dev/ad2 ******* parameters extracted from in-core disklabel are: cylinders=79656 heads=16 sectors/track=63 (1008 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=79656 heads=16 sectors/track=63 (1008 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 131 (0x83),(Linux native) start 63, size 20466747 (9993 Meg), flag 0 beg: cyl 0/ head 1/ sector 1; end: cyl 1023/ head 254/ sector 63 The data for partition 2 is: The data for partition 3 is: The data for partition 4 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 40949685, size 38909430 (18998 Meg), flag 80 (active) beg: cyl 1023/ head 0/ sector 1; end: cyl 1023/ head 254/ sector 63 There is a lot of free space after and before FreeBSD slice. I would like to know if is possible to move the entire FreeBSD slice (with 'dd', for example) to the end of the Linux slice, and then change the starting point in the slice table, and then change '4' into '2'. So there is no free space between the slices and the numbering is correct. I think 'dd' will not overrite some parts of the slice with others because it is copying the data backwards, not forward. Just for curiousity: Can I make 'dd' copy the data backwards (I mean, the same result but instead of copying 1 to , 2 to +1, etc.; copies to , -1 to +1, etc.)? Is possible to make such modification to 'dd'? I plan to use this to move a slice forward. I guess I will have to use a bootable CD to boot a FreeBSD system (like FreeSBIE) to move the slice. Here are my results in bytes to pass to 'dd' (are they correct?): Part Start Size 1: 32256 10478974464 (9993 Meg) 4: 20966238720 (19994 Meg) 19921628160 (18998 Meg) What does the line "Warning: BIOS sector numbering starts with sector 1" mean? It is an error? Does the filesystem has to do with the phisical location of the slice (according to the BSD label I think is does not, because it uses offsets, not absolute values)? Do I have to modify other file than '/etc/fstab' (like a loader configuration file)? I appreciate any recommendations/considerations/instructions/warnings. Thanks and Best Regards, Ale