partitions and slices

Hi all,

I recently did a fresh install of v8.2 on a 2TB drive. During the installation process I created a partition of 25GB, with a section for / and one for /home:
Code:
/dev/ad4s1a    9.7G    5.3G    3.6G    60%    /
/dev/ad4s1d     14G    2.3G     10G    18%    /home

Now I'd like to mount the rest of the drive for misc. storage. I created a new partition, s2, and tried to create slice in it to mount.

I managed to create /dev/ad4s2 but disklabel won't let me create it. It prompts for a mount point. I enter one which exists, but it keeps returing an error message:
Code:
Error mounting /dev/ad4s2d on /mount/disk8 : No such file or directory

What am I missing here?

Thanks
 
cbrace said:
Now I'd like to mount the rest of the drive for misc. storage. I create a new slice, s2, and tried to create a label to mount somewhere.

What did you do?

I managed to create /dev/ad4s2 but disklabel won't let me create label.

What is the error message?

It prompts for a mount point.

disklabel, which is really bsdlabel(8)? Or are you trying to use sysinstall?

I enter one which exists, but it keeps returing an error message:
Code:
Error mounting /dev/ad4s2d on /mount/disk8 : No such file or directory

What am I missing here?

Details, mainly. What is the output of
% bsdlabel /dev/ad4s2
 
Sorry, I am getting my terminology wrong.

Using sysinstall, first I created a 2nd partition, /dev/ad4s2

Then I tried to create a slice within it, also from within sysinstall. I supplied a mount point, but it kept refusing to accept the value I entered.

Code:
$ sudo bsdlabel /dev/ad4s2
# /dev/ad4s2:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c: 3854601072        0    unused        0     0         # "raw" part, don't edit
  d: 3854601072        0    4.2BSD        0     0     0

Thanks
 
cbrace said:
Sorry, I am getting my terminology wrong.

Using sysinstall, first I created a 2nd partition, /dev/ad4s2

Okay, stop right there. After installing a system, stop using sysinstall.

Seriously. No, really.

The two programs that do what is needed here are fdisk(8) and bsdlabel(8).

The first step is to create the second slice (MS-DOS partition), normally done with fdisk. You have succeeded at that with sysinstall. Be grateful it didn't overwrite /etc/fstab, which it really, really wants to do.

Code:
$ sudo bsdlabel /dev/ad4s2
# /dev/ad4s2:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
c: 3854601072 0 unused 0 0 # "raw" part, don't edit
d: 3854601072 0 4.2BSD 0 0 0

(Be aware that sudo is not the same as being root. There are environment differences. On FreeBSD, use su - to switch to root.)

The first BSD partition should be a, not d. Ignore the c, you can't use it.

CAUTION: back up the whole drive right now, including the partition table/boot block. It's easy to kill a working system by changing the bsdlabel.

# sysctl kern.geom.debugflags=16
# bsdlabel -w -B ad4s2
# bsdlabel -e ad4s2

Create an a: partition. This will be in vi(1), if you don't like that, set the EDITOR environment variable to another editor.
Code:
a: * * 4.2BSD 0 0
c: 3854601072 0 unused 0 0 # "raw" part, don't edit
Save that, and the new ad4s2a partition will be available. Use newfs(8) on it, then it can be mounted.

Reference: Disk Setup On FreeBSD
 
cbrace said:
Sorry, I am getting my terminology wrong.

Using sysinstall, first I created a 2nd partition, /dev/ad4s2

Then I tried to create a slice within it,
It's the other way around, /dev/ad4s2 is a slice (note the s in there) and you create partitions (a,b, etc) inside it.

And I agree with wblock, stop using sysinstall.
 
Back
Top