Próximo: Módulos de imagem, Anterior: Instanciar uma imagem, Acima: Creating System Images [Conteúdo][Índice]
The guix system image
command can, as we saw above, take a file
containing an image
declaration as argument and produce an actual
disk image from it. The same command can also handle a file containing an
operating-system
declaration as argument. In that case, how is the
operating-system
turned into an image?
That’s where the image-type
record intervenes. This record defines
how to transform an operating-system
record into an image
record.
This is the data type representing an image-type.
name
The image-type name as a mandatory symbol, 'efi32-raw
for instance.
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.
Crie uma imagem baseada na imagem mbr-disk-image
.
Build an image based on the mbr-hybrid-disk-image
image.
Build an image based on the efi-disk-image
image.
Build an image based on the efi32-disk-image
image.
Build an image based on the mbr-disk-image
image but with the
compressed-qcow2
image format.
Build a compressed image based on the iso9660-image
image.
Build an image based on the iso9660-image
image but with the
compression?
field set to #false
.
Build an image based on the docker-image
image.
Crie uma imagem MBR com uma única partição começando em um deslocamento
1024KiB
. Isso é útil para deixar algum espaço para instalar um
bootloader na lacuna pós-MBR.
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.
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.
Build an image that is targeting the Novena machine. It has the same
characteristics as raw-with-offset-image-type
.
Build an image that is targeting the Pine64 machine. It has the same
characteristics as raw-with-offset-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.
Build an image similar to the one built by the hurd-image-type
but
with the format
set to 'compressed-qcow2
.
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
Então, se voltarmos ao comando guix system image
tomando uma
declaração operating-system
como argumento. Por padrão, o
mbr-raw-image-type
é usado para transformar o operating-system
fornecido em uma imagem inicializável real.
Para usar um image-type
diferente, a opção --image-type
pode
ser usada. A opção --list-image-types
listará todos os tipos de
imagem suportados. Acontece que é uma listagem textual de todas as variáveis
image-types
descritas logo acima (veja Invoking guix system
).
Próximo: Módulos de imagem, Anterior: Instanciar uma imagem, Acima: Creating System Images [Conteúdo][Índice]