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

Re: restore boot block



The BOOT code is contained in the first 466 bytes.  Try wiping the first
466 instead of 512 and see if that does what you need.  You may also
need to clear the last 2 bytes of the 512 because it will contain 55aa
which is the boot code "signiture" which says the first 466 is valid.

dd if=/dev/hda of=mypartitions skip=466 count=44
dd if=/dev/zero of=/dev/hda bs=512 count=1
dd if=mypartitions of=/dev/hda skip=466

# This isn't required if the new partitions are the exact same as the
old ones
echo w | fdisk /dev/hda

More info:
www.cpqlinux.com/mbr.html

Of course there are many other methods:

1. echo commands into fdisk
2. use sfdisk (scriptable fdisk)

3. Another method is to set PXE to first in the boot order, then have
the pxe server determine if they will do a local boot or do another
install.  This method is great for clusters and for testing.

Sincerely,
Richard Black

Fong Vang wrote:

>Currently, we automate the installation of hundreds of machines by wiping
>the bootblock (first 512 bytes of the disk) to force them to do PXE boot on
>bootup. However, because parts of the partition table reside in this
>location as well, wiping the 512 bytes of the disk makes the partition table
>unreadable. Once anaconda takes over (no longer booting), does anyone know
>how one could restore the partition table. What would be the best approach
>to recreate the partition table?
>
>
>
>
>
>This e-mail has been captured and archived by the ZANTAZ Digital Safe(tm)
>service. For more information, visit us at www.zantaz.com.
>IMPORTANT: This electronic mail message is intended only for the use of the
>individual or entity to which it is addressed and may contain information
>that is privileged, confidential or exempt from disclosure under applicable
>law. If the reader of this message is not the intended recipient, or the
>employee or agent responsible for delivering this message to the intended
>recipient, you are hereby notified that any dissemination, distribution or
>copying of this communication is strictly prohibited. If you have received
>this communication in error, please notify the sender immediately by
>telephone or directly reply to the original message(s) sent. Thank you.
>
>
>_______________________________________________
>Kickstart-list mailing list
>Kickstart-list redhat com
>https://www.redhat.com/mailman/listinfo/kickstart-list
>
>







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