geom_part_mbr vs user
Xin LI
delphij at delphij.net
Tue Nov 2 21:17:04 UTC 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 11/02/10 10:02, Andriy Gapon wrote:
>
> It seems that geom_part_mbr:
> 1. uses CHS for some things
> 2. insists that various things be "CHS-aligned"
>
> While 1 is quite acceptable (although perhaps useless), 2 seems to be unhelpful
> (and even annoying).
> E.g. I wanted to create a partition that starts at sector 64, but that was
> auto-magically and silently converted to 126 (2x63). It took me a while to
> realize what's going on. Using some greater starting sector (like 8x63) did work.
>
> But I still believe that geom_part_mbr "thinking" that it is smarter than me is
> incorrect. Yeah, keep using CHS params for some defaults, etc, but do obey what I
> explicitly specify if doesn't violate fundamental constraints like media size or
> slice overlaps.
+1.
I even have a local patch which mute the warning when booting !verbose.
Cheers,
- --
Xin LI <delphij at delphij.net> http://www.delphij.net/
FreeBSD - The Power to Serve! Live free or die
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (FreeBSD)
iQEcBAEBCAAGBQJM0H+/AAoJEATO+BI/yjfB5eAIAMC3CMVA2gE6ssSFJJfM8JW5
GPGHquCePFWvSOKBp/IQGNsxkpc1XYvlFYnWKVjvQAM8zZixbmFhUB0duIzujzag
R7x8Q+xJrwLFGki/7wUwUF2tSh46F26veQ5y6g8Oellt9tG8zEH8Wl6bIS+GfgfM
YdvDCQYSmbwznSJLLQp5Sv2uQJZX4xSZsPJLSXxSM9auhCqbMZLwVf1Nm9EU8hb+
BgFf+6/hLIGUrE6fcETm0XcZO8/6sPgLY4lhuq1FpWj+5eEHjB20WZK6F1k72QGz
XvbZGJY5p3SzGrv6oIDGGFBda3F/eGiCqfzW/amuiJDs/46WSux4dRlo398UQJI=
=D5fM
-----END PGP SIGNATURE-----
-------------- next part --------------
Index: sys/geom/part/g_part_mbr.c
===================================================================
--- sys/geom/part/g_part_mbr.c (revision 214681)
+++ sys/geom/part/g_part_mbr.c (working copy)
@@ -449,12 +449,16 @@
basetable->gpt_heads = heads;
}
}
- if ((ent.dp_start % basetable->gpt_sectors) != 0)
- printf("GEOM: %s: partition %d does not start on a "
- "track boundary.\n", pp->name, index + 1);
- if ((ent.dp_size % basetable->gpt_sectors) != 0)
- printf("GEOM: %s: partition %d does not end on a "
- "track boundary.\n", pp->name, index + 1);
+ if (bootverbose) {
+ if ((ent.dp_start % basetable->gpt_sectors) != 0)
+ printf("GEOM: %s: partition %d does not "
+ "start on a track boundary.\n",
+ pp->name, index + 1);
+ if ((ent.dp_size % basetable->gpt_sectors) != 0)
+ printf("GEOM: %s: partition %d does not "
+ "end on a track boundary.\n",
+ pp->name, index + 1);
+ }
entry = (struct g_part_mbr_entry *)g_part_new_entry(basetable,
index + 1, ent.dp_start, ent.dp_start + ent.dp_size - 1);
More information about the freebsd-geom
mailing list