~alpine/users

1

sys mode setup for RPI

Jerome Marc <marcjero@yahoo.com>
Details
Message ID
<CAD1Ag0yOBKKY56idfTUnbofGKiHm2NU=H8Tf0ERBGH4MSxkk=A@mail.gmail.com>
DKIM signature
missing
Download raw message
Hi,

I followed the instructions here :
https://wiki.alpinelinux.org/wiki/Classic_install_or_sys_mode_on_Raspberry_Pi

I ran setup-disk this way :

alpine:~# export FORCE_BOOTFS=1
alpine:~# setup-disk -m sys /mnt
ext4 is not supported. Only supported are: vfat
Continuing at your own risk.
Installing system on /dev/mmcblk0p2:
/sbin/setup-disk: line 469: can't create /mnt/boot/config.txt: nonexistent
directory
/sbin/setup-disk: line 470: can't create /mnt/boot/cmdline.txt: nonexistent
directory
100%
/boot/initramfs-rpi
You might need fix the MBR to be able to boot

I'm confused now about the /mnt/boot directory structure. Because /mnt/boot
contains kernel stuff but also the firmware files.
If I move /mnt/boot/* to /media/mmcblk0p1/boot/ firmware files and overlays
will be copied as well
This means that these files will be available twice in the boot partition
(in /media/mmcblk0p1 and /media/mmcblk0p1/boot/)

The good thing is that firmware and kernel will be managed from apk.
However if apk upgrades the firmware files they won't be used by the system
because they are located in the /media/mmcblk0p1/boot/ subdirectory/.
Or do I have to change something in config.txt to force the use of the
firmware and overlays files stored in /media/mmcblk0p1/boot/ ?

Thanks !
Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
Details
Message ID
<7cc4b38a-02b9-4584-8920-a7337027bbf9@wildtechgarden.ca>
In-Reply-To
<CAD1Ag0yOBKKY56idfTUnbofGKiHm2NU=H8Tf0ERBGH4MSxkk=A@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
Hello Jerome,

RPi installation has become much easier with 3.16.0 (or else it simply
hasn't been documented how to do this).

On 2022-05-31 7:09 a.m., Jerome Marc wrote:
> Hi,
>
> I followed the instructions here
> : https://wiki.alpinelinux.org/wiki/Classic_install_or_sys_mode_on_Raspberry_Pi
>
Instead of that you might want to try:

1. Boot Pi using freshly created SD card

2. Login as root (no password required).

3. Execute something like (see notes):

|# Notes: -eL is for encrypted (LUKS) + LVM. You can omit if you don't
want those. DISKOPTS="-eL -m sys" setup-alpine |

Enter |y| when prompted whether to use the boot media
(|/boot/mmcblk0p1|) and to enter |y| again for the prompt on whether to
erase an use the the entire disk (|mmcblk0|). This is because you will
be erasing the boot media and replacing it with a ‘classic’ OS install.
This does mean the process will be interactive at that point, because
|setup-alpine| does not currently have a fully automated way to achieve
the goal of replacing the boot install with the ‘sys’ mode install.

Reboot once the install process complete and you should have a RPi 'sys'
mode install of Alpine Linux 3.1.6.0

You might want to consider the following while using `setup-alpine`:

I recommend either not creating an admin user when prompted (and
creating one after the install) OR using a very simple password for the
new user, and updating the password after the install. The reasoning is
that with Alpine 3.16.0, which added the new user addition, there is an
error in adduser logic such that if you do not correctly enter the
password twice (password and confirmation) then you will end up stuck in
an error loop you can’t exit except by aborting the install, rebooting,
and trying again. In addition, the new user’s home directory does not
survive the first reboot. (After firstboot, if you create a user on a
system/classic install, this does not occur; the issue has to do with
what directories are preserved by the install/diskless system).

* Copied from a web page I wrote at
https://wildtechgarden.ca/deploy-admin/server-alpine-linux-docs4web/server-install-config/create-sys-aka-classic-install/

* It is my intent to integrate this into the wiki (I have released as
CC-BY-SA-4.0 to facilitate that, and the source code is at:
https://gitlab.com/danielfdickinson/server-alpine-linux-docs4web if you
get impatient to get it any of those docs on the wiki yourself.

I hope that helps!

Regards,

Daniel

> I ran setup-disk this way :
>
> alpine:~# export FORCE_BOOTFS=1
> alpine:~# setup-disk -m sys /mnt
> ext4 is not supported. Only supported are: vfat
> Continuing at your own risk.
> Installing system on /dev/mmcblk0p2:
> /sbin/setup-disk: line 469: can't create /mnt/boot/config.txt:
> nonexistent directory
> /sbin/setup-disk: line 470: can't create /mnt/boot/cmdline.txt:
> nonexistent directory
> 100%
> /boot/initramfs-rpi
> You might need fix the MBR to be able to boot
>
> I'm confused now about the /mnt/boot directory structure. Because
> /mnt/boot contains kernel stuff but also the firmware files.
> If I move /mnt/boot/* to /media/mmcblk0p1/boot/ firmware files and
> overlays will be copied as well
> This means that these files will be available twice in the boot
> partition (in /media/mmcblk0p1 and /media/mmcblk0p1/boot/)
>
> The good thing is that firmware and kernel will be managed from apk.
> However if apk upgrades the firmware files they won't be used by the
> system because they are located in the
> /media/mmcblk0p1/boot/ subdirectory/.
> Or do I have to change something in config.txt to force the use of the
> firmware and overlays files stored in /media/mmcblk0p1/boot/ ?
>
> Thanks !
>

-- 
https://wildtechgarden.ca Technical and professional website
https://princesandmadmen.ca Personal and political blog
Reply to thread Export thread (mbox)