Is it just me, or do all OS images end up with the same boot disk UUID?

57 views
Skip to first unread message

Mark Leonard Reynolds

unread,
Sep 6, 2016, 5:41:50 PM9/6/16
to gce-discussion
Centos 6 V20160803

UUID=200a1620-196a-4d76-8b25-2170d788be27

UUID=200a1620-196a-4d76-8b25-2170d788be27


Centos 7 V20160803

UUID=87669206-2812-44b2-b347-1e0278340e00

UUID=87669206-2812-44b2-b347-1e0278340e00

UUID 87669206-2812-44b2-b347-1e0278340e00  (from last weeks same image)


Debian 8 Jesse V20160803

UUID=16dc7bf4-05f2-4b56-ac10-431627379092

UUID=16dc7bf4-05f2-4b56-ac10-431627379092


Not all that important until you start mounting other disks from same image source,
and get UUID collisions in say the /etc/fstab file.

Those sorts of processes are used (and recommended in the doco) to export and import server disk images from google storage.

I guess the image is really an image, with little post processing to reset disk UUID.

I'm not sure if there would be any security issues, having thousands of servers on GCE all with the same boot disk uuid?

Can anyone please confirm this observation?
Concerns? Thoughts?

Workarounds are easy enough - change the disk uuid, change the disk label, and/or
mount the disk differently in /etc/fstab

regards
Mark

Theodore Ts'o

unread,
Sep 7, 2016, 11:31:39 PM9/7/16
to Mark Leonard Reynolds, gce-discussion
On Tue, Sep 06, 2016 at 02:41:50PM -0700, Mark Leonard Reynolds wrote:
>
> Not all that important until you start mounting other disks from
> same image source, and get UUID collisions in say the /etc/fstab
> file.
>
> Can anyone please confirm this observation?
> Concerns? Thoughts?

Yep, it's an issue.

This is how I fix the problem before creating a new image which is
derived from Debian Jessie:

https://github.com/tytso/xfstests-bld/blob/master/kvm-xfstests/test-appliance/gce-export.sh#L43


This is part of a system where I build the image using this script
(and the related startup script which actually builds the test
appliance image):

https://github.com/tytso/xfstests-bld/blob/master/kvm-xfstests/test-appliance/gce-create-image
https://github.com/tytso/xfstests-bld/blob/master/kvm-xfstests/test-appliance/gce-xfstests-bld.sh

I'll then test the image make sure it's working correctly, and then
I'll export the image using these scripts:

https://github.com/tytso/xfstests-bld/blob/master/kvm-xfstests/test-appliance/gce-export-image
https://github.com/tytso/xfstests-bld/blob/master/kvm-xfstests/test-appliance/gce-export.sh

... and then I'll important them into publically readable image project so others can use the test appliance:

https://github.com/tytso/xfstests-bld/blob/master/kvm-xfstests/test-appliance/gce-import-image

The import and export scripts are fairly generic and could be easily
adaptable to other projects. The gce-xfstests-bld.sh script is quite
specific to setting up the test appliance VM image, but folks might
find a few interesting tips and tricks there.

For more information about this system, please see https://thunk.org/gce-xfstests

Cheers,

- Ted
Reply all
Reply to author
Forward
0 new messages