--- trunk/installer/include/prepare_bootloader.sh 2010/05/30 23:08:26 1045 +++ trunk/installer/include/prepare_bootloader.sh 2010/05/31 17:15:47 1051 @@ -19,13 +19,21 @@ install_grub() { local chroot + local grub_disk + + if [[ -z ${PARTITION_DISK_BOOT} ]] + then + grub_disk="${PARTITION_DISK_ROOT}" + else + grub_disk="${PARTITION_DISK_BOOT}" + fi [[ ! -z ${INSTALL_ROOT} ]] && chroot=chrooted # update grub ${chroot} grub --batch --no-floppy << EOF 1> /dev/null 2> /dev/null -root $(convert_device ${PARTITION_DISK_BOOT}) -setup $(convert_device ${PARTITION_DISK_BOOT} | sed "s:,[0-9]::") +root $(convert_device ${grub_disk}) +setup $(convert_device ${grub_disk} | sed "s:,[0-9]::") quit EOF @@ -67,10 +75,13 @@ create_grub_conf() { local splashimage + local grub_disk if [[ -z ${PARTITION_DISK_BOOT} ]] then - export PARTITION_DISK_BOOT="${PARTITION_DISK_ROOT}" + grub_disk="${PARTITION_DISK_ROOT}" + else + grub_disk="${PARTITION_DISK_BOOT}" fi # create an empty one @@ -89,7 +100,7 @@ if [[ -f ${INSTALL_ROOT}/boot/${splashimage} ]] then add_grub_conf "# splash image" - add_grub_conf "splashimage $(convert_device ${PARTITION_DISK_BOOT})/boot/${splashimage}" + add_grub_conf "splashimage $(convert_device ${grub_disk})/boot/${splashimage}" add_grub_conf "foreground FFFFFF" add_grub_conf "background 253861" @@ -101,7 +112,7 @@ fi add_grub_conf "title Magellan-Linux $(< ${INSTALL_ROOT}/etc/mageversion) ($(readlink ${INSTALL_ROOT}/boot/vmlinuz | sed s:kernel-::))" - add_grub_conf "root $(convert_device ${PARTITION_DISK_BOOT})" + add_grub_conf "root $(convert_device ${grub_disk})" add_grub_conf "kernel /boot/$(readlink ${INSTALL_ROOT}/boot/vmlinuz) root=UUID=$(get_uuid ${PARTITION_DISK_ROOT})" add_grub_conf "initrd /boot/$(readlink ${INSTALL_ROOT}/boot/initrd)"