Date: Tue, 12 May 2009 17:01:40 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Daniel Underwood <djuatdelta@gmail.com> Cc: "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org> Subject: Re: Reformatting external harddrive Message-ID: <4A099D64.9050709@infracaninophile.co.uk> In-Reply-To: <b6c05a470905111818ja0ddd76yd5742e4fbfa54bf2@mail.gmail.com> References: <b6c05a470905111818ja0ddd76yd5742e4fbfa54bf2@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5A3D8B3BB51123E2D769C81D Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Daniel Underwood wrote: > After unsuccessfully trying to reformat my external harddrive on my > linux machine, I'm trying to reformat the disk in FreeBSD. Frankly, I > just don't know how to do that. Please help me get the disk back to > working order; I don't need to keep any data that is currently on the > disk. >=20 > The command >=20 > $ /dev/da0 ITYM: fdisk /dev/da0 > gives the following output: >=20 > ******* Working on device /dev/da0 ******* > parameters extracted from in-core disklabel are: > cylinders=3D38913 heads=3D255 sectors/track=3D63 (16065 blks/cyl) >=20 > Figures below won't work with BIOS for partitions not in cyl 1 > parameters to be used for BIOS calculations are: > cylinders=3D38913 heads=3D255 sectors/track=3D63 (16065 blks/cyl) >=20 > 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 (0xa5),(FreeBSD/NetBSD/386BSD) > start 63, size 625137282 (305242 Meg), flag 80 (active) > beg: cyl 0/ head 1/ sector 1; > end: cyl 0/ head 254/ sector 63 > The data for partition 2 is: > <UNUSED> > The data for partition 3 is: > <UNUSED> > The data for partition 4 is: > <UNUSED> This says that you have written a partition table onto the drive that indicates the whole disk is being used for FreeBSD. That's a good start if your intention is to use the disk dedicated for FreeBSD. The way the partition naming scheme works you should now have a /dev/da0s= 1 device file (indicating 'slice 1' or disk 'da0') In order to make the disk usable with FreeBSD, you need to follow somethi= ng like these steps: * Use bsdlabel(8) to create BSD partitions on slice1. To write a=20 default label: # bsdlabel -w /dev/da0s1 Then to edit the default label and define the partitions you want, # bsdlabel -e da0s1 Edit mode will pop up an editor with the existing BSD partition table -- that's vi(1) by default but you can override it by setting = the EDITOR environment variable. If your aim is to use this disk as one big filesystem for storing da= ta then creating a 'd' partition covering all the available space would= be appropriate. After saving the edited partition table you should now= have a device file: /dev/da0s1d * Use newfs(8) to create a filesystem on the drive. I'd just leave it= with the default settings unless you know you're going to be using the di= sk=20 for unusually large files or unusually many very small files. newfs /dev/da0s1d * Mount the new filesystem to make it available to FreeBSD. Add a lin= e like the following to /etc/fstab: /dev/da0s1d /data ufs rw 2 2 Then create the mount point: # mkdir -p /data and mount the drive: # mount /data The drive will be remounted automatically on system reboots and is = expected to be permanently present. If you want to have the disk be removab= le, then read all about amd(8) and feel free to ask again here. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig5A3D8B3BB51123E2D769C81D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkoJnW0ACgkQ8Mjk52CukIwEAgCgi7M2A4CYkwLQKRekiB8QAt6S OgwAn2wpnd6ZZzJVWlaSl64pwBUHjsop =Onkf -----END PGP SIGNATURE----- --------------enig5A3D8B3BB51123E2D769C81D--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A099D64.9050709>