Date: Sun, 8 Dec 2013 10:47:00 -0800 From: Michael Sierchio <kudzu@tenebras.com> To: Doug Hardie <bc979@lafn.org> Cc: "freebsd-questions@freebsd.org Questions" <freebsd-questions@freebsd.org> Subject: Re: Using bsdinstall for an additional drive Message-ID: <CAHu1Y732myTGH9mBbL_uBS1B49f0MYfgG2BZLJ1AfpNpAVRMHQ@mail.gmail.com> In-Reply-To: <B6C67E2D-48D5-4422-917B-06C2152EF397@lafn.org> References: <B6C67E2D-48D5-4422-917B-06C2152EF397@lafn.org>
next in thread | previous in thread | raw e-mail | index | archive | help
I think it's worth the effort to try to understand gpart et al.
If you have a new disk, DISK=3Dad4, for example
# remove any possible existing data at beginning and end of disk (this
is just an example)
offset=3D`diskinfo $DISK | awk '{ print $4 - 131072 }'`
dd if=3D/dev/zero of=3D/dev/$DISK bs=3D64k count=3D1
dd if=3D/dev/zero of=3D/dev/$DISK bs=3D64k seek=3D$offset
The following is for a boot drive, with some fixed ideas about
partitions, but is possibly useful as an example. The assumption here
is alignment to 64k boundaries. If you don't need a bootable drive,
just skip the parts for that. You could create one big partition, if
that's what you want, with just the last bit.
# create partition table
gpart create -s gpt ${DISK}
# add boot partition
# p1
gpart add -t freebsd-boot -l boot -s 64k ${DISK}
# put boot code in boot partition
gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ${DISK}
# add 1G root, make sectors aligned
# p2
gpart add -t freebsd-ufs -l root -a 64k -s 1G ${DISK}
# add 2G swap
# p3
gpart add -t freebsd-swap -l swap -a 64k -s 2G ${DISK}
# add 1G tmp
# p4
gpart add -t freebsd-ufs -l tmp -a 64k -s 1G ${DISK}
# add 2G var
# p5
gpart add -t freebsd-ufs -l var -a 64k -s 2G ${DISK}
# add 2G opt
# p6
gpart add -t freebsd-ufs -l opt -a 64k -s 2G ${DISK}
# add remainder of disk for usr
# p7
gpart add -t freebsd-ufs -l usr -a 64k ${DISK}
On Sun, Dec 8, 2013 at 10:25 AM, Doug Hardie <bc979@lafn.org> wrote:
> I have a running 9.2 system that I need to add another drive to. With sy=
sinstall it was easy (once you understood it) to add a new drive. However,=
I have not figured out how to do that with bsdinstall. I don't want to ex=
periment much as the running system would take forever to rebuild. Is ther=
e a way to do this without affecting the existing system?
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o=
rg"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHu1Y732myTGH9mBbL_uBS1B49f0MYfgG2BZLJ1AfpNpAVRMHQ>
