public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH installer] auto: do not allow btrfs as root-fs if not enabled in the setup
@ 2024-11-26 13:27 Christoph Heiss
  2024-11-26 14:09 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Heiss @ 2024-11-26 13:27 UTC (permalink / raw)
  To: pve-devel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH installer] auto: do not allow btrfs as root-fs if not enabled in the setup
  2024-11-26 13:27 [pve-devel] [PATCH installer] auto: do not allow btrfs as root-fs if not enabled in the setup Christoph Heiss
@ 2024-11-26 14:09 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2024-11-26 14:09 UTC (permalink / raw)
  To: Proxmox VE development discussion, Christoph Heiss

Am 26.11.24 um 14:27 schrieb Christoph Heiss:
> 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(+)
> 
>

applied, with slightly adapted error messages as talked off-list, thanks!


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-11-26 14:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-26 13:27 [pve-devel] [PATCH installer] auto: do not allow btrfs as root-fs if not enabled in the setup Christoph Heiss
2024-11-26 14:09 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal