From: "Grégoire Sutre" <gregoire.sutre@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Improperly nested partitions, help needed!
Date: Tue, 21 Sep 2010 15:59:07 +0200 [thread overview]
Message-ID: <4C98BA2B.3020300@gmail.com> (raw)
In-Reply-To: <1285054276.10425.39.camel@hp.my.own.domain>
On 09/21/2010 09:31, Svante Signell wrote:
> When installing a new kernel or a new version of grub I get a
> warning that /dev/sda1 (windows rescue) and /dev/sda3 (linux root /)
> are improperly nested: /usr/sbin/grub-probe: warn: Discarding
> improperly nested partition (hd1,msdos3,msdos1).
Assuming that hd1 is sda, this means that (1) grub-probe detects an
MSDOS partition table T in the first sector of sda3, and (2) the first
partition descriptor in T describes a partition that ends after sda3.
It does not say anything about sda1, which is (hd1,msdos1).
Correct detection of MSDOS partition tables is not obvious. If I read
the code correctly, grub-probe detects an MSDOS partition table (at the
beggining of a disk/partition) if (a) the sector ends with the correct
signature and (b) the first byte of each partition descriptor contains
a valid boot flag.
Actually, for (b), the check that it's a valid boot flag is:
for (i = 0; i < 4; i++)
if (mbr.entries[i].flag & 0x7f)
return grub_error (GRUB_ERR_BAD_PART_TABLE, "bad boot flag");
Couldn't this be made stronger, with:
for (i = 0; i < 4; i++)
if (mbr.entries[i].flag != 0x00 && mbr.entries[i].flag != 0x80)
return grub_error (GRUB_ERR_BAD_PART_TABLE, "bad boot flag");
?
> How to resolve this problem?
It's likely that the first sector of sda3 contains useless, leftover
data. If that's the case (I mean if you are absolutely sure that it's
the case) then you could simply fill this sector with zeroes.
> Additionally, does the same warning have to be repeated so many times
> for every kernel entry???
Well, I guess so, since grub-probe is run independently for each kernel
entry (several times actually).
Grégoire
next prev parent reply other threads:[~2010-09-21 13:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-21 7:31 Improperly nested partitions, help needed! Svante Signell
2010-09-21 13:13 ` Isaac Dupree
2010-09-21 20:23 ` Isaac Dupree
2010-09-21 13:59 ` Grégoire Sutre [this message]
2010-09-21 14:54 ` Lennart Sorensen
2010-09-21 15:23 ` Grégoire Sutre
2010-09-21 19:42 ` Svante Signell
2010-09-21 20:18 ` Lennart Sorensen
2010-09-21 20:29 ` Svante Signell
2010-09-21 21:11 ` Lennart Sorensen
2010-09-21 22:54 ` Grégoire Sutre
2010-09-22 16:19 ` Phillip Susi
2010-09-22 16:44 ` Lennart Sorensen
2010-09-22 17:08 ` Grégoire Sutre
2010-09-22 17:44 ` Lennart Sorensen
2010-09-22 18:00 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-09-22 20:57 ` Brendan Trotter
2010-09-22 21:13 ` Vladimir 'φ-coder/phcoder' Serbinenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C98BA2B.3020300@gmail.com \
--to=gregoire.sutre@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.