ZENworks workaround to OpenSUSE Grub Hang
Novell Cool Solutions: Tip
By Dan Wang
Digg This -
Posted: 9 Nov 2007
ENVIRONMENT: Compaq EN
PXE ZENworks preboot HP3 (have not tested with HP6 or later)
Editor's Note: This is a specialist usage, using ZENworks imaging for openSUSE (which we don't support), but this looks like a nice idea.
PROBLEM: OpenSuSE 10.2/10.3 grub hang restoring ZENworks image.
On our old Compaq EN machines, when we finish restoring the image on another machine that is the same machine model and same hard drive size (or even onto the same machine), it will boot to a hanging GRUB _ prompt and boot no further.
SOLUTION: We use a menu system with our PXE ZENworks imaging, so we've added the following commands to our menu to overcome this issue.
/bin/img restorep $PROXYADDR //$PROXYADDR/ZENworks/image.zmg cd / mount /dev/hda2 /mnt/harddisk mount --bind /dev /mnt/harddisk/dev mount --bind /proc /mnt/harddisk/proc chroot /mnt/harddisk grub-install /dev/hda --recheck reboot -f ;;
In summary, the script puts down the OpenSuSE image, then it mounts the newly imaged hard drive. Then it mounts the /dev and /proc directories from the ZENworks preboot into the newly imaged directory structure and then chroots into it. This allows you to use the newly imaged OS without having to boot into it (good thing since it wouldn't boot).
This method then allows you re-run the grub-install utility that comes with the image to fix the hanging issue on itself.
If you have any questions you may contact Dan at firstname.lastname@example.org
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com