diff --git a/src/stages/install/mod.rs b/src/stages/install/mod.rs index a8a911e..2df7eb2 100644 --- a/src/stages/install/mod.rs +++ b/src/stages/install/mod.rs @@ -38,9 +38,11 @@ use iced::{Color, Length, futures::channel::mpsc::Sender, widget::container}; use log; use rust_i18n::t; -const EFI_BOOT_MOUNT_POINT: &str = "/beefi"; +const EFI_BOOT_MOUNT_POINT: &str = "/mnt/inst_root/beefi"; const MNT_DIR: &str = "/mnt/inst_root"; const ROOT_PARTLABEL_DEV: &str = "/dev/disk/by-partlabel/bee-root"; +const EFI_PARTLABLE_DEV: &str = "/dev/disk/by-partlabel/bee-efi"; +const SWAP_PARTLABLE_DEV: &str = "/dev/disk/by-partlabel/bee-swap"; /// /// List of packages for desktop (elogind-dinit no need for headles system) /// @@ -93,7 +95,7 @@ const PKG_LIST_CORE_DESKTOP: [&str; 19] = [ // const PKG_LIST_MEDIA_DESKTOP: [&str; 4] = ["ffmpeg", "ffmpeg4.4", "strawberry", "mpv"]; -const PKG_LIST_KDE_DESKTOP: [&str; 44] = [ +const PKG_LIST_KDE_DESKTOP: [&str; 45] = [ "wireless-regdb", "wpa_supplicant", "wpa_supplicant-dinit", @@ -138,6 +140,8 @@ const PKG_LIST_KDE_DESKTOP: [&str; 44] = [ "ffmpeg4.4", "strawberry", "mpv", + "ttf-unifont", + ]; // const PKG_LIST_AWESOME_DESKTOP: [&str; 5] = [ @@ -149,7 +153,7 @@ const PKG_LIST_KDE_DESKTOP: [&str; 44] = [ // ]; /// Creates new GPT table and partitions from PartLayout -pub fn create_partitions(part_layout: &PartLayout) -> Result<(), ExecCommandError> { +fn create_partitions(part_layout: &PartLayout) -> Result<(), ExecCommandError> { log::info!("Creating GPT part table..."); kira_system::parted_init_gpt_part_table(&part_layout.dev)?; log::info!("Start to create partitions..."); @@ -165,7 +169,7 @@ pub fn create_partitions(part_layout: &PartLayout) -> Result<(), ExecCommandErro /// Unlock it if encryption used /// Mount to specified dir /// creates subvolumes bzz/root bzz/home -pub fn bcachefs_init( +fn bcachefs_init( dev_name: &str, mnt_dir: &str, password: Option, @@ -182,7 +186,7 @@ pub fn bcachefs_init( std::fs::create_dir(format!("{}{}", mnt_dir, "/bzz-snaps"))?; // Creating boot directory for efi mounting - std::fs::create_dir_all(format!("{}{}", mnt_dir, EFI_BOOT_MOUNT_POINT))?; + std::fs::create_dir_all(EFI_BOOT_MOUNT_POINT)?; // create subvolumes log::info!("Creating subvolumes..."); @@ -194,7 +198,7 @@ pub fn bcachefs_init( Ok(()) } -pub fn init_disk(part_layout: &PartLayout, mnt_dir: &str) -> Result<(), ExecCommandError> { +fn init_disk(part_layout: &PartLayout, mnt_dir: &str) -> Result<(), ExecCommandError> { let mnt_path = Path::new(mnt_dir); log::info!("Cheking is MNT path exists: {}", mnt_dir); if !mnt_path.exists() { @@ -309,6 +313,12 @@ pub fn mount_and_init_root( ))); } + log::info!("Mounting EFI partition"); + kira_system::mount_fs(EFI_PARTLABLE_DEV, EFI_BOOT_MOUNT_POINT)?; + + log::info!("Attaching swap partition"); + kira_system::swapon(SWAP_PARTLABLE_DEV)?; + Ok(()) }