bug-grub
[Top][All Lists]
Advanced

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

Re: simulating dd with grub


From: Yoshinori K. Okuji
Subject: Re: simulating dd with grub
Date: Fri, 21 Oct 2005 14:52:05 +0200
User-agent: KMail/1.7.2

On Friday 21 October 2005 11:24 am, adrian15 wrote:
> 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

You must not forget the last 2 bytes as well (the signature).

> My first instict, my first thought was to do:
>
> install p /boot/grub/blank.img INTO (hd0)

It is not a good idea to reuse install for this purpose, because install does 
much more than just copying.

>  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?

It is not only the first bytes, but also the last bytes.

> 2) Can I make a fake blank.img which is approved as a good grub stage1 by
> grub itself?

Possible, but not the right way. The right way is to add a different command 
for it. However, since this is a new feature, this won't be included in GRUB 
Legacy.

Okuji




reply via email to

[Prev in Thread] Current Thread [Next in Thread]