News:

Happy New Year! Yes, the current one, not a previous one; this is a new post, we swear!

Main Menu

Formatting external drive in FreeBSD

Started by Newby, July 25, 2006, 12:42:53 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Newby

Ok, I have found absolutely no fucking way to format a disk easily on FreeBSD.

It's super easy on Windows. It's super easy on Linux.

Come to FreeBSD, it's an absolute fucking pain in my ass.

Anybody wanna link me to the proper/correct/command line way to format a drive? Any drive. Preferably something like an iPod/thumbdrive/external hard-drive.

Thanks in advance. Google has failed me miserably.
- Newby
http://www.x86labs.org

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote from: Rule on June 30, 2008, 01:13:20 PM
Quote from: CrAz3D on June 30, 2008, 10:38:22 AM
I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Blaze

And like a fool I believed myself, and thought I was somebody else...

iago


Newby

Quote from: Blaze on July 25, 2006, 02:33:18 AM
http://www.freebsd.org/doc/en_US.ISO8859-1/articles/formatting-media/article.html

?

No.

Quote from: iago on July 25, 2006, 09:46:52 AM
Try mkfs?  Or is that just Linux?

The thing is that fdisk refuses to work from the console. I have to go into sysinstall for it, and even then it acts really weird. I can only select from like, 3 filesystems. ext2fs, ufs, and dos. What if I want more?
- Newby
http://www.x86labs.org

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote from: Rule on June 30, 2008, 01:13:20 PM
Quote from: CrAz3D on June 30, 2008, 10:38:22 AM
I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

iago

Well, can't you partition it with fdisk (through that program or whatever), then run mkfs to create the file system?

Which FS are you trying to create, exactly? 

Newby

Quote from: iago on July 25, 2006, 01:11:40 PM
Well, can't you partition it with fdisk (through that program or whatever), then run mkfs to create the file system?

Which FS are you trying to create, exactly? 

No mkfs. I really have no idea how to format it via mkfs_xxxx ala Linux. I know how to format to UFS and FAT32 (newfs and newfs_msdos) but getting past this pain in the ass in fdisk would be a start...

Quotenewby@overkill:~$ sudo fdisk /dev/ad0
Password:
******* Working on device /dev/ad0 *******
parameters extracted from in-core disklabel are:
cylinders=193821 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=193821 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 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 63, size 195366402 (95393 Meg), flag 80 (active)
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 1023/ 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>
newby@overkill:~$

I used my hard-drive as an example, but it does that for everything.
- Newby
http://www.x86labs.org

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote from: Rule on June 30, 2008, 01:13:20 PM
Quote from: CrAz3D on June 30, 2008, 10:38:22 AM
I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Nate

http://lists.freebsd.org/pipermail/freebsd-questions/2005-May/087399.html

This seems to be what you want but you probably already saw it and didnt like it for some reason, no reason not to through it out there though.

Newby

Yes. I know how to format an external hard-drive. I just need the fucking commands. I can look up the manual pages once I have them, but so far I have been failed.
- Newby
http://www.x86labs.org

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote from: Rule on June 30, 2008, 01:13:20 PM
Quote from: CrAz3D on June 30, 2008, 10:38:22 AM
I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

nslay

#8
Quote from: Newby on July 26, 2006, 02:06:47 AM
Yes. I know how to format an external hard-drive. I just need the fucking commands. I can look up the manual pages once I have them, but so far I have been failed.

Do you want to zero out the disk or create a new partition?
You showed a snipit of fdisk...
If you want to do fdisk for FreeBSD on the entire disk
do:
fdisk -I /dev/da0

otherwise
for a new disk
do:
fdisk -i /dev/da0

or to modify an existing partition
fdisk -# -u /dev/da0

where # is the partition number

To zero out the drive, you could use dd
dd if=/dev/zero of=/dev/da0

Since BSD eliminated block devices, you do not need to specify the block size.

BTW:
If you want to make a UFS2 file system after you fdisk it
do: newfs /dev/da0s1
Although I strongly suggest you bsdlabel /dev/da0s first, otherwise the other BSDs can't read it.  A label is distinguished by a letter, e.g. da0s1a, once you label it do newfs on the label (e.g. newfs /dev/da0s1a).  To be brief, the other BSDs assume the partition is labelled which, if you just did 'newfs /dev/da0s1' will cause problems.
An adorable giant isopod!

Newby

I wanted to create a new partition. I'll look into those commands tomorrow.

How would I go about formatting the partition afterwards?
- Newby
http://www.x86labs.org

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote from: Rule on June 30, 2008, 01:13:20 PM
Quote from: CrAz3D on June 30, 2008, 10:38:22 AM
I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

nslay

#10
Quote from: Newby on August 10, 2006, 02:57:31 AM
I wanted to create a new partition. I'll look into those commands tomorrow.

How would I go about formatting the partition afterwards?

newfs takes care of those details.
newfs /dev/da0s1
will create a UFS2 FS for you...I think -o 1 will make it UFS1
be sure to bsdlabel it beforehand, otherwise Net and OpenBSD will not be able to read the FS.
Although, you may use it without labeling it in FreeBSD
An adorable giant isopod!