Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding XFS as a root filesystem type #5198

Merged
merged 4 commits into from
Apr 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Summary: Signed GRand Unified Bootloader for %{buildarch} systems
Name: grub2-efi-binary-signed-%{buildarch}
Version: 2.06
Release: 8%{?dist}
Release: 9%{?dist}
License: GPLv3+
Vendor: Microsoft Corporation
Distribution: Mariner
Expand Down Expand Up @@ -77,6 +77,9 @@ cp %{SOURCE3} %{buildroot}/boot/efi/EFI/BOOT/%{grubpxeefiname}
/boot/efi/EFI/BOOT/%{grubpxeefiname}

%changelog
* Wed Apr 05 2023 Andy Zaugg <azaugg@linkedin.com> - 2.06-9
- Adding XFS support to GRUB

* Thu Dec 29 2022 Mykhailo Bykhovtsev <mbykhovtsev@microsoft@microsoft.com> - 2.06-8
- Fix CVE-2022-2601 (Mykhailo Bykhovtsev <mbykhovtsev@microsoft.com>).

Expand Down
13 changes: 8 additions & 5 deletions SPECS/grub2/grub2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Summary: GRand Unified Bootloader
Name: grub2
Version: 2.06
Release: 8%{?dist}
Release: 9%{?dist}
License: GPLv3+
Vendor: Microsoft Corporation
Distribution: Mariner
Expand Down Expand Up @@ -237,12 +237,12 @@ cat ./sbat.csv
# Generate grub efi image
install -d %{buildroot}%{_datadir}/grub2-efi
%ifarch x86_64
./install-for-efi/usr/bin/grub2-mkimage -d ./install-for-efi/usr/lib/grub/x86_64-efi/ --sbat ./sbat.csv -o %{buildroot}%{_datadir}/grub2-efi/grubx64.efi -p /boot/grub2 -O x86_64-efi fat iso9660 part_gpt part_msdos normal boot linux configfile loopback chain efifwsetup efi_gop efi_uga ls search search_label search_fs_uuid search_fs_file gfxterm gfxterm_background gfxterm_menu test all_video loadenv exfat ext2 udf halt gfxmenu png tga lsefi help probe echo lvm cryptodisk luks gcry_rijndael gcry_sha512 tpm efinet tftp multiboot2
./install-for-efi/usr/bin/grub2-mkimage -d ./install-for-efi/usr/lib/grub/x86_64-efi/ --sbat ./sbat.csv -o %{buildroot}%{_datadir}/grub2-efi/grubx64-noprefix.efi --prefix= -O x86_64-efi fat iso9660 part_gpt part_msdos normal boot linux configfile loopback chain efifwsetup efi_gop efi_uga ls search search_label search_fs_uuid search_fs_file gfxterm gfxterm_background gfxterm_menu test all_video loadenv exfat ext2 udf halt gfxmenu png tga lsefi help probe echo lvm cryptodisk luks gcry_rijndael gcry_sha512 tpm efinet tftp multiboot2
./install-for-efi/usr/bin/grub2-mkimage -d ./install-for-efi/usr/lib/grub/x86_64-efi/ --sbat ./sbat.csv -o %{buildroot}%{_datadir}/grub2-efi/grubx64.efi -p /boot/grub2 -O x86_64-efi fat iso9660 part_gpt part_msdos normal boot linux configfile loopback chain efifwsetup efi_gop efi_uga ls search search_label search_fs_uuid search_fs_file gfxterm gfxterm_background gfxterm_menu test all_video loadenv exfat ext2 udf halt gfxmenu png tga lsefi help probe echo lvm cryptodisk luks gcry_rijndael gcry_sha512 tpm efinet tftp multiboot2 xfs
./install-for-efi/usr/bin/grub2-mkimage -d ./install-for-efi/usr/lib/grub/x86_64-efi/ --sbat ./sbat.csv -o %{buildroot}%{_datadir}/grub2-efi/grubx64-noprefix.efi --prefix= -O x86_64-efi fat iso9660 part_gpt part_msdos normal boot linux configfile loopback chain efifwsetup efi_gop efi_uga ls search search_label search_fs_uuid search_fs_file gfxterm gfxterm_background gfxterm_menu test all_video loadenv exfat ext2 udf halt gfxmenu png tga lsefi help probe echo lvm cryptodisk luks gcry_rijndael gcry_sha512 tpm efinet tftp multiboot2 xfs
%endif
%ifarch aarch64
./install-for-efi/usr/bin/grub2-mkimage -d ./install-for-efi/usr/lib/grub/arm64-efi/ --sbat ./sbat.csv -o %{buildroot}%{_datadir}/grub2-efi/grubaa64.efi -p /boot/grub2 -O arm64-efi fat iso9660 part_gpt part_msdos normal boot linux configfile loopback chain efifwsetup efi_gop ls search search_label search_fs_uuid search_fs_file gfxterm gfxterm_background gfxterm_menu test all_video loadenv exfat ext2 udf halt gfxmenu png tga lsefi help probe echo lvm cryptodisk luks gcry_rijndael gcry_sha512 tpm efinet tftp
./install-for-efi/usr/bin/grub2-mkimage -d ./install-for-efi/usr/lib/grub/arm64-efi/ --sbat ./sbat.csv -o %{buildroot}%{_datadir}/grub2-efi/grubaa64-noprefix.efi --prefix= -O arm64-efi fat iso9660 part_gpt part_msdos normal boot linux configfile loopback chain efifwsetup efi_gop ls search search_label search_fs_uuid search_fs_file gfxterm gfxterm_background gfxterm_menu test all_video loadenv exfat ext2 udf halt gfxmenu png tga lsefi help probe echo lvm cryptodisk luks gcry_rijndael gcry_sha512 tpm efinet tftp
./install-for-efi/usr/bin/grub2-mkimage -d ./install-for-efi/usr/lib/grub/arm64-efi/ --sbat ./sbat.csv -o %{buildroot}%{_datadir}/grub2-efi/grubaa64.efi -p /boot/grub2 -O arm64-efi fat iso9660 part_gpt part_msdos normal boot linux configfile loopback chain efifwsetup efi_gop ls search search_label search_fs_uuid search_fs_file gfxterm gfxterm_background gfxterm_menu test all_video loadenv exfat ext2 udf halt gfxmenu png tga lsefi help probe echo lvm cryptodisk luks gcry_rijndael gcry_sha512 tpm efinet tftp xfs
./install-for-efi/usr/bin/grub2-mkimage -d ./install-for-efi/usr/lib/grub/arm64-efi/ --sbat ./sbat.csv -o %{buildroot}%{_datadir}/grub2-efi/grubaa64-noprefix.efi --prefix= -O arm64-efi fat iso9660 part_gpt part_msdos normal boot linux configfile loopback chain efifwsetup efi_gop ls search search_label search_fs_uuid search_fs_file gfxterm gfxterm_background gfxterm_menu test all_video loadenv exfat ext2 udf halt gfxmenu png tga lsefi help probe echo lvm cryptodisk luks gcry_rijndael gcry_sha512 tpm efinet tftp xfs
%endif

# Install to efi directory
Expand Down Expand Up @@ -326,6 +326,9 @@ cp $GRUB_PXE_MODULE_SOURCE $EFI_BOOT_DIR/$GRUB_PXE_MODULE_NAME
%endif

%changelog
* Wed Apr 05 2023 Andy Zaugg <azaugg@linkedin.com> - 2.06-9
- Adding XFS support to GRUB

* Thu Dec 29 2022 Mykhailo Bykhovtsev <mbykhovtsev@microsoft@microsoft.com> - 2.06-8
- Fix CVE-2022-2601 (Mykhailo Bykhovtsev <mbykhovtsev@microsoft.com>).

Expand Down
2 changes: 1 addition & 1 deletion SPECS/initramfs/fscks.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fscks="e2fsck fsck fsck.ext2 fsck.ext3 fsck.ext4"
fscks="e2fsck fsck fsck.ext2 fsck.ext3 fsck.ext4 fsck.xfs"
2 changes: 1 addition & 1 deletion SPECS/initramfs/initramfs.signatures.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Signatures": {
"fscks.conf": "150975bb0d4c300781a52832529d7debccc1c919668f1d32fb7e973504dd97b1"
"fscks.conf": "32e1539fbed79b3693d4824bd263f29ebe19e81010f314cb4595eb20640a1391"
}
}
5 changes: 4 additions & 1 deletion SPECS/initramfs/initramfs.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Summary: initramfs
Name: initramfs
Version: 2.0
Release: 11%{?dist}
Release: 12%{?dist}
License: Apache License
Vendor: Microsoft Corporation
Distribution: Mariner
Expand Down Expand Up @@ -136,6 +136,9 @@ echo "initramfs" %{version}-%{release} "postun" >&2
%dir %{_localstatedir}/lib/initramfs/kernel

%changelog
* Fri Apr 07 2023 Andy Zaugg <azaugg@linkedin.com> - 2.0.12
- Added fsck.xfs into initrd

* Fri Mar 31 2023 Vince Perri <viperri@microsoft.com> - 2.0-11
- Add dracut-megaraid to package watch list, since it will add dracut modules

Expand Down
3 changes: 2 additions & 1 deletion toolkit/docs/building/prerequisites-mariner.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ sudo tdnf -y install \
rpm-build \
sudo \
tar \
wget
wget \
xfsprogs

# Enable Docker daemon at boot
sudo systemctl enable --now docker.service
Expand Down
3 changes: 2 additions & 1 deletion toolkit/docs/building/prerequisites-ubuntu.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ sudo apt -y install \
qemu-utils \
rpm \
tar \
wget
wget \
xfsprogs

# Fix go 1.17 link
sudo ln -vsf /usr/lib/go-1.17/bin/go /usr/bin/go
Expand Down
2 changes: 1 addition & 1 deletion toolkit/docs/formats/imageconfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ partition on the disk.

Note that Partitions do not have to be provided; the resulting image is going to be a rootfs.

Supported partition FsTypes: fat32, fat16, vfat, ext2, ext3, ext4, linux-swap.
Supported partition FsTypes: fat32, fat16, vfat, ext2, ext3, ext4, xfs, linux-swap.

Sample partitions entry, specifying a boot partition and a root partition:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"veritysetup",
"vim",
"words",
"xfsprogs",
"xz",
"zlib"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"util-linux",
"veritysetup",
"words",
"xfsprogs",
"xz",
"zlib"
]
Expand Down
2 changes: 1 addition & 1 deletion toolkit/tools/imagegen/diskutils/diskutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ func FormatSinglePartition(partDevPath string, partition configuration.Partition
// This is due to a possible race condition in Linux/parted where the partition may not actually be ready after being newly created.
// To handle such cases, we can retry the command.
switch fsType {
case "fat32", "fat16", "vfat", "ext2", "ext3", "ext4":
case "fat32", "fat16", "vfat", "ext2", "ext3", "ext4", "xfs":
if fsType == "fat32" || fsType == "fat16" {
fsType = "vfat"
}
Expand Down
2 changes: 1 addition & 1 deletion toolkit/tools/imagegen/installutils/installutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -1604,7 +1604,7 @@ func selinuxRelabelFiles(systemConfig configuration.SystemConfig, installChroot
// only supports the below cases:
for mount, fsType := range mountPointToFsTypeMap {
switch fsType {
case "ext2", "ext3", "ext4":
case "ext2", "ext3", "ext4", "xfs":
listOfMountsToLabel = append(listOfMountsToLabel, mount)
case "fat32", "fat16", "vfat":
logger.Log.Debugf("SELinux will not label mount at (%s) of type (%s), skipping", mount, fsType)
Expand Down