Gokrazy mkfs: a program to create an ext4 file system on the gokrazy perm partition

gokrazy mkfs

This program is intended to be run on gokrazy only, where it will create an ext4 file system on the perm partition and then reboot your system. If /perm is already mounted, the program will exit without changing anything.

The gokrazy mkfs program includes a frozen copy of the mke2fs program from the e2fsprogs package from Debian.

Usage

You can either include this program in your gokr-packer command line:

gokr-packer \
  -overwrite=/dev/sdx \
  -serial_console=disabled \
  github.com/gokrazy/fbstatus \
  github.com/gokrazy/hello \
  github.com/gokrazy/serial-busybox \
  github.com/gokrazy/mkfs

…or, if you want to run it only once without otherwise including it in your installation, you can use gok run:

git clone https://github.com/gokrazy/mkfs
cd mkfs
gok run -i bakery
Similar Resources

A virtual file system for small to medium sized datasets (MB or GB, not TB or PB). Like Docker, but for data.

AetherFS assists in the production, distribution, and replication of embedded databases and in-memory datasets. You can think of it like Docker, but f

Feb 9, 2022

GeeseFS is a high-performance, POSIX-ish S3 (Yandex, Amazon) file system written in Go

GeeseFS is a high-performance, POSIX-ish S3 (Yandex, Amazon) file system written in Go

GeeseFS is a high-performance, POSIX-ish S3 (Yandex, Amazon) file system written in Go Overview GeeseFS allows you to mount an S3 bucket as a file sys

Jan 1, 2023

Encrypted File System in Go

Getting Started: Setup the environment: Install GoLang: $ sudo apt update $ sudo apt upgrade $ sudo apt install libssl-dev gcc pkg-config $ sudo apt

Apr 30, 2022

Go program for uploading files to Google Drive

gdrive-upload Go program for uploading files to Google Drive. Installation Install Go Homebrew: sudo brew install go apt-get: sudo apt-get install gol

Nov 13, 2021

FujiSimuRecipesGen - A Golang program to generate Fujifilm simulations from recipes of such simulations in CSV

FujiSimuRecipesGen - A Golang program to generate Fujifilm simulations from recipes of such simulations in CSV

Aug 12, 2022

Create ePub files from URLs

url2epub Create ePub files from URLs Overview The root directory provides a Go library that creates ePub files out of URLs, with limitations.

Nov 5, 2022

Easily create & extract archives, and compress & decompress files of various formats

archiver Introducing Archiver 3.1 - a cross-platform, multi-format archive utility and Go library. A powerful and flexible library meets an elegant CL

Jan 3, 2023

Easily create Go files from stub files

go-stubs Easily create .go files from stub files in your projects. Usage go get github.com/nwby/go-stubs Create a stub file: package stubs type {{.Mo

Jan 27, 2022

Create all possible binaries from go files

Create all possible binaries from go files

nextBuild.go Create all possible binaries of a project in go ChangeLog 0.0.1 ─ First release. Flags You can alter a few things when creating the binar

Dec 8, 2022
Comments
  • Use armel instead of armhf for mke2fs.arm

    Use armel instead of armhf for mke2fs.arm

    On a Raspberry Pi 1B (using the community kernel, mkfs segfaults consistently for me.

    Debugging this through breakglass+busybox, I found the mke2fs binary shipped with mkfs doesn't work:

    /tmp # wget https://raw.githubusercontent.com/gokrazy/mkfs/main/third_party/e2fsprogs-1.46.5/mke2fs.arm
    Connecting to raw.githubusercontent.com (185.199.110.133:443)
    wget: note: TLS certificate validation not implemented
    saving to 'mke2fs.arm'
    mke2fs.arm           100% |**********************| 1271k  0:00:00 ETA
    'mke2fs.arm' saved
    
    /tmp # chmod +x mke2fs.arm
    /tmp # ./mke2fs.arm
    Segmentation fault
    

    Trying another pre-built mke2fs binary for arm, this is the result:

    /tmp # wget https://raw.githubusercontent.com/FerryAr/e2fsprogs-arm/master/system/bin/mke2fs
    Connecting to raw.githubusercontent.com (185.199.108.133:443)
    wget: note: TLS certificate validation not implemented
    saving to 'mke2fs'
    mke2fs               100% |************************| 1805k  0:00:00 ETA
    'mke2fs' saved
    
    /tmp # chmod +x mke2fs
    /tmp # ./mke2fs
    Usage: mke2fs [-c|-l filename] [-b block-size] [-C cluster-size]
            [-i bytes-per-inode] [-I inode-size] [-J journal-options]
            [-G flex-group-size] [-N number-of-inodes] [-d root-directory]
            [-m reserved-blocks-percentage] [-o creator-os]
            [-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]
            [-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]
            [-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z undo_file]
            [-jnqvDFSV] device [blocks-count]
    

    This is the diff that file shows:

    [/tmp] $ file mke2fs.arm
    mke2fs.arm: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), statically linked, BuildID[sha1]=2630dddab326a63955b5b612f5d43a489a29faee, for GNU/Linux 3.2.0, with debug_info, not stripped
    
    [/tmp] $ file mke2fs
    mke2fs: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, with debug_info, not stripped
    

    I tried switching from armhf to armel and it now works for me (notice how it changed to SYSV, when I switched to armel):

    third_party/e2fsprogs-1.46.5/mke2fs.arm: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, BuildID[sha1]=0849a1ec38b458bc0897662aa55d3a9e710861ba, for GNU/Linux 3.2.0, with debug_info, not stripped
    
  • Restart fails

    Restart fails

    Coming from https://github.com/gokrazy/gokrazy/issues/154.

    Restarting doesn't work when run through qemu. This is stderr:

    2022/11/20 18:01:38 gokrazy: attempt 0, starting ["/user/mkfs"]
    2022/11/20 18:01:38 Found mountpoint "/"
    2022/11/20 18:01:38 Found mountpoint "/dev"
    2022/11/20 18:01:38 Found mountpoint "/tmp"
    2022/11/20 18:01:38 Found mountpoint "/dev/pts"
    2022/11/20 18:01:38 Found mountpoint "/dev/shm"
    2022/11/20 18:01:38 Found mountpoint "/run"
    2022/11/20 18:01:38 Found mountpoint "/proc"
    2022/11/20 18:01:38 Found mountpoint "/sys"
    2022/11/20 18:01:38 Found mountpoint "/sys/fs/cgroup"
    2022/11/20 18:01:38 No /perm mountpoint found. Creating file system on /dev/vda4
    2022/11/20 18:01:38 Writing self-contained mke2fs to /tmp/gokrazy-mkfs-204447501
    2022/11/20 18:01:38 [/tmp/gokrazy-mkfs-204447501/mke2fs -t ext4 /dev/vda4]
    mke2fs 1.46.5 (30-Dec-2021)
    Post "http://localhost/reboot": dial tcp [::1]:80: connect: connection refused
    2022/11/20 18:01:43 gokrazy: process should not be supervised, stopping
    2022/11/20 18:01:43 gokrazy: exit status 125
    

    @stapelberg I guess that's because I have moved the host application to :80 (and gokrazy is on :443). Would you like a PR for a command line option to change the port of mkfs or do you see a better approach?

go-fastdfs 是一个简单的分布式文件系统(私有云存储),具有无中心、高性能,高可靠,免维护等优点,支持断点续传,分块上传,小文件合并,自动同步,自动修复。Go-fastdfs is a simple distributed file system (private cloud storage), with no center, high performance, high reliability, maintenance free and other advantages, support breakpoint continuation, block upload, small file merge, automatic synchronization, automatic repair.(similar fastdfs).
go-fastdfs 是一个简单的分布式文件系统(私有云存储),具有无中心、高性能,高可靠,免维护等优点,支持断点续传,分块上传,小文件合并,自动同步,自动修复。Go-fastdfs is a simple distributed file system (private cloud storage), with no center, high performance, high reliability, maintenance free and other advantages, support breakpoint continuation, block upload, small file merge, automatic synchronization, automatic repair.(similar fastdfs).

中文 English 愿景:为用户提供最简单、可靠、高效的分布式文件系统。 go-fastdfs是一个基于http协议的分布式文件系统,它基于大道至简的设计理念,一切从简设计,使得它的运维及扩展变得更加简单,它具有高性能、高可靠、无中心、免维护等优点。 大家担心的是这么简单的文件系统,靠不靠谱,可不

Jan 8, 2023
This program let you create a DataSet (.CSV) with all TedTalks

TedTalks-Scraper This program let you create a file .CSV with all information from TedTalks, including: Title Description Views (Number of Views) Auth

Dec 26, 2021
create PDF from ASCII File for Cable labels

CableLable create PDF from ASCII File for Cable labels file format is one label per line, a line containing up to 3 words, each word is a line on the

Nov 8, 2021
Bigfile -- a file transfer system that supports http, rpc and ftp protocol https://bigfile.site
Bigfile -- a file transfer system that supports http, rpc and ftp protocol   https://bigfile.site

Bigfile ———— a file transfer system that supports http, rpc and ftp protocol 简体中文 ∙ English Bigfile is a file transfer system, supports http, ftp and

Dec 31, 2022
File system event notification library on steroids.

notify Filesystem event notification library on steroids. (under active development) Documentation godoc.org/github.com/rjeczalik/notify Installation

Dec 31, 2022
Pluggable, extensible virtual file system for Go

vfs Package vfs provides a pluggable, extensible, and opinionated set of file system functionality for Go across a number of file system types such as

Jan 3, 2023
Cross-platform file system notifications for Go.

File system notifications for Go fsnotify utilizes golang.org/x/sys rather than syscall from the standard library. Ensure you have the latest version

Jan 1, 2023
Dragonfly is an intelligent P2P based image and file distribution system.
Dragonfly is an intelligent P2P based image and file distribution system.

Dragonfly Note: The master branch may be in an unstable or even broken state during development. Please use releases instead of the master branch in o

Jan 9, 2023
Plik is a scalable & friendly temporary file upload system ( wetransfer like ) in golang.

Want to chat with us ? Telegram channel : https://t.me/plik_root_gg Plik Plik is a scalable & friendly temporary file upload system ( wetransfer like

Jan 2, 2023
File system for GitHub
File system for GitHub

HUBFS · File System for GitHub HUBFS is a read-only file system for GitHub and Git. Git repositories and their contents are represented as regular dir

Dec 28, 2022