linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: "Andreas Bombe" <aeb@debian.org>,
	util-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Andrius Štikonas" <andrius@stikonas.eu>,
	"Curtis Gedak" <gedakc@gmail.com>,
	"Andy Shevchenko" <andy.shevchenko@gmail.com>,
	"Pavel Machek" <pavel@ucw.cz>
Subject: Re: Linux & FAT32 label
Date: Mon, 20 Nov 2017 12:12:56 +0100	[thread overview]
Message-ID: <20171120111256.zqvmpzdcf6ncyi5m@ws.net.home> (raw)
In-Reply-To: <20171119124440.ffxx64zjmwedmtdp@pali>

On Sun, Nov 19, 2017 at 01:44:40PM +0100, Pali Rohár wrote:
> On Thursday 09 November 2017 22:21:31 Pali Rohár wrote:
> > So from all tests and discussion I would propose new unification:
> > 
> > 1. Read label only from the root directory. If label in root directory
> >    is missing then disk would be treated as without label. Label from
> >    boot sector would not be read.
> > 
> >    --> Reason: Windows XP and mlabel ignores what is written in boot
> >        sector. Windows XP even do not update boot sector, so label
> >        stored in boot sector is incorrect after any change done by
> >        Windows XP.
> > 
> >        This logic is used by all tested MS-DOS and Windows versions,
> >        plus also by mtools on Linux.
> > 
> > 2. Write label to to both location, boot sector and root directory.
> > 
> >    --> Reason: MS-DOS 6.22, MS-DOS 7.10, Windows 98 and also mtools on
> >        Linux do this. This is also what is written in FAT specification.
> > 
> >        It also provides backward compatibility with old dosfslabel
> >        versions which read label only from boot sector.
> > 
> > 2. Process 'NO NAME    ' label in root directory as 'NO NAME' name. Not
> >    as empty label.
> > 
> >    --> Reason: 'NO NAME    ' is regular entry in root directory and both
> >        Windows XP and mlabel handle it in this way.
> > 
> > 3. Process 'NO NAME    ' label in boot directory as empty label. Not as
> >    label with name 'NO NAME'.
> > 
> >    --> Reason: On Windows XP when formatting empty disk and label is not
> >        specified then 'NO NAME    ' is stored to boot sector.
> > 
> >        Also in FAT specification is written that empty label is stored
> >        as 'NO NAME    '.
> > 
> > With this change we would get compatibility with MS-DOS, Windows (both
> > DOS-based and NT-based) and also with Linux mtools, modulo problems DOS
> > code page.
> > 
> > There are just two negatives:
> > 
> > 1) Labels set by old dosfslabel versions (which stored them only to boot
> >    sector) would not be visible. But they are already not visible on
> >    MS-DOS or Windows machines, and also via mlabel (from mtools).
> > 
> > 2) Behavior of blkid and fatlabel would be changed as both tools have
> >    different as proposed above, and based on tests they also differ each
> >    from other.
> > 
> > Andreas, Karel, what do you think about it?
> 
> Also for other people, do any have comments on my proposed solution?

Go ahead and send patch :-) (also with LABEL_FATBOOT=)

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

  reply	other threads:[~2017-11-20 11:13 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-04 15:33 Linux & FAT32 label Pali Rohár
2017-10-11 21:24 ` Pali Rohár
2017-10-11 21:29   ` Pali Rohár
2017-10-11 21:44   ` Pali Rohár
2017-10-12  8:56     ` Karel Zak
2017-10-12  9:21       ` Pali Rohár
2017-10-12 10:13         ` Karel Zak
2017-10-12 20:49           ` Pali Rohár
2017-10-16  1:12             ` Andreas Bombe
2017-10-16  7:28               ` Pali Rohár
2017-10-30 15:29                 ` Pali Rohár
2017-10-31  8:35               ` Andy Shevchenko
2017-11-05 13:39                 ` Pali Rohár
2017-11-05 13:56                   ` Andy Shevchenko
2017-11-05 14:07                     ` Pali Rohár
2017-11-05 14:25                       ` Andy Shevchenko
2017-11-05 14:34                         ` Pali Rohár
2017-11-05 14:51                           ` Andy Shevchenko
2017-11-05 14:56                             ` Pali Rohár
2017-11-06 10:14                           ` Karel Zak
2017-11-09  8:59                             ` Pali Rohár
2017-11-09 11:02                               ` Karel Zak
2017-11-05 20:35                       ` Theodore Ts'o
2017-11-05 21:12                         ` Pali Rohár
2017-11-07 17:28                           ` Theodore Ts'o
2017-11-09  9:01                             ` Pali Rohár
2017-11-09 16:21                               ` Theodore Ts'o
2017-11-09 17:33                                 ` Pali Rohár
2017-11-05 14:12                     ` Andrius Štikonas
2017-10-15  6:59     ` Pavel Machek
2017-10-15 22:04       ` Pali Rohár
2017-10-16  1:12         ` Andreas Bombe
2017-11-05 13:06   ` Pali Rohár
2017-11-09 21:21     ` Pali Rohár
2017-11-19 12:44       ` Pali Rohár
2017-11-20 11:12         ` Karel Zak [this message]
2017-11-22  8:52           ` Pali Rohár
2017-11-22 11:03             ` Karel Zak
2017-11-22 14:29               ` Andrius Štikonas
2017-11-23  9:01               ` Pali Rohár
2017-11-26 19:19           ` Pali Rohár
2017-11-27 12:13             ` Karel Zak
2018-02-14 21:52               ` Pali Rohár
2018-02-14 21:54                 ` Pali Rohár
2018-02-15 10:21                   ` Karel Zak
2018-03-07  8:28               ` Pali Rohár
2017-11-29 23:21           ` Pali Rohár
2018-01-29 16:49             ` Pali Rohár
2017-12-16 22:45       ` Pali Rohár

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171120111256.zqvmpzdcf6ncyi5m@ws.net.home \
    --to=kzak@redhat.com \
    --cc=aeb@debian.org \
    --cc=andrius@stikonas.eu \
    --cc=andy.shevchenko@gmail.com \
    --cc=gedakc@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).