[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
simulating dd with grub
From: |
adrian15 |
Subject: |
simulating dd with grub |
Date: |
Fri, 21 Oct 2005 11:24:44 +0200 |
(I already posted this question on grub-devel but as It's more a grub-
legacy question I post it right here)
Let's suppose that MBR has this structure:
Boot Code: 446 bytes
Let's do the following with Linux:
dd if=/dev/zero of=./blank.img count=1 bs=446
dd if=./blank.img of=/dev/hda
I think that this two commands will make a thing similar to
fdisk /mbr
that's to say give a blank mbr.
Supposing that this is equivalent to fdisk /mbr let's build a
grub disk
with the following extra file: blank.img stored int /boot/grub/ folder.
My first instict, my first thought was to do:
install p /boot/grub/blank.img INTO (hd0)
(Sorry, I don't remember the correct syntax right now, but I suppose you
get the point)
The problem is that when I read install command documentation it says that
Grub before embedding stage1 into the MBR ====checks==== if it's a right
Grub stage1 image.
So... I suppose I cannot embedd this image into the MBR.
So some questions arise right now:
1) When Grub embeds an stage1 image into the MBR does it copy it into
the 1st 466 bytes or not? And... why its size is 512 bytes instead of 466
bytes as in my scheme?
2) Can I make a fake blank.img which is approved as a good grub stage1 by
grub itself?
Thank you for your questions in advance.
adrian15
- simulating dd with grub,
adrian15 <=