Skip to content

Disk Image Type

Naoyuki Tai edited this page Dec 27, 2023 · 1 revision

Overview

Disk image type is a designation of disk usage. In WCE's environment, there are client machines which is the product of WCE operations.

To prepare disks for the client machine, we have the workstations that can load or create the disk images to the hard disk. There is also a network server that is capable of PXE booting the client machine in order to run the triage and loading disk images.

## Disk Image Metadata

In the subdirectory, each subdirectory must contain a disk image metadata. For this, you need to create a file named ".disk_image_type.json".

Here is the actual example of it in "wce-16".:

{ "id": "wce-16",
  "filestem": "wce-mate16",
  "name": "WCE Ubuntu 16.04LTS",
  "timestamp": true,
  "ext4_version": "1.42",
  "partition_map": "gpt"}

The "id" shall match with the subdirectory name. (It probalby works even if it doesn't but that's the convention.) This is a tag that the web browser uses for disk image type ID. "filestem" is used when you create a disk image. So, if you create a disk image in this directory, the file name starts with "wce-mate16". "timestamp" should be always true to ID when the disk image is created. The disk image creation app always adds the file system in its name as well. "ext4_version" is the one mentioned above. By declaring the ext4_version (which is actually the version number of libext4, I think), the partition task adds necessary mkfs option for Ubuntu 16.04 even if it's running on 18.04.

For wce-18, ext4_version is 1.44.

With the locations well known, httpsever easily finds all of disk images with it's metadata, and sends it up to web browser. Also, when you create a disk image, the image name is always consistent, and stored in well known location.

It's not difficult to have different "wce-disk-images" directory, and as a matter of fact, if you mount a different disk and there is a directory right below the mount point, httpserver will find it as well for loading. However, for creating image, it's always stored in "/usr/local/share/wce/wce-disk-images/FOO".

.disk_image_types.json specs

Tag Type Value Example
id string ID of this disk image type. Should be same as the parent directory. wce-18
filestem string Leading part of file name for creating image wce-mate18
name string Descriptive name for user WCE Mate 18.04LTS
timestamp boolean timestamp added for the image file true
efi_image string file name of the EFI parition. .efi-512M.fat32.partclone.gz
partition_map string "gpt", "msdos" gpt
hostname string Host name after the installation wce
randomize_hostname bool Add random suffix to host name false
cmdline json See cmdline description below { "splash": "_REMOVE_" }