mbox series

[0/2] udf: A cleanup and a mount fix

Message ID 20180821135429.676-1-jack@suse.cz (mailing list archive)
Headers show
Series udf: A cleanup and a mount fix | expand

Message

Jan Kara Aug. 21, 2018, 1:54 p.m. UTC
Hi,

this series removes some dead code from UDF and fixes mounting of
Win7-created media. I plan to merge these fixes through my tree. Review
is welcome.

								Honza

Comments

Jan Kara Aug. 22, 2018, 3:24 p.m. UTC | #1
Hi,

On Wed 22-08-18 15:25:51, jean-luc malet wrote:
> I didn't had time to test the patch yet but there is an issue in udf detection
> of mount (using udf formated partition with mkfs.udf under linux)
> when I do 
> # mount /dev/sdx1 /some/mount/point 
> it gives an error, syslog show and error saying exfat marker wasn't found (the
> partion id is set to one of the windows compatible one, either exfat/ntfs or
> one of the fat32 or 0x7 as described into https://serverfault.com/questions/
> 35243/what-is-the-partition-id-filesystem-type-for-udf : Short answer: I would
> suggest to use MBR id 0x07 for UDF partitions. so that it's detected by windows
> and have a drive letter assigned)
> but
> #mount /dev/sdx1 /some/mount/point -t udf 
> works fine
> don't know where it is relevant to file the bug... 

This is a different issue. Older versions of mkfs.udf did not wipe all
locations on disk where other filesystems (previous filesystems on the
media) could have their identifications. So mount finds exfat signature,
tries to mount the device as FAT which fails (as UDF has already
overwritten lots of its metadata). Right, Pali?

								Honza

> 
> thanks and regards
> 
> On Tue, Aug 21, 2018 at 3:54 PM Jan Kara <jack@suse.cz> wrote:
> 
> 
>     Hi,
> 
>     this series removes some dead code from UDF and fixes mounting of
>     Win7-created media. I plan to merge these fixes through my tree. Review
>     is welcome.
> 
>                                                                     Honza
>
Pali Rohár Aug. 22, 2018, 3:35 p.m. UTC | #2
On Wednesday 22 August 2018 17:24:35 Jan Kara wrote:
> Hi,
> 
> On Wed 22-08-18 15:25:51, jean-luc malet wrote:
> > I didn't had time to test the patch yet but there is an issue in udf detection
> > of mount (using udf formated partition with mkfs.udf under linux)
> > when I do 
> > # mount /dev/sdx1 /some/mount/point 
> > it gives an error, syslog show and error saying exfat marker wasn't found (the
> > partion id is set to one of the windows compatible one, either exfat/ntfs or
> > one of the fat32 or 0x7 as described into https://serverfault.com/questions/
> > 35243/what-is-the-partition-id-filesystem-type-for-udf : Short answer: I would
> > suggest to use MBR id 0x07 for UDF partitions. so that it's detected by windows
> > and have a drive letter assigned)
> > but
> > #mount /dev/sdx1 /some/mount/point -t udf 
> > works fine
> > don't know where it is relevant to file the bug... 
> 
> This is a different issue. Older versions of mkfs.udf did not wipe all
> locations on disk where other filesystems (previous filesystems on the
> media) could have their identifications. So mount finds exfat signature,
> tries to mount the device as FAT which fails (as UDF has already
> overwritten lots of its metadata). Right, Pali?

Yes, older versions of mkudffs (mkfs.udf) prior to 2.0 did not do any
cleanup. Just write new needed UDF structures to device. UDF itself does
not use first 32kB of disk, therefore any existing FAT/NTFS/ext*
signatures stay there. So ideally prior using older mkudffs erase first
10MB of disk, this should be enough to wipe all existing filesystem
signatures. Or use new version of mkudffs 2.0+.