Project

General

Profile

Bug #8090

fsck on Rspberry Pi (possibly other systems too)

Added by Harald Becker over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Boot sequence
Target version:
Start date:
10/31/2017
Due date:
% Done:

100%

Estimated time:
Affected versions:
Security IDs:

Description

Installing Alpine Linux on a Raspberry Pi SD Card revealed a bunch of bugs belonging to fsck of OpenRC startup:

The Raspberry Pi Boot Partition is a DOS FAT32 Partition, so the dosfstools package is required else the fsck crashes sometimes horribly because of the missing fsck.vfat.

... but just installing the package dosfstools, got the Pi unable to boot successfully. It took me some time to find the reason for this. The OpenRC file system check uses the Busybox fsck, which call the fsck helpers. For the FAT partitition this is called as:

from Busybox fsck => fsck.vfat -p -C0 UUID=xxx...

fsck.vfat is symlinked to fsck.fat, so is the command dosfsck, but it does not understand the -C0 option like the ext2/3/4 handlers. So the fsck dumps the usage text on startup, and then the startup crashes due to fsck exit code. Won't let you get to a working logging prompt this way.

... but removing -C0 option another problem is revealed. dosfsck doesn't understand the UUID=... or LABEL=... syntax, it needs the bare block device name ... but usually the partition is setup in /etc/fstab with the UUID methode.

The easiest workaround is, to remove the symlink from /usr/sbin/dosfsck to fsck.fat, rename fsck.fat to dosfsck, and create an fsck.fat shell script wrapper:

cd /usr/sbin
rm dosfsck
mv fsck.fat dosfsck
echo "#!/bin/sh" >fsck.fat
chmod 755 fsck.fat

This at least let the Raspberry Pi successfully boot with unmodified OpenRC scripts. Usually a quick helper in this situation, until we get some other changes on this topic.

... and this also effect other systems (tested on x86_64) which include a FAT partition on there disk setup, so it is not a specific Raspberry Pi problem.

History

#1 Updated by Natanael Copa about 1 year ago

  • Status changed from New to Resolved
  • Target version set to 3.7.0
  • % Done changed from 0 to 100

#2 Updated by Natanael Copa about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF