Installer does not handle FAT16 file systems

DoneSubmitted by Graham Lee.
Details
3 participants
  • Danny Milosavljevic
  • Graham Lee
  • Ludovic Courtès
Owner
unassigned
Severity
important
G
G
Graham Lee wrote on 14 May 2019 00:01
Filesystem error in the installer
(address . bug-guix@gnu.org)
63bd426cd2764658e6c1b5379544d7993c8ddc4a.camel@iamleeg.com
Hi folks,

I'm trying to install from the GNU GUIX 1.0.0 ISO, which I've copied to
USB. I pick the graphical installer, run through the language,
timezone, and keyboard choices. Then I either pick "guided" or "guided
with encryption" partition scheme, and I choose one big partition
instead of separate /home. Then the error appears.

I've attached a scaled down photo of the trace, as that was the easiest
way to get it off of the system I'm running on (which isn't networked
at the time of error). For clarity, the error message is:

ice-9/eval.scm:159:9: Unhandled fat16 fs-type

My hardware is a Dell Latitude E7450 and I'm trying to use a (currently
GPT-partitioned) Samsung SSD PM871 mSATA 256GB disk. If the installer
is confused by the existing FAT16 partition, that's the EFI partition.

Presumably I could work around it by repartitioning and removing the
EFI partition before running the installer. If so, should I switch to
an MBR partition table? Or is there a fix, or another workaround?

Thanks for your help,
Graham.
L
L
Ludovic Courtès wrote on 14 May 2019 10:12
control message for bug #35722
(address . control@debbugs.gnu.org)
87ef51314t.fsf@gnu.org
retitle 35722 Installer does not handle FAT16 file systems
L
L
Ludovic Courtès wrote on 14 May 2019 10:12
(address . control@debbugs.gnu.org)
87d0kl314o.fsf@gnu.org
severity 35722 important
L
L
Ludovic Courtès wrote on 14 May 2019 18:30
Re: bug#35722: Filesystem error in the installer
(name . Graham Lee)(address . graham@iamleeg.com)
871s11yp5b.fsf@gnu.org
Hello,

Graham Lee <graham@iamleeg.com> skribis:

Toggle quote (12 lines)
> I'm trying to install from the GNU GUIX 1.0.0 ISO, which I've copied to
> USB. I pick the graphical installer, run through the language,
> timezone, and keyboard choices. Then I either pick "guided" or "guided
> with encryption" partition scheme, and I choose one big partition
> instead of separate /home. Then the error appears.
>
> I've attached a scaled down photo of the trace, as that was the easiest
> way to get it off of the system I'm running on (which isn't networked
> at the time of error). For clarity, the error message is:
>
> ice-9/eval.scm:159:9: Unhandled fat16 fs-type

I tried in a VM to provide a disk with a FAT16 partition to reproduce
this bug. I could hit this particular error when choosing the “manual”
partitioning method and then selecting the FAT16 partition. However I
could not reproduce the bug when choosing the “guided” methods.

I think we don’t need the installer to be able to create FAT16
partitions; we merely need it to recognize and gracefully handle them
when they exist (which I think is quite unusual: the EFI System
Partition seems to be FAT32 usually, no?).

Anyway I think this is fixed by commit
628d09ae53047ea666f4f84ae5e5be911647fe8c, which Danny just pushed. :-)

Thanks,
Ludo’.
Closed
D
D
Danny Milosavljevic wrote on 14 May 2019 18:50
20190514185008.768fcc9c@scratchpost.org
Toggle quote (3 lines)
> Anyway I think this is fixed by commit
> 628d09ae53047ea666f4f84ae5e5be911647fe8c, which Danny just pushed. :-)

Yeah, but I fixed it by adding the file system type--which is kinda a sledgehammer
approach. We really don't want to include every file system known to man in the
installer. In this case we had fat32 already--which uses the same package as
fat16 anyway.

Maybe it would be better long term to make it impossible to edit those
entries that we don't know how to handle, while still not crashing/restarting
the installer.

Right now, gnu/installer/newt/partition.scm:604 (listbox-action) will fail
because partition->user-partition fails. The former should probably be
modified such that it just shows an error message dialog (without
stacktrace) and lets the user continue on his way after he dismisses it.

Unfortunately, I don't know enough about newt to do that myself.

The naming throws me off, too. What's a user-partition compared to a
partition? *scratches head*

partition-filesystem-user-type does some manual mapping of parted
file system names to "user" names (that's what actually fails).
Sounds like a lot of extra complexity to me. Is it worth it?
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlza8cAACgkQ5xo1VCww
uqXKCgf+NbPTnLNiS83ADQkdcwYmq8JojVepa5VMSztxpQKYO5KtEsELL8HZIwse
PqmuJZFaDK1aWZtYHO23bTY6aCmb4B//269sMCDuW0SuwY7rNt84EAnwOqV/FiGl
jnIvynQXtlEWnFcUmOXekWLKcebU4dSSIRFxJH7AwJaHtG0A3vOhJn+tUudiiZsY
kVvJTzZb+g0dNdDuI1hnrsCEIFcTgHZAXXa0WoVGSUFN61sniRpdlads8Lk9M6cA
0X5ft3t14oQ9LjPzcGjtUcht4o4M8NjDCSM5Eb+hOvVeOWiuNYJaM3L6fhWKVxUo
ySu+ZWiiz+oYHaWGudXmJtk+dfIWbA==
=vKZL
-----END PGP SIGNATURE-----


Closed
D
D
Danny Milosavljevic wrote on 14 May 2019 19:00
20190514190053.275fed24@scratchpost.org
Or just not let the user select "Format this partition" if we don't know how to
format it.
Also not let the user specify a mount point if we don't know how to mount it.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlza9EUACgkQ5xo1VCww
uqWsNwf+KN2jCn7SUBl61e+Jw0Pug6aDoYndP1O0R6wyl1ltnbXl23YoW+04laD7
fE3L+D/4u6fZ9b0W5c7naNmuOlK+l4ejvckM2H2m6v12WlBvC0s96tkQ4u2QYYZK
d99Sv+3hmxPhd3vImOY35WTpNCMCk/h7HaDYp58dNKksD26WK4q6q8iFyZ/gUZBf
iYOj8aDPk6we6Ki1sojIyMQDR1TNPlf4sTnyLSo16R7wJeQrLFJshU5Lg7zhQhOT
uMvB4Sj+6MlgTLYxwuPpr1XNlAscsxCs4k0D7AefLZRK041bU0vrf7UIhA2kLQQ0
zw1FX45+H4ZpO9/TLE0Wbajrno73Fw==
=0lwd
-----END PGP SIGNATURE-----


Closed
G
G
Graham Lee wrote on 14 May 2019 19:37
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
C3EE1B27-9032-44CC-BACF-5E0C984EE839@iamleeg.com
Hi,

Toggle quote (6 lines)
> On 14 May 2019, at 18:00, Danny Milosavljevic <dannym@scratchpost.org> wrote:
>
> Or just not let the user select "Format this partition" if we don't know how to
> format it.
> Also not let the user specify a mount point if we don't know how to mount it.

Thanks Danny, I appreciate you pushing a fix. I will find out how to make an updated installer and try again :).

Just to clear up, though, I was going through the guided partitioning, so didn’t either select to format the partition or try to mount it. It was already there, I have no opinion on it except that if it disappears my EFI probably breaks :). But this means that I’m not sure the fixes you described above would have helped in my situation. Also I would expect to install EFI-based GRUB so if I want to do that from the GUIX installer (and not, say, boot some other GNU/Linux installer to install GRUB), I would need to mount the FAT16 partition, or I [or the guided partitioning system] would need to know to recreate it as FAT32.

I understand that there are firmwares out there (I don’t know about mine) that won’t recognise small FAT partitions unless they are FAT16. On the other hand, the UEFI specification seems to expect the partition to be FAT32. So this is a case of different things working in theory and in practice. Also in practice: mkfs.fat will make small filesystems FAT16 by default, and some distros (notably, Fedora, which is what my target machine currently runs) don’t tell it otherwise. So even if the EFI partition is always FAT32 in theory, there will be practical cases where it’s FAT16.

Thanks again,
Graham.
Closed
D
D
Danny Milosavljevic wrote on 14 May 2019 20:20
20190514201804.22dd17fd@scratchpost.org
Root cause analysis:

(user-partitions (append
(auto-partition disk #:scheme scheme)
(create-special-user-partitions
(disk-partitions disk))))) <---


(define (create-special-user-partitions partitions)
"Return a list with a <user-partition> record describing the ESP partition
found in PARTITIONS, if any."
(filter-map (lambda (partition)
(and (esp-partition? partition)
(partition->user-partition partition))) <----
partitions))

I think create-special-user-partitions and the form above is automatically
trying to keep existing UEFI ESP partitions of the user.

And partition->user-partition failed for (existing) fat16 partitions.

So the fix of adding fat16 was definitely the right one for that specific
file system type.

It should be fine now.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlzbBtgACgkQ5xo1VCww
uqX2CQf/RVuJLJ3kVdJ5U70RHRvL0XNiLIoZsKXjbtuGhJYdhLEAkj61VuIxNVF6
25U6R5CPBmbDskSM9td0bl9FrHpl4m7N09wd4AEJOpKJJEI1zfqPcBiBZVL/L7LT
GsLrPnRPWVffKm575kO53sycXpAtEizXiHWj4GpXvEZ853W10DYhMBKTeJaWpc3S
PaXpnENLosFZw3AHuohTiJpHueR/GHD19/ZcR2KSLDo1b55SqKXhGVhviPXPwt9I
jfeWYBRYHPo8MArGWqQpBHz+AsN4bMnEO34cPmclgBmgqqWoJ8aul/7gx4zQDl4I
6wc4lsh7qkJgGqwEP+NqbHW2PtxvMw==
=e9gl
-----END PGP SIGNATURE-----


Closed
D
D
Danny Milosavljevic wrote on 14 May 2019 20:42
(name . Graham Lee)(address . graham@iamleeg.com)
20190514204257.18344ed2@scratchpost.org
Hi Graham,

On Tue, 14 May 2019 18:37:38 +0100
Graham Lee <graham@iamleeg.com> wrote:

Toggle quote (4 lines)
> Thanks Danny, I appreciate you pushing a fix. I will find out how to make an updated installer and try again :).

> Just to clear up, though, I was going through the guided partitioning, so didn’t either select to format the partition or try to mount it.

Thanks, good to know. So the bug was much worse and would basically have
prevented anyone that has this kind of EFI from using our guided partitioning.

Toggle quote (2 lines)
>But this means that I’m not sure the fixes you described above would have helped in my situation.

It would have.

(I still think that it would be better not to do the silly
"parted file system type -> user file system type" dance in the first place
but maybe there is a good reason for it. In any case, it should work now)

For the record (and for future problems like that), I went and implemented
everything we need for fat16:

* Creating
* Mounting
* Parted file system type -> user file system type conversion
* Showing that file system type in the GUI

When actually that would have been enough:

* Parted file system type -> user file system type conversion

Toggle quote (2 lines)
>Also I would expect to install EFI-based GRUB so if I want to do that from the GUIX installer (and not, say, boot some other GNU/Linux installer to install GRUB), I would need to mount the FAT16 partition

Yes.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlzbDDEACgkQ5xo1VCww
uqVW2Af/ZUoPZRGwZT8OqKzMkNqX4/vqBTeCd85UxytTiiC3J0HqTkJVm47Jd2yH
2QvKZn/K694h3QSMn5ISHabUtchHZ/AS+jee52bp1z1yZiGoNFJRpLtOBKvqY6Uj
stnq8ji9sJsRA5JemS7rV4dISY1IVpApUjzroX8aXEdxmq9KA7vugv41YjFoE/Kj
Y/WvPzbaVuA1uCP7jmGlNCA04IKVVpYGVifGAqEKOER45VeE6JZrB6PSKBKFRtAj
YdbN5DMpd5yDEXMtml6jXYF1C4cnoV8HWmnzrsHj2CwIJyIjPZztVzg6LEOmYAWb
lKuEHtVok6GfWU/8WqL0NsuFYXxRQg==
=GEfK
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 35722@debbugs.gnu.org