]> git.proxmox.com Git - pve-installer.git/commitdiff
auto-installer: shorten partition label to fit in 11 characters for FAT
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 24 Apr 2024 08:23:43 +0000 (10:23 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 24 Apr 2024 09:27:56 +0000 (11:27 +0200)
(v)FAT is still the most popular FS on removable medias like USB pen
drives, so we need to cope with its legacy..

So, rename the label that we look for again to PROXMOX-AIS, as that
still should allow admins to better recognize what this might be for
by having the "Proxmox" context and the rest is just hard to get
sensible meaning in, so do not bother to invent elaborate explanations
of why AIS is a good choice, it isn't but it's about the best thing
that one can do in these constraints.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
proxmox-auto-install-assistant/src/main.rs
proxmox-fetch-answer/src/fetch_plugins/partition.rs

index 44dd12ee5d090709b9b6899f6e66ec71c7e254a2..b798c4348516be172fd687a4afb89a78f46c8cfd 100644 (file)
@@ -94,8 +94,8 @@ struct CommandValidateAnswer {
 /// The behavior of how to fetch an answer file must be set with the '--fetch-from', parameter. The
 /// answer file can be{n}:
 /// * integrated into the ISO itself ('iso'){n}
-/// * needs to be present in a partition / file-system with the label 'PROXMOX-INST-SRC'
-///   ('partition'){n}
+/// * needs to be present in a partition / file-system with the label 'PROXMOX-AIS' (Proxmox
+/// Automated Installer Source) ('partition'){n}
 /// * get requested via an HTTP Post request ('http').
 ///
 /// The URL for the HTTP mode can be defined for the ISO with the '--url' argument. If not present,
index 335bb4713e21876d771346392356f874dd546a68..1d80847959879e8e771a02482982cb9c1dd8332e 100644 (file)
@@ -8,7 +8,8 @@ use std::{
 
 static ANSWER_FILE: &str = "answer.toml";
 static ANSWER_MP: &str = "/mnt/answer";
-static PARTLABEL: &str = "proxmox-inst-src";
+// FAT can only handle 11 characters, so shorten Automated Installer Source to AIS
+static PARTLABEL: &str = "proxmox-ais";
 static SEARCH_PATH: &str = "/dev/disk/by-label";
 
 pub struct FetchFromPartition;
@@ -59,7 +60,7 @@ fn scan_partlabels(partlabel_source: &str, search_path: &str) -> Result<PathBuf>
     bail!("Could not detect upper or lower case labels for '{partlabel_source}'");
 }
 
-/// Will search and mount a partition/FS labeled PARTLABEL (proxmox-inst-src) in lower or uppercase
+/// Will search and mount a partition/FS labeled PARTLABEL (proxmox-ais) in lower or uppercase
 /// to ANSWER_MP
 fn mount_proxmoxinst_part() -> Result<String> {
     if let Ok(true) = check_if_mounted(ANSWER_MP) {