Re: How to boot from SD but run from US

Liste des GroupesRevenir à cs raspberry-pi 
Sujet : Re: How to boot from SD but run from US
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.sys.raspberry-pi
Date : 11. Mar 2025, 04:42:33
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vqobf9$1m25v$2@dont-email.me>
References : 1 2
User-Agent : Pan/0.162 (Pokrosvk)
On Wed, 26 Feb 2025 17:45:00 +1300, Dave Vandermeer wrote:

Actually I did read somewhere that it is possible. Technically you
only need to use the SD card to boot to init, so modify your
/etc/fstab to change the location of your root partition to the
device of the USB drive.

The root volume (mounted on “/”) is the one volume that cannot be
mounted/dismounted directly in the normal way on a Linux system.
Instead, the kernel offers a special system call, pivot_root(2)
<https://manpages.debian.org/pivot_root(2)>, for handling setup of the
root volume.

At boot time, the initial root volume is the contents of the initrd
(“initial RAM disk”) image loaded by the bootloader along with the
kernel. This contains, among other things, some minimal startup script
that interprets the “root=” option that was passed to the kernel as
its command line from the bootloader. At the end of initrd processing,
it finds this volume, mounts it on a temporary directory somewhere,
and uses pivot_root to swap that with the initrd root. The initrd
filesystem (which is not root any more) is now mounted on that
temporary directory and can be dismounted from it in the normal way,
and all further processing can continue with the new root filesystem
as “/”.

In a sense, the entry in /etc/fstab for the filesystem to mount on “/”
is redundant in that it can never be used: accessing it means being
able to open /etc/fstab in the first place, and you can only do that
if the proper “/” is already mounted.

Date Sujet#  Auteur
23 Jan 25 * How to boot from SD but run from USB?36Chris Green
24 Jan 25 +* Re: How to boot from SD but run from USB?6yeti
24 Jan 25 i`* Re: How to boot from SD but run from USB?5Chris Green
24 Jan 25 i `* Re: How to boot from SD but run from USB?4Theo
24 Jan 25 i  `* Re: How to boot from SD but run from USB?3Chris Green
28 Jan 25 i   `* Re: How to boot from SD but run from USB?2Lawrence D'Oliveiro
28 Jan 25 i    `- Re: How to boot from SD but run from USB?1Chris Green
23 Jan 25 +* How to boot from SD but run from USB?19Dennis Slagers
24 Jan 25 i`* Re: How to boot from SD but run from USB?18druck
24 Jan 25 i +* How to boot from SD but run from USB?7Dennis Slagers
26 Feb 25 i i`* How to boot from SD but run from US6Dave Vandermeer
28 Feb 25 i i +* How to boot from SD but run from US2Dennis Slagers
2 Mar 25 i i i`- Re: How to boot from SD but run from US1The Natural Philosopher
2 Mar 25 i i +- Re: How to boot from SD but run from US1yeti
11 Mar 25 i i +- Re: How to boot from SD but run from US1Lawrence D'Oliveiro
11 Mar 25 i i `- How to boot from SD but run from US1Grant Weasner
24 Jan 25 i `* How to boot from SD but run from USB?10Dennis Slagers
27 Jan 25 i  +* Re: How to boot from SD but run from USB?3The Natural Philosopher
28 Jan 25 i  i`* Re: How to boot from SD but run from USB?2Lawrence D'Oliveiro
28 Jan 25 i  i `- Re: How to boot from SD but run from USB?1Theo
26 Feb 25 i  `* How to boot from SD but run from US6Dave Vandermeer
28 Feb 25 i   +* How to boot from SD but run from US2Dennis Slagers
5 Mar 25 i   i`- Re: How to boot from SD but run from US1Adrian Caspersz
4 Mar 25 i   +- Re: How to boot from SD but run from US1The Natural Philosopher
4 Mar 25 i   `* Re: How to boot from SD but run from US2druck
5 Mar 25 i    `- Re: How to boot from SD but run from US1The Natural Philosopher
24 Jan 25 +* Re: How to boot from SD but run from USB?9The Natural Philosopher
24 Jan 25 i+* Re: How to boot from SD but run from USB?3Theo
24 Jan 25 ii`* Re: How to boot from SD but run from USB?2The Natural Philosopher
28 Jan 25 ii `- Re: How to boot from SD but run from USB?1Lawrence D'Oliveiro
24 Jan 25 i`* Re: How to boot from SD but run from USB?5Chris Green
24 Jan 25 i `* Re: How to boot from SD but run from USB?4The Natural Philosopher
24 Jan 25 i  +* Re: How to boot from SD but run from USB?2Chris Green
24 Jan 25 i  i`- Re: How to boot from SD but run from USB?1The Natural Philosopher
28 Jan 25 i  `- Re: How to boot from SD but run from USB?1Lawrence D'Oliveiro
23 Jan 25 `- How to boot from SD but run from USB?1Dennis Slagers

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal