FreeBSD 10.2 Install with GPT and GMIRROR

Ellicia

New Member


Messages: 12

Hello, I have recently hit a snare with a recent installation and was hoping that I might be able to get some help here.

I understand that GPT and gmirror do not get along, however there is a work around that had currently worked for me on 9.0. This no longer works for me and I was wondering what I am doing wrong?

Code:
  gpart create -s gpt ada0
  gpart add -s 128k -t freebsd-boot -l boot0 ada0
  gpart add -a 1m -s 8G -t freebsd-swap -l swap0 ada0
  gpart add -a 1m -t freebsd-ufs -l root0 ada0

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

  gpart create -s gpt ada1
  gpart add -s 128k -t freebsd-boot -l boot1 ada1
  gpart add -a 1m -s 8G -t freebsd-swap -l swap1 ada1
  gpart add -a 1m -t freebsd-ufs -l root1 ada1

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

  true > /dev/ada0
  true > /dev/ada1

  ls -l /dev/gpt/

  crw-r-----  1 root  operator  0, 100 /dev/gpt/boot0
  crw-r-----  1 root  operator  0, 108 /dev/gpt/boot1
  crw-r-----  1 root  operator  0, 102 /dev/gpt/root0
  crw-r-----  1 root  operator  0, 110 /dev/gpt/root1
  crw-r-----  1 root  operator  0, 104 /dev/gpt/swap0
  crw-r-----  1 root  operator  0, 112 /dev/gpt/swap1

  gmirror label -h boot /dev/gpt/boot0 /dev/gpt/boot1
  gmirror label -h swap /dev/gpt/swap0 /dev/gpt/swap1
  gmirror label -h root /dev/gpt/root0 /dev/gpt/root1

  kldload geom_mirror

  gmirror status
  Name  Status  Components
  mirror/root  COMPLETE  gpt/root1 (ACTIVE)
  gpt/root0 (ACTIVE)
  mirror/swap  COMPLETE  gpt/swap1 (ACTIVE)
  gpt/swap0 (ACTIVE)
  mirror/boot  COMPLETE  gpt/boot1 (ACTIVE)
  gpt/boot0 (ACTIVE)

  newfs -U -L root /dev/mirror/root

  mount /dev/mirror/root /mnt

  vi /tmp/bsdinstall_etc/fstab

  # Device  Mountpoint  FStype  Options Dump  Pass#
  /dev/mirror/swap  none  swap  sw  0  0
  /dev/mirror/root  /  ufs  rw  1  1

Everything is seeming to be good so far.. Now I am supposed to continue the installation as normal and this is where their instructions no longer work for me. When setting this up on 9.0 I didn't have to do any additional steps. The installation did all of it's magic and after setting geom_mirror in the boot loader I was on my merry way.

But on 10.2 I am not allowed to continue until I go through the partitioning scheme? This does not seem right. This would be the whole reason that I made those edits to fstab and created that newfs, was to customize this installation setup. So this wouldn't be the right option.

Now there is a shell option that takes me to the shell and a message that tells me I need to mount the filesystem to mount (not sure why, since /tmp/bsdinstall_etc/fstab covers this). But I will play along. Now what am I mounting here? I assume the /dev/mirror/root, as that is the only filesystem that was created in my setup.

Code:
# mount /dev/mirror/root /mnt

#

I check /tmp/bsdinstall_etc/fstab and I notice that my changes have been clobbered... Okay, so I reenter that information.

Code:
  # Device  Mountpoint  FStype  Options Dump  Pass#

  /dev/mirror/swap  none  swap  sw  0  0

  /dev/mirror/root  /  ufs  rw  1  1

Now I exit and the installation proceeds with retrieving and installing their distro files. This finishes with no errors and I'm asked to make final changes and I go back into that shell.

What's this? /mnt is empty?? I am baffled...

Code:
# ls -l /mnt

#

Where do they go? /dev/null? What sort of trickery is this? When I take peek at the /tmp folder it's empty. No bsdinstall_log where it should be to review.

I wish I was not so ignorant on something with such a simple installation process.

Any help on this would be greatly appreciated.
 

wblock@

Beastie Himself
Developer

Reaction score: 3,729
Messages: 13,851

Please provide more information on who provided these instructions. They use the shaky method of mirroring multiple GPT partitions, which works fine, except maybe when recreating the mirror. bsdinstall(8) changes from time to time, and that could be a problem also. Maintaining the process will be up to whoever defined it.
 
OP
E

Ellicia

New Member


Messages: 12

Thank you for the response.

I really do not know anything about who this person is that provided these instructions other than what they have posted under their "about the author".

"A-Team Systems founder and president Adam Strohl is a FreeBSD evangelist and self proclaimed uber-geek." This gives little information and provides no credentials.

They have listed the method at the following link:
https://www.ateamsystems.com/tech-blog/installing-freebsd-9-gmirror-gpt-partitions-raid-1/

They also provide information on how to rebuild the mirror with this method.

Unfortunately, this is the only information that I have at the time.
 
Top