Date: Thu, 02 Apr 2009 15:09:30 +0300 From: Andriy Gapon <avg@icyb.net.ua> To: freebsd-geom@freebsd.org Subject: gpart micro-how-to Message-ID: <49D4AAFA.1000407@icyb.net.ua>
next in thread | raw e-mail | index | archive | help
When I was a FreeBSD newbie I used sysinstall to partition my disks (now this subset of sysinstall's functionality can be found in sade(1)); when I became more knowledgeable and self-confident I started using fdisk and disklabel; and now it's time for gpart. Yesterday I marked up a new disk using part and decided to share the commands I used just in case somebody finds it useful. The disk is WD5000AAKS, its size in sectors is 976773168. # the following is fdisk substitute: create mbr partition table # and populate two entries with FreeBSD slices gpart create -s mbr ad10 gpart add -b 63 -s 12578832 -t freebsd ad10 gpart add -b 12578895 -s 964194273 -t freebsd ad10 # the following are disklabel substitutes: create empty labels, then add ufs # partition ad10s1a, swap partition ad10s1b and partition ad10s2d of type # "unknown"/FS_OTHER/10 for future use by zfs gpart create -s bsd ad10s1 gpart create -s bsd ad10s2 gpart add -i 1 -b 16 -s 4194304 -t freebsd-ufs ad10s1 gpart add -i 2 -b 4194320 -s 8384512 -t freebsd-swap ad10s1 gpart add -i 4 -b 16 -s 964194257 -t \!10 ad10s2 # the following are substitutes for fdisk/disklabel with -B/-b flags gpart bootcode -b /boot/boot0 ad10 gpart bootcode -b /boot/boot ad10s1 And "gpart show" is, of course, of great help at intermediate steps to figure out sizes and offsets. -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49D4AAFA.1000407>