Bug 97498 - [request] newfs(8) has no option to clear the first 128 sectors
Summary: [request] newfs(8) has no option to clear the first 128 sectors
Status: Closed Not Accepted
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-fs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-19 16:20 UTC by var
Modified: 2018-05-29 14:01 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description var 2006-05-19 16:20:16 UTC
CF-Card 8 GB:
-------------
sysid 11 (0x0b),(DOS or Windows 95 with 32 bit FAT)
    start 63, size 3666915 (1790 Meg), flag 80 (active)
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 228/ head 65/ sector 63
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 3667041, size 12574674 (6139 Meg), flag 0
        beg: cyl 228/ head 67/ sector 1;
        end: cyl 1010/ head 254/ sector 63

Partition 2 first was FAT32.
newfs touches not the first 128 sectors.
I'm missing an option to clear this area automatically.
(When there is no bsdlabel in 2nd sector)
Because other OSes misinterpret: p1=1.75GB,FAT32  p2=2.4GB,FAT32
Correct would be: p1=1.75GB,FAT32  p2=6.0GB,unknown
I had used dd to correct, but an option would be better.

Fix: 

Add an option.
(A OS from SCO has such an option: 1st 64KB = Zero)
How-To-Repeat: newfs ...
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2006-06-03 22:14:56 UTC
State Changed
From-To: open->suspended

Mark suspended awaiting someone to create some patches.
Comment 2 Bruce Cran freebsd_committer freebsd_triage 2010-09-24 21:48:25 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

Over to maintainer(s).
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2018-05-28 19:50:28 UTC
batch change:

For bugs that match the following
-  Status Is In progress 
AND
- Untouched since 2018-01-01.
AND
- Affects Base System OR Documentation

DO:

Reset to open status.


Note:
I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.
Comment 4 Kirk McKusick freebsd_committer freebsd_triage 2018-05-29 14:01:31 UTC
The first few sectors on the partition (8K for UFS1, 64K or 256K for UFS2) are reserved for disk labels and boot code. The newfs utility does not manipulate (and in some cases is prevented from manipulating) this area. The gpart(8) (or disklabel(8)) utility is used to update this area. If it is desired to zero this area, one of these utilities shold be used to do that.