Next: , Previous: , Up: 创建系统镜像   [Contents][Index]


16.3 image-type Reference

正如我们在上面看到的那样,guix system image 命令可以将含有 image 声明的文件作为参数,从中产生一个磁盘镜像。同样的命令也可以操纵含有 operating-system 声明的文件作为参数。在那种情况下,operating-system 如何变为镜像呢?

那是 image-type 记录干预的地方。这个记录定义了 operating-system 记录如何转化为 image 记录。

数据类型: image-type

这是表示镜像类别的数据类型。

名字

镜像类型名称是强制性的符号,比如说 'efi32-raw

constructor

The image-type constructor, as a mandatory procedure that takes an operating-system record as argument and returns an image record.

There are several image-type records provided by the (gnu system image) and the (gnu system images …) modules.

Variable: mbr-raw-image-type

Build an image based on the mbr-disk-image image.

Variable: mbr-hybrid-raw-image-type

Build an image based on the mbr-hybrid-disk-image image.

Variable: efi-raw-image-type

Build an image based on the efi-disk-image image.

Variable: efi32-raw-image-type

Build an image based on the efi32-disk-image image.

Variable: qcow2-image-type

Build an image based on the mbr-disk-image image but with the compressed-qcow2 image format.

Variable: iso-image-type

Build a compressed image based on the iso9660-image image.

Variable: uncompressed-iso-image-type

Build an image based on the iso9660-image image but with the compression? field set to #false.

Variable: docker-image-type

Build an image based on the docker-image image.

Variable: raw-with-offset-image-type

Build an MBR image with a single partition starting at a 1024KiB offset. This is useful to leave some room to install a bootloader in the post-MBR gap.

Variable: pinebook-pro-image-type

Build an image that is targeting the Pinebook Pro machine. The MBR image contains a single partition starting at a 9MiB offset. The u-boot-pinebook-pro-rk3399-bootloader bootloader will be installed in this gap.

Variable: rock64-image-type

Build an image that is targeting the Rock64 machine. The MBR image contains a single partition starting at a 16MiB offset. The u-boot-rock64-rk3328-bootloader bootloader will be installed in this gap.

Variable: novena-image-type

Build an image that is targeting the Novena machine. It has the same characteristics as raw-with-offset-image-type.

Variable: pine64-image-type

Build an image that is targeting the Pine64 machine. It has the same characteristics as raw-with-offset-image-type.

Variable: hurd-image-type

Build an image that is targeting a i386 machine running the Hurd kernel. The MBR image contains a single ext2 partitions with specific file-system-options flags.

Variable: hurd-qcow2-image-type

Build an image similar to the one built by the hurd-image-type but with the format set to 'compressed-qcow2.

Variable: wsl2-image-type

Build an image for the WSL2 (Windows Subsystem for Linux 2). It can be imported by running:

wsl --import Guix ./guix ./wsl2-image.tar.gz
wsl -d Guix

So, if we get back to the guix system image command taking an operating-system declaration as argument. By default, the mbr-raw-image-type is used to turn the provided operating-system into an actual bootable image.

To use a different image-type, the --image-type option can be used. The --list-image-types option will list all the supported image types. It turns out to be a textual listing of all the image-types variables described just above (see 调用guix system).


Next: Image Modules, Previous: Instantiate an Image, Up: 创建系统镜像   [Contents][Index]