From owner-freebsd-questions@FreeBSD.ORG Tue Jan 8 15:04:20 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B571F16A420 for ; Tue, 8 Jan 2008 15:04:20 +0000 (UTC) (envelope-from john@jnielsen.net) Received: from ns1.jnielsen.net (ns1.jnielsen.net [69.55.238.237]) by mx1.freebsd.org (Postfix) with ESMTP id A694D13C4CE for ; Tue, 8 Jan 2008 15:04:20 +0000 (UTC) (envelope-from john@jnielsen.net) Received: from ns1.jnielsen.net (jn@ns1 [69.55.238.237]) by ns1.jnielsen.net (8.12.9p2/8.12.9) with ESMTP id m08F4IQV034568; Tue, 8 Jan 2008 10:04:20 -0500 (EST) (envelope-from john@jnielsen.net) Received: (from www@localhost) by ns1.jnielsen.net (8.12.9p2/8.12.9/Submit) id m08F4IvD034567; Tue, 8 Jan 2008 10:04:18 -0500 (EST) (envelope-from john@jnielsen.net) X-Authentication-Warning: ns1.jnielsen.net: www set sender to john@jnielsen.net using -f Received: from nc-2wac-zop05.wachovia.com (nc-2wac-zop05.wachovia.com [162.111.235.16]) by newwebmail.jnielsen.net (Horde MIME library) with HTTP; Tue, 08 Jan 2008 10:04:17 -0500 Message-ID: <20080108100417.txiqdm60mcscc0wo@newwebmail.jnielsen.net> Date: Tue, 08 Jan 2008 10:04:17 -0500 From: John Nielsen To: "Aryeh M. Friedman" References: <4782EEF0.80809@gmail.com> In-Reply-To: <4782EEF0.80809@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.0.4) / FreeBSD-4.9 X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on ns1.jnielsen.net X-Virus-Status: Clean Cc: FreeBSD Question Subject: Re: changing the postion of a partion in fdisk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2008 15:04:20 -0000 Quoting "Aryeh M. Friedman" : > > I have my FreeBSD partition as partition 1 and my ntfs as partition 2 > but Vista insists that there is no suitable partion to install to > (even though the ntfs partition is big enough)... after some research > I found that vista absolutely insists that the ntfs partition be > partition 1... how do I swap them and/or delete the ntfs one and > renumber it so freebsd is in partion slot 2 (with nothing in 1 and > then I can use fdisk to make a new slot 1) You can probably just use FreeBSD's fdisk to swap them. Something along the lines of: 1) Verify your backups 2) Boot from a FreeBSD Rescue CD and enter the "fixit" shell 3) Type "fdisk /dev/yourdisk". I'll assume ad0 from this point. 4) Write down the output. All of it. Keep a copy in a safe place (this is actually good practice even if you're _not_ intentionally messing with your partitions). If you're feeling clever and/or lazy you could of course bring up a line printer or a network interface and print the output or copy it to another machine (from which you should then print it), but a file on the local disk will not serve (and a file on the mfsroot will go away as soon as you reboot or if anything unexpected happens, which it usually does). 5) Type "fdisk -u /dev/ad0" (or whatever your disk is). Manually enter the numbers (including explicitly setting the start/end sector, etc) for partition 2 as partition 1 and vice versa. Think about which partition you want to mark as active (probably 2, see step 10) and do so. Verify your changes against your printout, then commit them. 6) Type "ls /dev/ad0*" and verify that you see the devices you expect (including your FreeBSD partitions, probably something like ad0s2[a-d]). 7) Mount your root partition, e.g. "mount /dev/ad0s2a /mnt". If it doesn't mount then abort. Run fdisk again and change the values back to what they were initially. 8) Edit your fstab to update the slice numbers. e.g. "vi /mnt/etc/fstab" or "sed -e "s/ad0s1/ad0s2/g" < /mnt/etc/fstab > /mnt/etc/fstab.new" followed by a sanity check and a couple mv commands. 9) Unmount your root partition, e.g. "umount /mnt". 10) Reboot and verify that your FreeBSD installation is still alive. 11) Carry on... This information comes with no warranty. :) JN