From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 8 09:49:59 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E84516A4CE for ; Wed, 8 Dec 2004 09:49:59 +0000 (GMT) Received: from delight.idiom.com (delight.idiom.com [216.240.32.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 72FA643D3F for ; Wed, 8 Dec 2004 09:49:59 +0000 (GMT) (envelope-from mwm@mired.org) Received: from idiom.com (idiom.com [216.240.32.1]) by delight.idiom.com (Postfix) with ESMTP id D71C21C6D11 for ; Wed, 8 Dec 2004 01:49:58 -0800 (PST) Received: from mired.org (mwm@idiom [216.240.32.1]) by idiom.com (8.12.11/8.12.11) with SMTP id iB89nvIq023492 for ; Wed, 8 Dec 2004 01:49:58 -0800 (PST) (envelope-from mwm@mired.org) Received: (qmail 4224 invoked by uid 100); 8 Dec 2004 09:49:57 -0000 Received: by guru.mired.org (tmda-sendmail, from uid 100); Wed, 08 Dec 2004 03:49:57 -0600 (CST) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16822.52804.874822.77474@guru.mired.org> Date: Wed, 8 Dec 2004 03:49:56 -0600 To: "Bagus" In-Reply-To: References: <20041206195709.A332@curly.tele2.no> X-Mailer: VM 7.17 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.0.3 (Seattle Slew) From: Mike Meyer X-Mailman-Approved-At: Wed, 08 Dec 2004 13:00:07 +0000 cc: hackers@freebsd.org Subject: Re: finding and mounting a fat partition X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Dec 2004 09:49:59 -0000 In , Bagus typed: > > Hi, > > When I built my box, I split the disk into two partitions, one 8 gig > partition for freebsd and one 2 gig fat one in case I ever wanted to change > my mind and install a different operating system on the box. Of course, I've > never wanted to do that, but I would like to now use that 2 gigs of > diskspace for stuff now if I could. > > I found this little bit of information: http://www.freebsdhowtos.com/61.html > but when I run a df, I don't see it listed, so I don't know what the device > is called. > > Am I screwed? Any ideas? You want to use fdisk to find the partition, and change it's type to FreeBSD. I've got a two-partition disk for the same reason, and it looks like: guru# fdisk /dev/da1 /datmp/redhat ******* Working on device /dev/da1 ******* parameters extracted from in-core disklabel are: cylinders=1777 heads=244 sectors/track=41 (10004 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=1777 heads=244 sectors/track=41 (10004 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 165,(FreeBSD/NetBSD/386BSD) start 41, size 13585391 (6633 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 1023/ head 243/ sector 41 The data for partition 2 is: sysid 165,(FreeBSD/NetBSD/386BSD) start 13585432, size 4191676 (2046 Meg), flag 0 beg: cyl 1023/ head 255/ sector 63; end: cyl 1023/ head 243/ sector 41 The data for partition 3 is: The data for partition 4 is: Note that's two slices, partition 1 and partition 2. The second one has one partition on it, /dev/da1s2a. The first one has three partitions on it, as disklabel will show you: guru# disklabel /dev/da1s1 /datmp/redhat # /dev/da1s1: type: SCSI disk: da1s1 label: flags: bytes/sector: 512 sectors/track: 41 tracks/cylinder: 244 sectors/cylinder: 10004 cylinders: 1357 sectors/unit: 13585391 rpm: 3600 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # milliseconds track-to-track seek: 0 # milliseconds drivedata: 0 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 131072 0 4.2BSD 1024 8192 23 # (Cyl. 0 - 13*) b: 1310720 131072 swap # (Cyl. 13*- 144*) c: 13585391 0 unused 0 0 # (Cyl. 0 - 1357*) e: 12143599 1441792 4.2BSD 1024 8192 22 # (Cyl. 144*- 1357*) Basically, what you need to do is use fdisk to find the partition and change the type to BSD (fdisk -u /dev/da1 for me). Then use disklabel to write a label on that slice (disklabel -r -w /dev/da1s1 auto). Check to see what it wrote (disklabel /dev/da1s1), and possibly edit it with disklabel (disklabel -r -e /dev/da1s1). Finally newfs the partition(s) you want to mount (newfs /dev/da1s1e). You can then add it to /etc/fstab and mount and use it. You should, of course, use your disk's actual name where I used da1. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information.