[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH] Sector 2 of non-embedded core.img: write early or patch late
From: |
Pavel Roskin |
Subject: |
[RFC PATCH] Sector 2 of non-embedded core.img: write early or patch later? |
Date: |
Fri, 27 Jun 2008 17:24:59 -0400 |
Hello!
We have a serious problem with installing onto partitions (e.g.
grub-install /dev/sda1) and drives with geometry that doesn't leave
enough space for core.img to be embedded before the first partition.
While it's not a desirable configuration, it should work, but it
doesn't.
Either we should write sector 2 before the core.img is checked for
readability or we should delay patching sector 2 in memory until the
verification is done. Otherwise, the verification will fail.
Delayed patching changes nothing in terms of I/O but needs a longer
patch and won't scale well if we want to put more information into
sector 2, as we'll need to cache more data.
Writing sector 2 early is less intrusive in terms of code, but may be
slower e.g. on floppies. It's probably more reliable because we verify
that the modified sector 2 made it to the filesystem.
I tend to prefer the later ("write early") approach, but I'd like to see
some feedback before I commit it.
Both proposed patches are attached.
--
Regards,
Pavel Roskin
01-patch-later.patch
Description: Text Data
01-write-early.patch
Description: Text Data
- [RFC PATCH] Sector 2 of non-embedded core.img: write early or patch later?,
Pavel Roskin <=