diff --git a/sysinstall/devices.c b/sysinstall/devices.c index dda0a5f3..235b139f 100644 --- a/sysinstall/devices.c +++ b/sysinstall/devices.c @@ -186,6 +186,11 @@ bool check_lacking_partition_table(void) return false; } +bool check_multiple_harddisks(void) +{ + return 2 <= hds_count; +} + bool fsck(struct filesystem* fs) { const char* bdev_path = path_of_blockdevice(fs->bdev); diff --git a/sysinstall/devices.h b/sysinstall/devices.h index faa7aa0a..9a944b6b 100644 --- a/sysinstall/devices.h +++ b/sysinstall/devices.h @@ -43,6 +43,7 @@ void scan_devices(void); struct filesystem* search_for_filesystem_by_uuid(const unsigned char* uuid); struct filesystem* search_for_filesystem_by_spec(const char* spec); bool check_lacking_partition_table(void); +bool check_multiple_harddisks(void); bool fsck(struct filesystem* fs); void free_mountpoints(struct mountpoint* mnts, size_t mnts_count); bool load_mountpoints(const char* fstab_path, diff --git a/sysinstall/sysinstall.c b/sysinstall/sysinstall.c index ae5acf74..f7b0d68f 100644 --- a/sysinstall/sysinstall.c +++ b/sysinstall/sysinstall.c @@ -665,14 +665,19 @@ int main(void) const char* mktable_tip = ""; if ( check_lacking_partition_table() ) mktable_tip = "Type mktable to make a new partition table. "; + const char* devices_tip = ""; + if ( check_multiple_harddisks() ) + devices_tip = "Type devices to list the devices. " + "Type device 1 to switch to device 1. "; textf("Type ls to list partitions on the device. " + "%s" "%s" "Type mkpart to make a new partition. " "Type mount 2 / to create a mountpoint for partition 2. " "Type exit when done. " "There is partitioning advice in installation(7). " "Type man 8 disked to display the disked(8) man page.\n", - mktable_tip); + mktable_tip, devices_tip); struct filesystem* root_filesystem = NULL; struct filesystem* boot_filesystem = NULL; struct filesystem* bootloader_filesystem = NULL;