Article

GRUB and ZISD

Author Info

4 August 2008 - 8:10am
Submitted by: adamhobbs

article
Reads:

2318

Score:
1.5
1.5
2
 
Comments:

1

A common problem with dual booting a machine with Windows and Linux is that the ZENworks Image Safe Data and GRUB bootloader attempt to write to the same part of the disk, starting at Sector 6.

As stated in TID 3414734 as of ZENworks 7 SP1 the ZISD can now be written anywhere between sector 6 and 63.

Ziswin is now capable of detecting if GRUB is present and write the ZISD to another sector.

However if you install Windows first, ZISD will be written to sector 6, if you then install SLED and configure it to dual boot using GRUB, GRUB will overwrite the ZISD. If your environment is set up to PXE boot you could end up inadvertently re-imaging the windows partition.

We install SLED using an autoyast script and to work around this issue we automatically relocate the ZISD with a pre-install script using the following commands:

#!/bin/bash
# preinstall.sh
# Script to relocate windows image safe data to prevent GRUB collision
# Adam Hobbs and Steven Knapp - Kingston University London
# July 2008
 
 
 dd if=/dev/sda of=/tmp/zisd skip=5 count=13 bs=512
 dd if=/tmp/zisd of=/tmp/label bs=1 count=4
 label=`cat /tmp/label`;export label
 
         if [ "$label" == "ZISD" ] ; then
 
         echo "Need to relocate ZISD"
 
         dd if=/tmp/zisd of=/dev/sda seek=16 count=13 bs=512
 
         else
 
         echo "ZISD is OK"
 
         fi
		 

You can place the script on an nfs/http server and call from an autoyast answer file with the following lines.

  
 	<scripts>
      	<pre-scripts config:type="list">
      	<script>   
      	<feedback config:type="boolean">false	</feedback>
  <location>nfs://myserver/mypath/preinstall.sh	</location>
       	</script>
      	</pre-scripts>
</scripts>

Set feedback to "true" if you need to check if it is working.


Author Info

4 August 2008 - 8:10am
Submitted by: adamhobbs




User Comments

tftp?

Submitted by KrisSmith on 5 August 2008 - 7:48am.

Can you host the script Files on a TFTP server as PXE servers already run TFTP?

© 2009 Novell, Inc. All Rights Reserved.