Skip to content

Commit 8ef2c54

Browse files
rdcore: fail if system has more than 1 boot partition
Signed-off-by: Nikita Dubrovskii <nikita@linux.ibm.com>
1 parent 500eb08 commit 8ef2c54

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/bin/rdcore/rootmap.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ use libcoreinst::runcmd_output;
2727
use crate::cmdline::*;
2828

2929
pub fn rootmap(config: &RootmapConfig) -> Result<()> {
30+
// fail if we have more than 1 partition with boot label
31+
if !check_single_partition("boot")? {
32+
bail!("System has several partitions with boot label. Please 'wipefs' other disks");
33+
}
3034
// get the backing device for the root mount
3135
let mount = Mount::from_existing(&config.root_mount)?;
3236
let device = PathBuf::from(mount.device());

0 commit comments

Comments
 (0)