Re: 9.1 install wipes out gpart boot blocks?

2013-01-30 Thread Gary Aitken
On 01/30/13 17:20, Warren Block wrote:
> On Wed, 30 Jan 2013, Gary Aitken wrote:

>>  clean up (delete) the original partitions
>>  gpart destroy ada3
> 
> These two steps can be replaced with
>   gpart destroy -F ada3

I prefer doing it piecemeal to see what's happening when along the way.

>>  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

Again, I prefer incremental steps so it's more obvious what any diagnostics
are referring to, if they should appear.

>>  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.

True, but if things get out of order for some reason, then you have a mess.

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

Thanks, already read that and bookmarked it quite a while ago.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: 9.1 install wipes out gpart boot blocks? [solved]

2013-01-30 Thread Gary Aitken
On 01/30/13 15:02, Robert Huff wrote:
> 
> Gary Aitken writes:
> 
>>  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.
> 
>   While the "it wouldn't boot" is catastrophically imprecise,

I knew I'd get hammered on that :-)
Screen goes blank, 
spinner spins maybe two notches, then just sits there.
So gptboot isn't even started.

> I
> had what sounds like a similar problem about a month ago.
>   I installed from the 9.0 CD and everything appeared to go
> correctly.  However, on final re-boot the loader couldn't identify
> the root partition.
>   The solution was to identify the disks using the GPT labels in
> fstab.
>   Check the archive of questions@ for more details.

Found the archive, didn't really help.

However, I did rewrite both boot areas and that solved the problem:

gpart bootcode -b /boot/pmbr ada3
gpart bootcode -p /boot/gptboot -i 1 ada3

So apparently the 9.1 installer wipes out at least the boot code in partition 1.
Since the spinner went a few notches, I suspect the primary boot block is ok,
but it crashed when it can't execute the gptboot code.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: 9.1 install wipes out gpart boot blocks?

2013-01-30 Thread Warren Block

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
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"