Opened 3 years ago

Closed 19 months ago

Last modified 19 months ago

#17659 closed bug (fixed)

EFI fat filesystem prepared by fat fs-shell tool invalid

Reported by: kallisti5 Owned by: kallisti5
Priority: normal Milestone: Unscheduled
Component: Build System Version: R1/beta3
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

[kallisti5@freeframe rune]$ fsck.fat  /dev/loop0p1 
fsck.fat 4.2 (2021-01-31)
There is no label in boot sector, but there is volume label 'Haiku Boot' stored in root directory
1) Copy volume label from root directory to boot sector
2) Remove volume label from root directory
[12?q]? 1

*** Filesystem was changed ***
The changes have not yet been written, you can still choose to leave the
filesystem unmodified:
1) Write changes
2) Leave filesystem unchanged
[12?q]? 1
/dev/loop0p1: 12 files, 324/16343 clusters

This isn't a problem to mount it, but rune and the fat tools can't properly detect the volume label.

Change History (7)

comment:1 by kallisti5, 3 years ago

before fsck:

[kallisti5@freeframe rune]$ ./target/debug/rune  -b rpi4 -i ~/Downloads/haiku-master-hrev55948-arm-mmc.image /tmp/test
[1/4] Calculating dependencies for Raspberry Pi 4 (BCM2711) media...
[2/4] Writing Haiku to "/tmp/test"...
Error: no Haiku boot partitions

after fsck repair:

[kallisti5@freeframe rune]$ ./target/debug/rune  -b rpi4 -i ~/Downloads/haiku-master-hrev55948-arm-mmc.image /tmp/test
[1/4] Calculating dependencies for Raspberry Pi 4 (BCM2711) media...
[2/4] Writing Haiku to "/tmp/test"...
[3/4] Provisioning block device... ◒[########################################] Success (0 offsets).
[4/4] Provisioning filesystem...   ◒[########################################] Success (7 files).
Success! /tmp/test is ready to boot on the Raspberry Pi 4! Enjoy Haiku!

comment:2 by kallisti5, 3 years ago

Summary: EFI fat filesystem prepared by new internal filesystem tool invalidEFI fat filesystem prepared by fat fs-shell tool invalid

comment:3 by kallisti5, 3 years ago

The problem appears to be here: https://cgit.haiku-os.org/haiku/tree/src/add-ons/kernel/file_systems/fat/mkdos.cpp#n551

We write the volume label to the root directory, but not the boot sector of the partition.

Looking at dosfstools example here: https://github.com/dosfstools/dosfstools/blob/1da41f0e70dcbfb874e8191c639b91fa58205ea4/src/boot.c#L578

comment:4 by kallisti5, 3 years ago

Owner: changed from nobody to kallisti5
Status: newassigned

oh.. easy fix lol. we write "NO NAME " to the bootsector, but then give the root the actual name

comment:6 by jessicah, 19 months ago

Resolution: fixed
Status: assignedclosed

Fixed in hrev55952.

comment:7 by kallisti5, 19 months ago

Oops. Thanks Jessica :-)

Note: See TracTickets for help on using tickets.