bug-grub
[Top][All Lists]
Advanced

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

Re: a patch for working with HDD images and for newer Intel cards


From: Sergey Babkin
Subject: Re: a patch for working with HDD images and for newer Intel cards
Date: Wed, 23 Apr 2003 10:26:50 -0400

Pádraig Brady wrote:
> 
> Sergey Babkin wrote:
> 
> >Hi,
> >
> >I've been trying to create the images of hard disks with GRUB and
> >found that on Linux it wants to write to the partition as a separate
> >file. Which is not neccessary and just plain harmful in case if
> >I'm installing GRUB on a disk image. So I've made the attached a small
> >patch grub-0.91-hddimage.patch. The patch is made against a
> >Caldera-patched version of 0.91 but it applies fine to 0.93 too.
> >
> But what if the user has the partition(s) in the disk image (file)
> mounted seperately?

How do you do that ? I'd like to do that too. Now I just
create the image of each parition separately, then write these images
into the image of the whole disk. So actually the way grub works
before that patch is kind of OK too if the images are named properly:
if the whole-disk image is dsk, then the 1st partition image should be 
named dsk1 etc. Only then I have to copy this partition image into the
disk image the second time after grub updates it. BTW, the parition image
must not be mounted when grub writes into it: otherwise these writes
may be fully or partially ignored since "mount -o loop" does not write
any changes into the underlying file until the filesystem gets unmounted.

> I was wondering the same thing (you might have seen my post to the list
> today (I only got yours now :-()), and assumed because of the linux bug that

Sorry, I'm not subscribed to the list. I just send patches when I
happen to do something grub-related.

> you would have to determine whether any partitions were mounted in the
> file/disk
> you're working on, to know whether to ignore this test?
> In other words as far as this linux bug is concerned whether it's a file
> or "real"
> disk doesn't matter?

I don't know a way to mount or otherwise access a partition in a disk
image in a file. So this is the difference.

-SB




reply via email to

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