Date: Mon, 30 Sep 1996 12:44:20 -0700 From: Darryl Okahata <darrylo@hpnmhjw.sr.hp.com> To: Mark Cheeseman <cheese@bbq.websource.com.au> Cc: questions@freefall.freebsd.org Subject: Re: Adding a second disk - what am I missing? Message-ID: <199609301944.AA271242660@hpnmhjw.sr.hp.com> In-Reply-To: Your message of "Mon, 30 Sep 1996 11:36:34 -0000."
next in thread | raw e-mail | index | archive | help
> I thought sysinstall was supposed to take care of that so I haven't tried it
> until now. Everything looks sensible except for the last few lines which
> say something like (excuse any typos - I don't have cut/paste here):
>
> 8 partitions:
> # size offset fstype [fsize bsize bps/cpg]
> c: 2031650 0 unused 0 0 # (Cyl. 0 - 27088*)
>
> Can I just change "unused" to "freebsd"? What should I do about the 8
> partitions? Change it to 1, or leave it as it is?
If and only if all of the following are true:
* You're an intermediate- to expert-level user. (DON'T EVEN THINK ABOUT
DOING THE FOLLOWING IF YOU'RE A NOVICE USER!)
* You have a SCSI disk (you did mention "sd0" -- IDE drives may work in
the following, but I don't know).
* You want to dedicate the *ENTIRE* disk to FreeBSD.
* You have no data on the disk that you want to keep.
* You don't mind losing ALL DATA that is currently on the disk.
* You don't mind destroying any and all MSDOS or Windows 3.1/95/NT
information that is on the disk.
* You don't plan on using or sharing the disk with other operating
systems (e.g., MSDOS or Windows).
* You want to partition the *ENTIRE* FreeBSD slice into a single FreeBSD
filesystem.
Then, the easiest way to add a dedicated disk is the following:
* First, determine the base disk name of the disk you want to add. Your
earlier posting said "sd0", a SCSI disk -- is this correct? This
implies that you're probably booting off an IDE disk, and not a SCSI
disk, as "sd0" is typically the boot drive (when booting from a SCSI
disk).
* Assuming that "sd0" really is correct (MAKE SURE OF THIS, AS YOU'LL
LOSE ALL DATA ON YOUR BOOT DISK, IF YOU'RE WRONG), do the following
(assuming Bourne shell /bin/sh syntax):
# This won't work if you're using /bin/csh:
d=sd0
dd if=/dev/zero of=/dev/r$d count=2
disklabel /dev/r$d | disklabel -B -R -r $d /dev/stdin
# We only want one partition, so using slice 'c' should be fine:
newfs /dev/r${d}c
(Thanks to Bruce Evans for the procedure.)
You can then mount the drive via a command like:
mount /dev/${d}c /mnt
Expert users can partition the FreeBSD slice into multiple filesystems
using a slightly different procedure:
# This won't work if you're using /bin/csh:
d=sd0
dd if=/dev/zero of=/dev/r$d count=2
TMP=/tmp/label$$
disklabel /dev/r$d > $TMP
# Edit disklabel to add partitions:
vi $TMP
disklabel -B -R -r $d $TMP
# newfs partitions appropriately
[ In case anyone's interested, I'm working on a perl script from h*ll
that attempts to simplify adding an hard disk (this perl script
generates a shell script that does the proper fdisk/disklabel/newfs
crud). I hope to release an alpha version this week to solicit
comments. ]
-- Darryl Okahata
Internet: darrylo@sr.hp.com
DISCLAIMER: this message is the author's personal opinion and does not
constitute the support, opinion, or policy of Hewlett-Packard, or of the
little green men that have been following him all day.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609301944.AA271242660>
