Skip to content

Commit

Permalink
Merge pull request #1031 from schabrolles/PPC_bootloader_support
Browse files Browse the repository at this point in the history
identify and define bootloader for POWER arch
  • Loading branch information
gdha committed Oct 10, 2016
2 parents 518bbcd + e8b7614 commit 6076726
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ case $myBOOTloader in
;;
ELILO) CHECK_CONFIG_FILES=( ${CHECK_CONFIG_FILES[@]} /etc/elilo.conf )
;;
PPC) CHECK_CONFIG_FILES=( ${CHECK_CONFIG_FILES[@]} /etc/lilo.conf /etc/yaboot.conf)
;;
*) BugError "Unknown bootloader ($myBOOTloader) - ask for sponsoring to get this fixed"
;;
esac
8 changes: 7 additions & 1 deletion usr/share/rear/prep/default/50_guess_bootloader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ for disk in /sys/block/* ; do
blockd=${disk#/sys/block/}
if [[ $blockd = hd* || $blockd = sd* || $blockd = cciss* || $blockd = vd* || $blockd = xvd* ]] ; then
devname=$(get_device_name $disk)

# Check if devname contains a PPC PreP boot partition (ID=0x41)
if $(file -s $devname | grep ID=0x41 >/dev/null) ; then
echo "PPC" >$VAR_DIR/recovery/bootloader
return
fi

dd if=$devname bs=512 count=4 | strings > $TMP_DIR/bootloader
grep -q "EFI" $TMP_DIR/bootloader && {
echo "EFI" >$VAR_DIR/recovery/bootloader
Expand All @@ -29,4 +36,3 @@ for disk in /sys/block/* ; do
cat $TMP_DIR/bootloader >&2
fi
done

0 comments on commit 6076726

Please sign in to comment.