From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH installer] auto: do not allow btrfs as root-fs if not enabled in the setup
Date: Tue, 26 Nov 2024 14:27:44 +0100 [thread overview]
Message-ID: <20241126132747.898671-1-c.heiss@proxmox.com> (raw)
Add a check such that this combination is not possible, if not enabled
for the specific iso.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
proxmox-auto-installer/src/utils.rs | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/proxmox-auto-installer/src/utils.rs b/proxmox-auto-installer/src/utils.rs
index 2be81ea..6482966 100644
--- a/proxmox-auto-installer/src/utils.rs
+++ b/proxmox-auto-installer/src/utils.rs
@@ -281,6 +281,16 @@ fn get_first_selected_disk(config: &InstallConfig) -> usize {
.expect("could not parse key to usize")
}
+fn verify_filesystem_settings(answer: &Answer, setup_info: &SetupInfo) -> Result<()> {
+ info!("Verifying filesystem settings");
+
+ if answer.disks.fs_type.is_btrfs() && !setup_info.config.enable_btrfs {
+ bail!("BTRFS not supported as root filesystem");
+ }
+
+ Ok(())
+}
+
fn verify_locale_settings(answer: &Answer, locales: &LocaleInfo) -> Result<()> {
info!("Verifying locale settings");
if !locales
@@ -345,6 +355,9 @@ pub fn parse_answer(
setup_info: &SetupInfo,
) -> Result<InstallConfig> {
info!("Parsing answer file");
+
+ verify_filesystem_settings(answer, setup_info)?;
+
info!("Setting File system");
let filesystem = answer.disks.fs_type;
info!("File system selected: {}", filesystem);
--
2.47.0
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next reply other threads:[~2024-11-26 13:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-26 13:27 Christoph Heiss [this message]
2024-11-26 14:09 ` [pve-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241126132747.898671-1-c.heiss@proxmox.com \
--to=c.heiss@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.