summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--locale/en_US.sh3
-rw-r--r--src/cmd/installer-pc.sh4
2 files changed, 7 insertions, 0 deletions
diff --git a/locale/en_US.sh b/locale/en_US.sh
index 1cd4695..cb5fe5d 100644
--- a/locale/en_US.sh
+++ b/locale/en_US.sh
@@ -105,6 +105,9 @@ msg_prokit_cmd_build_not_a_dir='Not a directory: %s'
msg_prokit_cmd_installer_pc_summary='install a PC system onto a block device'
msg_prokit_cmd_installer_pc_usage='-a <arch> -p <plat> [-m <mirror>] '\
'<suite> <device>'
+msg_prokit_cmd_installer_pc_dd_fail='Failed to clear MBR and partition table'
+msg_prokit_cmd_installer_pc_fdisk_fail='Failed to create partition table'
+msg_prokit_cmd_installer_pc_mkfs_fail='Failed to create file system'
# src/cmd/mkinitramfs.sh
msg_prokit_cmd_mkinitramfs_summary='generate an initramfs containing an '\
diff --git a/src/cmd/installer-pc.sh b/src/cmd/installer-pc.sh
index 848af10..c0162cc 100644
--- a/src/cmd/installer-pc.sh
+++ b/src/cmd/installer-pc.sh
@@ -107,21 +107,25 @@ cmd_installer_pc_make_partition_and_fs()
local dev="${1}"
if ! dd if=/dev/zero of="${dev}" bs=512 count=1; then
+ error "$(get_msg 'cmd_installer_pc_dd_fail')"
return 1
fi
if ${HAVE_SFDISK}; then
if ! printf ',,83,*\n' | ${SFDISK} "${dev}"; then
+ error "$(get_msg 'cmd_installer_pc_fdisk_fail')"
return 1
fi
elif ${HAVE_FDISK}; then
if ! printf 'n\np\n1\n\n\nt\n83\na\n1\nw\n' | ${FDISK} "${dev}"
then
+ error "$(get_msg 'cmd_installer_pc_fdisk_fail')"
return 1
fi
fi
if ! ${MKE2FS} -t ext4 "${dev}1"; then
+ error "$(get_msg 'cmd_installer_pc_mkfs_fail')"
return 1
fi