mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
'added raid detection in grub section'
This commit is contained in:
parent
9fdd2e7f93
commit
b09cb4ee9e
1 changed files with 57 additions and 48 deletions
|
@ -728,6 +728,8 @@ getsource() {
|
|||
fi
|
||||
|
||||
if [ "$MODE" = "ftp" ]; then
|
||||
#in order to cache packages from media check on it first!
|
||||
get_media
|
||||
select_mirror
|
||||
NEXTITEM="2"
|
||||
fi
|
||||
|
@ -1123,7 +1125,7 @@ donetwork() {
|
|||
DIALOG --yesno "Do you want to use DHCP?" 0 0
|
||||
if [ $? -eq 0 ]; then
|
||||
DIALOG --infobox "Please wait. Polling for DHCP server on $INTERFACE..." 10 65
|
||||
[ -e /var/run/dhcpcd-$INTERFACE.pid ] && kill $(cat /var/run/dhcpcd-$INTERFACE.pid)
|
||||
[ -e /var/run/dhcpcd-$INTERFACE.pid ] && kill $(cat /var/run/dhcpcd-$INTERFACE.pid) && sleep 1
|
||||
dhcpcd $INTERFACE >$LOG 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
DIALOG --msgbox "Failed to run dhcpcd. See $LOG for details." 0 0
|
||||
|
@ -1316,6 +1318,8 @@ dogrub() {
|
|||
DIALOG --msgbox "No hard drives were found" 0 0
|
||||
return 1
|
||||
fi
|
||||
S_GRUB=""
|
||||
while [ "$S_GRUB" = "" ]; do
|
||||
DIALOG --menu "Select the boot device where the GRUB bootloader will be installed (usually the MBR and not a partition)." 14 55 7 $DEVS 2>$ANSWER || return 1
|
||||
ROOTDEV=$(cat $ANSWER)
|
||||
DIALOG --infobox "Installing the GRUB bootloader..." 0 0
|
||||
|
@ -1336,11 +1340,6 @@ dogrub() {
|
|||
bootpart=$PART_ROOT
|
||||
fi
|
||||
fi
|
||||
DIALOG --defaultno --yesno "Do you have your system installed on software raid?\nAnswer 'YES' to install grub to another hard disk." 0 0
|
||||
if [ $? -eq 0 ]; then
|
||||
DIALOG --menu "Please select the boot partition device, this cannot be autodetected!\nPlease redo grub installation for all partitions you need it!" 14 55 7 $DEVS 2>$ANSWER || return 1
|
||||
bootpart=$(cat $ANSWER)
|
||||
fi
|
||||
bootpart=$(mapdev $bootpart)
|
||||
bootdev=$(mapdev $ROOTDEV)
|
||||
if [ "$bootpart" = "" ]; then
|
||||
|
@ -1368,7 +1367,17 @@ EOF
|
|||
return 1
|
||||
fi
|
||||
DIALOG --msgbox "GRUB was successfully installed." 0 0
|
||||
if [ "$(blkid -c /dev/null | grep TYPE=\"mdraid\")" ]; then
|
||||
DIALOG --defaultno --yesno "You have your system installed on software raid?\nAnswer 'YES' to install grub to another hard disk." 0 0
|
||||
if [ $? -eq 0 ]; then
|
||||
S_GRUB=""
|
||||
else
|
||||
S_GRUB=1
|
||||
fi
|
||||
else
|
||||
S_GRUB=1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
select_source()
|
||||
|
|
Loading…
Reference in a new issue