From: Michael Tremer Date: Thu, 21 Aug 2014 14:43:45 +0000 (+0200) Subject: installer: Destroy RAID superblocks on single disk installations X-Git-Tag: v2.17-core87~103^2~51^2~51 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d78fffa049464b5985faa58c06726fcef1cb5376;p=ipfire-2.x.git installer: Destroy RAID superblocks on single disk installations --- diff --git a/src/installer/hw.c b/src/installer/hw.c index 667e07fdf7..212deef89e 100644 --- a/src/installer/hw.c +++ b/src/installer/hw.c @@ -822,7 +822,7 @@ int hw_umount_filesystems(struct hw_destination* dest, const char* prefix) { return 0; } -static int hw_destroy_raid_superblocks(const struct hw_destination* dest, const char* output) { +int hw_destroy_raid_superblocks(const struct hw_destination* dest, const char* output) { char cmd[STRING_SIZE]; hw_stop_all_raid_arrays(output); diff --git a/src/installer/hw.h b/src/installer/hw.h index ea98e2f09e..123d89f7ca 100644 --- a/src/installer/hw.h +++ b/src/installer/hw.h @@ -120,6 +120,7 @@ int hw_create_filesystems(struct hw_destination* dest, const char* output); int hw_mount_filesystems(struct hw_destination* dest, const char* prefix); int hw_umount_filesystems(struct hw_destination* dest, const char* prefix); +int hw_destroy_raid_superblocks(const struct hw_destination* dest, const char* output); int hw_setup_raid(struct hw_destination* dest, const char* output); int hw_stop_all_raid_arrays(const char* output); diff --git a/src/installer/main.c b/src/installer/main.c index 254aae8ea5..45420e13e4 100644 --- a/src/installer/main.c +++ b/src/installer/main.c @@ -540,6 +540,10 @@ int main(int argc, char *argv[]) { } newtPopWindow(); + } else { + // We will have to destroy all RAID setups that may have + // been on the devices that we want to use now. + hw_destroy_raid_superblocks(destination, logfile); } // Execute the partitioning...