summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/libs/lib-blockdevices-filesystems.sh2
-rw-r--r--src/core/libs/lib-ui-interactive.sh13
-rw-r--r--src/core/procedures/automatic5
3 files changed, 14 insertions, 6 deletions
diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh
index a4bc534..e8f358c 100644
--- a/src/core/libs/lib-blockdevices-filesystems.sh
+++ b/src/core/libs/lib-blockdevices-filesystems.sh
@@ -721,7 +721,9 @@ process_filesystem ()
swap) mkswap $part $opts >$LOG 2>&1; ret=$? ;;
dm_crypt) [ -z "$fs_params" ] && fs_params='-c aes-xts-plain -y -s 512';
fs_params=${fs_params//_/ }
+ infofy "Please enter your passphrase to encrypt the device (with confirmation)"
cryptsetup $fs_params $opts luksFormat -q $part >$LOG 2>&1 < /dev/tty ; ret=$? #hack to give cryptsetup the approriate stdin. keep in mind we're in a loop (see process_filesystems where something else is on stdin)
+ infofy "Please enter your passphrase to unlock the device"
cryptsetup luksOpen $part $fs_label >$LOG 2>&1 < /dev/tty; ret=$? || ( show_warning 'cryptsetup' "Error luksOpening $part on /dev/mapper/$fs_label" ) ;;
lvm-pv) pvcreate $fs_opts $part >$LOG 2>&1; ret=$? ;;
lvm-vg) # $fs_params: ':'-separated list of PV's
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh
index d1d7a21..9283a19 100644
--- a/src/core/libs/lib-ui-interactive.sh
+++ b/src/core/libs/lib-ui-interactive.sh
@@ -1004,12 +1004,7 @@ generate_grub_menulst() {
local grubmenu="$var_TARGET_DIR/boot/grub/menu.lst"
get_device_with_mount '/' || return 1
local _rootpart=$ANSWER_DEVICE
- local _uuid="$(getuuid ${_rootpart})"
- # attempt to use a UUID if the root device has one
- if [ -n "${_uuid}" ]; then
- _rootpart="/dev/disk/by-uuid/${_uuid}"
- fi
-
+
# Determine what is the device that acts as grub's root
# This is the blockdevice where /boot lives, normally a seperate partition.
#
@@ -1063,6 +1058,12 @@ generate_grub_menulst() {
# remove default entries by truncating file at our little tag (#-*)
sed -i -e '/#-\*/q' $grubmenu
+ # attempt to use a UUID if the root device has one
+ local _uuid="$(getuuid ${_rootpart})"
+ if [ -n "${_uuid}" ]; then
+ _rootpart="/dev/disk/by-uuid/${_uuid}"
+ fi
+
# handle dmraid/mdadm,lvm,dm_crypt etc. replace entries where needed automatically
debug 'FS' 'Grub kernel line? Assuming "/ on raw" or "/ on lvm on raw" as default'
kernel="kernel $subdir/vmlinuz26 root=${_rootpart} ro"
diff --git a/src/core/procedures/automatic b/src/core/procedures/automatic
index 80aecfc..1fae06d 100644
--- a/src/core/procedures/automatic
+++ b/src/core/procedures/automatic
@@ -132,6 +132,11 @@ worker_configure_system () {
worker_install_bootloader ()
{
+ get_grub_map
grub-install $var_GRUB_DEVICE --root-directory=/mnt
+ # check if we have a seperate bootdev (/boot)
+ # ToDo: This is double-work, find a better place!
+ # See comment in generate_grub_menulst and interactive_grub
+ bootdev=$(mount | grep $var_TARGET_DIR/boot | cut -d' ' -f 1)
generate_grub_menulst
}