[arch-releng] Syslinux Patches - Review 2
Well this is round 2... TODO: * Update documentation accordingly Notable Changes: * Switch order of patches 3 and 2 around. * Changed location of syslinux-install_update to reflect new location in syslinux package (/usr/sbin/syslinux-install_update) * Removed check to see if syslinux is installed There is a signoff for syslinux 4.03-3 pending atm.
Function was updated to be flexible with the use of multiple bootloaders --- src/core/libs/lib-ui-interactive.sh | 26 ++++++++++++++++---------- 1 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index b244a6e..062c420 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -883,7 +883,7 @@ interactive_grub() { fi fi # Create and edit the grub menu.lst - interactive_grub_menulst + interactive_bootloader_menu "grub" $grubmenu DEVS="$(findblockdevices '_ ')" if [ "$DEVS" = " " ]; then @@ -1070,15 +1070,6 @@ initrd $subdir/kernel26-fallback.img EOF } -interactive_grub_menulst () { - generate_grub_menulst - local helptext= - grep -q '^/dev/mapper' $TMP_FSTAB && helptext=" /dev/mapper/ users: Pay attention to the kernel line!" - notify "Before installing GRUB, you must review the configuration file. You will now be put into the editor. After you save your changes and exit the editor, you can install GRUB.$helptext" - seteditor || return 1 - $EDITOR $grubmenu -} - interactive_grub_install () { debug FS "interactive_grub_install called. P1 = $1, P2 = $2, P3 = $3" # $1 = bootpart @@ -1120,6 +1111,21 @@ EOF fi } +# $1 - Bootloader Name +# $2 - Bootloader Configuration Files +interactive_bootloader_menu() { + if [[ $1 = grub ]]; then + generate_grub_menulst + fi + + grep -q '^/dev/mapper' $TMP_FSTAB && local helptext=" /dev/mapper/ users: Pay attention to the kernel line!" + notify "Before installing $1, you must review the configuration file. You will now be put into the editor. After you save your changes and exit the editor, you can install $1.$helptext" + + seteditor || return 1 + + $EDITOR $2 +} + get_kernel_parameters() { get_device_with_mount '/' || return 1 local rootpart="$ANSWER_DEVICE" -- 1.7.4.1
On Sun, 27 Feb 2011 11:55:16 -0500 pyther@pyther.net wrote:
Function was updated to be flexible with the use of multiple bootloaders --- current tense... please...
Dieter
On 02/27/2011 01:16 PM, Dieter Plaetinck wrote:
On Sun, 27 Feb 2011 11:55:16 -0500 pyther@pyther.net wrote:
Function was updated to be flexible with the use of multiple bootloaders --- current tense... please...
Dieter Better?
Update function to be flexible with the use of multiple bootloaders
On Sun, 27 Feb 2011 13:22:06 -0500 Matthew Gyurgyik <pyther@pyther.net> wrote:
On 02/27/2011 01:16 PM, Dieter Plaetinck wrote:
On Sun, 27 Feb 2011 11:55:16 -0500 pyther@pyther.net wrote:
Function was updated to be flexible with the use of multiple bootloaders --- current tense... please...
Dieter Better?
Update function to be flexible with the use of multiple bootloaders
yes..
--- src/core/libs/lib-blockdevices-filesystems.sh | 1 + src/core/libs/lib-ui-interactive.sh | 32 ++++++++++++++++-------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh index ac749a3..5bf181e 100644 --- a/src/core/libs/lib-blockdevices-filesystems.sh +++ b/src/core/libs/lib-blockdevices-filesystems.sh @@ -93,6 +93,7 @@ get_possible_fs () { done } +supported_bootloaders=('grub') # procedural code from quickinst functionized and fixed. # there were functions like this in the setup script too, with some subtle differences. see below diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index 062c420..be31440 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -2,7 +2,7 @@ # A library which allows you to do backend stuff by using user interfaces # Global Variables -grubmenu="/boot/grub/menu.lst" # be sure to override this if you have it somewhere else +grubmenu="/boot/grub/menu.lst" # check if a worker has completed successfully. if not -> tell user he must do it + return 1 # if ok -> don't warn anything and return 0 @@ -709,12 +709,13 @@ device type label size type create? mountpoint options label params" required "$ # params: none # returns: 1 on error interactive_select_packages() { + local needed_pkgs=() # set up our install location if necessary and sync up so we can get package lists target_prepare_pacman || { show_warning 'Pacman preparation failure' "Pacman preparation failed! Check $LOG for errors."; return 1; } repos=`list_pacman_repos target` - notify "Package selection is split into two stages. First you will select package groups that contain packages you may be interested in. Then you will be presented with a full list of packages for each group, allowing you to fine-tune.\n\n + notify "Package selection is split into three stages. First, you will select a bootloader. Then, you will select package groups that contain packages that you may be interested in. Lastly, you will be presented with a full list of packages for each group, allowing you to fine-tune.\n\n Note that right now the packages (and groups) selection is limited to the repos available at this time ($repos). Once you have your Arch system up and running, you have access to more repositories and packages.\n\n If any previous configuration you've done until now (like fancy filesystems) require extra packages, we've already preselected them for your convenience" @@ -724,6 +725,14 @@ If any previous configuration you've done until now (like fancy filesystems) req grouplist+=(${i} - OFF) done + ask_option no "Choose bootloader" "Which bootloader would you like to use?" optional \ + "grub" "GRUB bootloader" + + bootloader=$ANSWER_OPTION + + # Make sure selected bootloader is a supported_bootloader and mark bootloader for installation + check_is_in $bootloader "${supported_bootloaders[@]}" && needed_pkgs+=("$bootloader") + ask_checklist "Select Package groups\nDo not deselect base unless you know what you're doing!" 0 "${grouplist[@]}" || return 1 grouplist=("${ANSWER_CHECKLIST[@]}") @@ -731,9 +740,11 @@ If any previous configuration you've done until now (like fancy filesystems) req local pkgall=($(list_packages repo core | cut -d ' ' -f2)) pkginfo "${pkgall[@]}" + # packages that should be marked for installation + needed_pkgs=("${needed_pkgs_fs[@]}") + # build the list of options, sorted primarily by group, then by packagename (this is already). marking where appropriate local pkglist=() - needed_pkgs=("${needed_pkgs_fs[@]}") while read pkgname pkgver pkggroup pkgdesc; do mark=OFF if check_is_in "$pkggroup" "${grouplist[@]}" || check_is_in $pkgname "${needed_pkgs[@]}"; then @@ -842,15 +853,14 @@ interactive_runtime_network() { return 0 } +# bootloader is global variable that gets set in interactive_select_packages interactive_install_bootloader () { - ask_option Grub "Choose bootloader" "Which bootloader would you like to use? Grub is the Arch default." required \ - "Grub" "Use the GRUB bootloader (default)" \ - "None" "\Zb\Z1Warning\Z0\ZB: you must install your own bootloader!" || return 1 - - bl=`tr '[:upper:]' '[:lower:]' <<< "$ANSWER_OPTION"` - [ "$bl" != grub ] && return 0 - GRUB_OK=0 - interactive_grub + if [[ $bootloader = grub ]]; then + GRUB_OK=0 + interactive_grub + else + show_warning 'No Bootloader' 'You did not select a bootloader. No bootloader will be installed.' && return 0 + fi } interactive_grub() { -- 1.7.4.1
On Sun, 27 Feb 2011 11:55:17 -0500 pyther@pyther.net wrote:
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index 062c420..be31440 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -2,7 +2,7 @@ # A library which allows you to do backend stuff by using user interfaces
# Global Variables -grubmenu="/boot/grub/menu.lst" # be sure to override this if you have it somewhere else +grubmenu="/boot/grub/menu.lst"
why do you remove the comment?
+ + bootloader=$ANSWER_OPTION + + # Make sure selected bootloader is a supported_bootloader and mark bootloader for installation + check_is_in $bootloader "${supported_bootloaders[@]}" && needed_pkgs+=("$bootloader") + ask_checklist "Select Package groups\nDo not deselect base unless you know what you're doing!" 0 "${grouplist[@]}" || return 1 grouplist=("${ANSWER_CHECKLIST[@]}")
@@ -731,9 +740,11 @@ If any previous configuration you've done until now (like fancy filesystems) req local pkgall=($(list_packages repo core | cut -d ' ' -f2)) pkginfo "${pkgall[@]}"
+ # packages that should be marked for installation + needed_pkgs=("${needed_pkgs_fs[@]}") + # build the list of options, sorted primarily by group, then by packagename (this is already). marking where appropriate local pkglist=() - needed_pkgs=("${needed_pkgs_fs[@]}")
why did you rearrange this?
while read pkgname pkgver pkggroup pkgdesc; do mark=OFF if check_is_in "$pkggroup" "${grouplist[@]}" || check_is_in $pkgname "${needed_pkgs[@]}"; then @@ -842,15 +853,14 @@ interactive_runtime_network() { return 0 }
+# bootloader is global variable that gets set in interactive_select_packages interactive_install_bootloader () { - ask_option Grub "Choose bootloader" "Which bootloader would you like to use? Grub is the Arch default." required \ - "Grub" "Use the GRUB bootloader (default)" \ - "None" "\Zb\Z1Warning\Z0\ZB: you must install your own bootloader!" || return 1 - - bl=`tr '[:upper:]' '[:lower:]' <<< "$ANSWER_OPTION"` - [ "$bl" != grub ] && return 0 - GRUB_OK=0 - interactive_grub + if [[ $bootloader = grub ]]; then + GRUB_OK=0 + interactive_grub + else + show_warning 'No Bootloader' 'You did not select a bootloader. No bootloader will be installed.' && return 0 + fi }
I would make the exitcode a bit more obvious put 'return 0' at the end of the function, remove it from the 'no bootloader' warning and write interactive_grub || return 1 Dieter
interactive_syslinux depends on the syslinux-install_update script that is in the Arch Syslinux package. --- src/core/libs/lib-blockdevices-filesystems.sh | 3 +- src/core/libs/lib-ui-interactive.sh | 143 ++++++++++++++++++++++++- src/core/procedures/base | 1 + 3 files changed, 145 insertions(+), 2 deletions(-) diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh index 5bf181e..cd17c72 100644 --- a/src/core/libs/lib-blockdevices-filesystems.sh +++ b/src/core/libs/lib-blockdevices-filesystems.sh @@ -93,7 +93,8 @@ get_possible_fs () { done } -supported_bootloaders=('grub') +syslinux_supported_fs=('ext2' 'ext3' 'ext4' 'btrfs' 'vfat') +supported_bootloaders=('syslinux' 'grub') # procedural code from quickinst functionized and fixed. # there were functions like this in the setup script too, with some subtle differences. see below diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index be31440..7309f6d 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -2,7 +2,9 @@ # A library which allows you to do backend stuff by using user interfaces # Global Variables +# Be sure to override these if you have the configuration file elsewhere grubmenu="/boot/grub/menu.lst" +syslinuxmenu="/boot/syslinux/syslinux.cfg" # check if a worker has completed successfully. if not -> tell user he must do it + return 1 # if ok -> don't warn anything and return 0 @@ -726,7 +728,8 @@ If any previous configuration you've done until now (like fancy filesystems) req done ask_option no "Choose bootloader" "Which bootloader would you like to use?" optional \ - "grub" "GRUB bootloader" + "grub" "GRUB bootloader" \ + "syslinux" "Syslinux bootloader (${syslinux_supported_fs[*]})" bootloader=$ANSWER_OPTION @@ -858,6 +861,8 @@ interactive_install_bootloader () { if [[ $bootloader = grub ]]; then GRUB_OK=0 interactive_grub + elif [[ $bootloader = syslinux ]]; then + interactive_syslinux else show_warning 'No Bootloader' 'You did not select a bootloader. No bootloader will be installed.' && return 0 fi @@ -1121,11 +1126,147 @@ EOF fi } +interactive_syslinux() { + debug FS "starting interactive_syslinux" + + # Find and Store the device that has the root filesystem + get_device_with_mount '/' || return 1 + PART_ROOT="$ANSWER_DEVICE" + + # Gets booot device + get_device_with_mount '/boot' + bootdev="$ANSWER_DEVICE" + + # Check to see if /boot or / (root) has a valid FS type and set bootpart + # bootpart == device with /boot dir + if [[ $bootdev ]]; then + filesystem="$(awk '/ \/boot /{print $4}' $TMP_FILESYSTEMS)" + debug FS "$bootdev - FS type: $filesystem" + + local bootpart="$bootdev" + else + filesystem="$(awk '/ \/ /{print $4}' $TMP_FILESYSTEMS)" + debug FS "$PART_ROOT - FS type: $filesystem" + + local bootpart="$PART_ROOT" + fi + + if ! check_is_in "$filesystem" "${syslinux_supported_fs[@]}"; then + show_warning "Invalid FS" "Error: Syslinux does not support $filesystem.\n\nThe following filesystems are supported:\n ${syslinux_supported_fs[@]}" + return 1 + fi + + # remove default entries by truncating file at our little tag (#-*) + sed -i -e '/#-\*/q' "$syslinuxmenu" + + # Generate menu and prompt user to edit it + interactive_bootloader_menu "syslinux" "$syslinuxmenu" + + if device_is_raid "$bootpart"; then + debug FS "Software RAID detected" + local onraid=true + # Notify the user or trust the scripts? + fi + + debug FS "Installing Syslinux ($var_TARGET_DIR/usr/sbin/syslinux-install_update -i -c /mnt)" + inform "Installing Syslinux..." + if ! "$var_TARGET_DIR/usr/sbin/syslinux-install_update" -i -c /mnt; then + debug FS "FAILED: syslinux-install_update -i -c /mnt failed" + show_warning "FAILED" "syslinux-install_update -i -c /mnt failed" + return 1 + fi + + if ask_yesno "Set boot flag(s) and install the Syslinux MBR?" yes; then + inform "Setting Boot Flag(s)...\nThis could take a while. Please be patient.\n\n" syslinuxprog + "$var_TARGET_DIR/usr/sbin/syslinux-install_update" -a -c /mnt + rt=$? + case "$rt" in + 0) + debug FS "Successfully set boot flag(s)" + ;; + 1) + debug FS "Failed to set boot flag. Function in syslinux-install_update exited with status $rt" + notify "Failed to set boot flag. MBR not installed!" && return 1 + ;; + 3) + debug FS "Failed to set boot flag(s). syslinux-install_update -a exited with status $rt" + notify "Failed to set boot flag(s)! MBR not installed!" && return 1 + ;; + *) + debug FS "Failde to set boot flag(s). syslinux-install_update -a failed with an unkown Error Code - $rt" + notify "Failed to set boot flag(s). MBR not installed" && return 1 + ;; + esac + + inform "Installing Syslinux MBR..." syslinuxprog + "$var_TARGET_DIR/usr/sbin/syslinux-install_update" -m -c /mnt + rt=$? + case "$rt" in + 0) + debug FS "Successfully installed MBR(s)" + ;; + 1) + debug FS "Failed install MBR. Function in syslinux-install_update -m exited with status $rt" + notify "Failed to install the MBR!." && return 1 + ;; + 4) + debug FS "Failed to install MBR. syslinux-install_update -m exited with status $rt" + notify "Failed to install MBR!" && return 1 + ;; + *) + debug FS "Failed to install MBR. syslinux-install_update -m failed with an unkown Error Code - $rt" + notify "Failed to install the MBR!" && return 1 + ;; + esac + fi + notify "Syslinux Installation Successful" +} + +generate_syslinux_menu () { + get_kernel_parameters + + cat >>$syslinuxmenu <<EOF + +# (0) Arch Linux +LABEL arch + MENU LABEL Arch Linux + LINUX ../vmlinuz26 + APPEND $kernel_parameters + INITRD ../kernel26.img + +# (1) Arch Linux Fallback +LABEL archfallback + MENU LABEL Arch Linux Fallback + LINUX ../vmlinuz26 + APPEND $kernel_parameters + INITRD ../kernel26-fallback.img + +# (2) Windows +#LABEL windows +#COM32 chain.c32 +#APPEND hd0 0 + +LABEL hdt + MENU LABEL HDT (Hardware Detection Tool) + COM32 hdt.c32 + +LABEL reboot + MENU LABEL Reboot + COM32 reboot.c32 + +LABEL off + MENU LABEL Power Off + COMBOOT poweroff.com +EOF +} + # $1 - Bootloader Name # $2 - Bootloader Configuration Files interactive_bootloader_menu() { if [[ $1 = grub ]]; then generate_grub_menulst + elif [[ $1 = syslinux ]]; then + generate_syslinux_menu fi grep -q '^/dev/mapper' $TMP_FSTAB && local helptext=" /dev/mapper/ users: Pay attention to the kernel line!" diff --git a/src/core/procedures/base b/src/core/procedures/base index 3ff66b4..bab079b 100644 --- a/src/core/procedures/base +++ b/src/core/procedures/base @@ -11,6 +11,7 @@ var_UI_TYPE="cli" # set to cli or dia for dialog var_ARCH=`uname -m` #i686 or x86_64. NOTE: this assumes you want to install the same arch as the installation environment you're using. maybe we could decouple those someday.. [ -z "$var_ARCH" ] && die_error "Could not determine your architecture" grubmenu="$var_TARGET_DIR$grubmenu" +syslinuxmenu="$var_TARGET_DIR$syslinuxmenu" ###### Phases ( can be overridden by more specific procedures) ###### phase_preparation=(\ -- 1.7.4.1
On Sun, 27 Feb 2011 11:55:18 -0500 pyther@pyther.net wrote:
interactive_syslinux depends on the syslinux-install_update script that is in the Arch Syslinux package. --- src/core/libs/lib-blockdevices-filesystems.sh | 3 +- src/core/libs/lib-ui-interactive.sh | 143 ++++++++++++++++++++++++- src/core/procedures/base | 1 + 3 files changed, 145 insertions(+), 2 deletions(-)
diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh index 5bf181e..cd17c72 100644 --- a/src/core/libs/lib-blockdevices-filesystems.sh +++ b/src/core/libs/lib-blockdevices-filesystems.sh @@ -93,7 +93,8 @@ get_possible_fs () { done }
-supported_bootloaders=('grub') +syslinux_supported_fs=('ext2' 'ext3' 'ext4' 'btrfs' 'vfat') +supported_bootloaders=('syslinux' 'grub')
# procedural code from quickinst functionized and fixed. # there were functions like this in the setup script too, with some subtle differences. see below diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index be31440..7309f6d 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -2,7 +2,9 @@ # A library which allows you to do backend stuff by using user interfaces
# Global Variables +# Be sure to override these if you have the configuration file elsewhere grubmenu="/boot/grub/menu.lst" +syslinuxmenu="/boot/syslinux/syslinux.cfg"
# check if a worker has completed successfully. if not -> tell user he must do it + return 1 # if ok -> don't warn anything and return 0 @@ -726,7 +728,8 @@ If any previous configuration you've done until now (like fancy filesystems) req done
ask_option no "Choose bootloader" "Which bootloader would you like to use?" optional \ - "grub" "GRUB bootloader" + "grub" "GRUB bootloader" \ + "syslinux" "Syslinux bootloader (${syslinux_supported_fs[*]})"
bootloader=$ANSWER_OPTION
@@ -858,6 +861,8 @@ interactive_install_bootloader () { if [[ $bootloader = grub ]]; then GRUB_OK=0 interactive_grub + elif [[ $bootloader = syslinux ]]; then + interactive_syslinux else show_warning 'No Bootloader' 'You did not select a bootloader. No bootloader will be installed.' && return 0 fi @@ -1121,11 +1126,147 @@ EOF fi }
+interactive_syslinux() { + debug FS "starting interactive_syslinux" + + # Find and Store the device that has the root filesystem + get_device_with_mount '/' || return 1 + PART_ROOT="$ANSWER_DEVICE" + + # Gets booot device + get_device_with_mount '/boot' + bootdev="$ANSWER_DEVICE" + + # Check to see if /boot or / (root) has a valid FS type and set bootpart + # bootpart == device with /boot dir + if [[ $bootdev ]]; then + filesystem="$(awk '/ \/boot /{print $4}' $TMP_FILESYSTEMS)" + debug FS "$bootdev - FS type: $filesystem" + + local bootpart="$bootdev" + else + filesystem="$(awk '/ \/ /{print $4}' $TMP_FILESYSTEMS)" + debug FS "$PART_ROOT - FS type: $filesystem" + + local bootpart="$PART_ROOT" + fi + + if ! check_is_in "$filesystem" "${syslinux_supported_fs[@]}"; then + show_warning "Invalid FS" "Error: Syslinux does not support $filesystem.\n\nThe following filesystems are supported:\n ${syslinux_supported_fs[@]}" + return 1 + fi + + # remove default entries by truncating file at our little tag (#-*) + sed -i -e '/#-\*/q' "$syslinuxmenu" + + # Generate menu and prompt user to edit it + interactive_bootloader_menu "syslinux" "$syslinuxmenu" + + if device_is_raid "$bootpart"; then + debug FS "Software RAID detected" + local onraid=true + # Notify the user or trust the scripts? + fi + + debug FS "Installing Syslinux ($var_TARGET_DIR/usr/sbin/syslinux-install_update -i -c /mnt)" + inform "Installing Syslinux..." + if ! "$var_TARGET_DIR/usr/sbin/syslinux-install_update" -i -c /mnt; then + debug FS "FAILED: syslinux-install_update -i -c /mnt failed" + show_warning "FAILED" "syslinux-install_update -i -c /mnt failed" + return 1 + fi + + if ask_yesno "Set boot flag(s) and install the Syslinux MBR?" yes; then + inform "Setting Boot Flag(s)...\nThis could take a while. Please be patient.\n\n" syslinuxprog + "$var_TARGET_DIR/usr/sbin/syslinux-install_update" -a -c /mnt + rt=$? + case "$rt" in + 0) + debug FS "Successfully set boot flag(s)" + ;; + 1) + debug FS "Failed to set boot flag. Function in syslinux-install_update exited with status $rt" + notify "Failed to set boot flag. MBR not installed!" && return 1 + ;; + 3) + debug FS "Failed to set boot flag(s). syslinux-install_update -a exited with status $rt" + notify "Failed to set boot flag(s)! MBR not installed!" && return 1 + ;; + *) + debug FS "Failde to set boot flag(s). syslinux-install_update -a failed with an unkown Error Code - $rt" + notify "Failed to set boot flag(s). MBR not installed" && return 1 + ;; + esac
It's not clear what the difference is between 1 and 3. ("function in syslinux-install_update failed", vs "syslinux-install_update failed" ?) Also, does the script ever return anything else then 0/1/3? it seems to me this section can be shorter and simpler.
+ + inform "Installing Syslinux MBR..." syslinuxprog + "$var_TARGET_DIR/usr/sbin/syslinux-install_update" -m -c /mnt + rt=$? + case "$rt" in + 0) + debug FS "Successfully installed MBR(s)" + ;; + 1) + debug FS "Failed install MBR. Function in syslinux-install_update -m exited with status $rt" + notify "Failed to install the MBR!." && return 1 + ;; + 4) + debug FS "Failed to install MBR. syslinux-install_update -m exited with status $rt" + notify "Failed to install MBR!" && return 1 + ;; + *) + debug FS "Failed to install MBR. syslinux-install_update -m failed with an unkown Error Code - $rt" + notify "Failed to install the MBR!" && return 1 + ;; + esac + fi + notify "Syslinux Installation Successful" +}
same remark here.
+ +generate_syslinux_menu () { + get_kernel_parameters + + cat >>$syslinuxmenu <<EOF + +# (0) Arch Linux +LABEL arch + MENU LABEL Arch Linux + LINUX ../vmlinuz26 + APPEND $kernel_parameters + INITRD ../kernel26.img + +# (1) Arch Linux Fallback +LABEL archfallback + MENU LABEL Arch Linux Fallback + LINUX ../vmlinuz26 + APPEND $kernel_parameters + INITRD ../kernel26-fallback.img + +# (2) Windows +#LABEL windows +#COM32 chain.c32 +#APPEND hd0 0 + +LABEL hdt + MENU LABEL HDT (Hardware Detection Tool) + COM32 hdt.c32 + +LABEL reboot + MENU LABEL Reboot + COM32 reboot.c32 + +LABEL off + MENU LABEL Power Off + COMBOOT poweroff.com +EOF +} + # $1 - Bootloader Name # $2 - Bootloader Configuration Files interactive_bootloader_menu() { if [[ $1 = grub ]]; then generate_grub_menulst + elif [[ $1 = syslinux ]]; then + generate_syslinux_menu fi
grep -q '^/dev/mapper' $TMP_FSTAB && local helptext=" /dev/mapper/ users: Pay attention to the kernel line!" diff --git a/src/core/procedures/base b/src/core/procedures/base index 3ff66b4..bab079b 100644 --- a/src/core/procedures/base +++ b/src/core/procedures/base @@ -11,6 +11,7 @@ var_UI_TYPE="cli" # set to cli or dia for dialog var_ARCH=`uname -m` #i686 or x86_64. NOTE: this assumes you want to install the same arch as the installation environment you're using. maybe we could decouple those someday.. [ -z "$var_ARCH" ] && die_error "Could not determine your architecture" grubmenu="$var_TARGET_DIR$grubmenu" +syslinuxmenu="$var_TARGET_DIR$syslinuxmenu"
###### Phases ( can be overridden by more specific procedures) ###### phase_preparation=(\
participants (3)
-
Dieter Plaetinck
-
Matthew Gyurgyik
-
pyther@pyther.net