Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
aports
aports
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 649
    • Issues 649
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 205
    • Merge Requests 205
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • alpine
  • aportsaports
  • Issues
  • #8090

Closed
Open
Opened Oct 31, 2017 by Harald Becker@ralda

fsck on Rspberry Pi (possibly other systems too)

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.

(from redmine: issue id 8090, created on 2017-10-31, closed on 2017-11-29)

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
3.7.0
Milestone
3.7.0 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: alpine/aports#8090