'added syslinux support'

This commit is contained in:
Tobias Powalowski 2009-04-26 11:11:31 +02:00
parent 4d38a94461
commit 5d6f547364
4 changed files with 69 additions and 4 deletions

View file

@ -20,7 +20,7 @@ pcre cpio archboot fuse klibc libusb vi lzo2 libsasl libldap libevent gpm sdparm
rt2x00-rt61-fw rt2x00-rt71w-fw rt2500 ndiswrapper ndiswrapper-utils \ rt2x00-rt61-fw rt2x00-rt71w-fw rt2500 ndiswrapper ndiswrapper-utils \
zd1211-firmware ipw2100-fw ipw2200-fw iwlwifi-3945-ucode iwlwifi-4965-ucode iwlwifi-5000-ucode \ zd1211-firmware ipw2100-fw ipw2200-fw iwlwifi-3945-ucode iwlwifi-4965-ucode iwlwifi-5000-ucode \
smbclient tdb tiacx tiacx-firmware dmraid linux-atm netcfg tiacx tiacx-firmware parted tzdata ntp \ smbclient tdb tiacx tiacx-firmware dmraid linux-atm netcfg tiacx tiacx-firmware parted tzdata ntp \
v86d wlan-ng26-utils iw crda wireless-regdb libnl iproute2 dhclient" v86d wlan-ng26-utils iw crda wireless-regdb libnl iproute2 dhclient syslinux"
for i in $DEPENDS; do for i in $DEPENDS; do
for k in $(echo /var/lib/pacman/local/$i-[0-9]*-[0-9]*); do for k in $(echo /var/lib/pacman/local/$i-[0-9]*-[0-9]*); do

View file

@ -13,7 +13,7 @@ ncurses procps psmisc reiserfsprogs sed \
syslog-ng sysvinit tar util-linux-ng which xfsprogs hdparm memtest86+ \ syslog-ng sysvinit tar util-linux-ng which xfsprogs hdparm memtest86+ \
grub hwdetect shadow dosfstools udev initscripts filesystem kernel26 glibc kernel-headers pacman pacman-mirrorlist pam \ grub hwdetect shadow dosfstools udev initscripts filesystem kernel26 glibc kernel-headers pacman pacman-mirrorlist pam \
bzip2 gcc-libs openssl zlib libelf gpm sysfsutils libgcrypt libgpg-error popt libpcap lilo grub gzip libarchive \ bzip2 gcc-libs openssl zlib libelf gpm sysfsutils libgcrypt libgpg-error popt libpcap lilo grub gzip libarchive \
libdownload device-mapper cracklib readline acl attr archboot klibc libevent sdparm licenses dmraid parted" libdownload device-mapper cracklib readline acl attr archboot klibc libevent sdparm licenses dmraid parted syslinux"
for i in $DEPENDS; do for i in $DEPENDS; do
for k in $(echo /var/lib/pacman/local/$i-[0-9]*-[0-9]*); do for k in $(echo /var/lib/pacman/local/$i-[0-9]*-[0-9]*); do

View file

@ -13,7 +13,7 @@ for i in $(pacman -Sg base-devel | sed -e "s/base-devel//g"); do
DEVEL="$DEVEL $(echo $i)" DEVEL="$DEVEL $(echo $i)"
done done
# generate support, ntfs-3g is added additionally! # generate support, ntfs-3g is added additionally!
SUPPORT="$(echo -n $(pacman -Ss | grep -e ^core | grep -v '(' | sed -e 's/\ .*/ /g' -e 's#core/##g')) ntfs-3g" SUPPORT="$(echo -n $(pacman -Ss | grep -e ^core | grep -v '(' | sed -e 's/\ .*/ /g' -e 's#core/##g')) ntfs-3g syslinux"
for i in base devel support; do for i in base devel support; do
mkdir $i mkdir $i
svn co -N ${SVNSETUP} $i svn co -N ${SVNSETUP} $i

View file

@ -2076,6 +2076,69 @@ getcryptsetup() {
fi fi
} }
dosyslinux() {
getrootfs
getraidarrays
getcryptsetup
if [ ! -e $DESTDIR/usr/bin/syslinux ]; then
DIALOG --msgbox "Error: Couldn't find syslinux binary. Is SYSLINUX installed?" 0 0
return 1
fi
# look for a separately-mounted /boot partition
bootdev=$(mount | grep $DESTDIR/boot | cut -d' ' -f 1)
if [ "$bootdev" = "" ]; then
DIALOG --msgbox "Error: Couldn't find separate /boot partition." 0 0
return 1
fi
FSTYPE="$(blkid -c /dev/null $bootdev -o value -s TYPE)"
if ! [ "$FSTYPE" = "vfat" ]; then
DIALOG --msgbox "Error: Couldn't find vfat boot partition." 0 0
return 1
fi
DEVS="$(findbootloaderdisks _)"
DEVS="$DEVS $(findbootloaderpartitions _)"
if [ "$DEVS" = "" ]; then
DIALOG --msgbox "No hard drives were found" 0 0
return 1
fi
DIALOG --menu "Select the boot device where the SYSLINUX bootloader will be installed (usually the MBR)" 14 55 7 $DEVS 2>$ANSWER || return 1
ROOTDEV=$(cat $ANSWER)
# generate syslinux.cfg
TEMPDIR=/tmp
MBR=${DESTDIR}/usr/lib/syslinux/mbr.bin
[ -e ${TEMPDIR}/syslinux.cfg ] && rm ${TEMPDIR}/syslinux.cfg
echo "prompt 1" >> ${TEMPDIR}/syslinux.cfg
echo "timeout 300" >> ${TEMPDIR}/syslinux.cfg
echo "default arch" >> ${TEMPDIR}/syslinux.cfg
echo "label arch" >> ${TEMPDIR}/syslinux.cfg
echo "kernel vmlinuz26" >> ${TEMPDIR}/syslinux.cfg
if [ "$UUIDPARAMETER" = "yes" ]; then
local _rootpart="${PART_ROOT}"
local _uuid="$(getuuid ${PART_ROOT})"
if [ -n "${_uuid}" ]; then
_rootpart="/dev/disk/by-uuid/${_uuid}"
fi
echo "append initrd=kernel26.img root=${_rootpart} rootfstype=$ROOTFS $RAIDARRAYS $CRYPTSETUP" >> ${TEMPDIR}/syslinux.cfg
else
echo "append initrd=kernel26.img root=${PART_ROOT} rootfstype=$ROOTFS $RAIDARRAYS $CRYPTSETUP" >> ${TEMPDIR}/syslinux.cfg
fi
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 ${TEMPDIR}/syslinux.cfg
DIALOG --infobox "Installing the SYSLINUX bootloader..." 0 0
cp ${TEMPDIR}/syslinux.cfg ${DESTDIR}/boot/syslinux.cfg
cat ${MBR} > ${ROOTDEV}
chroot_mount
chroot /usr/bin/syslinux -o offset $bootdev >$LOG 2>&1
if [ $? -gt 0 ]; then
chroot_umount
DIALOG --msgbox "Error installing SYSLINUX. (see $LOG for output)" 0 0
return 1
fi
chroot_umount
DIALOG --msgbox "SYSLINUX was successfully installed." 0 0
}
dolilo() { dolilo() {
getrootfs getrootfs
getraidarrays getraidarrays
@ -2880,10 +2943,12 @@ install_bootloader()
DIALOG --menu "Which bootloader would you like to use? Grub is the Arch default.\n\n" \ DIALOG --menu "Which bootloader would you like to use? Grub is the Arch default.\n\n" \
10 55 2 \ 10 55 2 \
"GRUB" "Use the GRUB bootloader (default)" \ "GRUB" "Use the GRUB bootloader (default)" \
"LILO" "Use the LILO bootloader" 2>$ANSWER || CANCEL=1 "LILO" "Use the LILO bootloader" \
"SYSLINUX" "Use the SYSLINUX bootloader" 2>$ANSWER || CANCEL=1
case $(cat $ANSWER) in case $(cat $ANSWER) in
"GRUB") dogrub ;; "GRUB") dogrub ;;
"LILO") dolilo ;; "LILO") dolilo ;;
"SYSLINUX") dosyslinux ;;
esac esac
if [ "$CANCEL" = "1" ]; then if [ "$CANCEL" = "1" ]; then
NEXTITEM="7" NEXTITEM="7"