9.1 install wipes out gpart boot blocks?

Warren Block wblock at wonkity.com
Thu Jan 31 00:20:35 UTC 2013


On Wed, 30 Jan 2013, Gary Aitken wrote:

> I used gpart to set up a new disk,
> then went through a 9.1 install.
> Everything seemed to go fine, but when time came to boot the new drive,
> it wouldn't boot.

What did it say?

> When doing the 9.1 install,
> I selected the disk and had to assign the partitions to the various filesystems.
> AFIK, I did not otherwise modify the filesystems.
>
> Does the 9.1 install process trash the boot areas?
>
> My gpart setup was:
>
>  clean up (delete) the original partitions
>  gpart destroy ada3

These two steps can be replaced with
   gpart destroy -F ada3

>  gpart create -s GPT ada3
>  gpart bootcode -b /boot/pmbr ada3
>  gpart add -t freebsd-boot -i 1 -s 512K -l gptboot ada3
>  gpart bootcode -p /boot/gptboot -i 1 ada3

I do the bootcode in one step:
   gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada3

>  gpart add -t freebsd-ufs -a 4K -b 1M -s 4G -i 2 -l fbsdroot ada3  # /
>  gpart add -t freebsd-swap -a 4K -s 2G -i 3 -l fbsdswap ada3     # swap
>  gpart add -t freebsd-ufs -a 4K -s 2G -i 4 -l fbsdvar ada3         # /var
>  gpart add -t freebsd-ufs -a 4K -s 2G -i 5 -l fbsdtmp ada3         # /tmp
>  gpart add -t freebsd-ufs -a 4K -i 6 -l fbsdusr ada3               # /usr

It's not necessary to use partition numbers with "add", gpart will just 
use the next one available.

Here are my notes:
http://www.wonkity.com/~wblock/docs/html/disksetup.html


More information about the freebsd-questions mailing list