GRUB discussion -- virgin disks ?

John Summerfield debian at herakles.homelinux.org
Mon Oct 22 02:37:31 UTC 2007


William Case wrote:
> Hi Jacques et al;
>

> 
> If I have just installed a new drive on a new machine, how do I
> configure the drive (before partitioning) so that it has a MBR.  Suppose
> I am offering customers an option of Operating Systems that will be
> installed after they make their choice of systems.  At that time I will
> install the appropriate partitions and file systems.
> 
> Can I put a MBR on a drive without formatting the rest?

The first sector is the MBR. Whatever is there is what the system will 
try to use: sensible BIOSes will reject it if the MBR is invalid (for 
some value of all terms).

To ensure it's invalid, this will do it to /dev/sda:
dd if=/dev/zero of=/dev/sda count=1

I'm not sure it's a very useful thing to do though.


Note, Jacques, that /dev/null doesn't do anything useful here:-)

fdisk, when partitioning, will write an MBR with no boot code.

grub and lilo (re)write the boot code when installed. Windows XP also 
has the ability to write its boot code after partitioning, and if 
suitably desperate I'd find out how again:-)




-- 

Cheers
John

-- spambait
1aaaaaaa at coco.merseine.nu  Z1aaaaaaa at coco.merseine.nu

Please do not reply off-list




More information about the users mailing list