Trying to create a FreeBSD Image on an Openstack Installation

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

I'm using this guide:



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?
 
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
 
You are right. I just needed to edit /etc/fstab.

I'll look into switching to GUIDs. How do you do that, actually?
 
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.
 
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.
 
Back
Top