Date: Tue, 11 Jan 2022 19:23:34 +0000 (UTC) From: Roderick <hruodr@gmail.com> To: questions@freebsd.org Cc: Steve O'Hara-Smith <steve@sohara.org> Subject: Re: dd and mbr Message-ID: <4a441db-9d0-9fb3-ae9e-35e0496638dd@gmail.com> In-Reply-To: <c267742c-8bae-8344-94e1-484818cf7975@gmail.com> References: <4af920fc-eff1-a92e-d36e-1ba97079864c@gmail.com> <20220111104112.dd98218395b3edc567ab2031@sohara.org> <d27a752a-c6b0-51b8-e16-90c360986a24@gmail.com> <c267742c-8bae-8344-94e1-484818cf7975@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
After zeroing with FreeBSD, FreeBSD shows a BSD slice, but OpenBSD an unused slice. The problem seems to be what fdisk shows. Not dd. R. On Tue, 11 Jan 2022, Roderick wrote: > > Zeroing makes a BSD slice?! Another experiment: > > ----- > > % fdisk da0 > ******* Working on device /dev/da0 ******* > parameters extracted from in-core disklabel are: > cylinders=810 heads=64 sectors/track=32 (2048 blks/cyl) > > parameters to be used for BIOS calculations are: > cylinders=810 heads=64 sectors/track=32 (2048 blks/cyl) > > Media sector size is 512 > Warning: BIOS sector numbering starts with sector 1 > Information from DOS bootblock is: > The data for partition 1 is: > sysid 11 (0x0b),(DOS or Windows 95 with 32 bit FAT) > start 32, size 1658848 (809 Meg), flag 80 (active) > beg: cyl 0/ head 1/ sector 1; > end: cyl 809/ head 63/ sector 32 > The data for partition 2 is: > <UNUSED> > The data for partition 3 is: > <UNUSED> > The data for partition 4 is: > <UNUSED> > > % dd if=/dev/zero of=/dev/da0 count=1 > 1+0 records in > 1+0 records out > 512 bytes transferred in 0.333139 secs (1537 bytes/sec) > > % fdisk da0 > ******* Working on device /dev/da0 ******* > parameters extracted from in-core disklabel are: > cylinders=810 heads=64 sectors/track=32 (2048 blks/cyl) > > parameters to be used for BIOS calculations are: > cylinders=810 heads=64 sectors/track=32 (2048 blks/cyl) > > fdisk: invalid fdisk partition table found > Media sector size is 512 > Warning: BIOS sector numbering starts with sector 1 > Information from DOS bootblock is: > The data for partition 1 is: > sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > start 32, size 1658848 (809 Meg), flag 80 (active) > beg: cyl 0/ head 1/ sector 1; > end: cyl 809/ head 63/ sector 32 > The data for partition 2 is: > <UNUSED> > The data for partition 3 is: > <UNUSED> > The data for partition 4 is: > <UNUSED> > ------ > > > > > > > > On Tue, 11 Jan 2022, Roderick wrote: > >> >> I did the folowing experiment. >> >> (1) dd if=/dev/zero of=/dev/da0 bs=1m >> >> (2) reboot the system in order to eliminate everything cached. >> >> (3) following comandos: >> >> % dd if=/dev/da0 count=1 | hd >> 1+0 records in >> 1+0 records out >> 512 bytes transferred in 0.001911 secs (267913 bytes/sec) >> 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >> |................| >> * >> 00000200 >> % >> % fdisk da0 >> ******* Working on device /dev/da0 ******* >> parameters extracted from in-core disklabel are: >> cylinders=810 heads=64 sectors/track=32 (2048 blks/cyl) >> >> parameters to be used for BIOS calculations are: >> cylinders=810 heads=64 sectors/track=32 (2048 blks/cyl) >> >> fdisk: invalid fdisk partition table found >> Media sector size is 512 >> Warning: BIOS sector numbering starts with sector 1 >> Information from DOS bootblock is: >> The data for partition 1 is: >> sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) >> start 32, size 1658848 (809 Meg), flag 80 (active) >> beg: cyl 0/ head 1/ sector 1; >> end: cyl 809/ head 63/ sector 32 >> The data for partition 2 is: >> <UNUSED> >> The data for partition 3 is: >> <UNUSED> >> The data for partition 4 is: >> <UNUSED> >> % >> >> >> >> >> >> On Tue, 11 Jan 2022, Steve O'Hara-Smith wrote: >> >>> On Tue, 11 Jan 2022 10:02:26 +0000 (UTC) >>> Roderick <hruodr@gmail.com> wrote: >>> >>>> >>>> The command: >>>> >>>> dd if=/dev/zero of=/dev/da0 >>>> >>>> does not delete the mbr, I still see the partition table with >>>> fdisk. My questions: >>> >>> It does delete the partition table, but fdisk is showing you cached >>> data - the clue is in this bit of the output: >>> >>> ******* Working on device /dev/ada0 ******* >>> parameters extracted from in-core disklabel are: >>> >>> I thought there was a way to get fdisk to read directly but I >>> can't find it in the man page now. >>> >>> -- >>> Steve O'Hara-Smith <steve@sohara.org> >>> >>> >> >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4a441db-9d0-9fb3-ae9e-35e0496638dd>