mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
'finished syslinux'
This commit is contained in:
parent
0870795b5b
commit
528c181f8b
1 changed files with 15 additions and 4 deletions
|
@ -2077,8 +2077,6 @@ getcryptsetup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
dosyslinux() {
|
dosyslinux() {
|
||||||
bootdev=""
|
|
||||||
bootprefix=""
|
|
||||||
getrootfs
|
getrootfs
|
||||||
getraidarrays
|
getraidarrays
|
||||||
getcryptsetup
|
getcryptsetup
|
||||||
|
@ -2090,8 +2088,8 @@ dosyslinux() {
|
||||||
# look for a separately-mounted /boot partition
|
# look for a separately-mounted /boot partition
|
||||||
bootdev=$(mount | grep $DESTDIR/boot | cut -d' ' -f 1)
|
bootdev=$(mount | grep $DESTDIR/boot | cut -d' ' -f 1)
|
||||||
if [ "$bootdev" = "" ]; then
|
if [ "$bootdev" = "" ]; then
|
||||||
bootdev=${PART_ROOT}
|
DIALOG --msgbox "Error: Couldn't find separate /boot partition." 0 0
|
||||||
bootprefix=/boot
|
return 1
|
||||||
fi
|
fi
|
||||||
# syslinux only can boot from vfat partitions!
|
# syslinux only can boot from vfat partitions!
|
||||||
FSTYPE="$(blkid -c /dev/null $bootdev -o value -s TYPE)"
|
FSTYPE="$(blkid -c /dev/null $bootdev -o value -s TYPE)"
|
||||||
|
@ -2113,6 +2111,7 @@ dosyslinux() {
|
||||||
[ -e ${TEMPDIR}/syslinux.cfg ] && rm ${TEMPDIR}/syslinux.cfg
|
[ -e ${TEMPDIR}/syslinux.cfg ] && rm ${TEMPDIR}/syslinux.cfg
|
||||||
echo "prompt 1" >> ${TEMPDIR}/syslinux.cfg
|
echo "prompt 1" >> ${TEMPDIR}/syslinux.cfg
|
||||||
echo "timeout 300" >> ${TEMPDIR}/syslinux.cfg
|
echo "timeout 300" >> ${TEMPDIR}/syslinux.cfg
|
||||||
|
echo "display boot.msg" >> ${TEMPDIR}/syslinux.cfg
|
||||||
echo "default arch" >> ${TEMPDIR}/syslinux.cfg
|
echo "default arch" >> ${TEMPDIR}/syslinux.cfg
|
||||||
echo "label arch" >> ${TEMPDIR}/syslinux.cfg
|
echo "label arch" >> ${TEMPDIR}/syslinux.cfg
|
||||||
echo "kernel vmlinuz26" >> ${TEMPDIR}/syslinux.cfg
|
echo "kernel vmlinuz26" >> ${TEMPDIR}/syslinux.cfg
|
||||||
|
@ -2133,12 +2132,24 @@ dosyslinux() {
|
||||||
else
|
else
|
||||||
echo "append initrd=kernel26-fallback.img root=${PART_ROOT} rootfstype=$ROOTFS $RAIDARRAYS $CRYPTSETUP" >> ${TEMPDIR}/syslinux.cfg
|
echo "append initrd=kernel26-fallback.img root=${PART_ROOT} rootfstype=$ROOTFS $RAIDARRAYS $CRYPTSETUP" >> ${TEMPDIR}/syslinux.cfg
|
||||||
fi
|
fi
|
||||||
|
# create boot message
|
||||||
|
[ -e ${TEMPDIR}/boot.msg ] && rm ${TEMPDIR}/boot.msg
|
||||||
|
echo "Arch Linux" >> ${TEMPDIR}/boot.msg
|
||||||
|
echo "SYSLINUX BOOT" >> ${TEMPDIR}/boot.msg
|
||||||
|
echo "" >> ${TEMPDIR}/boot.msg
|
||||||
|
echo "Available labels:" >> ${TEMPDIR}/boot.msg
|
||||||
|
echo "- 'arch' for normal boot" >> ${TEMPDIR}/boot.msg
|
||||||
|
echo "- 'fallback' for fallback boot" >> ${TEMPDIR}/boot.msg
|
||||||
|
# edit syslinux.cfg
|
||||||
DIALOG --msgbox "Before installing SYSLINUX, you must review the configuration file. You will now be put into the editor. After you save your changes and exit the editor, SYSLINUX will be installed." 0 0
|
DIALOG --msgbox "Before installing SYSLINUX, you must review the configuration file. You will now be put into the editor. After you save your changes and exit the editor, SYSLINUX will be installed." 0 0
|
||||||
[ "$EDITOR" ] || geteditor
|
[ "$EDITOR" ] || geteditor
|
||||||
$EDITOR ${TEMPDIR}/syslinux.cfg
|
$EDITOR ${TEMPDIR}/syslinux.cfg
|
||||||
|
# install syslinux
|
||||||
DIALOG --infobox "Installing the SYSLINUX bootloader..." 0 0
|
DIALOG --infobox "Installing the SYSLINUX bootloader..." 0 0
|
||||||
cp ${TEMPDIR}/syslinux.cfg ${DESTDIR}/boot/syslinux.cfg
|
cp ${TEMPDIR}/syslinux.cfg ${DESTDIR}/boot/syslinux.cfg
|
||||||
|
cp ${TEMPDIR}/boot.msg ${DESTDIR}/boot/boot.msg
|
||||||
cat ${MBR} > ${ROOTDEV}
|
cat ${MBR} > ${ROOTDEV}
|
||||||
|
[ -e ${DESTDIR}/boot/ldlinux.sys ] && rm ${DESTDIR}/boot/ldlinux.sys
|
||||||
syslinux $bootdev >$LOG 2>&1
|
syslinux $bootdev >$LOG 2>&1
|
||||||
if [ $? -gt 0 ]; then
|
if [ $? -gt 0 ]; then
|
||||||
DIALOG --msgbox "Error installing SYSLINUX. (see $LOG for output)" 0 0
|
DIALOG --msgbox "Error installing SYSLINUX. (see $LOG for output)" 0 0
|
||||||
|
|
Loading…
Reference in a new issue