Re: svn commit: r221972 - head/sys/geom/part

2011-05-23 Thread Andrey V. Elsukov
On 23.05.2011 6:29, Warner Losh wrote: Looking at one of my flash drives that shows the problem: da0: 15423MB (31588351 512 byte sectors: 255H 63S/T 1966C) GEOM_PART: partition 1 has end offset beyond last LBA: 31588350 31588325 So why does gpart think the last LBA is 25 less than it

Re: svn commit: r221972 - head/sys/geom/part

2011-05-23 Thread Poul-Henning Kamp
In message 4dd9f0a3@freebsd.org, Andrey V. Elsukov writes: There is another opinion: http://www.boot-us.com/gloss02.htm There is the convention that partitions should always start and end on *= cylinder boundaries*. It is actually more weird than that: The rule is that the starting or

Re: svn commit: r221972 - head/sys/geom/part

2011-05-23 Thread Warner Losh
On May 22, 2011, at 11:29 PM, Andrey V. Elsukov wrote: On 23.05.2011 6:29, Warner Losh wrote: Looking at one of my flash drives that shows the problem: da0: 15423MB (31588351 512 byte sectors: 255H 63S/T 1966C) GEOM_PART: partition 1 has end offset beyond last LBA: 31588350 31588325

Re: svn commit: r221972 - head/sys/geom/part

2011-05-23 Thread Doug Barton
I don't know enough about the topic to know what's best, however what I would like to add to the conversation is that it would be nice if we did it the same way that windows and linux do it, because otherwise you end up with messages like these: GEOM: ad0s2: geometry does not match label

Re: svn commit: r221972 - head/sys/geom/part

2011-05-23 Thread Warner Losh
On May 23, 2011, at 12:44 PM, Doug Barton wrote: I don't know enough about the topic to know what's best, however what I would like to add to the conversation is that it would be nice if we did it the same way that windows and linux do it, because otherwise you end up with messages like

Re: svn commit: r221972 - head/sys/geom/part

2011-05-23 Thread Wilko Bulte
Quoting Poul-Henning Kamp, who wrote on Mon, May 23, 2011 at 06:56:30AM + .. In message 4dd9f0a3@freebsd.org, Andrey V. Elsukov writes: There is another opinion: http://www.boot-us.com/gloss02.htm There is the convention that partitions should always start and end on *= cylinder

Re: svn commit: r221972 - head/sys/geom/part

2011-05-23 Thread Poul-Henning Kamp
In message 20110523210915.ga3...@freebie.xs4all.nl, Wilko Bulte writes: Quoting Poul-Henning Kamp, who wrote on Mon, May 23, 2011 at 06:56:30AM + .. This requirement dates back to smart BIOS'es and ST-506 drives which couldn't ask the drive for its geometry. WD1003 anyone? Hehe, I just

Re: svn commit: r221972 - head/sys/geom/part

2011-05-22 Thread Stefan Farfeleder
On Sun, May 15, 2011 at 08:03:55PM +, Andrey V. Elsukov wrote: Author: ae Date: Sun May 15 20:03:54 2011 New Revision: 221972 URL: http://svn.freebsd.org/changeset/base/221972 Log: Add a sysctl kern.geom.part.check_integrity for those who has corrupt partition tables and lost an

Re: svn commit: r221972 - head/sys/geom/part

2011-05-22 Thread Adrian Chadd
This also bit me on embedded platform stuff. Is it possible to disable this by default for now and have it just warn loudly? And/or hide the default value behind a kernel configuration variable so we can disable it (but still get the warnings) for now? Thanks, Adrian On 22 May 2011 17:33,

Re: svn commit: r221972 - head/sys/geom/part

2011-05-22 Thread Warner Losh
On May 22, 2011, at 3:33 AM, Stefan Farfeleder wrote: On Sun, May 15, 2011 at 08:03:55PM +, Andrey V. Elsukov wrote: Author: ae Date: Sun May 15 20:03:54 2011 New Revision: 221972 URL: http://svn.freebsd.org/changeset/base/221972 Log: Add a sysctl kern.geom.part.check_integrity for

Re: svn commit: r221972 - head/sys/geom/part

2011-05-22 Thread Warner Losh
On May 22, 2011, at 7:03 AM, Adrian Chadd wrote: This also bit me on embedded platform stuff. Is it possible to disable this by default for now and have it just warn loudly? And/or hide the default value behind a kernel configuration variable so we can disable it (but still get the

Re: svn commit: r221972 - head/sys/geom/part

2011-05-22 Thread Warner Losh
After carefully reviewing this code, we need to have it be *OFF* by default. It should also explain *WHY* it is rejecting the partition. It isn't clear to me at all that this is even useful. While different than Marcel's warnings, I think we need to take a very cautious approach here. Where

Re: svn commit: r221972 - head/sys/geom/part

2011-05-22 Thread Andrey V. Elsukov
On 22.05.2011 13:33, Stefan Farfeleder wrote: URL: http://svn.freebsd.org/changeset/base/221972 Log: Add a sysctl kern.geom.part.check_integrity for those who has corrupt partition tables and lost an ability to boot after r221788. Also unhide an error message from bootverbose, this

Re: svn commit: r221972 - head/sys/geom/part

2011-05-22 Thread Poul-Henning Kamp
In message 38a0d352-30a8-47a0-8259-12b3b2164...@bsdimp.com, Warner Losh write s: After carefully reviewing this code, we need to have it be *OFF* by default. It should also explain *WHY* it is rejecting the partition. It isn't clear to me at all that this is even useful. Seconded * 3. My

Re: svn commit: r221972 - head/sys/geom/part

2011-05-22 Thread Andrey V. Elsukov
On 22.05.2011 20:32, Warner Losh wrote: After carefully reviewing this code, we need to have it be *OFF* by default. It should also explain *WHY* it is rejecting the partition. Did you reviewed r221992? It isn't clear to me at all that this is even useful. While different than Marcel's

Re: svn commit: r221972 - head/sys/geom/part

2011-05-22 Thread Marcel Moolenaar
On May 22, 2011, at 9:26 AM, Warner Losh wrote: On May 22, 2011, at 7:03 AM, Adrian Chadd wrote: This also bit me on embedded platform stuff. Is it possible to disable this by default for now and have it just warn loudly? And/or hide the default value behind a kernel configuration

Re: svn commit: r221972 - head/sys/geom/part

2011-05-22 Thread Poul-Henning Kamp
In message 6ae10d76-ac2f-4d7b-a985-ee072949e...@xcllnt.net, Marcel Moolenaar writes: Rather than just calling it a bad idea, why not come up with something constructive? One thing I would like to point out, is that the potential for damage is very different in R/O and R/W mode. I think it

Re: svn commit: r221972 - head/sys/geom/part

2011-05-22 Thread Warner Losh
On May 22, 2011, at 2:28 PM, Marcel Moolenaar wrote: On May 22, 2011, at 9:26 AM, Warner Losh wrote: On May 22, 2011, at 7:03 AM, Adrian Chadd wrote: This also bit me on embedded platform stuff. Is it possible to disable this by default for now and have it just warn loudly?

svn commit: r221972 - head/sys/geom/part

2011-05-15 Thread Andrey V. Elsukov
Author: ae Date: Sun May 15 20:03:54 2011 New Revision: 221972 URL: http://svn.freebsd.org/changeset/base/221972 Log: Add a sysctl kern.geom.part.check_integrity for those who has corrupt partition tables and lost an ability to boot after r221788. Also unhide an error message from