Create .baremetal file on internal system. Hide install to disk if already installed.
This commit is contained in:
@@ -1083,8 +1083,8 @@ if __name__ == "__main__":
|
||||
# Add system section
|
||||
menu.add_section("System")
|
||||
|
||||
# Add installer only on x86_64
|
||||
if platform.machine() == "x86_64":
|
||||
# Add installer only on x86_64 and if not already installed (no .baremetal file)
|
||||
if platform.machine() == "x86_64" and not os.path.exists("/home/stormux/.baremetal"):
|
||||
menu.add_item("System", "Install System to Hard Drive", "GAME='Install to Disk' /home/stormux/.clirc")
|
||||
|
||||
menu.add_item("System", "Internet Configuration", "GAME=\"Network Configuration\" /home/stormux/.clirc")
|
||||
|
||||
@@ -355,6 +355,13 @@ if sudo mount "$TARGET_ROOT_PART" "$TEMP_MOUNT" 2>/dev/null; then
|
||||
# Remove any USB-specific markers
|
||||
sudo rm -f "$TEMP_MOUNT/home/stormux/.firstboot" 2>/dev/null || true
|
||||
|
||||
# Create .baremetal marker file to indicate installed system
|
||||
echo "Creating baremetal system marker..."
|
||||
sudo touch "$TEMP_MOUNT/home/stormux/.baremetal"
|
||||
sudo chown stormux:stormux "$TEMP_MOUNT/home/stormux/.baremetal" 2>/dev/null || true
|
||||
# Set immutable attribute to prevent accidental deletion
|
||||
sudo chattr +i "$TEMP_MOUNT/home/stormux/.baremetal" 2>/dev/null || echo "Warning: Could not set immutable attribute on .baremetal"
|
||||
|
||||
# Update /etc/fstab with new UUIDs
|
||||
if [[ ${#uuid_mappings[@]} -gt 0 ]]; then
|
||||
update_fstab_uuids "$TEMP_MOUNT" "${uuid_mappings[@]}"
|
||||
|
||||
Reference in New Issue
Block a user