Bugzilla – Bug 607480
Error writing grub at end of stage 1 -> unbootable system
Last modified: 2010-06-16 10:04:57 UTC
Created attachment 363479 [details] y2logs.tgz At end of stage 1 installer is unable to install grub. Reason is that /boot/grub/ do not contain the necessary files (from /usr/lib/grub/). Maybe the necessary post install script did not run. ls -al /boot/grub/ total 24 drwxr-xr-x 2 root root 4096 2010-05-20 13:18 . drwxr-xr-x 3 root root 4096 2010-05-20 13:03 .. -rw------- 1 root root 109 2010-05-20 13:18 device.map -rw-r--r-- 1 root root 108 2010-05-20 12:46 device.map.old -rw------- 1 root root 1129 2010-05-20 13:04 menu.lst -rw-r--r-- 1 root root 930 2010-05-20 12:46 menu.lst.old
Rudi, could this possibly be due to the latest spec-file change that does not run %post under some circumstances?
I don't really see how. the line reads: test ! -e /.buildenv || exit 0 unless that file is present on the target machine (and who would create such a file in / of his system), this should never exit outside of the build environment.
grub is included in the images copied to disk. So the new check in the post install script is the culprit if the file /.buildenv exists during creation of those images. Disabling installation from images circumvents the bug.
this bug also affects the live cds - they are build in build environment too ;(
well, looks like that postinstall needs revisiting, for M7 let's live with the previous variant.
osc rq 40466 created: +Fri May 21 12:07:18 CEST 2010 - ro@suse.de + +- fix the post-install again, can not just disable in buildenv + for image-building reasons +- make sure all lines in post-install have a clean exit status, + "test $condition && echo" constructs should not be used, + replaced by if..then..fi instead +- test if xfs_freeze is available before calling it %post -test ! -e /.buildenv || exit 0 # should anything go wrong the system will remain bootable : -[ -e /boot/grub/stage2 ] && mv /boot/grub/stage2{,.old} +if [ -e /boot/grub/stage2 ] ; then + mv /boot/grub/stage2{,.old} +fi # copy especially stage2 over, because it will be modified in-place ! cp -p /usr/lib/grub/*stage1* /boot/grub 2>/dev/null || true %install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz @@ -234,14 +235,19 @@ # sync may take much longer on XFS (Bug#223773) bootpart=`df /boot/. | perl -ane '$F[0] =~ m,/dev/[^\s]*, && print $F[0]'` eval `/sbin/blkid -u filesystem -o udev $bootpart` -if [ "X$ID_FS_TYPE" = "X" -o "t_$ID_FS_TYPE" = "t_xfs" ]; then +XFS_FREEZE=`type -p xfs_freeze` || true +if [ -n "$XFS_FREEZE" ] ; then + if [ "X$ID_FS_TYPE" = "X" -o "t_$ID_FS_TYPE" = "t_xfs" ]; then sync; sleep 5; sync; sleep 5; sync (xfs_freeze -f /; xfs_freeze -f /boot) > /dev/null 2>&1 (xfs_freeze -u /; xfs_freeze -u /boot) > /dev/null 2>&1 + fi fi # command sequence to update-install stage1/stage2. # leave everything else alone ! -[ -e /etc/grub.conf ] && /usr/sbin/grub --batch < /etc/grub.conf >/dev/null 2>&1 +if [ -e /etc/grub.conf ] ; then + /usr/sbin/grub --batch < /etc/grub.conf >/dev/null 2>&1 +fi exit 0
while this was fixed/working in MS7 (Build0625), it started failing again in the next LiveCD Build0626: http://www3.zq1.de/opensuse/video/openSUSE-KDE-LiveCD-x86_64-Build0626a.ogv
tested working again in Build0629