Article

coolguys's picture
article
Reads:

2876

Score:
0
0
 
Comments:

0

Boot in ZfD7-Maintenance Mode to a working Machine

Author Info

8 March 2006 - 12:00am
Submitted by: coolguys

(View Disclaimer)


"This is a very neat way to store and deploy the MBR, but bear in mind two things: 1) this is only necessary if you are using the a1:p1 form of the imaging command, since the MBR is backed up for the active partition, and will be put back if you're restoring that partition without using the a1:p1 form of the command, and 2) be very careful in using the dd command, since you're accessing the disk at a low-level, and a small mistake could make your machine unbootable."

Shaun Pond–ZENworks Product SpecialistNovell, Inc.

PROBLEM: ZfD7 does not save the bootsector in the Imagefile.
So, when you change the OS for example from Linux to Windows,
you must write a valid bootsector for yourself.

Save the bootsector to a file:

IDE Harddisk: dd if=/dev/hda of=/bootsec.win bs=446 count=1
S-ATA Harddisk: dd if=/dev/sda of=/bootsec.win bs=446 count=1

Copy the file to the Server (Example with floppy-disk):

mount -t auto /dev/fd0 /mnt/floppy
cp /bootsec.win /mnt/floppy
umount /mnt/floopy

Create a folder on your PXE-Server:
tftp\boots\
Copy the bootsec.win from the floopy to this location.

Now you can use the file in a scripted Image Object as below:

EXAMPLE:

# Write new Bootsector
tftp $PROXYADDR -c get boots/bootsec.win
dd if=/bootsec.win of=/dev/hda bs=446 count=1

img pd1
img pd2
img pd3
img pd4
img pc1 ntfs 10000
img pc2 ntfs
img pa1
img rp $PROXYADDR //$PROXYADDR/zen/images/0-mobil/image-set_5.zmg a1:p1
img rp $PROXYADDR //$PROXYADDR/zen/images/addon/format_ntfs_fr.zmg a2:p2

Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).

It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.




User Comments

© 2012 Novell