[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [RFH] Test of new grub package



On Saturday 12 November 2005 18:36, Frans Pop wrote:
> An strace for both first and second run are attached.

I've also made a log of the output of the grub-install script with set -x.

It turns out I can reproduce the problem by running 'rm -rf /boot/grub' 
before running the grub-install script.

+ prefix=/
+ exec_prefix=/
+ sbindir=//sbin
+ libdir=//lib
+ PACKAGE=grub
+ VERSION=0.97
+ host_cpu=i386
+ host_os=linux-gnu
+ host_vendor=pc
+ pkglibdir=//lib/grub/i386-pc
+ grub_shell=//sbin/grub
+ grub_set_default=//sbin/grub-set-default
+ log_file=/tmp/grub-install.log.22723
+ img_file=/tmp/grub-install.img.22723
+ rootdir=
+ grub_prefix=/boot/grub
+ install_device=
+ no_floppy=
+ force_lba=
+ recheck=no
+ debug=no
+ test -x /bin/tempfile
+ mklog='/bin/tempfile --prefix=grub'
+ mkimg='/bin/tempfile --prefix=grub'
+ for option in '"$@"'
+ case "$option" in
+ recheck=yes
+ for option in '"$@"'
+ case "$option" in
+ no_floppy=--no-floppy
+ for option in '"$@"'
+ case "$option" in
+ test x '!=' x
+ install_device='(hd0)'
+ test 'x(hd0)' = x
+ test no = yes
+ case "$host_os" in
+ bootdir=/boot
+ grubdir=/boot/grub
+ device_map=/boot/grub/device.map
+ set //sbin/grub dummy
+ test -f //sbin/grub
+ :
+ test -f //lib/grub/i386-pc/stage1
+ :
+ test -f //lib/grub/i386-pc/stage2
+ :
+ test -d /boot
+ test -d /boot/grub
+ mkdir /boot/grub
+ test yes = yes
+ rm -f /boot/grub/device.map
+ test -f /boot/grub/device.map
+ test -n '/bin/tempfile --prefix=grub'
++ /bin/tempfile --prefix=grub
+ log_file=/tmp/grubAS4eAh
+ sync
+ //sbin/grub --batch --no-floppy --device-map=/boot/grub/device.map
Probing devices to guess BIOS drives. This may take a long time.
+ grep 'Error [0-9]*: ' /tmp/grubAS4eAh
+ rm -f /tmp/grubAS4eAh
++ sort
++ uniq -d
++ sed -n 1p
++ sed -n '/^([fh]d[0-9]*)/s/\(^(.*)\).*/\1/p' /boot/grub/device.map
+ tmp=
+ test -n ''
+ case "$install_device" in
+ install_drive='(hd0)'
++ find_device
+++ df /
+++ sed -n 's%.*\(/dev/[^ 	]*\).*%\1%p'
++ tmp_fname=/dev/sda1
++ test -z /dev/sda1
+++ resolve_symlink /dev/sda1
+++ tmp_fname=/dev/sda1
+++ test -L /dev/sda1
+++ echo /dev/sda1
++ tmp_fname=/dev/sda1
++ echo /dev/sda1
+ root_device=/dev/sda1
++ find_device /boot
+++ df /boot/
+++ sed -n 's%.*\(/dev/[^ 	]*\).*%\1%p'
++ tmp_fname=/dev/sda1
++ test -z /dev/sda1
+++ resolve_symlink /dev/sda1
+++ tmp_fname=/dev/sda1
+++ test -L /dev/sda1
+++ echo /dev/sda1
++ tmp_fname=/dev/sda1
++ echo /dev/sda1
+ bootdir_device=/dev/sda1
+ test x/dev/sda1 '!=' x/dev/sda1
++ convert /dev/sda1
++ test -e /dev/sda1
++ :
++ case "$host_os" in
++ case $1 in
+++ echo /dev/sda1
+++ 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%'
++ tmp_disk=/dev/sda
+++ echo /dev/sda1
+++ 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%%'
++ tmp_part=1
+++ grep -v '^#' /boot/grub/device.map
+++ grep '/dev/sda *$'
+++ sed 's%.*\(([hf]d[0-9][a-g0-9,]*)\).*%\1%'
++ tmp_drive='(hd0)'
++ test 'x(hd0)' = x
++ test x1 '!=' x
++ case "$host_os" in
++ echo '(hd0)'
+++ expr 1 - 1
++ sed 's%)$%,0)%'
+ root_drive='(hd0,0)'
+ test 'x(hd0,0)' = x
++ find_device /boot/grub
+++ df /boot/grub/
+++ sed -n 's%.*\(/dev/[^ 	]*\).*%\1%p'
++ tmp_fname=/dev/sda1
++ test -z /dev/sda1
+++ resolve_symlink /dev/sda1
+++ tmp_fname=/dev/sda1
+++ test -L /dev/sda1
+++ echo /dev/sda1
++ tmp_fname=/dev/sda1
++ echo /dev/sda1
+ grubdir_device=/dev/sda1
+ test x/dev/sda1 '!=' x/dev/sda1
+ for file in '${grubdir}/stage1' '${grubdir}/stage2' '${grubdir}/*stage1_5'
+ rm -f /boot/grub/stage1
+ for file in '${grubdir}/stage1' '${grubdir}/stage2' '${grubdir}/*stage1_5'
+ rm -f /boot/grub/stage2
+ for file in '${grubdir}/stage1' '${grubdir}/stage2' '${grubdir}/*stage1_5'
+ rm -f '/boot/grub/*stage1_5'
+ for file in '${pkglibdir}/stage1' '${pkglibdir}/stage2' '${pkglibdir}/*stage1_5'
+ cp -f //lib/grub/i386-pc/stage1 /boot/grub
+ for file in '${pkglibdir}/stage1' '${pkglibdir}/stage2' '${pkglibdir}/*stage1_5'
+ cp -f //lib/grub/i386-pc/stage2 /boot/grub
+ for file in '${pkglibdir}/stage1' '${pkglibdir}/stage2' '${pkglibdir}/*stage1_5'
+ cp -f //lib/grub/i386-pc/e2fs_stage1_5 /boot/grub
+ for file in '${pkglibdir}/stage1' '${pkglibdir}/stage2' '${pkglibdir}/*stage1_5'
+ cp -f //lib/grub/i386-pc/fat_stage1_5 /boot/grub
+ for file in '${pkglibdir}/stage1' '${pkglibdir}/stage2' '${pkglibdir}/*stage1_5'
+ cp -f //lib/grub/i386-pc/jfs_stage1_5 /boot/grub
+ for file in '${pkglibdir}/stage1' '${pkglibdir}/stage2' '${pkglibdir}/*stage1_5'
+ cp -f //lib/grub/i386-pc/minix_stage1_5 /boot/grub
+ for file in '${pkglibdir}/stage1' '${pkglibdir}/stage2' '${pkglibdir}/*stage1_5'
+ cp -f //lib/grub/i386-pc/reiserfs_stage1_5 /boot/grub
+ for file in '${pkglibdir}/stage1' '${pkglibdir}/stage2' '${pkglibdir}/*stage1_5'
+ cp -f //lib/grub/i386-pc/xfs_stage1_5 /boot/grub
+ //sbin/grub-set-default --root-directory= default
+ test -n '/bin/tempfile --prefix=grub'
++ /bin/tempfile --prefix=grub
+ img_file=/tmp/grubShsYrU
+ test -n '/bin/tempfile --prefix=grub'
++ /bin/tempfile --prefix=grub
+ log_file=/tmp/grubBgqdRS
+ for file in '${grubdir}/stage1' '${grubdir}/stage2' '${grubdir}/*stage1_5'
+ count=5
++ echo /boot/grub/stage1
++ sed 's|^/boot/grub|/boot/grub|'
+ tmp=/boot/grub/stage1
+ test 5 -gt 0
+ //sbin/grub --batch --no-floppy --device-map=/boot/grub/device.map
+ prefix=/
+ exec_prefix=/
+ sbindir=//sbin
+ libdir=//lib
+ PACKAGE=grub
+ VERSION=0.97
+ host_cpu=i386
+ host_os=linux-gnu
+ host_vendor=pc
+ pkglibdir=//lib/grub/i386-pc
+ grub_shell=//sbin/grub
+ grub_set_default=//sbin/grub-set-default
+ log_file=/tmp/grub-install.log.23477
+ img_file=/tmp/grub-install.img.23477
+ rootdir=
+ grub_prefix=/boot/grub
+ install_device=
+ no_floppy=
+ force_lba=
+ recheck=no
+ debug=no
+ test -x /bin/tempfile
+ mklog='/bin/tempfile --prefix=grub'
+ mkimg='/bin/tempfile --prefix=grub'
+ for option in '"$@"'
+ case "$option" in
+ recheck=yes
+ for option in '"$@"'
+ case "$option" in
+ no_floppy=--no-floppy
+ for option in '"$@"'
+ case "$option" in
+ test x '!=' x
+ install_device='(hd0)'
+ test 'x(hd0)' = x
+ test no = yes
+ case "$host_os" in
+ bootdir=/boot
+ grubdir=/boot/grub
+ device_map=/boot/grub/device.map
+ set //sbin/grub dummy
+ test -f //sbin/grub
+ :
+ test -f //lib/grub/i386-pc/stage1
+ :
+ test -f //lib/grub/i386-pc/stage2
+ :
+ test -d /boot
+ test -d /boot/grub
+ test yes = yes
+ rm -f /boot/grub/device.map
+ test -f /boot/grub/device.map
+ test -n '/bin/tempfile --prefix=grub'
++ /bin/tempfile --prefix=grub
+ log_file=/tmp/grubLoZV0e
+ sync
+ //sbin/grub --batch --no-floppy --device-map=/boot/grub/device.map
Probing devices to guess BIOS drives. This may take a long time.
+ grep 'Error [0-9]*: ' /tmp/grubLoZV0e
+ rm -f /tmp/grubLoZV0e
++ sed -n '/^([fh]d[0-9]*)/s/\(^(.*)\).*/\1/p' /boot/grub/device.map
++ sort
++ uniq -d
++ sed -n 1p
+ tmp=
+ test -n ''
+ case "$install_device" in
+ install_drive='(hd0)'
++ find_device
+++ df /
+++ sed -n 's%.*\(/dev/[^ 	]*\).*%\1%p'
++ tmp_fname=/dev/sda1
++ test -z /dev/sda1
+++ resolve_symlink /dev/sda1
+++ tmp_fname=/dev/sda1
+++ test -L /dev/sda1
+++ echo /dev/sda1
++ tmp_fname=/dev/sda1
++ echo /dev/sda1
+ root_device=/dev/sda1
++ find_device /boot
+++ df /boot/
+++ sed -n 's%.*\(/dev/[^ 	]*\).*%\1%p'
++ tmp_fname=/dev/sda1
++ test -z /dev/sda1
+++ resolve_symlink /dev/sda1
+++ tmp_fname=/dev/sda1
+++ test -L /dev/sda1
+++ echo /dev/sda1
++ tmp_fname=/dev/sda1
++ echo /dev/sda1
+ bootdir_device=/dev/sda1
+ test x/dev/sda1 '!=' x/dev/sda1
++ convert /dev/sda1
++ test -e /dev/sda1
++ :
++ case "$host_os" in
++ case $1 in
+++ echo /dev/sda1
+++ 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%'
++ tmp_disk=/dev/sda
+++ echo /dev/sda1
+++ 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%%'
++ tmp_part=1
+++ grep '/dev/sda *$'
+++ sed 's%.*\(([hf]d[0-9][a-g0-9,]*)\).*%\1%'
+++ grep -v '^#' /boot/grub/device.map
++ tmp_drive='(hd0)'
++ test 'x(hd0)' = x
++ test x1 '!=' x
++ case "$host_os" in
++ echo '(hd0)'
+++ expr 1 - 1
++ sed 's%)$%,0)%'
+ root_drive='(hd0,0)'
+ test 'x(hd0,0)' = x
++ find_device /boot/grub
+++ df /boot/grub/
+++ sed -n 's%.*\(/dev/[^ 	]*\).*%\1%p'
++ tmp_fname=/dev/sda1
++ test -z /dev/sda1
+++ resolve_symlink /dev/sda1
+++ tmp_fname=/dev/sda1
+++ test -L /dev/sda1
+++ echo /dev/sda1
++ tmp_fname=/dev/sda1
++ echo /dev/sda1
+ grubdir_device=/dev/sda1
+ test x/dev/sda1 '!=' x/dev/sda1
+ for file in '${grubdir}/stage1' '${grubdir}/stage2' '${grubdir}/*stage1_5'
+ rm -f /boot/grub/stage1
+ for file in '${grubdir}/stage1' '${grubdir}/stage2' '${grubdir}/*stage1_5'
+ rm -f /boot/grub/stage2
+ for file in '${grubdir}/stage1' '${grubdir}/stage2' '${grubdir}/*stage1_5'
+ rm -f /boot/grub/e2fs_stage1_5
+ for file in '${grubdir}/stage1' '${grubdir}/stage2' '${grubdir}/*stage1_5'
+ rm -f /boot/grub/fat_stage1_5
+ for file in '${grubdir}/stage1' '${grubdir}/stage2' '${grubdir}/*stage1_5'
+ rm -f /boot/grub/jfs_stage1_5
+ for file in '${grubdir}/stage1' '${grubdir}/stage2' '${grubdir}/*stage1_5'
+ rm -f /boot/grub/minix_stage1_5
+ for file in '${grubdir}/stage1' '${grubdir}/stage2' '${grubdir}/*stage1_5'
+ rm -f /boot/grub/reiserfs_stage1_5
+ for file in '${grubdir}/stage1' '${grubdir}/stage2' '${grubdir}/*stage1_5'
+ rm -f /boot/grub/xfs_stage1_5
+ for file in '${pkglibdir}/stage1' '${pkglibdir}/stage2' '${pkglibdir}/*stage1_5'
+ cp -f //lib/grub/i386-pc/stage1 /boot/grub
+ for file in '${pkglibdir}/stage1' '${pkglibdir}/stage2' '${pkglibdir}/*stage1_5'
+ cp -f //lib/grub/i386-pc/stage2 /boot/grub
+ for file in '${pkglibdir}/stage1' '${pkglibdir}/stage2' '${pkglibdir}/*stage1_5'
+ cp -f //lib/grub/i386-pc/e2fs_stage1_5 /boot/grub
+ for file in '${pkglibdir}/stage1' '${pkglibdir}/stage2' '${pkglibdir}/*stage1_5'
+ cp -f //lib/grub/i386-pc/fat_stage1_5 /boot/grub
+ for file in '${pkglibdir}/stage1' '${pkglibdir}/stage2' '${pkglibdir}/*stage1_5'
+ cp -f //lib/grub/i386-pc/jfs_stage1_5 /boot/grub
+ for file in '${pkglibdir}/stage1' '${pkglibdir}/stage2' '${pkglibdir}/*stage1_5'
+ cp -f //lib/grub/i386-pc/minix_stage1_5 /boot/grub
+ for file in '${pkglibdir}/stage1' '${pkglibdir}/stage2' '${pkglibdir}/*stage1_5'
+ cp -f //lib/grub/i386-pc/reiserfs_stage1_5 /boot/grub
+ for file in '${pkglibdir}/stage1' '${pkglibdir}/stage2' '${pkglibdir}/*stage1_5'
+ cp -f //lib/grub/i386-pc/xfs_stage1_5 /boot/grub
+ //sbin/grub-set-default --root-directory= default
+ test -n '/bin/tempfile --prefix=grub'
++ /bin/tempfile --prefix=grub
+ img_file=/tmp/grubqRFOwk
+ test -n '/bin/tempfile --prefix=grub'
++ /bin/tempfile --prefix=grub
+ log_file=/tmp/grubZ0HHJn
+ for file in '${grubdir}/stage1' '${grubdir}/stage2' '${grubdir}/*stage1_5'
+ count=5
++ echo /boot/grub/stage1
++ sed 's|^/boot/grub|/boot/grub|'
+ tmp=/boot/grub/stage1
+ test 5 -gt 0
+ //sbin/grub --batch --no-floppy --device-map=/boot/grub/device.map
+ grep 'Error [0-9]*: ' /tmp/grubZ0HHJn
+ cmp /boot/grub/stage1 /tmp/grubqRFOwk
+ break
+ test 5 -eq 0
+ for file in '${grubdir}/stage1' '${grubdir}/stage2' '${grubdir}/*stage1_5'
+ count=5
++ echo /boot/grub/stage2
++ sed 's|^/boot/grub|/boot/grub|'
+ tmp=/boot/grub/stage2
+ test 5 -gt 0
+ //sbin/grub --batch --no-floppy --device-map=/boot/grub/device.map
+ grep 'Error [0-9]*: ' /tmp/grubZ0HHJn
+ cmp /boot/grub/stage2 /tmp/grubqRFOwk
+ break
+ test 5 -eq 0
+ for file in '${grubdir}/stage1' '${grubdir}/stage2' '${grubdir}/*stage1_5'
+ count=5
++ echo /boot/grub/e2fs_stage1_5
++ sed 's|^/boot/grub|/boot/grub|'
+ tmp=/boot/grub/e2fs_stage1_5
+ test 5 -gt 0
+ //sbin/grub --batch --no-floppy --device-map=/boot/grub/device.map
+ grep 'Error [0-9]*: ' /tmp/grubZ0HHJn
+ cmp /boot/grub/e2fs_stage1_5 /tmp/grubqRFOwk
+ break
+ test 5 -eq 0
+ for file in '${grubdir}/stage1' '${grubdir}/stage2' '${grubdir}/*stage1_5'
+ count=5
++ echo /boot/grub/fat_stage1_5
++ sed 's|^/boot/grub|/boot/grub|'
+ tmp=/boot/grub/fat_stage1_5
+ test 5 -gt 0
+ //sbin/grub --batch --no-floppy --device-map=/boot/grub/device.map
+ grep 'Error [0-9]*: ' /tmp/grubZ0HHJn
+ cmp /boot/grub/fat_stage1_5 /tmp/grubqRFOwk
+ break
+ test 5 -eq 0
+ for file in '${grubdir}/stage1' '${grubdir}/stage2' '${grubdir}/*stage1_5'
+ count=5
++ echo /boot/grub/jfs_stage1_5
++ sed 's|^/boot/grub|/boot/grub|'
+ tmp=/boot/grub/jfs_stage1_5
+ test 5 -gt 0
+ //sbin/grub --batch --no-floppy --device-map=/boot/grub/device.map
+ grep 'Error [0-9]*: ' /tmp/grubZ0HHJn
+ cmp /boot/grub/jfs_stage1_5 /tmp/grubqRFOwk
+ break
+ test 5 -eq 0
+ for file in '${grubdir}/stage1' '${grubdir}/stage2' '${grubdir}/*stage1_5'
+ count=5
++ echo /boot/grub/minix_stage1_5
++ sed 's|^/boot/grub|/boot/grub|'
+ tmp=/boot/grub/minix_stage1_5
+ test 5 -gt 0
+ //sbin/grub --batch --no-floppy --device-map=/boot/grub/device.map
+ grep 'Error [0-9]*: ' /tmp/grubZ0HHJn
+ cmp /boot/grub/minix_stage1_5 /tmp/grubqRFOwk
+ break
+ test 5 -eq 0
+ for file in '${grubdir}/stage1' '${grubdir}/stage2' '${grubdir}/*stage1_5'
+ count=5
++ echo /boot/grub/reiserfs_stage1_5
++ sed 's|^/boot/grub|/boot/grub|'
+ tmp=/boot/grub/reiserfs_stage1_5
+ test 5 -gt 0
+ //sbin/grub --batch --no-floppy --device-map=/boot/grub/device.map
+ grep 'Error [0-9]*: ' /tmp/grubZ0HHJn
+ cmp /boot/grub/reiserfs_stage1_5 /tmp/grubqRFOwk
+ break
+ test 5 -eq 0
+ for file in '${grubdir}/stage1' '${grubdir}/stage2' '${grubdir}/*stage1_5'
+ count=5
++ echo /boot/grub/xfs_stage1_5
++ sed 's|^/boot/grub|/boot/grub|'
+ tmp=/boot/grub/xfs_stage1_5
+ test 5 -gt 0
+ //sbin/grub --batch --no-floppy --device-map=/boot/grub/device.map
+ grep 'Error [0-9]*: ' /tmp/grubZ0HHJn
+ cmp /boot/grub/xfs_stage1_5 /tmp/grubqRFOwk
+ break
+ test 5 -eq 0
+ rm -f /tmp/grubqRFOwk
+ rm -f /tmp/grubZ0HHJn
+ test -n '/bin/tempfile --prefix=grub'
++ /bin/tempfile --prefix=grub
+ log_file=/tmp/grubI7rlhb
+ sync
+ //sbin/grub --batch --no-floppy --device-map=/boot/grub/device.map
+ grep 'Error [0-9]*: ' /tmp/grubI7rlhb
+ test no = yes
+ rm -f /tmp/grubI7rlhb
+ echo 'Installation finished. No error reported.'
Installation finished. No error reported.
+ echo 'This is the contents of the device map /boot/grub/device.map.'
This is the contents of the device map /boot/grub/device.map.
+ echo 'Check if this is correct or not. If any of the lines is incorrect,'
Check if this is correct or not. If any of the lines is incorrect,
+ echo 'fix it and re-run the script `grub-install'\''.'
fix it and re-run the script `grub-install'.
+ echo

+ cat /boot/grub/device.map
(hd0)	/dev/sda
+ exit 0

Attachment: pgpKRaCNzkeFu.pgp
Description: PGP signature


Reply to: