Re: secondary hdd

2007-07-30 Thread Rolf G Nielsen

Cyrus wrote:

ok, i origainly had windows xp pro on my machine, i installed freebsd 6.2.
my machine has a 40gb seagate disk for o/s, and a 160 gb WD disk for
storage.

my question is, how do i go about formating the 160 gb, from ntfs to ufs for
use in freebsd?  and make it automount when system boots?

Thank you
Cyrus
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"





The simplest way if you're new to FreeBSD would be to use sysinstall. 
Just type sysinstall at the promt in the console. In the menu select 
Configure, then Fdisk. If you know the device name of the disk in 
question, you need only select that one in the list that shows up, 
otherwise select all. You will now see a screen with info about the each 
disk you selected, one at a time. For the disk(s) you do not want to 
change, just hit ESC and select None in the list that appears. When you 
come to the disk you want to use as secondary, select the slices one by 
one and press D for each one. When all slices have been deleted, just 
press A, then W.
When you're done, go back to the main menu and select Label. Then you 
will see a screen with all the slices you configured, and available 
space in each one. Select the one in the secondary disc and press C to 
create a partition. You'll be asked to enter the desired size of the new 
partition, and if you want just one partition on the entire disk, just 
press enter. If you want more than one partition, repeat this until 
you're satisfied, then make a note the device name(s) created (for 
instance ad1s1e) and press W. The partition(s) will be formated.
I don't think this will make the disk automount, so you'll have to edit 
your /etc/fstab file, which contains info on all the filesystems to be 
mounted on boot, one line per entry. This is what an fstab entry looks like


/dev/ad1s1e  /usr   ufsrw22

First is the file system's device node, then under what directory you 
want it to be mounted, third is the filesystem type (should be ufs for 
native FreeBSD partitions), fourth is options (rw means read/write, see 
man fstab for other options). The last two columns should be set to 2, 
except for the root filesystem (should be 1) and swap, procfs and other 
specialities (should be 0). Once you're done, save the file and reboot, 
and you're disc should be automatically mounted.


--

Vänligen / Sincerly,
Rolf Nielsen
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: secondary hdd

2007-07-30 Thread Jerry McAllister
On Mon, Jul 30, 2007 at 01:20:31PM -0700, Cyrus wrote:

> ok, i origainly had windows xp pro on my machine, i installed freebsd 6.2.
> my machine has a 40gb seagate disk for o/s, and a 160 gb WD disk for
> storage.
> 
> my question is, how do i go about formating the 160 gb, from ntfs to ufs for
> use in freebsd?  and make it automount when system boots?

That is pretty well documented in the handbook, FAQs and online 
publications.

A brief rundown is:
  You don't have to literally "reformat" it.   That is a low level
  process done at the factory and normally not redone.   But, we
  know what you mean - you want to do whatever is necessary to use
  it in FreeBSD and don't care what the process is actually called.

NOTE:  If it is SCSI the name is da1:  if IDE/SATA it is probably ad1:

ALSO NOTE:  I am presuming you do not intend to make this disk bootable.
If you do, add a -B flag to the fdisk and to the first bsdlabel

NOTE too:  This all must be done as root.

  First:  use fdisk to create one slice (da1s1) of FreeBSD type on it that
occupies the whole disk.
  dd if=/dev/zero of=/dev/da1 bs=512 count=1024
  fdisk -I da1
the dd wipes out old stuff.  It might not be needed, but is easy
just to make sure.

  Second:  use bsdlabel to write the partitions in that slice.  Partition
layout Depends on how you want to use it.  For example, I will use
one chunk of extra swap and two mountable partitions d & e.
  bsdlabel -w da1s1  [this puts the base label there]

  bsdlabel -e da1s1  [this puts you in mode to edit partitions]
you will then see something like this:

  8 partitions:
#size   offsetfstype   [fsize bsize bps/cpg]
c:3355443200  unused   0 0  # "raw" part, don't edit

Edit it to look something like:

  8 partitions:
#size   offsetfstype   [fsize bsize bps/cpg]
b:  20971620swap
c:3355443200  unused   0 0  # "raw" part, don't edit
d: 33554432*  4.2BSD2048 16384 8
e:**  4.2BSD2048 16384 28552

This will give you a 1 GB swap partition, a 16 GB da1s1d partition
and a da1s1e partition that takes up all the rest of the disk.

NOTE:  The numbers under size and offset are in 512 byte blocks.
   You can use values like 16GB, but this was is consistent.
NOTE too:  When you use * for offset and the final size, bsdlabel
   calculates them for you - correctly.   But you can specify
   them yourself if you want - if you are doing something weird
   like leaving a hole in the middle or whatever.

  Third:  You must run newfs on the two mountable partitions
  newfs /dev/da1s1d
  newfs /dev/da1s1e
Nowdays the defaults are generally good for most usages, but there
may be times you need to adjust them to get more inodes if you
have a large filesystem with lots of vary small files.

NOTE:  newfs seems to want the full device name still, even though fdisk
   and bsdlabel now will fill in if you just give them da1  without /dev.

  Fourth:  You must create mount points for the mountable partitions.
   Say you want to mount them as /work and /scratch, then
 mkdir /work
 mkdir /scratch

  Fifth:  You must edit /etc/fstab to add lines for each of the three
  new partitions.  The swap should look like your existing swap
  line with the new device name, something like:
/dev/ad0s3b   none swapsw0   0
  The mountable partition should look about like one of the
  other mountable partition lines but with the new names:
/dev/da1s1d   /workufs rw2   2
/dev/da1s1e   /scratch ufs rw2   2

Thereafter, it should all work just fine and dandy.   Again, note,
these examples are for SCSI.  For IDE/SATA the device names would 
be ad  in place of da
  such as bsdlabel ad1s1  and  /dev/as1s1d  for mounts.

The documentation is quite complete on this.  You should do
some reading.

jerry

> 
> Thank you
> Cyrus
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"