diff --git a/src/args.rs b/src/args.rs index ab8a0f4..909c77c 100644 --- a/src/args.rs +++ b/src/args.rs @@ -52,6 +52,10 @@ pub struct CreateCommand { #[structopt(long = "aur-packages", value_name = "aurpackage")] pub aur_packages: Vec, + /// Boot partition size in megabytes + #[structopt(long = "boot-size")] + pub boot_size: Option, + /// Enter interactive chroot before unmounting the drive #[structopt(short = "i", long = "interactive")] pub interactive: bool, diff --git a/src/main.rs b/src/main.rs index e33466b..8d3298a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -162,12 +162,14 @@ fn create(command: args::CreateCommand) -> anyhow::Result<()> { info!("Partitioning the block device"); debug!("{:?}", disk_path); + let boot_size = command.boot_size.unwrap_or(300); + sgdisk .execute() .args(&[ "-Z", "-o", - "--new=1::+250M", + &format!("--new=1::+{}M", boot_size), "--new=2::+1M", "--largest-new=3", "--typecode=1:EF00",