You are not logged in.

#1 2011-04-27 19:22:41

eDio
Member
From: Ukraine, Kyiv
Registered: 2008-12-02
Posts: 422

[SOLVED] Format USB flash stick to UDF

Hi all.
I've got new 8GB USB flash stick and decided to format it to UDF. Don't ask why and don't say me, that fat32/ntfs/extX/whatever is better  smile
I actually don't need USB stick at all. So formatting it to UDF is just a matter of interest.

I've installed udftools.
Then I've tried to make fs as a regular user

$ mkudffs --media-type=hd --blocksize=512 /dev/sdc
trying to change type of multiple extents
$

After that I've tried the same as root

# mkudffs --media-type=hd --blocksize=512 /dev/sdc
start=0, blocks=64, type=RESERVED 
start=64, blocks=12, type=VRS 
start=76, blocks=180, type=USPACE 
start=256, blocks=1, type=ANCHOR 
start=257, blocks=16, type=PVDS 
start=273, blocks=1, type=LVID 
start=274, blocks=15826413, type=PSPACE 
start=15826687, blocks=1, type=ANCHOR 
start=15826688, blocks=239, type=USPACE 
start=15826927, blocks=16, type=RVDS 
start=15826943, blocks=1, type=ANCHOR 
#

So, I failed to create new fs.

Could someone help to create one?

Great thanks in advance

Last edited by eDio (2011-05-04 20:26:19)

Offline

#2 2011-04-27 19:29:26

Meyithi
Member
From: Wirral, UK
Registered: 2009-06-21
Posts: 550
Website

Re: [SOLVED] Format USB flash stick to UDF

I would of thought that you would need to create a partition to format.


The mind roams more freely in empty rooms.
dwm - colours - ncmpcpp - system
irc://irc.freenode.net:meyithi

Offline

#3 2011-04-27 19:46:01

eDio
Member
From: Ukraine, Kyiv
Registered: 2008-12-02
Posts: 422

Re: [SOLVED] Format USB flash stick to UDF

Meyithi, thanks for the advice.
However, I have one... At least, I believe so...

# fdisk -b 512 /dev/sdc

Command (m for help): p

Disk /dev/sdc: 8103 MB, 8103395328 bytes
64 heads, 32 sectors/track, 7728 cylinders, total 15826944 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x8497e059

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048    15826943     7912448   83  Linux

I'm not sure, if I created partition correctly though...

Offline

#4 2011-04-27 19:56:46

Meyithi
Member
From: Wirral, UK
Registered: 2009-06-21
Posts: 550
Website

Re: [SOLVED] Format USB flash stick to UDF

Looks like you have a partition indeed, but you seem to be trying to create a fs on the whole device and not the partition.


The mind roams more freely in empty rooms.
dwm - colours - ncmpcpp - system
irc://irc.freenode.net:meyithi

Offline

#5 2011-04-27 20:01:20

eDio
Member
From: Ukraine, Kyiv
Registered: 2008-12-02
Posts: 422

Re: [SOLVED] Format USB flash stick to UDF

With unallocated space

# mkudffs --media-type=hd --blocksize=512 /dev/sdc1
trying to change type of multiple extents

# mkudffs --media-type=hd --blocksize=512 /dev/sdc
start=0, blocks=64, type=RESERVED 
start=64, blocks=12, type=VRS 
start=76, blocks=180, type=USPACE 
start=256, blocks=1, type=ANCHOR 
start=257, blocks=16, type=PVDS 
start=273, blocks=1, type=LVID 
start=274, blocks=15826413, type=PSPACE 
start=15826687, blocks=1, type=ANCHOR 
start=15826688, blocks=239, type=USPACE 
start=15826927, blocks=16, type=RVDS 
start=15826943, blocks=1, type=ANCHOR 

After creating partition

(parted) print                                                            
Model: USB DISK 2.0 (scsi)
Disk /dev/sdc: 8103MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      32,3kB  8102MB  8102MB  primary
# mkudffs --media-type=hd --blocksize=512 /dev/sdc1
start=0, blocks=64, type=RESERVED 
start=64, blocks=12, type=VRS 
start=76, blocks=180, type=USPACE 
start=256, blocks=1, type=ANCHOR 
start=257, blocks=16, type=PVDS 
start=273, blocks=1, type=LVID 
start=274, blocks=15823431, type=PSPACE 
start=15823705, blocks=1, type=ANCHOR 
start=15823706, blocks=239, type=USPACE 
start=15823945, blocks=16, type=RVDS 
start=15823961, blocks=1, type=ANCHOR 

# mkudffs --media-type=hd --blocksize=512 /dev/sdc
start=0, blocks=64, type=RESERVED 
start=64, blocks=12, type=VRS 
start=76, blocks=180, type=USPACE 
start=256, blocks=1, type=ANCHOR 
start=257, blocks=16, type=PVDS 
start=273, blocks=1, type=LVID 
start=274, blocks=15826413, type=PSPACE 
start=15826687, blocks=1, type=ANCHOR 
start=15826688, blocks=239, type=USPACE 
start=15826927, blocks=16, type=RVDS 
start=15826943, blocks=1, type=ANCHOR 

Last edited by eDio (2011-04-27 20:02:25)

Offline

#6 2011-04-27 20:41:35

eDio
Member
From: Ukraine, Kyiv
Registered: 2008-12-02
Posts: 422

Re: [SOLVED] Format USB flash stick to UDF

Hmmm... seems, like all that time I have creating fs succesfully.

At last, I removed all partitions from usb stick. Then ran mkudffs, got the same output.
Then remounted my flash drive and found, that it is readable/writable.

Parted shows no partitions. Kde partition manager says, that there is unknown partition... Going to try stick in Windows later (have no Windows at home). If ok, will mark thread as solved

Thanks for help.

Offline

#7 2011-05-04 20:23:58

eDio
Member
From: Ukraine, Kyiv
Registered: 2008-12-02
Posts: 422

Re: [SOLVED] Format USB flash stick to UDF

Solution to make flash readable-writable under Linux and Windows 7:
1. create partition of type 06 (FAT16)
2. make udf fs on that partition

# mkudffs --media-type=hd --blocksize=512 /dev/sdc1

Offline

#8 2011-12-19 17:32:05

xbj9000
Member
Registered: 2010-04-23
Posts: 2

Re: [SOLVED] Format USB flash stick to UDF

It shouldn't be necessary to create any partitions.. 


first, obliterate any existing partition table (a leftover table will cause problems -- I suspect this happened to you):

# dd if=/dev/zero of=/dev/sdX bs=512 count=1


then format:

# mkudffs --blocksize=512 --media-type=hd --utf8 --lvid=DriveLabel --vid=DriveLabel --fsid=DriveLabel /dev/sdX


--lvid, --vid and --fsid are optional and not important as far as I know, and they will all default to "LinuxUDF" if not set..

Last edited by xbj9000 (2011-12-19 17:33:45)

Offline

Board footer

Powered by FluxBB