[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#26815: [PATCH 2/3] vm: Support creating FAT partitions.
From: |
Maxim Cournoyer |
Subject: |
bug#26815: [PATCH 2/3] vm: Support creating FAT partitions. |
Date: |
Mon, 08 May 2017 08:59:24 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Hi,
Marius Bakke <address@hidden> writes:
> * gnu/build/vm.scm (create-ext-file-system, create-fat-file-system): New
> procedures.
> (format-partition): Use procedures. Error for unknown file systems.
> * gnu/system/vm.scm (qemu-image): Add DOSFSTOOLS to the closure.
> * gnu/system/linux-initrd.scm (base-initrd): Add nls_is8859-1.ko regardless of
> whether a FAT filesystem is present.
> ---
> gnu/build/vm.scm | 43 ++++++++++++++++++++++++++++++++++++-------
> gnu/system/linux-initrd.scm | 4 +---
> gnu/system/vm.scm | 2 +-
> 3 files changed, 38 insertions(+), 11 deletions(-)
>
> diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
> index 3286ffb02..ad39e29ce 100644
> --- a/gnu/build/vm.scm
> +++ b/gnu/build/vm.scm
> @@ -214,17 +214,46 @@ actual /dev name based on DEVICE."
>
> (define MS_BIND 4096) ; <sys/mounts.h> again!
>
> +(define* (create-ext-file-system partition type
> + #:key label)
> + "Create an ext-family filesystem of TYPE on PARTITION. If LABEL is true,
> +use that as the volume name."
> + (format #t "creating ~a partition...\n" type)
> + (apply system* (string-append "mkfs." type)
Is there a reason why we don't simply call system* directly here? And
similarly below. I don't see the gain of using `apply'. Maybe I'm
missing something.
> + "-F" partition
> + (if label
> + `("-L" ,label)
> + '())))
> +
> +(define* (create-fat32-file-system partition
> + #:key label)
> + "Create a FAT32 filesystem on PARTITION, which must be at least 32 MiB
> long.
> +If LABEL is true, use that as volume name."
> + (format #t "Creating FAT32 partition...\n")
> + ;; Without the -F parameter, mkfs.fat will automatically determine
> + ;; the number of file allocation tables based on partition size.
> + ;; Ensure a FAT32 partition for compatibility with e.g. UEFI.
> + (apply system* "mkfs.fat" "-F32" partition
> + (if label
> + `("-n" ,label)
> + '())))
> +
Maxim
- bug#26815: [PATCH v4 3/3] vm: Add UEFI loader to disk images., (continued)
- bug#26815: [PATCH 2/3] vm: Support creating FAT partitions., Marius Bakke, 2017/05/07
- bug#26815: [PATCH 2/3] vm: Support creating FAT partitions., Danny Milosavljevic, 2017/05/07
- bug#26815: [PATCH 2/3] vm: Support creating FAT partitions., Marius Bakke, 2017/05/07
- bug#26815: [PATCH v2 2/3] vm: Support creating FAT partitions., Marius Bakke, 2017/05/07
- bug#26815: [PATCH 2/3] vm: Support creating FAT partitions., Danny Milosavljevic, 2017/05/07
- bug#26815: [PATCH 2/3] vm: Support creating FAT partitions., Marius Bakke, 2017/05/07
- bug#26815: [PATCH 2/3] vm: Support creating FAT partitions., Danny Milosavljevic, 2017/05/07
- bug#26815: [PATCH 2/3] vm: Support creating FAT partitions., Ludovic Courtès, 2017/05/08
- bug#26815: [PATCH 2/3] vm: Support creating FAT partitions.,
Maxim Cournoyer <=
bug#26815: [PATCH 1/3] vm: Add support for arbitrary partition flags., Danny Milosavljevic, 2017/05/07
bug#26815: [PATCH 1/3] vm: Add support for arbitrary partition flags., Ludovic Courtès, 2017/05/08
bug#26815: [PATCH 1/3] vm: Add support for arbitrary partition flags., Maxim Cournoyer, 2017/05/08
bug#26815: [PATCH 1/3] vm: Add support for arbitrary partition flags., Danny Milosavljevic, 2017/05/08
bug#26815: [PATCH 0/3] Hybrid UEFI disk image, Marius Bakke, 2017/05/07