# Trying to create a FreeBSD Image on an Openstack Installation



## rainer_d (Feb 24, 2019)

I'm trying to create a FreeBSD image on our local Openstack installation (Rocky, if I'm not mistaken).

I'm using this guide:









						infrastructure/freebsd-image.md at master · ome/infrastructure
					

A repository containing scripts for managing infrastructure - infrastructure/freebsd-image.md at master · ome/infrastructure




					github.com
				





However, interestingly when I get to choose disks during installation, there are two disks: first one is 512MB, the other is the 16GB volume I created per the tutorial.

When I try to boot the image with nova as per the tutorial, it can't mount the root-disk - I assume because it thinks it should be the 2nd disks but is then at this point is really the first disk.

How can I fix this?


----------



## iSiek (Feb 24, 2019)

Hi,

it seems, you are using standard BSD labels to mount drives.

Please replace standard partitioning schema in /etc/fstab with partitions GUIDs. This will prevent disk IDs order change.

EDIT: I forgot to mention that GUIDs are not working with MBR partition scheme. You need to use GPT partitioning to be able to use partitions GUID


----------



## rainer_d (Feb 24, 2019)

You are right. I just needed to edit /etc/fstab.

I'll look into switching to GUIDs. How do you do that, actually?


----------



## iSiek (Feb 24, 2019)

You can identify your /boot partition GUID with

`ls /dev/gptid`

or, when you are logged on, check which GUID is mapped to which drive, issuing below command:

`gpart list`

You can see GUIDs assigned to particular partitions under *rawuuid *line of *da0pX* entry.
However, to be successful in OS logon, you need to mount *root partition* over UUID only. This is enough.

To replace /dev/da0p2 within /etc/fstab where 2 is ID for root partition, put instead of previous value this one with UUID in the form:

`/dev/gptid/IdentifiedUUID`

Save changes and reboot system to verify if thisis working.
During the boot process, you should see that root partition is being tried to mount over UUID.


----------



## vadimk (Feb 26, 2019)

Also keep in mind what hypervisor are you trying to run image at and what mode (PV, HVM). I have created different images for XenServer and KVM. They also have different drive naming conventions. For XenServer "tools" are more or less required.


----------

