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: Sun, 8 Jan 2023 15:59:03 +0000	[thread overview]
Message-ID: <269c5d9ba480047a140fe06b6ca5167e@hamnavoe.com> (raw)
In-Reply-To: <baf38d3a75b4e6381244e8953ceb7c84@hamnavoe.com>

I said:
> 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.

I've done a bit of experimenting, and did manage to boot a pi4 with
only a usb drive and no SD card. It turns out that you can use the
first part of the mbr sector on the usb drive to store the fs(3)
configuration, ie fsconfig=/dev/sdU0.0/data in cmdline.txt -- as
long as you don't have so many partitions that the config text
overlaps the DOS partition information in the mbr (at offset 0x1be),
the pi4 bootrom code will happily boot from the usb drive. I wouldn't
suggest that PC users try this - a PC bios might be more strict about
what's in the mbr.

Booting without an SD card seems to have some rough edges. You get
irritating error messages when startup procedures include /dev/sdM0
in the list of disks to look at, and the reboot(8) command doesn't
work because the usb disk interface probably needs some soft-reset
to be done before the pi bootrom can initialise it again.  Even if
you are primarily using a usb drive, booting from SD (or netbooting?)
might still be preferable.


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

  parent reply	other threads:[~2023-01-08 15:59 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
2023-01-07 20:53   ` Marco Feichtinger
2023-01-07 22:21     ` Richard Miller
2023-01-08 15:59   ` Richard Miller [this message]
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=269c5d9ba480047a140fe06b6ca5167e@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).