NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: newfs_udf(8) and other OSes



On Sat, Jun 27, 2015 at 08:52:19PM +0200, tlaronde%polynum.com@localhost wrote:
> 
> [Trying to use an UDF formatted USB disk between NetBSD and Windows]
>
> On Sat, Jun 27, 2015 at 07:13:04PM +0200, Benny Siegert wrote:
> > [...]
> > > when using newfs_udf(8) while the Windows formatted shows the first
> > > pseudo partition as a 238 aka "GPT Protective MBR".
> > 
> > So the stick has a GPT partition table, not an MBR. You will want to
> > use gpt(8) to create one. (I would be interested in knowing which GPT
> > partition type Windows uses for the GPT partition.) Something like
> > 
> > gpt create sd0
> > gpt add -t windows sd0
> > 
> 
> I have created a gpt: still not recognized on Windows.
> 
> Then, under Windows, I have formatted by specifying "/A:512" (not
> documented in help) to create an UDF with 512 allocation blocks.
> 
> Then under NetBSD, gpt (gpt show -l sd0) gives:
> 
>        start        size  index  contents
>            0           1         PMBR
>            1           1         Pri GPT header
>            2          32         Pri GPT table
>           34        2014         
>         2048  1953454080      1  GPT part - "Basic data partition"
>   1953456128        2015         
>   1953458143          32         Sec GPT table
>   1953458175           1         Sec GPT header
> 
> The problem is now, I imagine, to create a "wedge" so that the UDF is
> not searched at the very beginning but at block 2048.
> 
> But dkctl(8) doesn't help a lot: addwedge gives systematically "invalid
> argument", without information, and, furthermore, udf is not listed as
> a valid ptype (is cd9660 instead OK?).

Oups! The dk0 was already created (message on console) so adding the
same partition failed.

Mounting /dev/dk0 then with mount_ufs(8) now succeeds.

I suspect that doing it from NetBSD should work too :

1) Create a GPT header on the USB disk;

2) Create an uniq partition on the remaining space after first 2048
blocks and before duplicate info at end with "unused" type ("Basic data
partition"?);

3) Then whether after deconnecting and reconnecting for the automatic
creation of the wedge, or by adding the wedge with dkctl(8), format the
partition with newfs_udf(8).

Seems solved (but I will have to verify that what I write on NetBSD,
using for safety "mount_udf -c" to "close" the sessions, I will be able
to read the result under another OS.

Thanks!
-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                     http://www.kergis.com/
                     http://www.arts-po.fr/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C


Home | Main Index | Thread Index | Old Index