++ test -e /dev/sdb ++ : ++ case "$host_os" in ++ case $1 in +++ echo /dev/sdb +++ sed -e 's%\([sh]d[a-z]\)[0-9]*$%\1%' -e 's%\(d[0-9]*\)p[0-9]*$%\1%' -e 's%\(fd[0-9]*\)$%\1%' -e 's%/part[0-9]*$%/disc%' -e 's%\(c[0-7]d[0-9]*\).*$%\1%' -e 's%\(e[0-9]\.[0-9]*\).*$%\1%' ++ tmp_disk=/dev/sdb +++ echo /dev/sdb +++ sed -e 's%.*/[sh]d[a-z]\([0-9]*\)$%\1%' -e 's%.*d[0-9]*p%%' -e 's%.*/fd[0-9]*$%%' -e 's%.*/floppy/[0-9]*$%%' -e 's%.*/\(disc\|part\([0-9]*\)\)$%\2%' -e 's%.*c[0-7]d[0-9]*p*%%' -e 's%.*e[0-9]\.[0-9]*p%%' -e 's%.*e[0-9]\.[0-9]*$%%' ++ tmp_part= +++ grep -v '^#' /boot/grub/device.map +++ grep '/dev/sdb *$' +++ sed 's%.*\(([hf]d[0-9][a-z0-9,]*)\).*%\1%' ++ tmp_drive='(hd1)' ++ test 'x(hd1)' = x ++ test x '!=' x ++ echo '(hd1)' +++ df / +++ sed -n 's%.*\(/dev/[^ ]*\).*%\1%p' ++ tmp_fname=/dev/sda2 ++ test -z /dev/sda2 +++ resolve_symlink /dev/sda2 +++ tmp_fname=/dev/sda2 +++ test -L /dev/sda2 +++ echo /dev/sda2 ++ tmp_fname=/dev/sda2 ++ echo /dev/sda2 +++ df /boot/ +++ sed -n 's%.*\(/dev/[^ ]*\).*%\1%p' ++ tmp_fname=/dev/sda2 ++ test -z /dev/sda2 +++ resolve_symlink /dev/sda2 +++ tmp_fname=/dev/sda2 +++ test -L /dev/sda2 +++ echo /dev/sda2 ++ tmp_fname=/dev/sda2 ++ echo /dev/sda2 ++ test -e /dev/sda2 ++ : ++ case "$host_os" in ++ case $1 in +++ echo /dev/sda2 +++ sed -e 's%\([sh]d[a-z]\)[0-9]*$%\1%' -e 's%\(d[0-9]*\)p[0-9]*$%\1%' -e 's%\(fd[0-9]*\)$%\1%' -e 's%/part[0-9]*$%/disc%' -e 's%\(c[0-7]d[0-9]*\).*$%\1%' -e 's%\(e[0-9]\.[0-9]*\).*$%\1%' ++ tmp_disk=/dev/sda +++ echo /dev/sda2 +++ sed -e 's%.*/[sh]d[a-z]\([0-9]*\)$%\1%' -e 's%.*d[0-9]*p%%' -e 's%.*/fd[0-9]*$%%' -e 's%.*/floppy/[0-9]*$%%' -e 's%.*/\(disc\|part\([0-9]*\)\)$%\2%' -e 's%.*c[0-7]d[0-9]*p*%%' -e 's%.*e[0-9]\.[0-9]*p%%' -e 's%.*e[0-9]\.[0-9]*$%%' ++ tmp_part=2 +++ grep -v '^#' /boot/grub/device.map +++ grep '/dev/sda *$' +++ sed 's%.*\(([hf]d[0-9][a-z0-9,]*)\).*%\1%' ++ tmp_drive='(hd0)' ++ test 'x(hd0)' = x ++ test x2 '!=' x ++ case "$host_os" in ++ echo '(hd0)' +++ expr 2 - 1 ++ sed 's%)$%,1)%' +++ df /boot/grub/ +++ sed -n 's%.*\(/dev/[^ ]*\).*%\1%p' ++ tmp_fname=/dev/sda2 ++ test -z /dev/sda2 +++ resolve_symlink /dev/sda2 +++ tmp_fname=/dev/sda2 +++ test -L /dev/sda2 +++ echo /dev/sda2 ++ tmp_fname=/dev/sda2 ++ echo /dev/sda2 Searching for GRUB installation directory ... found: /boot/grub The file /boot/grub/stage1 not read correctly.