mirror of
https://github.com/philmmanjaro/alma.git
synced 2025-07-24 22:19:28 +02:00
Add a command line flag to specify the boot partition size (fix #79)
This commit is contained in:
parent
60438bac5c
commit
3f89061369
@ -52,6 +52,10 @@ pub struct CreateCommand {
|
||||
#[structopt(long = "aur-packages", value_name = "aurpackage")]
|
||||
pub aur_packages: Vec<String>,
|
||||
|
||||
/// Boot partition size in megabytes
|
||||
#[structopt(long = "boot-size")]
|
||||
pub boot_size: Option<u32>,
|
||||
|
||||
/// Enter interactive chroot before unmounting the drive
|
||||
#[structopt(short = "i", long = "interactive")]
|
||||
pub interactive: bool,
|
||||
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user