9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Richard Miller <9fans@hamnavoe.com>
To: 9fans@9fans.net
Subject: Re: [9fans] pi4 USB '/boot/kfs' error
Date: Sat, 7 Jan 2023 19:49:48 +0000	[thread overview]
Message-ID: <baf38d3a75b4e6381244e8953ceb7c84@hamnavoe.com> (raw)
In-Reply-To: <BDC56530-D966-440E-8068-4B918DEC47E0@germteig.com>

marco@germteig.com:
> I am running the Dec 22 9legacy on a machine, and now want to create a bootable USB on it.
> The USB is for a raspberry pi 4 4GB, acting as a standalone auth only.

When you say "bootable USB", do you want to boot the pi4 without an
SD card, and just a USB drive?

If you're happy to have both SD card and USB drive, you can use the
SD card to hold a DOS partition (with bootable kernel and cmdline.txt)
and a fsconfig partition (to hold a partition configuration for a
/dev/fs device (see fs(3)) which maps the USB drive. This is what I do
to set up a pi4 file server with fossil on a SSD drive. My pi4 kernel
config doesn't have partfs, fdisk and prep in the bootdir section,
and does have fs in the dev section. The cmdline.txt is
  readparts=1 nvram=#S/sdM0/nvram fsconfig=#S/sdM0/fscfg bootargs=local!/dev/sdXX/fossil
and the fscfg partition on the SD card looks like this (the fsdev:
first line seems to be undocumented)

fsdev:
part sdXX/nvram /dev/sdU0.0/data 2096640 512
part sdXX/fossil /dev/sdU0.0/data 2097152 8192000000
part sdXX/swap /dev/sdU0.0/data 8194097152 2048000000

... plus some other partitions for venti, etc

I use the fs(3) device because I haven't been able to get partfs(8)
to work at boot time. I think there may be a bug in /sys/src/9/boot
where an extra re-mount is missed out.

If you want to boot the pi4 completely from a USB drive, with no
SD card present (I've never tried this), you'll need an alternative
place for a fs(3) configuration (maybe in the built-in bootdir in
the kernel?), or the boot code will need tweaking to get the partfs(8)
partitions re-mounted at the right time.


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T4cb044b1eee98e3e-Mc9962f736d0b6ee6e0c0ad7b
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

  reply	other threads:[~2023-01-07 19:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-07 17:40 Marco Feichtinger
2023-01-07 19:49 ` Richard Miller [this message]
2023-01-07 20:53   ` Marco Feichtinger
2023-01-07 22:21     ` Richard Miller
2023-01-08 15:59   ` Richard Miller
2023-01-08 17:36     ` Marco Feichtinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=baf38d3a75b4e6381244e8953ceb7c84@hamnavoe.com \
    --to=9fans@hamnavoe.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).