Date: Fri, 26 Jan 2024 18:40:24 +0200 From: Toomas Soome <tsoome@me.com> To: "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net> Cc: Alexander Leidinger <Alexander@Leidinger.net>, Warner Losh <imp@bsdimp.com>, Ed Maste <emaste@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: Removing fdisk and bsdlabel (legacy partition tools) Message-ID: <CC89CB84-FFAF-46F4-BB05-115BFB3F81B9@me.com> In-Reply-To: <202401261621.40QGLIv7006285@gndrsh.dnsmgr.net> References: <202401261621.40QGLIv7006285@gndrsh.dnsmgr.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_F0426EF8-7AD0-4641-9138-CFB20337145F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 26. Jan 2024, at 18:21, Rodney W. Grimes = <freebsd-rwg@gndrsh.dnsmgr.net> wrote: >=20 >>=20 >>=20 >>> On 26. Jan 2024, at 18:02, Rodney W. Grimes = <freebsd-rwg@gndrsh.dnsmgr.net> wrote: >>>=20 >>> -- Start of PGP signed section. >>>> Am 2024-01-25 18:49, schrieb Rodney W. Grimes: >>>>>> On Thu, Jan 25, 2024, 9:11?AM Ed Maste <emaste@freebsd.org> = wrote: >>>>>>=20 >>>>>>> On Thu, 25 Jan 2024 at 11:00, Rodney W. Grimes >>>>>>> <freebsd-rwg@gndrsh.dnsmgr.net> wrote: >>>>>>>>=20 >>>>>>>>> These will need to be addressed before actually removing any = of these >>>>>>>>> binaries, of course. >>>>>>>>=20 >>>>>>>> You seem to have missed /rescue. Now think about that long >>>>>>>> and hard, these tools classified as so important that they >>>>>>>> are part of /rescue. Again I can not stress enough how often >>>>>>>> I turn to these tools in a repair mode situation. >>>>>>>=20 >>>>>>> I haven't missed rescue, it is included in the work in progress = I >>>>>>> mentioned. Note that rescue has included gpart since 2007. >>>>>>>=20 >>>>>>=20 >>>>>> What can fdisk and/or disklabel repair that gpart can't? >>>>>=20 >>>>> As far as I know there is no way in gpart to get to the >>>>> MBR cyl/hd/sec values, you can only get to the LBA start >>>>> and end values: >>>>> sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) >>>>> start 63, size 8388513 (4095 Meg), flag 80 (active) >>>>> beg: cyl 0/ head 1/ sector 1; >>>>> end: cyl 1023/ head 15/ sector 63 >>>>>=20 >>>>> gpart show ada0 >>>>> =3D> 63 8388545 ada0 MBR (4.0G) >>>>> 63 8388513 1 freebsd [active] (4.0G) >>>>> 8388576 32 - free - (16K) >>>>=20 >>>> What are you using cyl/hd/sec values for on a system which runs = FreeBSD=20 >>>> current or on which you would have to use FreeBSD-current in case = of a=20 >>>> repair need? What is the disk hardware on those systems that you = still=20 >>>> need cyl/hd/sec and LBA doesn't work? Serious questions out of=20 >>>> curiosity. >>>=20 >>> Your making way to many assuptions, I deal with all sorts of = operating >>> systems, not just FreeBSD, and I often many drives from many systems >>> connected to a FreeBSD box doing work to repair various anomolyies. >>> FreeBSD is my swiss army knife of choice for fixing things. >>>=20 >>> UEFI CMS and BIOS emplemntations can get very confused about a >>> disk if these values are not properly set. Also make a big >>> mental note that GPT is really just a BIOS type 0x238 MBR >>> entry and if that entry is messed up you are screwed. I am >>> not sure gpart has anyway to fix the protective MBR other >>> than to rewrite it, probably destroying access to the whole >>> contents of the disk. >>>=20 >>=20 >> That does not make too much sense because PMBR is just fake partition = covering whole disk (within the data type size limit), with the hope = that MBR only tool will see all the space is allocated and will not = attempt anything silly. Right after sector 0, in sector 1 there is GPT, = followed by GPT table array ? that is, if anything will attempt to write = anything other into sectors 1-33 (or depending on how large is your = table array), you are in trouble as the primary GPT is destroyed. >=20 > *SIGH* Seriously if you think it is so fake NUKE it and see how good = your system works. >=20 > dd if=3D/dev/zero of=3D/dev/FOO count=3D1 > GOOD LUCK! >=20 It is fake in a sense that a) its role is to denote the marked space is = in use and b) in case of large disks, the PMBR end is not the same as = disk end (due to data type limit). It is entirely other matter what happens when PMBR is wiped. However, = even if you wipe it, it is trivial to restore. rgds, toomas >> rgds, >> toomas >>> I am getting rather tired of hearing from people who just simply >>> do not use these tools or can not phantom there are legitamate >>> uses for them. But it is evident the project has decided to >>> remote them to ports no matter what, so be it, yet another >>> reason for me to use less FreeBSD and more of someone elses >>> product. >>>=20 >>>>=20 >>>> Bye, >>>> Alexander. >>>>=20 >>>> --=20 >>>> http://www.Leidinger.net Alexander@Leidinger.net: PGP = 0x8F31830F9F2772BF >>>> http://www.FreeBSD.org netchild@FreeBSD.org : PGP = 0x8F31830F9F2772BF >>> -- End of PGP section, PGP failed! >>>=20 >>> --=20 >>> Rod Grimes = rgrimes@freebsd.org > --=20 > Rod Grimes = rgrimes@freebsd.org <mailto:rgrimes@freebsd.org> --Apple-Mail=_F0426EF8-7AD0-4641-9138-CFB20337145F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii <html><head><meta http-equiv=3D"content-type" content=3D"text/html; = charset=3Dus-ascii"></head><body style=3D"overflow-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;"><br = id=3D"lineBreakAtBeginningOfMessage"><div><br><blockquote = type=3D"cite"><div>On 26. Jan 2024, at 18:21, Rodney W. Grimes = <freebsd-rwg@gndrsh.dnsmgr.net> wrote:</div><br = class=3D"Apple-interchange-newline"><div><meta = charset=3D"UTF-8"><blockquote type=3D"cite" style=3D"font-family: = Hack-Regular; font-size: 12px; font-style: normal; font-variant-caps: = normal; font-weight: 400; letter-spacing: normal; orphans: auto; = text-align: start; text-indent: 0px; text-transform: none; white-space: = normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; = text-decoration: none;"><br><br><blockquote type=3D"cite">On 26. Jan = 2024, at 18:02, Rodney W. Grimes <freebsd-rwg@gndrsh.dnsmgr.net> = wrote:<br><br>-- Start of PGP signed section.<br><blockquote = type=3D"cite">Am 2024-01-25 18:49, schrieb Rodney W. = Grimes:<br><blockquote type=3D"cite"><blockquote type=3D"cite">On Thu, = Jan 25, 2024, 9:11?AM Ed Maste <emaste@freebsd.org> = wrote:<br><br><blockquote type=3D"cite">On Thu, 25 Jan 2024 at 11:00, = Rodney W. Grimes<br><freebsd-rwg@gndrsh.dnsmgr.net> = wrote:<br><blockquote type=3D"cite"><br><blockquote type=3D"cite">These = will need to be addressed before actually removing any of = these<br>binaries, of course.<br></blockquote><br>You seem to have = missed /rescue. Now think about that long<br>and hard, these tools = classified as so important that they<br>are part of /rescue. Again = I can not stress enough how often<br>I turn to these tools in a repair = mode situation.<br></blockquote><br>I haven't missed rescue, it is = included in the work in progress I<br>mentioned. Note that rescue has = included gpart since 2007.<br><br></blockquote><br>What can fdisk and/or = disklabel repair that gpart can't?<br></blockquote><br>As far as I know = there is no way in gpart to get to the<br>MBR cyl/hd/sec values, you can = only get to the LBA start<br>and end values:<br>sysid 165 = (0xa5),(FreeBSD/NetBSD/386BSD)<br> start 63, size 8388513 = (4095 Meg), flag 80 (active)<br> beg: = cyl 0/ head 1/ sector 1;<br> end: cyl = 1023/ head 15/ sector 63<br><br>gpart show ada0<br>=3D> = 63 8388545 ada0 MBR = (4.0G)<br> 63 8388513 = 1 freebsd [active] = (4.0G)<br>8388576 32 = - free - = (16K)<br></blockquote><br>What are you using cyl/hd/sec values for = on a system which runs FreeBSD<span = class=3D"Apple-converted-space"> </span><br>current or on which you = would have to use FreeBSD-current in case of a<span = class=3D"Apple-converted-space"> </span><br>repair need? What is = the disk hardware on those systems that you still<span = class=3D"Apple-converted-space"> </span><br>need cyl/hd/sec and LBA = doesn't work? Serious questions out of<span = class=3D"Apple-converted-space"> </span><br>curiosity.<br></blockquot= e><br>Your making way to many assuptions, I deal with all sorts of = operating<br>systems, not just FreeBSD, and I often many drives from = many systems<br>connected to a FreeBSD box doing work to repair various = anomolyies.<br>FreeBSD is my swiss army knife of choice for fixing = things.<br><br>UEFI CMS and BIOS emplemntations can get very confused = about a<br>disk if these values are not properly set. Also make a = big<br>mental note that GPT is really just a BIOS type 0x238 = MBR<br>entry and if that entry is messed up you are screwed. I = am<br>not sure gpart has anyway to fix the protective MBR other<br>than = to rewrite it, probably destroying access to the whole<br>contents of = the disk.<br><br></blockquote><br>That does not make too much sense = because PMBR is just fake partition covering whole disk (within the data = type size limit), with the hope that MBR only tool will see all the = space is allocated and will not attempt anything silly. Right after = sector 0, in sector 1 there is GPT, followed by GPT table array ? that = is, if anything will attempt to write anything other into sectors 1-33 = (or depending on how large is your table array), you are in trouble as = the primary GPT is destroyed.<br></blockquote><br style=3D"caret-color: = rgb(0, 0, 0); font-family: Hack-Regular; font-size: 12px; font-style: = normal; font-variant-caps: normal; font-weight: 400; letter-spacing: = normal; text-align: start; text-indent: 0px; text-transform: none; = white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; = text-decoration: none;"><span style=3D"caret-color: rgb(0, 0, 0); = font-family: Hack-Regular; font-size: 12px; font-style: normal; = font-variant-caps: normal; font-weight: 400; letter-spacing: normal; = text-align: start; text-indent: 0px; text-transform: none; white-space: = normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; = text-decoration: none; float: none; display: inline !important;">*SIGH* = Seriously if you think it is so fake NUKE it and see how good your = system works.</span><br style=3D"caret-color: rgb(0, 0, 0); font-family: = Hack-Regular; font-size: 12px; font-style: normal; font-variant-caps: = normal; font-weight: 400; letter-spacing: normal; text-align: start; = text-indent: 0px; text-transform: none; white-space: normal; = word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: = none;"><br style=3D"caret-color: rgb(0, 0, 0); font-family: = Hack-Regular; font-size: 12px; font-style: normal; font-variant-caps: = normal; font-weight: 400; letter-spacing: normal; text-align: start; = text-indent: 0px; text-transform: none; white-space: normal; = word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: = none;"><span style=3D"caret-color: rgb(0, 0, 0); font-family: = Hack-Regular; font-size: 12px; font-style: normal; font-variant-caps: = normal; font-weight: 400; letter-spacing: normal; text-align: start; = text-indent: 0px; text-transform: none; white-space: normal; = word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: = none; float: none; display: inline !important;">dd if=3D/dev/zero = of=3D/dev/FOO count=3D1</span><br style=3D"caret-color: rgb(0, 0, 0); = font-family: Hack-Regular; font-size: 12px; font-style: normal; = font-variant-caps: normal; font-weight: 400; letter-spacing: normal; = text-align: start; text-indent: 0px; text-transform: none; white-space: = normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; = text-decoration: none;"><span style=3D"caret-color: rgb(0, 0, 0); = font-family: Hack-Regular; font-size: 12px; font-style: normal; = font-variant-caps: normal; font-weight: 400; letter-spacing: normal; = text-align: start; text-indent: 0px; text-transform: none; white-space: = normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; = text-decoration: none; float: none; display: inline !important;">GOOD = LUCK!</span><br style=3D"caret-color: rgb(0, 0, 0); font-family: = Hack-Regular; font-size: 12px; font-style: normal; font-variant-caps: = normal; font-weight: 400; letter-spacing: normal; text-align: start; = text-indent: 0px; text-transform: none; white-space: normal; = word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: = none;"><br style=3D"caret-color: rgb(0, 0, 0); font-family: = Hack-Regular; font-size: 12px; font-style: normal; font-variant-caps: = normal; font-weight: 400; letter-spacing: normal; text-align: start; = text-indent: 0px; text-transform: none; white-space: normal; = word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: = none;"></div></blockquote><div><br></div><div>It is fake in a sense that = a) its role is to denote the marked space is in use and b) in case of = large disks, the PMBR end is not the same as disk end (due to data type = limit).</div><div><br></div><div>It is entirely other matter what = happens when PMBR is wiped. However, even if you wipe it, it is trivial = to = restore.</div><div><br></div><div>rgds,</div><div>toomas</div><br><blockqu= ote type=3D"cite"><div><blockquote type=3D"cite" style=3D"font-family: = Hack-Regular; font-size: 12px; font-style: normal; font-variant-caps: = normal; font-weight: 400; letter-spacing: normal; orphans: auto; = text-align: start; text-indent: 0px; text-transform: none; white-space: = normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; = text-decoration: none;">rgds,<br>toomas<br><blockquote type=3D"cite">I = am getting rather tired of hearing from people who just simply<br>do not = use these tools or can not phantom there are legitamate<br>uses for = them. But it is evident the project has decided to<br>remote them = to ports no matter what, so be it, yet another<br>reason for me to use = less FreeBSD and more of someone elses<br>product.<br><br><blockquote = type=3D"cite"><br>Bye,<br>Alexander.<br><br>--<span = class=3D"Apple-converted-space"> </span><br>http://www.Leidinger.net = Alexander@Leidinger.net: PGP = 0x8F31830F9F2772BF<br>http://www.FreeBSD.org = netchild@FreeBSD.org : PGP = 0x8F31830F9F2772BF<br></blockquote>-- End of PGP section, PGP = failed!<br><br>--<span = class=3D"Apple-converted-space"> </span><br>Rod Grimes = &n= bsp; &nbs= p; = rgrimes@= freebsd.org<br></blockquote></blockquote><span style=3D"caret-color: = rgb(0, 0, 0); font-family: Hack-Regular; font-size: 12px; font-style: = normal; font-variant-caps: normal; font-weight: 400; letter-spacing: = normal; text-align: start; text-indent: 0px; text-transform: none; = white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; = text-decoration: none; float: none; display: inline !important;">--<span = class=3D"Apple-converted-space"> </span></span><br = style=3D"caret-color: rgb(0, 0, 0); font-family: Hack-Regular; = font-size: 12px; font-style: normal; font-variant-caps: normal; = font-weight: 400; letter-spacing: normal; text-align: start; = text-indent: 0px; text-transform: none; white-space: normal; = word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: = none;"><span style=3D"caret-color: rgb(0, 0, 0); font-family: = Hack-Regular; font-size: 12px; font-style: normal; font-variant-caps: = normal; font-weight: 400; letter-spacing: normal; text-align: start; = text-indent: 0px; text-transform: none; white-space: normal; = word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: = none; float: none; display: inline !important;">Rod Grimes = &n= bsp; &nbs= p; = </span><= a href=3D"mailto:rgrimes@freebsd.org" style=3D"font-family: = Hack-Regular; font-size: 12px; font-style: normal; font-variant-caps: = normal; font-weight: 400; letter-spacing: normal; orphans: auto; = text-align: start; text-indent: 0px; text-transform: none; white-space: = normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: = 0px;">rgrimes@freebsd.org</a></div></blockquote></div><br></body></html>= --Apple-Mail=_F0426EF8-7AD0-4641-9138-CFB20337145F--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CC89CB84-FFAF-46F4-BB05-115BFB3F81B9>