Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Oct 2017 01:30:27 -0700
From:      John-Mark Gurney <jmg@funkthat.com>
To:        HSR Hackspace <hsr.hackspace@gmail.com>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: Fwd: EXT2 partitioning in BSD
Message-ID:  <20171028083027.GH42467@funkthat.com>
In-Reply-To: <CAJN=9WEdaEc%2Bn0RsisssgGYRJ-O15crfury_UGT3JKTFDWv-oA@mail.gmail.com>
References:  <CAJN=9WG3eTtKzD3R3P_MotGdda_ywU%2B5OAS=EzD38upHu33OhA@mail.gmail.com> <CAJN=9WEdaEc%2Bn0RsisssgGYRJ-O15crfury_UGT3JKTFDWv-oA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
HSR Hackspace wrote this message on Thu, Sep 07, 2017 at 22:36 +0530:
> Hi folks;
> 
> I'm writing this mail regarding a strange issue while formatting a
> parting as ext2 on a x86
> machine running Freebsd 10.1 with MBR partitioning with BSDDISKLABEL
> support enabled.
> 
> Warning: could not erase sector 0: Operation not permitted or
> Warning: could not erase sector 0: Attempt to write block to file
> system resulted in short write
> 
> If I try to format same partition as UFS. Formatting is clean which I
> think proves that HDD (512 byte sectors) is good.
> 
> This is not HDD or  kernel issue as in GPT partitioning case I use
> same kernel.  Does BSD disk label or MBR partitioning require anything
> extra (other
> than FS system support)  to be enabled  in kernel?
> 
> I have posted more details and logs here:
> 
> https://unix.stackexchange.com/questions/390050/creating-a-ext2-partition-on-freebsd-10-1-running-on-x86-based-box-with-mbr-part
> 
> Appreciate any help that can guide my debugging for this issue.

Sorry for the late reply.

The issue is that your partion a, starts at the begining of the
slice:
=>         0  2339839908  mfid0s1c  BSD  (1.1T)
           0     4194304         1  (null)  (2.0G)

GEOM protects the first 16 sectors in order to prevent file systems from
overwriting the bsdlabel...  If you move this to start at sector 16
instead of 0, then you will not get the error...

UFS "knew" about the bsdlabel, and always skipped the first 16 sectors
to not overwrite them.

If you tried this on pre-geom machines, you would have corrupted your
bsdlabel.

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20171028083027.GH42467>