diff -u syslinux-3.63+dfsg/debian/changelog syslinux-3.63+dfsg/debian/changelog --- syslinux-3.63+dfsg/debian/changelog +++ syslinux-3.63+dfsg/debian/changelog @@ -1,3 +1,9 @@ +syslinux (2:3.63+dfsg-2ubuntu4) jaunty; urgency=low + + * MBR: BIOS bug work-around: Ctrl key forces boot from first hard disk (LP: 277903) + + -- TJ Mon, 30 Mar 2009 16:30:00 +0000 + syslinux (2:3.63+dfsg-2ubuntu3) intrepid; urgency=low * Drop mtools back to Recommends now that recommended packages are diff -u syslinux-3.63+dfsg/debian/patches/00list syslinux-3.63+dfsg/debian/patches/00list --- syslinux-3.63+dfsg/debian/patches/00list +++ syslinux-3.63+dfsg/debian/patches/00list @@ -8,0 +9 @@ +15-mbr-ctrl-key-force-first-hard-disk.dpatch only in patch2: unchanged: --- syslinux-3.63+dfsg.orig/debian/patches/15-mbr-ctrl-key-force-first-hard-disk.dpatch +++ syslinux-3.63+dfsg/debian/patches/15-mbr-ctrl-key-force-first-hard-disk.dpatch @@ -0,0 +1,35 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 15-mbr-ctrl-key-force-first-hard-disk.dpatch +## +## DP: MBR use Ctrl key to force boot from first hard disk. + +@DPATCH@ + +diff --git a/mbr/mbr.S b/mbr/mbr.S +index 722d90d..e8be09e 100644 +--- a/mbr/mbr.S ++++ b/mbr/mbr.S +@@ -51,6 +51,7 @@ _start: + movw %ax, %ss + movw $stack, %sp + movw %sp, %si ++ movw %sp, %bp /* needed later if drive number is to be forced due to Ctrl key being pressed */ + pushw %es /* es:di -> $PnP header */ + pushw %di + pushw %dx /* dl -> drive number */ +@@ -66,6 +67,15 @@ _start: + ljmpw $0, $next + + next: ++ /* Provide a way for the user to force boot from first hard-disk by pressing a Ctrl key */ ++get_shift_keys: /* Provide a way for the user to force CHS addressing mode by pressing either Shift key */ ++ testb $0x04, 0x0417 /* I/O memory-mapped keyboard shift flags: control key pressed? */ ++ jz detect_bios_type ++force_first_hard_disk: ++ movb $0x80, -6(%bp) /* offset from top-of-stack to drive number; force it to be first hard disk */ ++ movb $0x80, %dl /* change the drive number about to be used in detect_bios_type */ ++ ++detect_bios_type: + /* Check to see if we have EBIOS */ + pushw %dx /* drive number */ + movb $0x41, %ah /* %al == 0 already */