installer: remove other O.S. partiton selection, rely on grub-install + os-prober for automatic configuration
This commit is contained in:
parent
cdbd56e126
commit
86284136d4
@ -2774,6 +2774,30 @@ done
|
|||||||
<pixmap>image7</pixmap>
|
<pixmap>image7</pixmap>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="Label">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>Label21_2_2</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>70</x>
|
||||||
|
<y>10</y>
|
||||||
|
<width>500</width>
|
||||||
|
<height>30</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>15</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Configure the boot manager</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
<widget class="ButtonGroup">
|
<widget class="ButtonGroup">
|
||||||
<property name="name">
|
<property name="name">
|
||||||
<cstring>BootloaderBox</cstring>
|
<cstring>BootloaderBox</cstring>
|
||||||
@ -2797,6 +2821,30 @@ done
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Bootloader configuration</string>
|
<string>Bootloader configuration</string>
|
||||||
</property>
|
</property>
|
||||||
|
<widget class="Label">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>Label29_2</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>531</width>
|
||||||
|
<height>40</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<italic>1</italic>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Please select where you want to install the boot manager.</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>WordBreak|AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
<widget class="QLayoutWidget">
|
<widget class="QLayoutWidget">
|
||||||
<property name="name">
|
<property name="name">
|
||||||
<cstring>Layout5_2</cstring>
|
<cstring>Layout5_2</cstring>
|
||||||
@ -2804,7 +2852,7 @@ done
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>320</y>
|
<y>60</y>
|
||||||
<width>530</width>
|
<width>530</width>
|
||||||
<height>26</height>
|
<height>26</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -2876,86 +2924,6 @@ done
|
|||||||
</widget>
|
</widget>
|
||||||
</hbox>
|
</hbox>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="ListBox">
|
|
||||||
<property name="name">
|
|
||||||
<cstring>chainloadbox</cstring>
|
|
||||||
</property>
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>100</y>
|
|
||||||
<width>540</width>
|
|
||||||
<height>170</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="selectionMode">
|
|
||||||
<enum>Multi</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="Label">
|
|
||||||
<property name="name">
|
|
||||||
<cstring>Label3_2_2_2</cstring>
|
|
||||||
</property>
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>70</y>
|
|
||||||
<width>290</width>
|
|
||||||
<height>24</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Please select the boot menu options:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="Label">
|
|
||||||
<property name="name">
|
|
||||||
<cstring>Label29_2</cstring>
|
|
||||||
</property>
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>280</y>
|
|
||||||
<width>531</width>
|
|
||||||
<height>40</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<italic>1</italic>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Please select where you want to install the boot manager.</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>WordBreak|AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="Label">
|
|
||||||
<property name="name">
|
|
||||||
<cstring>Label28</cstring>
|
|
||||||
</property>
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>20</y>
|
|
||||||
<width>540</width>
|
|
||||||
<height>40</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<italic>1</italic>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Below is a list of other operating systems found on this computer, you may configure them to appear as a choice when the computer starts.</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>WordBreak|AlignTop</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="ScriptObject">
|
<widget class="ScriptObject">
|
||||||
<property name="name">
|
<property name="name">
|
||||||
<cstring>setBootableCheckbox</cstring>
|
<cstring>setBootableCheckbox</cstring>
|
||||||
@ -2966,7 +2934,7 @@ done
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>520</x>
|
<x>520</x>
|
||||||
<y>70</y>
|
<y>10</y>
|
||||||
<width>32</width>
|
<width>32</width>
|
||||||
<height>32</height>
|
<height>32</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -2992,102 +2960,6 @@ fi
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="Label">
|
|
||||||
<property name="name">
|
|
||||||
<cstring>Label21_2_2</cstring>
|
|
||||||
</property>
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>70</x>
|
|
||||||
<y>10</y>
|
|
||||||
<width>500</width>
|
|
||||||
<height>30</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>15</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Configure the boot manager</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="ScriptObject">
|
|
||||||
<property name="name">
|
|
||||||
<cstring>scanbootloader</cstring>
|
|
||||||
</property>
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>550</x>
|
|
||||||
<y>10</y>
|
|
||||||
<width>32</width>
|
|
||||||
<height>32</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="associations" stdset="0">
|
|
||||||
<stringlist>
|
|
||||||
<string>@BackBox.setChecked(true)
|
|
||||||
@NextBox.setChecked(true)
|
|
||||||
@chainloadbox.clear
|
|
||||||
@setBootableCheckbox.execute()
|
|
||||||
@execBegin
|
|
||||||
function get_udisks_key() {
|
|
||||||
LANG=C udisks --show-info $1 | grep " $2:" | head -n1 | sed "s|[[:space:]]*$2:[[:space:]]*\(.*\)|\1|"
|
|
||||||
}
|
|
||||||
conffile=~/.installer.conf
|
|
||||||
[ -e $conffile ] && mv ${conffile} ${conffile}~
|
|
||||||
installdevice=@String.section(@devicesbox.item(@devicesbox.currentItem)," ",0)
|
|
||||||
devices=`udisks --enumerate-device-files | grep -v /dev/disk | sort -n -r`
|
|
||||||
partlabel=
|
|
||||||
|
|
||||||
for device in $devices; do
|
|
||||||
[ "${device:5:5}" = "$installdevice" ] && continue
|
|
||||||
native_path=`get_udisks_key $device native-path`
|
|
||||||
[ -e $native_path/partition ] || continue
|
|
||||||
is_system_internal=`get_udisks_key $device "system internal"`
|
|
||||||
volsize=`get_udisks_key $device size`
|
|
||||||
volsize=`expr $volsize / 1024 / 1024`
|
|
||||||
volname=`get_udisks_key $device label`
|
|
||||||
[ "$volname" ] || volname="unnamed"
|
|
||||||
parttype=`get_udisks_key $device usage`
|
|
||||||
[ "$parttype" ] || parttype="unknown"
|
|
||||||
partscheme=`get_udisks_key $device scheme`
|
|
||||||
[ "$partscheme" ] || partscheme="unknown"
|
|
||||||
fstype=`get_udisks_key $device type`
|
|
||||||
[ "$fstype" ] || fstype="unformatted"
|
|
||||||
add_info=""
|
|
||||||
[ "$is_system_internal" = "1" ] || {
|
|
||||||
add_info=",removable"
|
|
||||||
[ @removablebox.checked == 1 ] || continue
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ "$partscheme" == "mbr" -o "$partscheme" == "embr" ]; then
|
|
||||||
partlabel="$partlabel<br>${device:5:5} $fstype $volname $volsize MB"
|
|
||||||
case "$fstype" in
|
|
||||||
swap|iso9660|unformatted) ;;
|
|
||||||
ext2|ext3|ext4|reiserfs|reiser4) ;;
|
|
||||||
*) dcop @dcopid KommanderIf "addListItem(QString,QString,int)" chainloadbox "${device:5:5} ($fstype,$volname,$volsize MB${add_info})" 0
|
|
||||||
dcop @dcopid KommanderIf "setSelection" chainloadbox "${device:5:5} ($fstype,$volname,$volsize MB${add_info})"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
elif [ "$partscheme" == "gpt" -o "$partscheme" == "unknown" -a $volsize -gt 0 ]; then
|
|
||||||
case "$fstype" in
|
|
||||||
swap|iso9660|unformatted) ;;
|
|
||||||
ext2|ext3|ext4|reiserfs|reiser4) ;;
|
|
||||||
*) dcop @dcopid KommanderIf "addListItem(QString,QString,int)" chainloadbox "${device:5:5} ($fstype,$volname,$volsize MB${add_info})" 0
|
|
||||||
dcop @dcopid KommanderIf "setSelection" chainloadbox "${device:5:5} ($fstype,$volname,$volsize MB${add_info})"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
@execEnd</string>
|
|
||||||
</stringlist>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget">
|
<widget class="QWidget">
|
||||||
<property name="name">
|
<property name="name">
|
||||||
@ -3653,12 +3525,6 @@ fi
|
|||||||
<receiver>setLangLabel</receiver>
|
<receiver>setLangLabel</receiver>
|
||||||
<slot>execute()</slot>
|
<slot>execute()</slot>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
|
||||||
<sender>bootableBox</sender>
|
|
||||||
<signal>widgetOpened()</signal>
|
|
||||||
<receiver>scanbootloader</receiver>
|
|
||||||
<slot>execute()</slot>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
<connection>
|
||||||
<sender>NextBox</sender>
|
<sender>NextBox</sender>
|
||||||
<signal>widgetOpened()</signal>
|
<signal>widgetOpened()</signal>
|
||||||
|
@ -461,14 +461,14 @@ if [ "$INSTALL_BOOTLOADER_DEVICE" ]; then
|
|||||||
if [ "$INSTALL_BOOTLOADER_DEVICE_INTERNAL" != "1" ]; then
|
if [ "$INSTALL_BOOTLOADER_DEVICE_INTERNAL" != "1" ]; then
|
||||||
echo $"Installing grub bootloader on removable device $INSTALL_BOOTLOADER_DEVICE"
|
echo $"Installing grub bootloader on removable device $INSTALL_BOOTLOADER_DEVICE"
|
||||||
echo "(hd0) $INSTALL_BOOTLOADER_DEVICE" > $MOUNTPOINT/boot/grub/device.map
|
echo "(hd0) $INSTALL_BOOTLOADER_DEVICE" > $MOUNTPOINT/boot/grub/device.map
|
||||||
grub-install $INSTALL_BOOTLOADER_DEVICE --root-directory=$MOUNTPOINT --no-floppy --force
|
grub-install $INSTALL_BOOTLOADER_DEVICE --root-directory=$MOUNTPOINT --target=i386-pc --recheck --no-floppy --force
|
||||||
else
|
else
|
||||||
echo $"Installing grub bootloader on $INSTALL_BOOTLOADER_DEVICE"
|
echo $"Installing grub bootloader on $INSTALL_BOOTLOADER_DEVICE"
|
||||||
> $MOUNTPOINT/boot/grub/device.map
|
> $MOUNTPOINT/boot/grub/device.map
|
||||||
for i in `seq 1 ${#DEV_NAME_ORIG[*]}`; do
|
for i in `seq 1 ${#DEV_NAME_ORIG[*]}`; do
|
||||||
echo "(${GRUB_NAME_DEST[i-1]}) ${DEV_NAME_ORIG[i-1]}" >> $MOUNTPOINT/boot/grub/device.map
|
echo "(${GRUB_NAME_DEST[i-1]}) ${DEV_NAME_ORIG[i-1]}" >> $MOUNTPOINT/boot/grub/device.map
|
||||||
done
|
done
|
||||||
grub-install $INSTALL_BOOTLOADER_DEVICE --root-directory=$MOUNTPOINT --no-floppy --force
|
grub-install $INSTALL_BOOTLOADER_DEVICE --root-directory=$MOUNTPOINT --target=i386-pc --recheck --no-floppy --force
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# DEV_NAME_ORIG=(${DEV_NAME_ORIG[*]} $GRUB_DEV)
|
# DEV_NAME_ORIG=(${DEV_NAME_ORIG[*]} $GRUB_DEV)
|
||||||
|
Loading…
Reference in New Issue
Block a user