X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=scripts%2Fbootgrub.mksh;h=8aa234947017b78fb01039a38517f65a4069a303;hb=f5b2bf83a696e5e9d625e867abd5a688ea56d5b2;hp=7bbe2898e5f2dd51a4834a336d62462e78a8c3c6;hpb=aefb34fc861b4225134d7c0a6cbc512fd9d9bf6c;p=grml-live.git diff --git a/scripts/bootgrub.mksh b/scripts/bootgrub.mksh index 7bbe289..8aa2349 100644 --- a/scripts/bootgrub.mksh +++ b/scripts/bootgrub.mksh @@ -1,6 +1,6 @@ #!/usr/bin/env mksh # $Id$ -# $miros: src/sys/arch/i386/stand/bootxx/mkbxinst.sh,v 1.18 2009/06/07 13:07:46 tg Exp $ +# $miros: src/sys/arch/i386/stand/bootxx/mkbxinst.sh,v 1.20 2009/06/07 18:00:43 tg Exp $ #- # Copyright (c) 2007, 2008, 2009 # Thorsten Glaser @@ -140,7 +140,7 @@ if (( g_code[0] )); then if (( g_code[0] < 1 || g_code[1] < 1 || g_code[1] > 256 || g_code[2] < 1 || g_code[2] > 63 )); then print -u2 Invalid geometry, values out of bounds. - elif [[ $(print "(${g_code[0]} * ${g_code[1]} * {g_code[2]})" \ + elif [[ $(print "(${g_code[0]} * ${g_code[1]} * ${g_code[2]})" \ "> 4294967295" | bc) = 1 ]]; then print -u2 Invalid geometry, more than 2 TiB of data. else @@ -222,7 +222,7 @@ if (( psz )); then thecode[mbrpno++]=0 (( thecode[mbrpno++] = (partp ? partp : 0x27) )) (( thecode[mbrpno++] = g_code[1] - 1 )) - (( cylno = g_code[0] > 1023 ? 1023 : g_code[0] )) + (( cylno = g_code[0] > 1024 ? 1023 : g_code[0] - 1 )) (( thecode[mbrpno++] = g_code[2] | ((cylno & 0x0300) >> 2) )) (( thecode[mbrpno++] = cylno & 0x00FF )) thecode[mbrpno++]=0