<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Txnintn</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Txnintn"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Txnintn"/>
	<updated>2026-05-02T12:36:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=25289</id>
		<title>User:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=25289"/>
		<updated>2023-09-23T14:23:49Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title:  Alpine Linux install: LVM over Raid1 with a Micro SD spare.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Discussion:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Alpine Linux setup-alpine scripts when executed with two disks and the install medium, if both disks are selected, i.e., sda and sdb, the script will automatically configure a RAID1 installation.&amp;lt;br&amp;gt;&lt;br /&gt;
https://wiki.alpinelinux.org/wiki/Setting_up_the_build_environment_on_HDD#Basic_setup&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Additionally, LVM with a &#039;sys&#039; install can be selected during the setup-alpine script.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from the USB or the Micro SD port. By having a Micro SD RAID1 spare, if the primary USB drive fails, the Micro SD should be able to boot the system.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
NOTE:  A mirrored RAID array (level 1 or 5) protects you against hardware failure. It doesn&#039;t protect against rm -rf /, software errors, exploits, earthquakes, fire. Don&#039;t rely on RAID as a backup strategy.&amp;lt;br&amp;gt;&lt;br /&gt;
https://wiki.alpinelinux.org/wiki/Setting_up_a_software_RAID_array#Advice&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
LVM requires the Micro SD spare partition to be the same size as USB RAID1 partitions.  A larger capacity Micro SD drive 2nd partition can easily resized to match the USB partition.  During the install the setup-alpine script will maximize the size of 2nd partition on RAID1 drives&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Tech Tip, not all Micro SD and USB drives are the same size.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ 16GB Drives&lt;br /&gt;
|-&lt;br /&gt;
! MFG / Model !! Size&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Industrial Micro SD || 14.84GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra Ultra Fit USB 3.1 || 14.34GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra USB 3.0 || 14.91GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Cruzer Glide USB 2.0 || 14.91GB&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+32GB Drives&lt;br /&gt;
! MFG / Model !! Size&lt;br /&gt;
|-&lt;br /&gt;
| Samsung SD Pro Endurance Micro SD || 29.81GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra SD || 29.72GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra Fit USB 3.1 Gen1 || 28.67GB&lt;br /&gt;
|-&lt;br /&gt;
| Silicon Power 5 USB 3.2 || 28.85GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra 3.0 OTG || 28.85GB&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ 64GB Drive&lt;br /&gt;
|-&lt;br /&gt;
! MFG / Model !! Size&lt;br /&gt;
|-&lt;br /&gt;
| Samsung EVO Select Micro SD || 59.69GB&lt;br /&gt;
|-&lt;br /&gt;
| Samsung Fit USB 3.1 || 59.75GB&lt;br /&gt;
|} &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Requirements:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Raspberry PI 4&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Two Identical USB Drives - fit style drives recommended based on physical clearance issues.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
One Micro SD Drive with the same or larger capacity then the USB drives&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
One USB drive for the installation files.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Preparation:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Created the following for the USB RAID disks:&amp;lt;br&amp;gt;&lt;br /&gt;
sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI.&amp;lt;br&amp;gt; &lt;br /&gt;
sdx2 using the rest of the disk with a fd linux raid partition, formatted ext4&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
mmcblkx, sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI.&amp;lt;br&amp;gt; &lt;br /&gt;
sdx2 sized to match USB RAID partition, Linux 83 and formatted Ext4.  Do not use Linux Raid.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The USB installation drive single partition fat 32 0c with boot and LBA flags.&amp;lt;br&amp;gt;&lt;br /&gt;
Extract the contents of alpine-rpi-3.x.x-aarch.tar.gz to sdc1 (spare USB) partition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Raspberry Pi eprom must be set to boot USB port first and SD port second.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Installation:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Insert the &amp;quot;sda&amp;quot; USB disk into the bottom USB 3.0 port and the &amp;quot;sdb&amp;quot; USB drive into the upper USB 3.0 port.  Power up the system, after the system has failed to boot to the installed USB drives, the screen will change from white and red to black and white text, insert the installation USB (sdc) to start the install process. This will set the drive assignments properly.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
After logging in as root.&amp;lt;br&amp;gt;&lt;br /&gt;
To start the install, &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  setup-alpine and PRESS:  enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Select keyboard layout: [none], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  us and PRESS:  enter.&amp;lt;br&amp;gt;&lt;br /&gt;
At, Select variant (or &#039;abort&#039;):, prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  us and PRESS:  enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter system hostname (fully qualified form, e.g. &#039;foo.example.org&#039;) [localhost] prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  the localhost name, for example, rpi44gb and PRESS: enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter &#039;?&#039; for help on bridges, bonding and vlans.&amp;lt;br&amp;gt;&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [eth0], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: enter, to use the default, ethernet0 connection.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Ip address for eth0? (or &#039;dhcp&#039;, &#039;none&#039;, &#039;?&#039;) [dhcp], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter to use the default, dhcp.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At the second,  Enter &#039;?&#039; for help on bridges, bonding and vlans.&amp;lt;br&amp;gt;&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [wlan0], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: done and PRESS: enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Then at, Do you want to do and manual network configuration? (y/n) [n], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS enter for the default, [n], for no.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Change password for root, prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: the root password, and PRESS:  enter.&amp;lt;br&amp;gt;&lt;br /&gt;
At, Retype password, prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: the root password and PRESS:  enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Which timezone are you in? (&#039;?&#039; for a list) [UTC]. prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  America, with a capital A, and press enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, What sub-timezone of &#039;America&#039; are you in? (&#039;?&#039; for list), prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  Chicago, with a capital C, and press enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, HTTP/FTP proxy URL? (e.g. /http://proxy:8000&#039;, or &#039;none&#039;) [none], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default, none.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Which NTP Client to run? (&#039;busybox&#039;, &#039;openntpd&#039;, &#039;chrony&#039; or &#039;none&#039;) [chrony], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default, chrony.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
When the list of mirrors stop and at --More--, prompt &amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: the letter &amp;quot;r&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
r) Add random from the above list &amp;lt;br&amp;gt;&lt;br /&gt;
f) Detect and add the fastest mirror from above list &amp;lt;br&amp;gt;&lt;br /&gt;
e) Edit /etc/apk/repositories with text editor &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter mirror number (1-72) or URL to add (or r/f/e/done) [1], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default number 1. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Setup a user? (enter a lower-case loginname, or &#039;no&#039;) [no], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: enter for the default no. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, which ssh server? (&#039;openssh&#039;, &#039;dropbear&#039; or &#039;none&#039;), prompt.&lt;br /&gt;
TYPE: none and PRESS:  enter to continue.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Available disks are: &amp;lt;br&amp;gt;&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;       &lt;br /&gt;
At Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) [none], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: sda sdb and PRESS:  enter to continue. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The following disks are selected: &amp;lt;br&amp;gt;&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, &#039;crypt&#039;, &#039;lvm&#039; or &#039;?&#039; for help) [?], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  lvm and PRESS: enter to continue. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The following disks are selected (with LVM): &amp;lt;br&amp;gt;&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;               &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, or &#039;?&#039; for help) [?], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  sys for system disk and PRESS: enter to continue. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, WARNING: Erase the above disk(s) and continue? (y/n) [n], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
        sda (15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;              &lt;br /&gt;
        sdb (15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: y, for yes and PRESS: enter to continue. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Partition #1 contains a vfat signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Partition #2 contains a ext4 signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Partition #1 contains a vfat signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Partition #2 contains a ext4 signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Creating file systems&amp;lt;br&amp;gt;&lt;br /&gt;
mkfs.fat 4.2 ((2021-01-31)&amp;lt;br&amp;gt;&lt;br /&gt;
        Physical volume &amp;quot;/dev/md1&amp;quot; successfully created. &amp;lt;br&amp;gt;&lt;br /&gt;
        Logical volume &amp;quot;lv_root&amp;quot; created. &amp;lt;br&amp;gt;&lt;br /&gt;
* service lvm added to runlevel boot &amp;lt;br&amp;gt;&lt;br /&gt;
Installing system on /dev/vg0/lv_root&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
100% ###################################### &amp;lt;br&amp;gt;&lt;br /&gt;
=&amp;gt; initframfs: creating /boot/initramfs-rpi4 &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Installation is complete.  Please reboot.  DO NOT REBOOT!!! &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Alpine installed the boot drive as a FD linux raid autodetect, IT WILL NOT BOOT on a Raspberry Pi. The Raspberry Pi can only boot from fat16 or fat32 partition with boot and lba flags enabled. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  watch  cat /proc/mdstat&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Personalities : [raid1]&lt;br /&gt;
md1 : active raid1 sdb2[1] sda2[0]&lt;br /&gt;
          14723072 blocks super 1.2 [2/2] [UU]&lt;br /&gt;
          {&amp;gt;....................] resyc - 2.7% (397521/14723072) finish=22.1min speed=8768K/sec&lt;br /&gt;
md0 : active raid1 sdb1[1] sda1[0]&lt;br /&gt;
          307136 blocks [2/2] [UU]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Raid MD1 is still resycing. Take a break, the drives should be finished in 20 to 30 minutes.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: ctrl + c to exit watch cat /proc/mdstat&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Backup the boot raid partition first&amp;lt;br&amp;gt;&lt;br /&gt;
Insert mmcblk0&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  dd if=/dev/sda1 of=/dev/mmcblk0p1 bs=512&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Reboot&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Unmount the RAID 1 filesystem&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  umount /dev/md0&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Stop the madam raid device &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  mdadm --stop /dev/md0 &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Remove the Superblocks &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  mdadm --zero-superblock /dev/sda1 /dev/sdb1 /dev/mmcblk0p1 (due to dd backup copying) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
verify md0 has been removed &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  lsblk and or cat /proc/mdstat &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  apk add nano or use vi to remove RAID /dev/md0 entries by editing /etc/fstab and /etc/mdadm.conf &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
reboot &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Verify partition table sizes are the same on the Micro SD card and USB Drives. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  fdisk -l (some entries removed for clairification) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/mmcblk0: 15 GB, 15931539456 bytes, 31116288 sectors &amp;lt;-- &amp;lt;br&amp;gt;&lt;br /&gt;
15193 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/mmcblk0p1 *  1,0,1       300,63,32         2048     616447     614400  300M  c Win95 FAT32 (LBA)     ok &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/mmcblk0p2    301,0,1     1023,63,32      616448   31116287   30499840 14.5G fd Linux raid autodetect &amp;lt;-- &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
Disk /dev/sda: 14 GB, 15401484288 bytes, 30081024 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
14688 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sda1 *  1,0,1       300,63,32         2048     616447     614400  300M fd Linux raid autodetect ok &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sda2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect &amp;lt;-- &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/sdb: 14 GB, 15401484288 bytes, 30081024 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
14688 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sdb1 *  1,0,1       300,63,32         2048     616447     614400  300M fd Linux raid autodetect ok &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sdb2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect &amp;lt;-- &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If the Micro SD card is larger then /dev/sda2 and /dev/sdb2.  &amp;lt;br&amp;gt;&lt;br /&gt;
Resize the partion before continuing.  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/mmcblk0: 15 GB, 15931539456 bytes, 31116288 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
15193 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/mmcblk0p1 *  1,0,1       300,63,32         2048     616447     614400  300M  c Win95 FAT32 (LBA) &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/mmcblk0p2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/sda: 14 GB, 15401484288 bytes, 30081024 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
14688 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sda1 *  1,0,1       300,63,32         2048     616447     614400  300M fd Linux raid autodetect &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sda2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/sdb: 14 GB, 15401484288 bytes, 30081024 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
14688 cylinders, 64 heads, 32 sectors/track&amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type&amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sdb1 *  1,0,1       300,63,32         2048     616447     614400  300M fd Linux raid autodetect&amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sdb2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Install sfdisk to copy partition table information &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  apk add sfdisk &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*** Warning*** &amp;lt;br&amp;gt;&lt;br /&gt;
Before executing the following commands mmcblk0, sda, and sdb must be the exact same size partitons. &amp;lt;br&amp;gt;&lt;br /&gt;
**************&amp;lt;br&amp;gt;&lt;br /&gt;
Copy mmcblk0 disk partition table to sda and sdb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  sfdisk -d /dev/mmcblk0 |  sfdisk --force /dev/sda&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  sfdisk -d /dev/mmcblk0 |  sfdisk --force /dev/sdb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Copy mmcblk0p1 boot partition to sda1 and sdb1&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sda1 bs=512&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sdb1 bs=512&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Add mmcblk0 as a spare drive to RAID /dev/md1&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  madam --add /dev/md1 /dev/mmcblk0p2&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
View Raid One information&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: mdadm --detail /dev/md1&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
/dev/md1&amp;lt;br&amp;gt;&lt;br /&gt;
                        version : 1.2&lt;br /&gt;
          Creation Time        : Sat Jun 24 12:50:56 2023&lt;br /&gt;
             Raid Level : raid 1&lt;br /&gt;
             Array Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
          Used Dev Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
           Raid Devices : 2&lt;br /&gt;
          Total Devices : 3&lt;br /&gt;
            Persistence : Superblock is persistence&lt;br /&gt;
           &lt;br /&gt;
            Update Time : Sat Jun 24 14:30:11 2023&lt;br /&gt;
                      State : clean&lt;br /&gt;
         Active Devices : 2&lt;br /&gt;
        Working Devices : 3&lt;br /&gt;
         Failed Devices : 0&lt;br /&gt;
          Spare Devices : 1&lt;br /&gt;
txnintn&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User_talk:Txnintn&amp;diff=24196</id>
		<title>User talk:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User_talk:Txnintn&amp;diff=24196"/>
		<updated>2023-08-12T16:26:49Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== How to do a manual LVM install on a Raspberry Pi 4. ==&lt;br /&gt;
&lt;br /&gt;
Insert USB Alpine Linux setup disk into usb2.0 port. &amp;lt;br&amp;gt;&lt;br /&gt;
Power on the Raspberry Pi&amp;lt;br&amp;gt;&lt;br /&gt;
At the rainbow splash screen, plug in your SDA drive. &amp;lt;br&amp;gt;&lt;br /&gt;
Type root at the prompt and press enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# source title&amp;lt;br&amp;gt;&lt;br /&gt;
Setting up Logical Volumes with LVM&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type modprobe dm-mod&amp;lt;br&amp;gt;&lt;br /&gt;
Type echo dm-mod &amp;gt;&amp;gt; /etc/modules-load.d/dm.conf&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type setup-keymap us us and press enter&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type setup-hostname ha-1836 and press enter&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type setup-interfaces and press enter&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-service networking start&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Setup-timezone -z America/Chicago and press enter&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-update add networking boot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-update add seedrng boot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-update add acpid default&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vi /etc/hosts&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
setup-ntp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
setup-apkrepos&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
apk update&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
setup-sshd&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
apk add lvm2 e2fsprogs lsblk&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-update add lvm&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pvcreate /dev/sda2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vgcreate vg0 /dev/sda2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
lvcreate -n lv_root -L 8G vg0&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-update add lvm boot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mkfs.ext4 /dev/vg0/lv_root&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
initialize volume group&amp;lt;br&amp;gt;&lt;br /&gt;
vgchange -ay&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mount -t ext4 /dev/vg0/root /mnt/&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir /mnt/boot&amp;lt;br&amp;gt;&lt;br /&gt;
mount /dev/sda1 /mnt/boot&amp;lt;br&amp;gt;&lt;br /&gt;
setup-disk -m sys /mount&amp;lt;br&amp;gt;&lt;br /&gt;
reboot and remove setup usb drive.&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User_talk:Txnintn&amp;diff=24195</id>
		<title>User talk:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User_talk:Txnintn&amp;diff=24195"/>
		<updated>2023-08-12T16:25:38Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== How to do a manual LVM install on a Raspberry Pi 4. ==&lt;br /&gt;
&lt;br /&gt;
Insert USB Alpine Linux setup disk into usb2.0 port. &amp;lt;br&amp;gt;&lt;br /&gt;
Power on the Raspberry Pi&amp;lt;br&amp;gt;&lt;br /&gt;
At the rainbow splash screen, plug in your SDA drive. &amp;lt;br&amp;gt;&lt;br /&gt;
Type root at the prompt and press enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# source title&amp;lt;br&amp;gt;&lt;br /&gt;
Setting up Logical Volumes with LVM&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type modprobe dm-mod&amp;lt;br&amp;gt;&lt;br /&gt;
Type echo dm-mod &amp;gt;&amp;gt; /etc/modules-load.d/dm.conf&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type setup-keymap us us and press enter&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type setup-hostname ha-1836 and press enter&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type setup-interfaces and press enter&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-service networking start&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Setup-timezone -z America/Chicago and press enter&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-update add networking boot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-update add seedrng boot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-update add acpid default&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vi /etc/hosts&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
setup-ntp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
setup-apkrepos&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
apk update&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
setup-sshd&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
apk add lvm2 e2fsprogs lsblk&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-update add lvm&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pvcreate /dev/sda2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vgcreate vg0 /dev/sda2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
lvcreate -n lv_root -L 8G vg0&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-update add lvm boot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mkfs.ext4 /dev/vg0/lv_root&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
initialize volume group&amp;lt;br&amp;gt;&lt;br /&gt;
vgchange -ay&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mount -t ext4 /dev/vg0/root /mnt/&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir /mnt/boot&amp;lt;br&amp;gt;&lt;br /&gt;
mount /dev/sda1 /mnt/boot&amp;lt;br&amp;gt;&lt;br /&gt;
setup-disk -m sys /mount&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User_talk:Txnintn&amp;diff=24194</id>
		<title>User talk:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User_talk:Txnintn&amp;diff=24194"/>
		<updated>2023-08-12T16:23:12Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: /* test */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title&amp;lt;br&amp;gt;&lt;br /&gt;
*** work in progress *** not fully validated&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install Alpine Linux on a Raspberry PI 4 in Diskless Mode.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Discussion:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Preparation:&amp;lt;br&amp;gt;&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from either a USB or a Micro SD port.&amp;lt;br&amp;gt;&lt;br /&gt;
Prepare a USB or Micro SD drive 1st partition fat 32 partition type 0c with boot and LBA flags. &amp;lt;br&amp;gt;&lt;br /&gt;
Use the rest of the drive in the second partition Ext4 partition type 83. &amp;lt;br&amp;gt; &lt;br /&gt;
Extract the contents of alpine-rpi-3.x.x-aarch.tar.gz to the first partition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To start the install, &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  setup-alpine and PRESS:  enter&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Select keyboard layout: [none], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  us and PRESS:  enter&amp;lt;br&amp;gt;&lt;br /&gt;
At, Select variant (or &#039;abort&#039;):, prompt.&amp;lt;br&amp;gt; &lt;br /&gt;
TYPE:  us and PRESS:  enter&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter system hostname (fully qualified form, e.g. &#039;foo.example.org&#039;) [localhost] prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: enter, to use the default localhost.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter &#039;?&#039; for help on bridges, bonding and vlans.&amp;lt;br&amp;gt;&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [eth0], prompt.&amp;lt;br&amp;gt; &lt;br /&gt;
PRESS: enter, to use the default, ethernet0 connection.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Ip address for eth0? (or &#039;dhcp&#039;, &#039;none&#039;, &#039;?&#039;) [dhcp], prompt.&amp;lt;br&amp;gt; &lt;br /&gt;
PRESS:  enter to use the default, dhcp.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At the second,  Enter &#039;?&#039; for help on bridges, bonding and vlans.&amp;lt;br&amp;gt;&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [wlan0], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: done and PRESS: enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Then at, Do you want to do and manual network configuration? (y/n) [n], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS enter for the default, [n], for no.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Change password for root, prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: the root password, and PRESS:  enter&amp;lt;br&amp;gt;&lt;br /&gt;
At, Retype password, prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: the root password and PRESS:  enter&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Which timezone are you in? (&#039;?&#039; for a list) [UTC]. prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  America, with a capital A, and press enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, What sub-timezone of &#039;America&#039; are you in? (&#039;?&#039; for list), prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  Chicago, with a capital C, and press enter.&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, HTTP/FTP proxy URL? (e.g. /&amp;lt;nowiki&amp;gt;http://proxy:8000&amp;lt;/nowiki&amp;gt;&#039;, or &#039;none&#039;) [none], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default, none.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Which NTP Client to run? (&#039;busybox&#039;, &#039;openntpd&#039;, &#039;chrony&#039; or &#039;none&#039;) [chrony], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default, chrony.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
When the list of mirrors stop and at --More--, prompt&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: the letter &amp;quot;r&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
r) Add random from the above list&amp;lt;br&amp;gt;&lt;br /&gt;
f) Detect and add the fastest mirror from above list&amp;lt;br&amp;gt;&lt;br /&gt;
e) Edit /etc/apk/repositories with text editor&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter mirror number (1-72) or URL to add (or r/f/e/done) [1], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default number 1.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Setup a user? (enter a lower-case loginname, or &#039;no&#039;) [no], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: enter for the default no.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, which ssh server? (&#039;openssh&#039;, &#039;dropbear&#039; or &#039;none&#039;), prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: none and PRESS:  enter to continue.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
No disks available.  Try boot media /media/sda1? (y/n) [n]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;        &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Enter where to store configs (&#039;floppy&#039;, &#039;sda1&#039;, &#039;usb&#039;, or &#039;none&#039;) [sda1]&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: none and PRESS: enter to continue.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Enter apk cache directory (or &#039;?&#039; or &#039;none&#039;) [/media/usb/cache]&amp;lt;br&amp;gt; &lt;br /&gt;
TYPE: none and press enter to continue.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The install is complete.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Warning: By default, an lbu commit only stores modifications below /etc, with the exception of the /etc/init.d/ directory.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
https://wiki.alpinelinux.org/wiki/Alpine_local_backup&amp;lt;br&amp;gt;&lt;br /&gt;
Warning: By default, an lbu commit only stores modifications below /etc, with the exception of the /etc/init.d/ directory.&amp;lt;br&amp;gt;&lt;br /&gt;
However, lbu include enables modifying that set of included files, and can be used to specify additional files or folders.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Create the apk cache file location and a LBU backup directory.&amp;lt;br&amp;gt;&lt;br /&gt;
At the command prompt,  TYPE:  mkdir /root/config-backups and then PRESS: enter&amp;lt;br&amp;gt;&lt;br /&gt;
At the command prompt,  TYPE:  mkdir /etc/apk/cache and then PRESS: enter&amp;lt;br&amp;gt;&lt;br /&gt;
At the command prompt,  TYPE: vi /etc/lbu/lbu.conf and then PRESS: enter&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: the ESC key and press i to change to insert mode.&amp;lt;br&amp;gt;&lt;br /&gt;
Remove the pound sign at LBU_BACKUPDIR=/root/config-backups&amp;lt;br&amp;gt;&lt;br /&gt;
Remove the pound sign at BACKUP_LIMIT=3&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS the ESC key and TYPE : followed by wq and PRESS enter.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS lbu ci&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS lbu commit -d&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to do a manual LVM install on a Raspberry Pi 4. ==&lt;br /&gt;
&lt;br /&gt;
Insert USB Alpine Linux setup disk into usb2.0 port. &amp;lt;br&amp;gt;&lt;br /&gt;
Power on the Raspberry Pi&amp;lt;br&amp;gt;&lt;br /&gt;
At the rainbow splash screen, plug in your SDA drive. &amp;lt;br&amp;gt;&lt;br /&gt;
Type root at the prompt and press enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# source title&amp;lt;br&amp;gt;&lt;br /&gt;
Setting up Logical Volumes with LVM&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type modprobe dm-mod&amp;lt;br&amp;gt;&lt;br /&gt;
Type echo dm-mod &amp;gt;&amp;gt; /etc/modules-load.d/dm.conf&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type setup-keymap us us and press enter&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type setup-hostname ha-1836 and press enter&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type setup-interfaces and press enter&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-service networking start&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Setup-timezone -z America/Chicago and press enter&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-update add networking boot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-update add seedrng boot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-update add acpid default&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vi /etc/hosts&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
setup-ntp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
setup-apkrepos&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
apk update&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
setup-sshd&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
apk add lvm2 e2fsprogs lsblk&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-update add lvm&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pvcreate /dev/sda2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vgcreate vg0 /dev/sda2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
lvcreate -n lv_root -L 8G vg0&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-update add lvm boot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mkfs.ext4 /dev/vg0/lv_root&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
initialize volume group&amp;lt;br&amp;gt;&lt;br /&gt;
vgchange -ay&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mount -t ext4 /dev/vg0/root /mnt/&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir /mnt/boot&amp;lt;br&amp;gt;&lt;br /&gt;
mount /dev/sda1 /mnt/boot&amp;lt;br&amp;gt;&lt;br /&gt;
setup-disk -m sys /mount&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== test ==&lt;br /&gt;
&lt;br /&gt;
test&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User_talk:Txnintn&amp;diff=24193</id>
		<title>User talk:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User_talk:Txnintn&amp;diff=24193"/>
		<updated>2023-08-12T16:21:36Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: /* How to do a manual LVM install on a Raspberry Pi 4. */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title&amp;lt;br&amp;gt;&lt;br /&gt;
*** work in progress *** not fully validated&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install Alpine Linux on a Raspberry PI 4 in Diskless Mode.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Discussion:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Preparation:&amp;lt;br&amp;gt;&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from either a USB or a Micro SD port.&amp;lt;br&amp;gt;&lt;br /&gt;
Prepare a USB or Micro SD drive 1st partition fat 32 partition type 0c with boot and LBA flags. &amp;lt;br&amp;gt;&lt;br /&gt;
Use the rest of the drive in the second partition Ext4 partition type 83. &amp;lt;br&amp;gt; &lt;br /&gt;
Extract the contents of alpine-rpi-3.x.x-aarch.tar.gz to the first partition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To start the install, &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  setup-alpine and PRESS:  enter&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Select keyboard layout: [none], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  us and PRESS:  enter&amp;lt;br&amp;gt;&lt;br /&gt;
At, Select variant (or &#039;abort&#039;):, prompt.&amp;lt;br&amp;gt; &lt;br /&gt;
TYPE:  us and PRESS:  enter&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter system hostname (fully qualified form, e.g. &#039;foo.example.org&#039;) [localhost] prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: enter, to use the default localhost.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter &#039;?&#039; for help on bridges, bonding and vlans.&amp;lt;br&amp;gt;&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [eth0], prompt.&amp;lt;br&amp;gt; &lt;br /&gt;
PRESS: enter, to use the default, ethernet0 connection.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Ip address for eth0? (or &#039;dhcp&#039;, &#039;none&#039;, &#039;?&#039;) [dhcp], prompt.&amp;lt;br&amp;gt; &lt;br /&gt;
PRESS:  enter to use the default, dhcp.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At the second,  Enter &#039;?&#039; for help on bridges, bonding and vlans.&amp;lt;br&amp;gt;&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [wlan0], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: done and PRESS: enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Then at, Do you want to do and manual network configuration? (y/n) [n], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS enter for the default, [n], for no.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Change password for root, prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: the root password, and PRESS:  enter&amp;lt;br&amp;gt;&lt;br /&gt;
At, Retype password, prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: the root password and PRESS:  enter&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Which timezone are you in? (&#039;?&#039; for a list) [UTC]. prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  America, with a capital A, and press enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, What sub-timezone of &#039;America&#039; are you in? (&#039;?&#039; for list), prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  Chicago, with a capital C, and press enter.&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, HTTP/FTP proxy URL? (e.g. /&amp;lt;nowiki&amp;gt;http://proxy:8000&amp;lt;/nowiki&amp;gt;&#039;, or &#039;none&#039;) [none], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default, none.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Which NTP Client to run? (&#039;busybox&#039;, &#039;openntpd&#039;, &#039;chrony&#039; or &#039;none&#039;) [chrony], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default, chrony.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
When the list of mirrors stop and at --More--, prompt&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: the letter &amp;quot;r&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
r) Add random from the above list&amp;lt;br&amp;gt;&lt;br /&gt;
f) Detect and add the fastest mirror from above list&amp;lt;br&amp;gt;&lt;br /&gt;
e) Edit /etc/apk/repositories with text editor&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter mirror number (1-72) or URL to add (or r/f/e/done) [1], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default number 1.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Setup a user? (enter a lower-case loginname, or &#039;no&#039;) [no], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: enter for the default no.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, which ssh server? (&#039;openssh&#039;, &#039;dropbear&#039; or &#039;none&#039;), prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: none and PRESS:  enter to continue.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
No disks available.  Try boot media /media/sda1? (y/n) [n]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;        &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Enter where to store configs (&#039;floppy&#039;, &#039;sda1&#039;, &#039;usb&#039;, or &#039;none&#039;) [sda1]&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: none and PRESS: enter to continue.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Enter apk cache directory (or &#039;?&#039; or &#039;none&#039;) [/media/usb/cache]&amp;lt;br&amp;gt; &lt;br /&gt;
TYPE: none and press enter to continue.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The install is complete.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Warning: By default, an lbu commit only stores modifications below /etc, with the exception of the /etc/init.d/ directory.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
https://wiki.alpinelinux.org/wiki/Alpine_local_backup&amp;lt;br&amp;gt;&lt;br /&gt;
Warning: By default, an lbu commit only stores modifications below /etc, with the exception of the /etc/init.d/ directory.&amp;lt;br&amp;gt;&lt;br /&gt;
However, lbu include enables modifying that set of included files, and can be used to specify additional files or folders.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Create the apk cache file location and a LBU backup directory.&amp;lt;br&amp;gt;&lt;br /&gt;
At the command prompt,  TYPE:  mkdir /root/config-backups and then PRESS: enter&amp;lt;br&amp;gt;&lt;br /&gt;
At the command prompt,  TYPE:  mkdir /etc/apk/cache and then PRESS: enter&amp;lt;br&amp;gt;&lt;br /&gt;
At the command prompt,  TYPE: vi /etc/lbu/lbu.conf and then PRESS: enter&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: the ESC key and press i to change to insert mode.&amp;lt;br&amp;gt;&lt;br /&gt;
Remove the pound sign at LBU_BACKUPDIR=/root/config-backups&amp;lt;br&amp;gt;&lt;br /&gt;
Remove the pound sign at BACKUP_LIMIT=3&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS the ESC key and TYPE : followed by wq and PRESS enter.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS lbu ci&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS lbu commit -d&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to do a manual LVM install on a Raspberry Pi 4. ==&lt;br /&gt;
&lt;br /&gt;
Insert USB Alpine Linux setup disk into usb2.0 port. &amp;lt;br&amp;gt;&lt;br /&gt;
Power on the Raspberry Pi&amp;lt;br&amp;gt;&lt;br /&gt;
At the rainbow splash screen, plug in your SDA drive. &amp;lt;br&amp;gt;&lt;br /&gt;
Type root at the prompt and press enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# source title&amp;lt;br&amp;gt;&lt;br /&gt;
Setting up Logical Volumes with LVM&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type modprobe dm-mod&amp;lt;br&amp;gt;&lt;br /&gt;
Type echo dm-mod &amp;gt;&amp;gt; /etc/modules-load.d/dm.conf&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type setup-keymap us us and press enter&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type setup-hostname ha-1836 and press enter&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type setup-interfaces and press enter&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-service networking start&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Setup-timezone -z America/Chicago and press enter&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-update add networking boot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-update add seedrng boot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-update add acpid default&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vi /etc/hosts&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
setup-ntp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
setup-apkrepos&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
apk update&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
setup-sshd&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
apk add lvm2 e2fsprogs lsblk&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-update add lvm&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pvcreate /dev/sda2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vgcreate vg0 /dev/sda2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
lvcreate -n lv_root -L 8G vg0&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rc-update add lvm boot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mkfs.ext4 /dev/vg0/lv_root&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
initialize volume group&amp;lt;br&amp;gt;&lt;br /&gt;
vgchange -ay&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mount -t ext4 /dev/vg0/root /mnt/&amp;lt;br&amp;gt;&lt;br /&gt;
mkdir /mnt/boot&amp;lt;br&amp;gt;&lt;br /&gt;
mount /dev/sda1 /mnt/boot&amp;lt;br&amp;gt;&lt;br /&gt;
setup-disk -m sys /mount&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23995</id>
		<title>User:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23995"/>
		<updated>2023-07-29T16:36:53Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title:  Alpine Linux install: LVM over Raid1 with a Micro SD spare.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Discussion:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Alpine Linux setup-alpine scripts when executed with two disks and the install medium, if both disks are selected, i.e., sda and sdb, the script will automatically configure a RAID1 installation.&amp;lt;br&amp;gt;&lt;br /&gt;
https://wiki.alpinelinux.org/wiki/Setting_up_the_build_environment_on_HDD#Basic_setup&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Additionally, LVM with a &#039;sys&#039; install can be selected during the setup-alpine script.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from the USB or the Micro SD port. By having a Micro SD RAID1 spare, if the primary USB drive fails, the Micro SD should be able to boot the system.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
NOTE:  A mirrored RAID array (level 1 or 5) protects you against hardware failure. It doesn&#039;t protect against rm -rf /, software errors, exploits, earthquakes, fire. Don&#039;t rely on RAID as a backup strategy.&amp;lt;br&amp;gt;&lt;br /&gt;
https://wiki.alpinelinux.org/wiki/Setting_up_a_software_RAID_array#Advice&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
LVM requires the Micro SD spare partition to be the same size as USB RAID1 partitions.  A larger capacity Micro SD drive 2nd partition can easily resized to match the USB partition.  During the install the setup-alpine script will maximize the size of 2nd partition on RAID1 drives&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Tech Tip, not all Micro SD and USB drives are the same size.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ 16GB Drives&lt;br /&gt;
|-&lt;br /&gt;
! MFG / Model !! Size&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Industrial Micro SD || 14.84GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra Ultra Fit USB 3.1 || 14.34GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra USB 3.0 || 14.91GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Cruzer Glide USB 2.0 || 14.91GB&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+32GB Drives&lt;br /&gt;
! MFG / Model !! Size&lt;br /&gt;
|-&lt;br /&gt;
| Samsung SD Pro Endurance Micro SD || 29.81GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra SD || 29.72GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra Fit USB 3.1 Gen1 || 28.67GB&lt;br /&gt;
|-&lt;br /&gt;
| Silicon Power 5 USB 3.2 || 28.85GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra 3.0 OTG || 28.85GB&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ 64GB Drive&lt;br /&gt;
|-&lt;br /&gt;
! MFG / Model !! Size&lt;br /&gt;
|-&lt;br /&gt;
| Samsung EVO Select Micro SD || 59.69GB&lt;br /&gt;
|-&lt;br /&gt;
| Samsung Fit USB 3.1 || 59.75GB&lt;br /&gt;
|} &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Requirements:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Raspberry PI 4&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Two Identical USB Drives - fit style drives recommended based on physical clearance issues.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
One Micro SD Drive with the same or larger capacity then the USB drives&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
One USB drive for the installation files.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Preparation:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Created the following for the USB RAID disks:&amp;lt;br&amp;gt;&lt;br /&gt;
sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI.&amp;lt;br&amp;gt; &lt;br /&gt;
sdx2 using the rest of the disk with a fd linux raid partition, formatted ext4&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
mmcblkx, sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI.&amp;lt;br&amp;gt; &lt;br /&gt;
sdx2 sized to match USB RAID partition, Linux 83 and formatted Ext4.  Do not use Linux Raid.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The USB installation drive single partition fat 32 0c with boot and LBA flags.&amp;lt;br&amp;gt;&lt;br /&gt;
Extract the contents of alpine-rpi-3.x.x-aarch.tar.gz to sdc1 (spare USB) partition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Raspberry Pi eprom must be set to boot USB port first and SD port second.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Installation:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Insert the &amp;quot;sda&amp;quot; USB disk into the bottom USB 3.0 port and the &amp;quot;sdb&amp;quot; USB drive into the upper USB 3.0 port.  Power up the system, after the system has failed to boot to the installed USB drives, the screen will change from white and red to black and white text, insert the installation USB (sdc) to start the install process. This will set the drive assignments properly.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
After logging in as root.&amp;lt;br&amp;gt;&lt;br /&gt;
To start the install, &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  setup-alpine and PRESS:  enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Select keyboard layout: [none], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  us and PRESS:  enter.&amp;lt;br&amp;gt;&lt;br /&gt;
At, Select variant (or &#039;abort&#039;):, prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  us and PRESS:  enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter system hostname (fully qualified form, e.g. &#039;foo.example.org&#039;) [localhost] prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  the localhost name, for example, rpi44gb and PRESS: enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter &#039;?&#039; for help on bridges, bonding and vlans.&amp;lt;br&amp;gt;&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [eth0], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: enter, to use the default, ethernet0 connection.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Ip address for eth0? (or &#039;dhcp&#039;, &#039;none&#039;, &#039;?&#039;) [dhcp], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter to use the default, dhcp.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At the second,  Enter &#039;?&#039; for help on bridges, bonding and vlans.&amp;lt;br&amp;gt;&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [wlan0], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: done and PRESS: enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Then at, Do you want to do and manual network configuration? (y/n) [n], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS enter for the default, [n], for no.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Change password for root, prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: the root password, and PRESS:  enter.&amp;lt;br&amp;gt;&lt;br /&gt;
At, Retype password, prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: the root password and PRESS:  enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Which timezone are you in? (&#039;?&#039; for a list) [UTC]. prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  America, with a capital A, and press enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, What sub-timezone of &#039;America&#039; are you in? (&#039;?&#039; for list), prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  Chicago, with a capital C, and press enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, HTTP/FTP proxy URL? (e.g. /http://proxy:8000&#039;, or &#039;none&#039;) [none], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default, none.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Which NTP Client to run? (&#039;busybox&#039;, &#039;openntpd&#039;, &#039;chrony&#039; or &#039;none&#039;) [chrony], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default, chrony.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
When the list of mirrors stop and at --More--, prompt &amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: the letter &amp;quot;r&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
r) Add random from the above list &amp;lt;br&amp;gt;&lt;br /&gt;
f) Detect and add the fastest mirror from above list &amp;lt;br&amp;gt;&lt;br /&gt;
e) Edit /etc/apk/repositories with text editor &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter mirror number (1-72) or URL to add (or r/f/e/done) [1], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default number 1. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Setup a user? (enter a lower-case loginname, or &#039;no&#039;) [no], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: enter for the default no. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, which ssh server? (&#039;openssh&#039;, &#039;dropbear&#039; or &#039;none&#039;), prompt.&lt;br /&gt;
TYPE: none and PRESS:  enter to continue.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Available disks are: &amp;lt;br&amp;gt;&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;       &lt;br /&gt;
At Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) [none], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: sda sdb and PRESS:  enter to continue. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The following disks are selected: &amp;lt;br&amp;gt;&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, &#039;crypt&#039;, &#039;lvm&#039; or &#039;?&#039; for help) [?], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  lvm and PRESS: enter to continue. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The following disks are selected (with LVM): &amp;lt;br&amp;gt;&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;               &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, or &#039;?&#039; for help) [?], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  sys for system disk and PRESS: enter to continue. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, WARNING: Erase the above disk(s) and continue? (y/n) [n], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
        sda (15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;              &lt;br /&gt;
        sdb (15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: y, for yes and PRESS: enter to continue. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Partition #1 contains a vfat signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Partition #2 contains a ext4 signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Partition #1 contains a vfat signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Partition #2 contains a ext4 signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Creating file systems&amp;lt;br&amp;gt;&lt;br /&gt;
mkfs.fat 4.2 ((2021-01-31)&amp;lt;br&amp;gt;&lt;br /&gt;
        Physical volume &amp;quot;/dev/md1&amp;quot; successfully created. &amp;lt;br&amp;gt;&lt;br /&gt;
        Logical volume &amp;quot;lv_root&amp;quot; created. &amp;lt;br&amp;gt;&lt;br /&gt;
* service lvm added to runlevel boot &amp;lt;br&amp;gt;&lt;br /&gt;
Installing system on /dev/vg0/lv_root&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
100% ###################################### &amp;lt;br&amp;gt;&lt;br /&gt;
=&amp;gt; initframfs: creating /boot/initramfs-rpi4 &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Installation is complete.  Please reboot.  DO NOT REBOOT!!! &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Alpine installed the boot drive as a FD linux raid autodetect, IT WILL NOT BOOT on a Raspberry Pi. The Raspberry Pi can only boot from fat16 or fat32 partition with boot and lba flags enabled. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  watch  cat /proc/mdstat&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Personalities : [raid1]&lt;br /&gt;
md1 : active raid1 sdb2[1] sda2[0]&lt;br /&gt;
          14723072 blocks super 1.2 [2/2] [UU]&lt;br /&gt;
          {&amp;gt;....................] resyc - 2.7% (397521/14723072) finish=22.1min speed=8768K/sec&lt;br /&gt;
md0 : active raid1 sdb1[1] sda1[0]&lt;br /&gt;
          307136 blocks [2/2] [UU]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Raid MD1 is still resycing. Take a break, the drives should be finished in 20 to 30 minutes.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: ctrl + c to exit watch cat /proc/mdtstat&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Backup the boot raid partition first&amp;lt;br&amp;gt;&lt;br /&gt;
Insert mmcblk0&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  dd if=/dev/sda1 of=/dev/mmcblk0p1 bs=512&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Reboot&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Unmount the RAID 1 filesystem&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  umount /dev/md0&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Stop the madam raid device &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  mdadm --stop /dev/md0 &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Remove the Superblocks &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  mdadm --zero-superblock /dev/sda1 /dev/sdb1 /dev/mmcblk0p1 (due to dd backup copying) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
verify md0 has been removed &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  lsblk and or cat /proc/mdstat &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  apk add nano or use vi to remove RAID /dev/md0 entries by editing /etc/fstab and /etc/mdadm.conf &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
reboot &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Verify partition table sizes are the same on the Micro SD card and USB Drives. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  fdisk -l (some entries removed for clairification) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/mmcblk0: 15 GB, 15931539456 bytes, 31116288 sectors &amp;lt;-- &amp;lt;br&amp;gt;&lt;br /&gt;
15193 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/mmcblk0p1 *  1,0,1       300,63,32         2048     616447     614400  300M  c Win95 FAT32 (LBA)     ok &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/mmcblk0p2    301,0,1     1023,63,32      616448   31116287   30499840 14.5G fd Linux raid autodetect &amp;lt;-- &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
Disk /dev/sda: 14 GB, 15401484288 bytes, 30081024 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
14688 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sda1 *  1,0,1       300,63,32         2048     616447     614400  300M fd Linux raid autodetect ok &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sda2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect &amp;lt;-- &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/sdb: 14 GB, 15401484288 bytes, 30081024 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
14688 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sdb1 *  1,0,1       300,63,32         2048     616447     614400  300M fd Linux raid autodetect ok &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sdb2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect &amp;lt;-- &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If the Micro SD card is larger then /dev/sda2 and /dev/sdb2.  &amp;lt;br&amp;gt;&lt;br /&gt;
Resize the partion before continuing.  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/mmcblk0: 15 GB, 15931539456 bytes, 31116288 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
15193 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/mmcblk0p1 *  1,0,1       300,63,32         2048     616447     614400  300M  c Win95 FAT32 (LBA) &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/mmcblk0p2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/sda: 14 GB, 15401484288 bytes, 30081024 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
14688 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sda1 *  1,0,1       300,63,32         2048     616447     614400  300M fd Linux raid autodetect &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sda2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/sdb: 14 GB, 15401484288 bytes, 30081024 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
14688 cylinders, 64 heads, 32 sectors/track&amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type&amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sdb1 *  1,0,1       300,63,32         2048     616447     614400  300M fd Linux raid autodetect&amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sdb2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Install sfdisk to copy partition table information &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  apk add sfdisk &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*** Warning*** &amp;lt;br&amp;gt;&lt;br /&gt;
Before executing the following commands mmcblk0, sda, and sdb must be the exact same size partitons. &amp;lt;br&amp;gt;&lt;br /&gt;
**************&amp;lt;br&amp;gt;&lt;br /&gt;
Copy mmcblk0 disk partition table to sda and sdb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  sfdisk -d /dev/mmcblk0 |  sfdisk --force /dev/sda&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  sfdisk -d /dev/mmcblk0 |  sfdisk --force /dev/sdb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Copy mmcblk0p1 boot partition to sda1 and sdb1&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sda1 bs=512&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sdb1 bs=512&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Add mmcblk0 as a spare drive to RAID /dev/md1&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  madam --add /dev/md1 /dev/mmcblk0p2&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
View Raid One information&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: mdadm --detail /dev/md1&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
/dev/md1&amp;lt;br&amp;gt;&lt;br /&gt;
                        version : 1.2&lt;br /&gt;
          Creation Time        : Sat Jun 24 12:50:56 2023&lt;br /&gt;
             Raid Level : raid 1&lt;br /&gt;
             Array Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
          Used Dev Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
           Raid Devices : 2&lt;br /&gt;
          Total Devices : 3&lt;br /&gt;
            Persistence : Superblock is persistence&lt;br /&gt;
           &lt;br /&gt;
            Update Time : Sat Jun 24 14:30:11 2023&lt;br /&gt;
                      State : clean&lt;br /&gt;
         Active Devices : 2&lt;br /&gt;
        Working Devices : 3&lt;br /&gt;
         Failed Devices : 0&lt;br /&gt;
          Spare Devices : 1&lt;br /&gt;
txnintn&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23994</id>
		<title>User:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23994"/>
		<updated>2023-07-29T16:32:05Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title:  Alpine Linux install: LVM over Raid1 with a Micro SD spare.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Discussion:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Alpine Linux setup-alpine scripts when executed with two disks and the install medium, if both disks are selected, i.e., sda and sdb, the script will automatically configure a RAID1 installation.&amp;lt;br&amp;gt;&lt;br /&gt;
https://wiki.alpinelinux.org/wiki/Setting_up_the_build_environment_on_HDD#Basic_setup&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Additionally, LVM with a &#039;sys&#039; install can be selected during the setup-alpine script.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from the USB or the Micro SD port. By having a Micro SD RAID1 spare, if the primary USB drive fails, the Micro SD should be able to boot the system.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
NOTE:  A mirrored RAID array (level 1 or 5) protects you against hardware failure. It doesn&#039;t protect against rm -rf /, software errors, exploits, earthquakes, fire. Don&#039;t rely on RAID as a backup strategy.&amp;lt;br&amp;gt;&lt;br /&gt;
https://wiki.alpinelinux.org/wiki/Setting_up_a_software_RAID_array#Advice&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
LVM requires the Micro SD spare partition to be the same size as USB RAID1 partitions.  A larger capacity Micro SD drive 2nd partition can easily resized to match the USB partition.  During the install the setup-alpine script will maximize the size of 2nd partition on RAID1 drives&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Tech Tip, not all Micro SD and USB drives are the same size.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ 16GB Drives&lt;br /&gt;
|-&lt;br /&gt;
! MFG / Model !! Size&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Industrial Micro SD || 14.84GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra Ultra Fit USB 3.1 || 14.34GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra USB 3.0 || 14.91GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Cruzer Glide USB 2.0 || 14.91GB&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+32GB Drives&lt;br /&gt;
! MFG / Model !! Size&lt;br /&gt;
|-&lt;br /&gt;
| Samsung SD Pro Endurance Micro SD || 29.81GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra SD || 29.72GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra Fit USB 3.1 Gen1 || 28.67GB&lt;br /&gt;
|-&lt;br /&gt;
| Silicon Power 5 USB 3.2 || 28.85GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra 3.0 OTG || 28.85GB&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ 64GB Drive&lt;br /&gt;
|-&lt;br /&gt;
! MFG / Model !! Size&lt;br /&gt;
|-&lt;br /&gt;
| Samsung EVO Select Micro SD || 59.69GB&lt;br /&gt;
|-&lt;br /&gt;
| Samsung Fit USB 3.1 || 59.75GB&lt;br /&gt;
|} &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Requirements:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Raspberry PI 4&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Two Identical USB Drives - fit style drives recommended based on physical clearance issues.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
One Micro SD Drive with the same or larger capacity then the USB drives&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
One USB drive for the installation files.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Preparation:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Created the following for the USB RAID disks:&amp;lt;br&amp;gt;&lt;br /&gt;
sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI.&amp;lt;br&amp;gt; &lt;br /&gt;
sdx2 using the rest of the disk with a fd linux raid partition, formatted ext4&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
mmcblkx, sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI.&amp;lt;br&amp;gt; &lt;br /&gt;
sdx2 sized to match USB RAID partition, Linux 83 and formatted Ext4.  Do not use Linux Raid.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The USB installation drive single partition fat 32 0c with boot and LBA flags.&amp;lt;br&amp;gt;&lt;br /&gt;
Extract the contents of alpine-rpi-3.x.x-aarch.tar.gz to sdc1 (spare USB) partition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Raspberry Pi eprom must be set to boot USB port first and SD port second.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Installation:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Insert the &amp;quot;sda&amp;quot; USB disk into the bottom USB 3.0 port and the &amp;quot;sdb&amp;quot; USB drive into the upper USB 3.0 port.  Power up the system, after the system has failed to boot to the installed USB drives, the screen will change from white and red to black and white text, insert the installation USB (sdc) to start the install process. This will set the drive assignments properly.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
After logging in as root.&amp;lt;br&amp;gt;&lt;br /&gt;
To start the install, &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  setup-alpine and PRESS:  enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Select keyboard layout: [none], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  us and PRESS:  enter.&amp;lt;br&amp;gt;&lt;br /&gt;
At, Select variant (or &#039;abort&#039;):, prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  us and PRESS:  enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter system hostname (fully qualified form, e.g. &#039;foo.example.org&#039;) [localhost] prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  the localhost name, for example, rpi44gb and PRESS: enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter &#039;?&#039; for help on bridges, bonding and vlans.&amp;lt;br&amp;gt;&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [eth0], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: enter, to use the default, ethernet0 connection.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Ip address for eth0? (or &#039;dhcp&#039;, &#039;none&#039;, &#039;?&#039;) [dhcp], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter to use the default, dhcp.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At the second,  Enter &#039;?&#039; for help on bridges, bonding and vlans.&amp;lt;br&amp;gt;&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [wlan0], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: done and PRESS: enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Then at, Do you want to do and manual network configuration? (y/n) [n], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS enter for the default, [n], for no.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Change password for root, prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: the root password, and PRESS:  enter.&amp;lt;br&amp;gt;&lt;br /&gt;
At, Retype password, prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: the root password and PRESS:  enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Which timezone are you in? (&#039;?&#039; for a list) [UTC]. prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  America, with a capital A, and press enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, What sub-timezone of &#039;America&#039; are you in? (&#039;?&#039; for list), prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  Chicago, with a capital C, and press enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, HTTP/FTP proxy URL? (e.g. /http://proxy:8000&#039;, or &#039;none&#039;) [none], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default, none.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Which NTP Client to run? (&#039;busybox&#039;, &#039;openntpd&#039;, &#039;chrony&#039; or &#039;none&#039;) [chrony], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default, chrony.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
When the list of mirrors stop and at --More--, prompt &amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: the letter &amp;quot;r&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
r) Add random from the above list &amp;lt;br&amp;gt;&lt;br /&gt;
f) Detect and add the fastest mirror from above list &amp;lt;br&amp;gt;&lt;br /&gt;
e) Edit /etc/apk/repositories with text editor &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter mirror number (1-72) or URL to add (or r/f/e/done) [1], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default number 1. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Setup a user? (enter a lower-case loginname, or &#039;no&#039;) [no], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: enter for the default no. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, which ssh server? (&#039;openssh&#039;, &#039;dropbear&#039; or &#039;none&#039;), prompt.&lt;br /&gt;
TYPE: none and PRESS:  enter to continue.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Available disks are: &amp;lt;br&amp;gt;&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;       &lt;br /&gt;
At Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) [none], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: sda sdb and PRESS:  enter to continue. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The following disks are selected: &amp;lt;br&amp;gt;&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, &#039;crypt&#039;, &#039;lvm&#039; or &#039;?&#039; for help) [?], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  lvm and PRESS: enter to continue. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The following disks are selected (with LVM): &amp;lt;br&amp;gt;&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;               &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, or &#039;?&#039; for help) [?], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  sys for system disk and PRESS: enter to continue. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, WARNING: Erase the above disk(s) and continue? (y/n) [n], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
        sda (15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;              &lt;br /&gt;
        sdb (15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: y, for yes and PRESS: enter to continue. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Partition #1 contains a vfat signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Partition #2 contains a ext4 signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Partition #1 contains a vfat signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Partition #2 contains a ext4 signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Creating file systems&amp;lt;br&amp;gt;&lt;br /&gt;
mkfs.fat 4.2 ((2021-01-31)&amp;lt;br&amp;gt;&lt;br /&gt;
        Physical volume &amp;quot;/dev/md1&amp;quot; successfully created. &amp;lt;br&amp;gt;&lt;br /&gt;
        Logical volume &amp;quot;lv_root&amp;quot; created. &amp;lt;br&amp;gt;&lt;br /&gt;
* service lvm added to runlevel boot &amp;lt;br&amp;gt;&lt;br /&gt;
Installing system on /dev/vg0/lv_root&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
100% ###################################### &amp;lt;br&amp;gt;&lt;br /&gt;
=&amp;gt; initframfs: creating /boot/initramfs-rpi4 &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Installation is complete.  Please reboot.  DO NOT REBOOT!!! &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Alpine installed the boot drive as a FD linux raid autodetect, IT WILL NOT BOOT on a Raspberry Pi. The Raspberry Pi can only boot from fat16 or fat32 partition with boot and lba flags enabled. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  watch  cat /proc/mdstat&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Personalities : [raid1]&amp;lt;br&amp;gt;&lt;br /&gt;
md1 : active raid1 sdb2[1] sda2[0]&amp;lt;br&amp;gt;&lt;br /&gt;
          14723072 blocks super 1.2 [2/2] [UU]&amp;lt;br&amp;gt;&lt;br /&gt;
          {&amp;gt;....................] resyc - 2.7% (397521/14723072) finish=22.1min speed=8768K/sec&amp;lt;br&amp;gt;&lt;br /&gt;
md0 : active raid1 sdb1[1] sda1[0]&amp;lt;br&amp;gt;&lt;br /&gt;
          307136 blocks [2/2] [UU]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Raid MD1 is still resycing. Take a break, the drives should be finished in 20 to 30 minutes.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: ctrl + c to exit watch cat /proc/mdtstat&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Backup the boot raid partition first&amp;lt;br&amp;gt;&lt;br /&gt;
Insert mmcblk0&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  dd if=/dev/sda1 of=/dev/mmcblk0p1 bs=512&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Reboot&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Unmount the RAID 1 filesystem&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  umount /dev/md0&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Stop the madam raid device &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  mdadm --stop /dev/md0 &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Remove the Superblocks &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  mdadm --zero-superblock /dev/sda1 /dev/sdb1 /dev/mmcblk0p1 (due to dd backup copying) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
verify md0 has been removed &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  lsblk and or cat /proc/mdstat &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  apk add nano or use vi to remove RAID /dev/md0 entries by editing /etc/fstab and /etc/mdadm.conf &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
reboot &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Verify partition table sizes are the same on the Micro SD card and USB Drives. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  fdisk -l (some entries removed for clairification) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/mmcblk0: 15 GB, 15931539456 bytes, 31116288 sectors &amp;lt;-- &amp;lt;br&amp;gt;&lt;br /&gt;
15193 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/mmcblk0p1 *  1,0,1       300,63,32         2048     616447     614400  300M  c Win95 FAT32 (LBA)     ok &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/mmcblk0p2    301,0,1     1023,63,32      616448   31116287   30499840 14.5G fd Linux raid autodetect &amp;lt;-- &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/sda: 14 GB, 15401484288 bytes, 30081024 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
14688 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sda1 *  1,0,1       300,63,32         2048     616447     614400  300M fd Linux raid autodetect ok &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sda2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect &amp;lt;-- &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/sdb: 14 GB, 15401484288 bytes, 30081024 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
14688 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sdb1 *  1,0,1       300,63,32         2048     616447     614400  300M fd Linux raid autodetect ok &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sdb2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect &amp;lt;-- &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If the Micro SD card is larger then /dev/sda2 and /dev/sdb2.  &amp;lt;br&amp;gt;&lt;br /&gt;
Resize the partion before continuing.  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/mmcblk0: 15 GB, 15931539456 bytes, 31116288 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
15193 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/mmcblk0p1 *  1,0,1       300,63,32         2048     616447     614400  300M  c Win95 FAT32 (LBA) &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/mmcblk0p2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/sda: 14 GB, 15401484288 bytes, 30081024 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
14688 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sda1 *  1,0,1       300,63,32         2048     616447     614400  300M fd Linux raid autodetect &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sda2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/sdb: 14 GB, 15401484288 bytes, 30081024 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
14688 cylinders, 64 heads, 32 sectors/track&amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type&amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sdb1 *  1,0,1       300,63,32         2048     616447     614400  300M fd Linux raid autodetect&amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sdb2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Install sfdisk to copy partition table information &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  apk add sfdisk &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*** Warning*** &amp;lt;br&amp;gt;&lt;br /&gt;
Before executing the following commands mmcblk0, sda, and sdb must be the exact same size partitons. &amp;lt;br&amp;gt;&lt;br /&gt;
**************&amp;lt;br&amp;gt;&lt;br /&gt;
Copy mmcblk0 disk partition table to sda and sdb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  sfdisk -d /dev/mmcblk0 |  sfdisk --force /dev/sda&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  sfdisk -d /dev/mmcblk0 |  sfdisk --force /dev/sdb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Copy mmcblk0p1 boot partition to sda1 and sdb1&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sda1 bs=512&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sdb1 bs=512&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Add mmcblk0 as a spare drive to RAID /dev/md1&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  madam --add /dev/md1 /dev/mmcblk0p2&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
View Raid One information&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: mdadm --detail /dev/md1&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
/dev/md1&amp;lt;br&amp;gt;&lt;br /&gt;
                        version : 1.2&lt;br /&gt;
          Creation Time        : Sat Jun 24 12:50:56 2023&lt;br /&gt;
             Raid Level : raid 1&lt;br /&gt;
             Array Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
          Used Dev Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
           Raid Devices : 2&lt;br /&gt;
          Total Devices : 3&lt;br /&gt;
            Persistence : Superblock is persistence&lt;br /&gt;
&amp;lt;br&amp;gt;            &lt;br /&gt;
            Update Time : Sat Jun 24 14:30:11 2023&lt;br /&gt;
                      State : clean&lt;br /&gt;
         Active Devices : 2&lt;br /&gt;
        Working Devices : 3&lt;br /&gt;
         Failed Devices : 0&lt;br /&gt;
          Spare Devices : 1&lt;br /&gt;
txnintn&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23993</id>
		<title>User:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23993"/>
		<updated>2023-07-29T16:28:09Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title:  Alpine Linux install: LVM over Raid1 with a Micro SD spare.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Discussion:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Alpine Linux setup-alpine scripts when executed with two disks and the install medium, if both disks are selected, i.e., sda and sdb, the script will automatically configure a RAID1 installation.&amp;lt;br&amp;gt;&lt;br /&gt;
https://wiki.alpinelinux.org/wiki/Setting_up_the_build_environment_on_HDD#Basic_setup&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Additionally, LVM with a &#039;sys&#039; install can be selected during the setup-alpine script.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from the USB or the Micro SD port. By having a Micro SD RAID1 spare, if the primary USB drive fails, the Micro SD should be able to boot the system.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
NOTE:  A mirrored RAID array (level 1 or 5) protects you against hardware failure. It doesn&#039;t protect against rm -rf /, software errors, exploits, earthquakes, fire. Don&#039;t rely on RAID as a backup strategy.&amp;lt;br&amp;gt;&lt;br /&gt;
https://wiki.alpinelinux.org/wiki/Setting_up_a_software_RAID_array#Advice&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
LVM requires the Micro SD spare partition to be the same size as USB RAID1 partitions.  A larger capacity Micro SD drive 2nd partition can easily resized to match the USB partition.  During the install the setup-alpine script will maximize the size of 2nd partition on RAID1 drives&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tech Tip, not all Micro SD and USB drives are the same size.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ 16GB Drives&lt;br /&gt;
|-&lt;br /&gt;
! MFG / Model !! Size&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Industrial Micro SD || 14.84GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra Ultra Fit USB 3.1 || 14.34GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra USB 3.0 || 14.91GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Cruzer Glide USB 2.0 || 14.91GB&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+32GB Drives&lt;br /&gt;
! MFG / Model !! Size&lt;br /&gt;
|-&lt;br /&gt;
| Samsung SD Pro Endurance Micro SD || 29.81GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra SD || 29.72GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra Fit USB 3.1 Gen1 || 28.67GB&lt;br /&gt;
|-&lt;br /&gt;
| Silicon Power 5 USB 3.2 || 28.85GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra 3.0 OTG || 28.85GB&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ 64GB Drive&lt;br /&gt;
|-&lt;br /&gt;
! MFG / Model !! Size&lt;br /&gt;
|-&lt;br /&gt;
| Samsung EVO Select Micro SD || 59.69GB&lt;br /&gt;
|-&lt;br /&gt;
| Samsung Fit USB 3.1 || 59.75GB&lt;br /&gt;
|} &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Requirements:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Raspberry PI 4&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Two Identical USB Drives - fit style drives recommended based on physical clearance issues.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
One Micro SD Drive with the same or larger capacity then the USB drives&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
One USB drive for the installation files.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Preparation:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Created the following for the USB RAID disks:&amp;lt;br&amp;gt;&lt;br /&gt;
sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI.&amp;lt;br&amp;gt; &lt;br /&gt;
sdx2 using the rest of the disk with a fd linux raid partition, formatted ext4&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
mmcblkx, sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI.&amp;lt;br&amp;gt; &lt;br /&gt;
sdx2 sized to match USB RAID partition, Linux 83 and formatted Ext4.  Do not use Linux Raid.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The USB installation drive single partition fat 32 0c with boot and LBA flags.&amp;lt;br&amp;gt;&lt;br /&gt;
Extract the contents of alpine-rpi-3.x.x-aarch.tar.gz to sdc1 (spare USB) partition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Raspberry Pi eprom must be set to boot USB port first and SD port second.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Installation:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Insert the &amp;quot;sda&amp;quot; USB disk into the bottom USB 3.0 port and the &amp;quot;sdb&amp;quot; USB drive into the upper USB 3.0 port.  Power up the system, after the system has failed to boot to the installed USB drives, the screen will change from white and red to black and white text, insert the installation USB (sdc) to start the install process. This will set the drive assignments properly.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
After logging in as root.&amp;lt;br&amp;gt;&lt;br /&gt;
To start the install, &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  setup-alpine and PRESS:  enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Select keyboard layout: [none], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  us and PRESS:  enter.&amp;lt;br&amp;gt;&lt;br /&gt;
At, Select variant (or &#039;abort&#039;):, prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  us and PRESS:  enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter system hostname (fully qualified form, e.g. &#039;foo.example.org&#039;) [localhost] prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  the localhost name, for example, rpi44gb and PRESS: enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter &#039;?&#039; for help on bridges, bonding and vlans.&amp;lt;br&amp;gt;&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [eth0], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: enter, to use the default, ethernet0 connection.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Ip address for eth0? (or &#039;dhcp&#039;, &#039;none&#039;, &#039;?&#039;) [dhcp], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter to use the default, dhcp.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At the second,  Enter &#039;?&#039; for help on bridges, bonding and vlans.&amp;lt;br&amp;gt;&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [wlan0], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: done and PRESS: enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Then at, Do you want to do and manual network configuration? (y/n) [n], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS enter for the default, [n], for no.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Change password for root, prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: the root password, and PRESS:  enter.&amp;lt;br&amp;gt;&lt;br /&gt;
At, Retype password, prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: the root password and PRESS:  enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Which timezone are you in? (&#039;?&#039; for a list) [UTC]. prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  America, with a capital A, and press enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, What sub-timezone of &#039;America&#039; are you in? (&#039;?&#039; for list), prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  Chicago, with a capital C, and press enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, HTTP/FTP proxy URL? (e.g. /http://proxy:8000&#039;, or &#039;none&#039;) [none], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default, none.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Which NTP Client to run? (&#039;busybox&#039;, &#039;openntpd&#039;, &#039;chrony&#039; or &#039;none&#039;) [chrony], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default, chrony.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
When the list of mirrors stop and at --More--, prompt &amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: the letter &amp;quot;r&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
r) Add random from the above list &amp;lt;br&amp;gt;&lt;br /&gt;
f) Detect and add the fastest mirror from above list &amp;lt;br&amp;gt;&lt;br /&gt;
e) Edit /etc/apk/repositories with text editor &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter mirror number (1-72) or URL to add (or r/f/e/done) [1], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default number 1. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Setup a user? (enter a lower-case loginname, or &#039;no&#039;) [no], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: enter for the default no. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, which ssh server? (&#039;openssh&#039;, &#039;dropbear&#039; or &#039;none&#039;), prompt.&lt;br /&gt;
TYPE: none and PRESS:  enter to continue.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Available disks are: &amp;lt;br&amp;gt;&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;       &lt;br /&gt;
At Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) [none], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: sda sdb and PRESS:  enter to continue. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The following disks are selected: &amp;lt;br&amp;gt;&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, &#039;crypt&#039;, &#039;lvm&#039; or &#039;?&#039; for help) [?], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  lvm and PRESS: enter to continue. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The following disks are selected (with LVM): &amp;lt;br&amp;gt;&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;               &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, or &#039;?&#039; for help) [?], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  sys for system disk and PRESS: enter to continue. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, WARNING: Erase the above disk(s) and continue? (y/n) [n], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
        sda (15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;              &lt;br /&gt;
        sdb (15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: y, for yes and PRESS: enter to continue. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Partition #1 contains a vfat signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Partition #2 contains a ext4 signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Partition #1 contains a vfat signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Partition #2 contains a ext4 signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Creating file systems&amp;lt;br&amp;gt;&lt;br /&gt;
mkfs.fat 4.2 ((2021-01-31)&amp;lt;br&amp;gt;&lt;br /&gt;
        Physical volume &amp;quot;/dev/md1&amp;quot; successfully created. &amp;lt;br&amp;gt;&lt;br /&gt;
        Logical volume &amp;quot;lv_root&amp;quot; created. &amp;lt;br&amp;gt;&lt;br /&gt;
* service lvm added to runlevel boot &amp;lt;br&amp;gt;&lt;br /&gt;
Installing system on /dev/vg0/lv_root&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
100% ###################################### &amp;lt;br&amp;gt;&lt;br /&gt;
=&amp;gt; initframfs: creating /boot/initramfs-rpi4 &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Installation is complete.  Please reboot.  DO NOT REBOOT!!! &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Alpine installed the boot drive as a FD linux raid autodetect, IT WILL NOT BOOT on a Raspberry Pi. The Raspberry Pi can only boot from fat16 or fat32 partition with boot and lba flags enabled. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  watch  cat /proc/mdstat&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Personalities : [raid1]&amp;lt;br&amp;gt;&lt;br /&gt;
md1 : active raid1 sdb2[1] sda2[0]&amp;lt;br&amp;gt;&lt;br /&gt;
          14723072 blocks super 1.2 [2/2] [UU]&amp;lt;br&amp;gt;&lt;br /&gt;
          {&amp;gt;....................] resyc - 2.7% (397521/14723072) finish=22.1min speed=8768K/sec&amp;lt;br&amp;gt;&lt;br /&gt;
md0 : active raid1 sdb1[1] sda1[0]&amp;lt;br&amp;gt;&lt;br /&gt;
          307136 blocks [2/2] [UU]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Raid MD1 is still resycing. Take a break, the drives should be finished in 20 to 30 minutes.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: ctrl + c to exit watch cat /proc/mdtstat&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Backup the boot raid partition first&amp;lt;br&amp;gt;&lt;br /&gt;
Insert mmcblk0&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  dd if=/dev/sda1 of=/dev/mmcblk0p1 bs=512&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Reboot&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Unmount the RAID 1 filesystem&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  umount /dev/md0&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Stop the madam raid device &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  mdadm --stop /dev/md0 &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Remove the Superblocks &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  mdadm --zero-superblock /dev/sda1 /dev/sdb1 /dev/mmcblk0p1 (due to dd backup copying) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
verify md0 has been removed &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  lsblk and or cat /proc/mdstat &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  apk add nano or use vi to remove RAID /dev/md0 entries by editing /etc/fstab and /etc/mdadm.conf &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
reboot &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Verify partition table sizes are the same on the Micro SD card and USB Drives. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  fdisk -l (some entries removed for clairification) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/mmcblk0: 15 GB, 15931539456 bytes, 31116288 sectors &amp;lt;-- &amp;lt;br&amp;gt;&lt;br /&gt;
15193 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/mmcblk0p1 *  1,0,1       300,63,32         2048     616447     614400  300M  c Win95 FAT32 (LBA)     ok &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/mmcblk0p2    301,0,1     1023,63,32      616448   31116287   30499840 14.5G fd Linux raid autodetect &amp;lt;-- &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/sda: 14 GB, 15401484288 bytes, 30081024 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
14688 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sda1 *  1,0,1       300,63,32         2048     616447     614400  300M fd Linux raid autodetect ok &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sda2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect &amp;lt;-- &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/sdb: 14 GB, 15401484288 bytes, 30081024 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
14688 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sdb1 *  1,0,1       300,63,32         2048     616447     614400  300M fd Linux raid autodetect ok &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sdb2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect &amp;lt;-- &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If the Micro SD card is larger then /dev/sda2 and /dev/sdb2.  &amp;lt;br&amp;gt;&lt;br /&gt;
Resize the partion before continuing.  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/mmcblk0: 15 GB, 15931539456 bytes, 31116288 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
15193 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/mmcblk0p1 *  1,0,1       300,63,32         2048     616447     614400  300M  c Win95 FAT32 (LBA) &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/mmcblk0p2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/sda: 14 GB, 15401484288 bytes, 30081024 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
14688 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sda1 *  1,0,1       300,63,32         2048     616447     614400  300M fd Linux raid autodetect &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sda2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/sdb: 14 GB, 15401484288 bytes, 30081024 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
14688 cylinders, 64 heads, 32 sectors/track&amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type&amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sdb1 *  1,0,1       300,63,32         2048     616447     614400  300M fd Linux raid autodetect&amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sdb2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Install sfdisk to copy partition table information &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  apk add sfdisk &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*** Warning*** &amp;lt;br&amp;gt;&lt;br /&gt;
Before executing the following commands mmcblk0, sda, and sdb must be the exact same size partitons. &amp;lt;br&amp;gt;&lt;br /&gt;
**************&amp;lt;br&amp;gt;&lt;br /&gt;
Copy mmcblk0 disk partition table to sda and sdb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  sfdisk -d /dev/mmcblk0 |  sfdisk --force /dev/sda&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  sfdisk -d /dev/mmcblk0 |  sfdisk --force /dev/sdb&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Copy mmcblk0p1 boot partition to sda1 and sdb1&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sda1 bs=512&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sdb1 bs=512&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Add mmcblk0 as a spare drive to RAID /dev/md1&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  madam --add /dev/md1 /dev/mmcblk0p2&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
View Raid One information&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: mdadm --detail /dev/md1&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
/dev/md1&amp;lt;br&amp;gt;&lt;br /&gt;
                        version : 1.2&amp;lt;br&amp;gt;&lt;br /&gt;
          Creation Time        : Sat Jun 24 12:50:56 2023&amp;lt;br&amp;gt;&lt;br /&gt;
             Raid Level : raid 1&amp;lt;br&amp;gt;&lt;br /&gt;
             Array Size : 14723072 (14.04 GiB 15.08 GB)&amp;lt;br&amp;gt;&lt;br /&gt;
          Used Dev Size : 14723072 (14.04 GiB 15.08 GB)&amp;lt;br&amp;gt;&lt;br /&gt;
           Raid Devices : 2&amp;lt;br&amp;gt;&lt;br /&gt;
          Total Devices : 3&amp;lt;br&amp;gt;&lt;br /&gt;
            Persistence : Superblock is persistence&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;            &lt;br /&gt;
            Update Time : Sat Jun 24 14:30:11 2023&amp;lt;br&amp;gt;&lt;br /&gt;
                      State : clean&amp;lt;br&amp;gt;&lt;br /&gt;
         Active Devices : 2&amp;lt;br&amp;gt;&lt;br /&gt;
        Working Devices : 3&amp;lt;br&amp;gt;&lt;br /&gt;
         Failed Devices : 0&amp;lt;br&amp;gt;&lt;br /&gt;
          Spare Devices : 1&amp;lt;br&amp;gt;&lt;br /&gt;
txnintn&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23992</id>
		<title>User:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23992"/>
		<updated>2023-07-29T16:16:09Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title:  Alpine Linux install: LVM over Raid1 with a Micro SD spare.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Discussion:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Alpine Linux setup-alpine scripts when executed with two disks and the install medium, if both disks are selected, i.e., sda and sdb, the script will automatically configure a RAID1 installation.&amp;lt;br&amp;gt;&lt;br /&gt;
https://wiki.alpinelinux.org/wiki/Setting_up_the_build_environment_on_HDD#Basic_setup&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Additionally, LVM with a &#039;sys&#039; install can be selected during the setup-alpine script.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from the USB or the Micro SD port. By having a Micro SD RAID1 spare, if the primary USB drive fails, the Micro SD should be able to boot the system.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
NOTE:  A mirrored RAID array (level 1 or 5) protects you against hardware failure. It doesn&#039;t protect against rm -rf /, software errors, exploits, earthquakes, fire. Don&#039;t rely on RAID as a backup strategy.&amp;lt;br&amp;gt;&lt;br /&gt;
https://wiki.alpinelinux.org/wiki/Setting_up_a_software_RAID_array#Advice&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
LVM requires the Micro SD spare partition to be the same size as USB RAID1 partitions.  A larger capacity Micro SD drive 2nd partition can easily resized to match the USB partition.  During the install the setup-alpine script will maximize the size of 2nd partition on RAID1 drives&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tech Tip, not all Micro SD and USB drives are the same size.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ 16GB Drives&lt;br /&gt;
|-&lt;br /&gt;
! MFG / Model !! Size&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Industrial Micro SD || 14.84GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra Ultra Fit USB 3.1 || 14.34GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra USB 3.0 || 14.91GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Cruzer Glide USB 2.0 || 14.91GB&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+32GB Drives&lt;br /&gt;
! MFG / Model !! Size&lt;br /&gt;
|-&lt;br /&gt;
| Samsung SD Pro Endurance Micro SD || 29.81GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra SD || 29.72GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra Fit USB 3.1 Gen1 || 28.67GB&lt;br /&gt;
|-&lt;br /&gt;
| Silicon Power 5 USB 3.2 || 28.85GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra 3.0 OTG || 28.85GB&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ 64GB Drive&lt;br /&gt;
|-&lt;br /&gt;
! MFG / Model !! Size&lt;br /&gt;
|-&lt;br /&gt;
| Samsung EVO Select Micro SD || 59.69GB&lt;br /&gt;
|-&lt;br /&gt;
| Samsung Fit USB 3.1 || 59.75GB&lt;br /&gt;
|} &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Requirements:&lt;br /&gt;
&lt;br /&gt;
Raspberry PI 4&lt;br /&gt;
&lt;br /&gt;
Two Identical USB Drives - fit style drives recommended based on physical clearance issues.&lt;br /&gt;
&lt;br /&gt;
One Micro SD Drive with the same or larger capacity then the USB drives&lt;br /&gt;
 &lt;br /&gt;
One USB drive for the installation files.&lt;br /&gt;
&lt;br /&gt;
Preparation:&lt;br /&gt;
&lt;br /&gt;
Created the following on the USB RAID disks:&lt;br /&gt;
sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 using the rest of the disk with a fd linux raid partition, formatted ext4&lt;br /&gt;
&lt;br /&gt;
mmcblkx, sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 sized to match USB RAID partition, Linux 83 and formatted Ext4.  Do not use Linux Raid.&lt;br /&gt;
&lt;br /&gt;
The USB installation drive single partition fat 32 0c with boot and LBA flags.&lt;br /&gt;
Extract the contents of alpine-rpi-3.x.x-aarch.tar.gz to sdc1 (spare USB) partition.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi eprom must be set to boot USB port first and SD port second.&lt;br /&gt;
&lt;br /&gt;
Installation:&lt;br /&gt;
&lt;br /&gt;
Insert the &amp;quot;sda&amp;quot; USB disk into the bottom USB 3.0 port and the &amp;quot;sdb&amp;quot; USB drive into the upper USB 3.0 port.  Power up the system, after the system has failed to boot to the installed USB drives, the screen will change from white and red to black and white text, insert the installation USB (sdc) to start the install process. This will set the drive assignments properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After logging in as root.&lt;br /&gt;
To start the install, &lt;br /&gt;
TYPE:  setup-alpine and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Select keyboard layout: [none], prompt.&lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
At, Select variant (or &#039;abort&#039;):, prompt. &lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter system hostname (fully qualified form, e.g. &#039;foo.example.org&#039;) [localhost] prompt.&lt;br /&gt;
TYPE:  the localhost name, for example, rpi44gb and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [eth0], prompt. &lt;br /&gt;
PRESS: enter, to use the default, ethernet0 connection.&lt;br /&gt;
&lt;br /&gt;
Ip address for eth0? (or &#039;dhcp&#039;, &#039;none&#039;, &#039;?&#039;) [dhcp], prompt. &lt;br /&gt;
PRESS:  enter to use the default, dhcp.&lt;br /&gt;
&lt;br /&gt;
At the second,  Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [wlan0], prompt.&lt;br /&gt;
TYPE: done and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
Then at, Do you want to do and manual network configuration? (y/n) [n], prompt.&lt;br /&gt;
PRESS enter for the default, [n], for no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Change password for root, prompt.&lt;br /&gt;
TYPE: the root password, and PRESS:  enter.&lt;br /&gt;
At, Retype password, prompt.&lt;br /&gt;
TYPE: the root password and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which timezone are you in? (&#039;?&#039; for a list) [UTC]. prompt.&lt;br /&gt;
TYPE:  America, with a capital A, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, What sub-timezone of &#039;America&#039; are you in? (&#039;?&#039; for list), prompt.&lt;br /&gt;
TYPE:  Chicago, with a capital C, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, HTTP/FTP proxy URL? (e.g. /http://proxy:8000&#039;, or &#039;none&#039;) [none], prompt.&lt;br /&gt;
PRESS:  enter for the default, none.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which NTP Client to run? (&#039;busybox&#039;, &#039;openntpd&#039;, &#039;chrony&#039; or &#039;none&#039;) [chrony], prompt.&lt;br /&gt;
PRESS:  enter for the default, chrony.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the list of mirrors stop and at --More--, prompt &amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: the letter &amp;quot;r&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
r) Add random from the above list &amp;lt;br&amp;gt;&lt;br /&gt;
f) Detect and add the fastest mirror from above list &amp;lt;br&amp;gt;&lt;br /&gt;
e) Edit /etc/apk/repositories with text editor &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter mirror number (1-72) or URL to add (or r/f/e/done) [1], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default number 1. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Setup a user? (enter a lower-case loginname, or &#039;no&#039;) [no], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: enter for the default no. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, which ssh server? (&#039;openssh&#039;, &#039;dropbear&#039; or &#039;none&#039;), prompt.&lt;br /&gt;
TYPE: none and PRESS:  enter to continue.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Available disks are: &amp;lt;br&amp;gt;&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;&lt;br /&gt;
  &amp;lt;br&amp;gt;       &lt;br /&gt;
At Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) [none], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: sda sdb and PRESS:  enter to continue. &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
The following disks are selected: &amp;lt;br&amp;gt;&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, &#039;crypt&#039;, &#039;lvm&#039; or &#039;?&#039; for help) [?], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  lvm and PRESS: enter to continue. &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
The following disks are selected (with LVM): &amp;lt;br&amp;gt;&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;               &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, or &#039;?&#039; for help) [?], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  sys for system disk and PRESS: enter to continue. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, WARNING: Erase the above disk(s) and continue? (y/n) [n], prompt. &amp;lt;br&amp;gt;&lt;br /&gt;
        sda (15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;              &lt;br /&gt;
        sdb (15.4 GB USB	SanDisk 3.2Gen1) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: y, for yes and PRESS: enter to continue. &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
Partition #1 contains a vfat signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Partition #2 contains a ext4 signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Partition #1 contains a vfat signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Partition #2 contains a ext4 signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Creating file systems&amp;lt;br&amp;gt;&lt;br /&gt;
mkfs.fat 4.2 ((2021-01-31)&amp;lt;br&amp;gt;&lt;br /&gt;
        Physical volume &amp;quot;/dev/md1&amp;quot; successfully created. &amp;lt;br&amp;gt;&lt;br /&gt;
        Logical volume &amp;quot;lv_root&amp;quot; created. &amp;lt;br&amp;gt;&lt;br /&gt;
* service lvm added to runlevel boot &amp;lt;br&amp;gt;&lt;br /&gt;
Installing system on /dev/vg0/lv_root&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
100% ###################################### &amp;lt;br&amp;gt;&lt;br /&gt;
=&amp;gt; initframfs: creating /boot/initramfs-rpi4 &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
Installation is complete.  Please reboot.  DO NOT REBOOT!!! &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alpine installed the boot drive as a FD linux raid autodetect, IT WILL NOT BOOT on a Raspberry Pi. &lt;br /&gt;
The Raspberry Pi can only boot from fat16 or fat32 partition with boot and lba flags enabled. &lt;br /&gt;
&lt;br /&gt;
TYPE:  watch  cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
Personalities : [raid1]&lt;br /&gt;
md1 : active raid1 sdb2[1] sda2[0]&lt;br /&gt;
          14723072 blocks super 1.2 [2/2] [UU]&lt;br /&gt;
          {&amp;gt;....................] resyc - 2.7% (397521/14723072) finish=22.1min speed=8768K/sec&lt;br /&gt;
md0 : active raid1 sdb1[1] sda1[0]&lt;br /&gt;
          307136 blocks [2/2] [UU] &lt;br /&gt;
&lt;br /&gt;
The Raid MD1 is still resycing. Take a break, the drives should be finished in 20 to 30 minutes.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PRESS: ctrl + c to exit watch cat /proc/mdtstat&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Backup the boot raid partition first&amp;lt;br&amp;gt;&lt;br /&gt;
Insert mmcblk0&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  dd if=/dev/sda1 of=/dev/mmcblk0p1 bs=512&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unmount the RAID 1 filesystem&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  umount /dev/md0&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Stop the madam raid device &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  mdadm --stop /dev/md0 &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remove the Superblocks &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  mdadm --zero-superblock /dev/sda1 /dev/sdb1 /dev/mmcblk0p1 (due to dd backup copying) &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
verify md0 has been removed &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  lsblk and or cat /proc/mdstat &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TYPE:  apk add nano or use vi to remove RAID /dev/md0 entries by editing /etc/fstab and /etc/mdadm.conf &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
reboot &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verify partition table sizes are the same on the Micro SD card and USB Drives. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
TYPE:  fdisk -l (some entries removed for clairification) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/mmcblk0: 15 GB, 15931539456 bytes, 31116288 sectors &amp;lt;-- &amp;lt;br&amp;gt;&lt;br /&gt;
15193 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/mmcblk0p1 *  1,0,1       300,63,32         2048     616447     614400  300M  c Win95 FAT32 (LBA)     ok &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/mmcblk0p2    301,0,1     1023,63,32      616448   31116287   30499840 14.5G fd Linux raid autodetect &amp;lt;-- &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/sda: 14 GB, 15401484288 bytes, 30081024 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
14688 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sda1 *  1,0,1       300,63,32         2048     616447     614400  300M fd Linux raid autodetect ok &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sda2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect &amp;lt;-- &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/sdb: 14 GB, 15401484288 bytes, 30081024 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
14688 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sdb1 *  1,0,1       300,63,32         2048     616447     614400  300M fd Linux raid autodetect ok &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sdb2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect &amp;lt;-- &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Micro SD card is larger then /dev/sda2 and /dev/sdb2.  &amp;lt;br&amp;gt;&lt;br /&gt;
Resize the partion before continuing.  &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/mmcblk0: 15 GB, 15931539456 bytes, 31116288 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
15193 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/mmcblk0p1 *  1,0,1       300,63,32         2048     616447     614400  300M  c Win95 FAT32 (LBA) &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/mmcblk0p2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/sda: 14 GB, 15401484288 bytes, 30081024 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
14688 cylinders, 64 heads, 32 sectors/track &amp;lt;br&amp;gt;&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sda1 *  1,0,1       300,63,32         2048     616447     614400  300M fd Linux raid autodetect &amp;lt;br&amp;gt;&lt;br /&gt;
/dev/sda2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
Disk /dev/sdb: 14 GB, 15401484288 bytes, 30081024 sectors &amp;lt;br&amp;gt;&lt;br /&gt;
14688 cylinders, 64 heads, 32 sectors/track&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
&lt;br /&gt;
Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type&lt;br /&gt;
/dev/sdb1 *  1,0,1       300,63,32         2048     616447     614400  300M fd Linux raid autodetect&lt;br /&gt;
/dev/sdb2    301,0,1     1023,63,32      616448   30081023   29464576 14.0G fd Linux raid autodetect&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
Install sfdisk to copy partition table information &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  apk add sfdisk &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
*** Warning*** &amp;lt;br&amp;gt;&lt;br /&gt;
Before executing the following commands mmcblk0, sda, and sdb must be the exact same size partitons. &amp;lt;br&amp;gt;&lt;br /&gt;
**************&amp;lt;br&amp;gt;&lt;br /&gt;
Copy mmcblk0 disk partition table to sda and sdb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
TYPE:  sfdisk -d /dev/mmcblk0 |  sfdisk --force /dev/sda&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
TYPE:  sfdisk -d /dev/mmcblk0 |  sfdisk --force /dev/sdb&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Copy mmcblk0p1 boot partition to sda1 and sdb1&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sda1 bs=512&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sdb1 bs=512&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Add mmcblk0 as a spare drive to RAID /dev/md1&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  madam --add /dev/md1 /dev/mmcblk0p2&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
View Raid One information&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: mdadm --detail /dev/md1&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/dev/md1&lt;br /&gt;
                        version : 1.2&lt;br /&gt;
          Creation Time        : Sat Jun 24 12:50:56 2023&lt;br /&gt;
             Raid Level : raid 1&lt;br /&gt;
             Array Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
          Used Dev Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
           Raid Devices : 2&lt;br /&gt;
          Total Devices : 3&lt;br /&gt;
            Persistence : Superblock is persistence&lt;br /&gt;
            &lt;br /&gt;
            Update Time : Sat Jun 24 14:30:11 2023&lt;br /&gt;
                      State : clean&lt;br /&gt;
         Active Devices : 2&lt;br /&gt;
        Working Devices : 3&lt;br /&gt;
         Failed Devices : 0&lt;br /&gt;
          Spare Devices : 1&lt;br /&gt;
txnintn&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User_talk:Txnintn&amp;diff=23782</id>
		<title>User talk:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User_talk:Txnintn&amp;diff=23782"/>
		<updated>2023-07-05T17:23:50Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title&amp;lt;br&amp;gt;&lt;br /&gt;
*** work in progress *** not fully validated&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install Alpine Linux on a Raspberry PI 4 in Diskless Mode.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Discussion:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Preparation:&amp;lt;br&amp;gt;&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from either a USB or a Micro SD port.&amp;lt;br&amp;gt;&lt;br /&gt;
Prepare a USB or Micro SD drive 1st partition fat 32 partition type 0c with boot and LBA flags. &amp;lt;br&amp;gt;&lt;br /&gt;
Use the rest of the drive in the second partition Ext4 partition type 83. &amp;lt;br&amp;gt; &lt;br /&gt;
Extract the contents of alpine-rpi-3.x.x-aarch.tar.gz to the first partition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To start the install, &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  setup-alpine and PRESS:  enter&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Select keyboard layout: [none], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  us and PRESS:  enter&amp;lt;br&amp;gt;&lt;br /&gt;
At, Select variant (or &#039;abort&#039;):, prompt.&amp;lt;br&amp;gt; &lt;br /&gt;
TYPE:  us and PRESS:  enter&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter system hostname (fully qualified form, e.g. &#039;foo.example.org&#039;) [localhost] prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: enter, to use the default localhost.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter &#039;?&#039; for help on bridges, bonding and vlans.&amp;lt;br&amp;gt;&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [eth0], prompt.&amp;lt;br&amp;gt; &lt;br /&gt;
PRESS: enter, to use the default, ethernet0 connection.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Ip address for eth0? (or &#039;dhcp&#039;, &#039;none&#039;, &#039;?&#039;) [dhcp], prompt.&amp;lt;br&amp;gt; &lt;br /&gt;
PRESS:  enter to use the default, dhcp.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At the second,  Enter &#039;?&#039; for help on bridges, bonding and vlans.&amp;lt;br&amp;gt;&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [wlan0], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: done and PRESS: enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Then at, Do you want to do and manual network configuration? (y/n) [n], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS enter for the default, [n], for no.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Change password for root, prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: the root password, and PRESS:  enter&amp;lt;br&amp;gt;&lt;br /&gt;
At, Retype password, prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: the root password and PRESS:  enter&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Which timezone are you in? (&#039;?&#039; for a list) [UTC]. prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  America, with a capital A, and press enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, What sub-timezone of &#039;America&#039; are you in? (&#039;?&#039; for list), prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  Chicago, with a capital C, and press enter.&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, HTTP/FTP proxy URL? (e.g. /http://proxy:8000&#039;, or &#039;none&#039;) [none], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default, none.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Which NTP Client to run? (&#039;busybox&#039;, &#039;openntpd&#039;, &#039;chrony&#039; or &#039;none&#039;) [chrony], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default, chrony.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
When the list of mirrors stop and at --More--, prompt&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: the letter &amp;quot;r&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
r) Add random from the above list&amp;lt;br&amp;gt;&lt;br /&gt;
f) Detect and add the fastest mirror from above list&amp;lt;br&amp;gt;&lt;br /&gt;
e) Edit /etc/apk/repositories with text editor&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter mirror number (1-72) or URL to add (or r/f/e/done) [1], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default number 1.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Setup a user? (enter a lower-case loginname, or &#039;no&#039;) [no], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: enter for the default no.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, which ssh server? (&#039;openssh&#039;, &#039;dropbear&#039; or &#039;none&#039;), prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: none and PRESS:  enter to continue.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
No disks available.  Try boot media /media/sda1? (y/n) [n]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;        &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Enter where to store configs (&#039;floppy&#039;, &#039;sda1&#039;, &#039;usb&#039;, or &#039;none&#039;) [sda1]&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: none and PRESS: enter to continue.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Enter apk cache directory (or &#039;?&#039; or &#039;none&#039;) [/media/usb/cache]&amp;lt;br&amp;gt; &lt;br /&gt;
TYPE: none and press enter to continue.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The install is complete.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Warning: By default, an lbu commit only stores modifications below /etc, with the exception of the /etc/init.d/ directory.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
https://wiki.alpinelinux.org/wiki/Alpine_local_backup&amp;lt;br&amp;gt;&lt;br /&gt;
Warning: By default, an lbu commit only stores modifications below /etc, with the exception of the /etc/init.d/ directory.&amp;lt;br&amp;gt;&lt;br /&gt;
However, lbu include enables modifying that set of included files, and can be used to specify additional files or folders.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Create the apk cache file location and a LBU backup directory.&amp;lt;br&amp;gt;&lt;br /&gt;
At the command prompt,  TYPE:  mkdir /root/config-backups and then PRESS: enter&amp;lt;br&amp;gt;&lt;br /&gt;
At the command prompt,  TYPE:  mkdir /etc/apk/cache and then PRESS: enter&amp;lt;br&amp;gt;&lt;br /&gt;
At the command prompt,  TYPE: vi /etc/lbu/lbu.conf and then PRESS: enter&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: the ESC key and press i to change to insert mode.&amp;lt;br&amp;gt;&lt;br /&gt;
Remove the pound sign at LBU_BACKUPDIR=/root/config-backups&amp;lt;br&amp;gt;&lt;br /&gt;
Remove the pound sign at BACKUP_LIMIT=3&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS the ESC key and TYPE : followed by wq and PRESS enter.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS lbu ci&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS lbu commit -d&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User_talk:Txnintn&amp;diff=23780</id>
		<title>User talk:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User_talk:Txnintn&amp;diff=23780"/>
		<updated>2023-07-04T19:13:17Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install Alpine Linux on a Raspberry PI 4 in Diskless Mode.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Discussion:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Preparation:&amp;lt;br&amp;gt;&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from either a USB or a Micro SD port.&amp;lt;br&amp;gt;&lt;br /&gt;
Prepare a USB or Micro SD drive 1st partition fat 32 partition type 0c with boot and LBA flags. &amp;lt;br&amp;gt;&lt;br /&gt;
Use the rest of the drive in the second partition Ext4 partition type 83. &amp;lt;br&amp;gt; &lt;br /&gt;
Extract the contents of alpine-rpi-3.x.x-aarch.tar.gz to the first partition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To start the install, &amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  setup-alpine and PRESS:  enter&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Select keyboard layout: [none], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  us and PRESS:  enter&amp;lt;br&amp;gt;&lt;br /&gt;
At, Select variant (or &#039;abort&#039;):, prompt.&amp;lt;br&amp;gt; &lt;br /&gt;
TYPE:  us and PRESS:  enter&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter system hostname (fully qualified form, e.g. &#039;foo.example.org&#039;) [localhost] prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: enter, to use the default localhost.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter &#039;?&#039; for help on bridges, bonding and vlans.&amp;lt;br&amp;gt;&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [eth0], prompt.&amp;lt;br&amp;gt; &lt;br /&gt;
PRESS: enter, to use the default, ethernet0 connection.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Ip address for eth0? (or &#039;dhcp&#039;, &#039;none&#039;, &#039;?&#039;) [dhcp], prompt.&amp;lt;br&amp;gt; &lt;br /&gt;
PRESS:  enter to use the default, dhcp.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At the second,  Enter &#039;?&#039; for help on bridges, bonding and vlans.&amp;lt;br&amp;gt;&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [wlan0], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: done and PRESS: enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Then at, Do you want to do and manual network configuration? (y/n) [n], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS enter for the default, [n], for no.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Change password for root, prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: the root password, and PRESS:  enter&amp;lt;br&amp;gt;&lt;br /&gt;
At, Retype password, prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: the root password and PRESS:  enter&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Which timezone are you in? (&#039;?&#039; for a list) [UTC]. prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  America, with a capital A, and press enter.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, What sub-timezone of &#039;America&#039; are you in? (&#039;?&#039; for list), prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  Chicago, with a capital C, and press enter.&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, HTTP/FTP proxy URL? (e.g. /http://proxy:8000&#039;, or &#039;none&#039;) [none], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default, none.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Which NTP Client to run? (&#039;busybox&#039;, &#039;openntpd&#039;, &#039;chrony&#039; or &#039;none&#039;) [chrony], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default, chrony.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
When the list of mirrors stop and at --More--, prompt&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: the letter &amp;quot;r&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
r) Add random from the above list&amp;lt;br&amp;gt;&lt;br /&gt;
f) Detect and add the fastest mirror from above list&amp;lt;br&amp;gt;&lt;br /&gt;
e) Edit /etc/apk/repositories with text editor&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Enter mirror number (1-72) or URL to add (or r/f/e/done) [1], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS:  enter for the default number 1.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, Setup a user? (enter a lower-case loginname, or &#039;no&#039;) [no], prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: enter for the default no.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
At, which ssh server? (&#039;openssh&#039;, &#039;dropbear&#039; or &#039;none&#039;), prompt.&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: none and PRESS:  enter to continue.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
No disks available.  Try boot media /media/sda1? (y/n) [n]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;        &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Enter where to store configs (&#039;floppy&#039;, &#039;sda1&#039;, &#039;usb&#039;, or &#039;none&#039;) [sda1]&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: none and PRESS: enter to continue.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Enter apk cache directory (or &#039;?&#039; or &#039;none&#039;) [/media/usb/cache]&amp;lt;br&amp;gt; &lt;br /&gt;
TYPE: none and press enter to continue.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The install is complete.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Warning: By default, an lbu commit only stores modifications below /etc, with the exception of the /etc/init.d/ directory.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
https://wiki.alpinelinux.org/wiki/Alpine_local_backup&amp;lt;br&amp;gt;&lt;br /&gt;
Warning: By default, an lbu commit only stores modifications below /etc, with the exception of the /etc/init.d/ directory.&amp;lt;br&amp;gt;&lt;br /&gt;
However, lbu include enables modifying that set of included files, and can be used to specify additional files or folders.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Create the apk cache file location and a LBU backup directory.&amp;lt;br&amp;gt;&lt;br /&gt;
At the command prompt,  TYPE:  mkdir /root/config-backups and then PRESS: enter&amp;lt;br&amp;gt;&lt;br /&gt;
At the command prompt,  TYPE:  mkdir /etc/apk/cache and then PRESS: enter&amp;lt;br&amp;gt;&lt;br /&gt;
At the command prompt,  TYPE: vi /etc/lbu/lbu.conf and then PRESS: enter&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS: the ESC key and press i to change to insert mode.&amp;lt;br&amp;gt;&lt;br /&gt;
Remove the pound sign at LBU_BACKUPDIR=/root/config-backups&amp;lt;br&amp;gt;&lt;br /&gt;
Remove the pound sign at BACKUP_LIMIT=3&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS the ESC key and TYPE : followed by wq and PRESS enter.&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS lbu ci&amp;lt;br&amp;gt;&lt;br /&gt;
PRESS lbu commit -d&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User_talk:Txnintn&amp;diff=23777</id>
		<title>User talk:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User_talk:Txnintn&amp;diff=23777"/>
		<updated>2023-07-04T18:57:36Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: Install Alpine Linux on a Raspberry PI 4 in Diskless Mode.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title&lt;br /&gt;
Install Alpine Linux on a Raspberry PI 4 in Diskless Mode.&lt;br /&gt;
&lt;br /&gt;
Discussion:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Preparation&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from either a USB or a Micro SD port.&lt;br /&gt;
Prepare a USB or Micro SD drive 1st partition fat 32 partition type 0c with boot and LBA flags. &lt;br /&gt;
Use the rest of the drive in the second partition Ext4 partition type 83.  &lt;br /&gt;
Extract the contents of alpine-rpi-3.x.x-aarch.tar.gz to the first partition.&lt;br /&gt;
&lt;br /&gt;
To start the install, &lt;br /&gt;
TYPE:  setup-alpine and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Select keyboard layout: [none], prompt.&lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
At, Select variant (or &#039;abort&#039;):, prompt. &lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter system hostname (fully qualified form, e.g. &#039;foo.example.org&#039;) [localhost] prompt.&lt;br /&gt;
PRESS: enter, to use the default localhost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [eth0], prompt. &lt;br /&gt;
PRESS: enter, to use the default, ethernet0 connection.&lt;br /&gt;
&lt;br /&gt;
Ip address for eth0? (or &#039;dhcp&#039;, &#039;none&#039;, &#039;?&#039;) [dhcp], prompt. &lt;br /&gt;
PRESS:  enter to use the default, dhcp.&lt;br /&gt;
&lt;br /&gt;
At the second,  Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [wlan0], prompt.&lt;br /&gt;
TYPE: done and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
Then at, Do you want to do and manual network configuration? (y/n) [n], prompt.&lt;br /&gt;
PRESS enter for the default, [n], for no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Change password for root, prompt.&lt;br /&gt;
TYPE: the root password, and PRESS:  enter.&lt;br /&gt;
At, Retype password, prompt.&lt;br /&gt;
TYPE: the root password and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which timezone are you in? (&#039;?&#039; for a list) [UTC]. prompt.&lt;br /&gt;
TYPE:  America, with a capital A, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, What sub-timezone of &#039;America&#039; are you in? (&#039;?&#039; for list), prompt.&lt;br /&gt;
TYPE:  Chicago, with a capital C, and press enter. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, HTTP/FTP proxy URL? (e.g. /http://proxy:8000&#039;, or &#039;none&#039;) [none], prompt.&lt;br /&gt;
PRESS:  enter for the default, none.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which NTP Client to run? (&#039;busybox&#039;, &#039;openntpd&#039;, &#039;chrony&#039; or &#039;none&#039;) [chrony], prompt.&lt;br /&gt;
PRESS:  enter for the default, chrony.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the list of mirrors stop and at --More--, prompt&lt;br /&gt;
PRESS: the letter &amp;quot;r&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
r) Add random from the above list&lt;br /&gt;
f) Detect and add the fastest mirror from above list&lt;br /&gt;
e) Edit /etc/apk/repositories with text editor&lt;br /&gt;
&lt;br /&gt;
At, Enter mirror number (1-72) or URL to add (or r/f/e/done) [1], prompt.&lt;br /&gt;
PRESS:  enter for the default number 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Setup a user? (enter a lower-case loginname, or &#039;no&#039;) [no], prompt.&lt;br /&gt;
PRESS: enter for the default no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, which ssh server? (&#039;openssh&#039;, &#039;dropbear&#039; or &#039;none&#039;), prompt.&lt;br /&gt;
TYPE: none and PRESS:  enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
No disks available.  Try boot media /media/sda1? (y/n) [n]&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
Enter where to store configs (&#039;floppy&#039;, &#039;sda1&#039;, &#039;usb&#039;, or &#039;none&#039;) [sda1] &lt;br /&gt;
TYPE: none and press enter to continue.&lt;br /&gt;
&lt;br /&gt;
Enter apk cache directory (or &#039;?&#039; or &#039;none&#039;) [/media/usb/cache] &lt;br /&gt;
TYPE: none and press enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The install is complete.&lt;br /&gt;
&lt;br /&gt;
Warning: By default, an lbu commit only stores modifications below /etc, with the exception of the /etc/init.d/ directory.&lt;br /&gt;
&lt;br /&gt;
https://wiki.alpinelinux.org/wiki/Alpine_local_backup&lt;br /&gt;
Warning: By default, an lbu commit only stores modifications below /etc, with the exception of the /etc/init.d/ directory.&lt;br /&gt;
However, lbu include enables modifying that set of included files, and can be used to specify additional files or folders.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create the apk cache file location and a LBU backup directory.&lt;br /&gt;
At the command prompt,  TYPE:  mkdir /root/config-backups and then PRESS: enter.&lt;br /&gt;
At the command prompt,  TYPE:  mkdir /etc/apk/cache and then PRESS: enter&lt;br /&gt;
At the command prompt,  TYPE: vi /etc/lbu/lbu.conf and then PRESS: enter&lt;br /&gt;
&lt;br /&gt;
PRESS: the ESC key and press i to change to insert mode.&lt;br /&gt;
Remove the pound sign at LBU_BACKUPDIR=/root/config-backups&lt;br /&gt;
Remove the pound sign at BACKUP_LIMIT=3&lt;br /&gt;
PRESS the ESC key and TYPE : followed by wq and PRESS enter.&lt;br /&gt;
PRESS lbu ci&lt;br /&gt;
PRESS lbu commit -d&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23767</id>
		<title>User:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23767"/>
		<updated>2023-07-04T15:05:45Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title:  Alpine Linux install: LVM over Raid1 with a Micro SD spare.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Discussion:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Alpine Linux setup-alpine scripts when executed with two disks and the install medium, if both disks are selected, i.e., sda and sdb, the script will automatically configure a RAID1 installation.&amp;lt;br&amp;gt;&lt;br /&gt;
https://wiki.alpinelinux.org/wiki/Setting_up_the_build_environment_on_HDD#Basic_setup&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Additionally, LVM with a &#039;sys&#039; install can be selected during the setup-alpine script.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from the USB or the Micro SD port. By having a Micro SD RAID1 spare, if the primary USB drive fails, the Micro SD should be able to boot the system.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
NOTE:  A mirrored RAID array (level 1 or 5) protects you against hardware failure. It doesn&#039;t protect against rm -rf /, software errors, exploits, earthquakes, fire. Don&#039;t rely on RAID as a backup strategy.&amp;lt;br&amp;gt;&lt;br /&gt;
https://wiki.alpinelinux.org/wiki/Setting_up_a_software_RAID_array#Advice&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
LVM requires the Micro SD spare partition to be the same size as USB RAID1 partitions.  A larger capacity Micro SD drive 2nd partition can easily resized to match the USB partition.  During the install the setup-alpine script will maximize the size of 2nd partition on RAID1 drives&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tech Tip, not all Micro SD and USB drives are the same size.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ 16GB Drives&lt;br /&gt;
|-&lt;br /&gt;
! MFG / Model !! Size&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Industrial Micro SD || 14.84GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra Ultra Fit USB 3.1 || 14.34GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra USB 3.0 || 14.91GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Cruzer Glide USB 2.0 || 14.91GB&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+32GB Drives&lt;br /&gt;
! MFG / Model !! Size&lt;br /&gt;
|-&lt;br /&gt;
| Samsung SD Pro Endurance Micro SD || 29.81GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra SD || 29.72GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra Fit USB 3.1 Gen1 || 28.67GB&lt;br /&gt;
|-&lt;br /&gt;
| Silicon Power 5 USB 3.2 || 28.85GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra 3.0 OTG || 28.85GB&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ 64GB Drive&lt;br /&gt;
|-&lt;br /&gt;
! MFG / Model !! Size&lt;br /&gt;
|-&lt;br /&gt;
| Samsung EVO Select Micro SD || 59.69GB&lt;br /&gt;
|-&lt;br /&gt;
| Samsung Fit USB 3.1 || 59.75GB&lt;br /&gt;
|} &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Requirements:&lt;br /&gt;
&lt;br /&gt;
Raspberry PI 4&lt;br /&gt;
&lt;br /&gt;
Two Identical USB Drives - fit style drives recommended based on physical clearance issues.&lt;br /&gt;
&lt;br /&gt;
One Micro SD Drive with the same or larger capacity then the USB drives&lt;br /&gt;
 &lt;br /&gt;
One USB drive for the installation files.&lt;br /&gt;
&lt;br /&gt;
Preparation:&lt;br /&gt;
&lt;br /&gt;
Created the following on the USB RAID disks:&lt;br /&gt;
sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 using the rest of the disk with a fd linux raid partition, formatted ext4&lt;br /&gt;
&lt;br /&gt;
mmcblkx, sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 sized to match USB RAID partition, Linux 83 and formatted Ext4.  Do not use Linux Raid.&lt;br /&gt;
&lt;br /&gt;
The USB installation drive single partition fat 32 0c with boot and LBA flags.&lt;br /&gt;
Extract the contents of alpine-rpi-3.x.x-aarch.tar.gz to sdc1 (spare USB) partition.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi eprom must be set to boot USB port first and SD port second.&lt;br /&gt;
&lt;br /&gt;
Installation:&lt;br /&gt;
&lt;br /&gt;
Insert the &amp;quot;sda&amp;quot; USB disk into the bottom USB 3.0 port and the &amp;quot;sdb&amp;quot; USB drive into the upper USB 3.0 port.  Power up the system, after the system has failed to boot to the installed USB drives, the screen will change from white and red to black and white text, insert the installation USB (sdc) to start the install process. This will set the drive assignments properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After logging in as root.&lt;br /&gt;
To start the install, &lt;br /&gt;
TYPE:  setup-alpine and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Select keyboard layout: [none], prompt.&lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
At, Select variant (or &#039;abort&#039;):, prompt. &lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter system hostname (fully qualified form, e.g. &#039;foo.example.org&#039;) [localhost] prompt.&lt;br /&gt;
TYPE:  the localhost name, for example, rpi44gb and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [eth0], prompt. &lt;br /&gt;
PRESS: enter, to use the default, ethernet0 connection.&lt;br /&gt;
&lt;br /&gt;
Ip address for eth0? (or &#039;dhcp&#039;, &#039;none&#039;, &#039;?&#039;) [dhcp], prompt. &lt;br /&gt;
PRESS:  enter to use the default, dhcp.&lt;br /&gt;
&lt;br /&gt;
At the second,  Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [wlan0], prompt.&lt;br /&gt;
TYPE: done and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
Then at, Do you want to do and manual network configuration? (y/n) [n], prompt.&lt;br /&gt;
PRESS enter for the default, [n], for no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Change password for root, prompt.&lt;br /&gt;
TYPE: the root password, and PRESS:  enter.&lt;br /&gt;
At, Retype password, prompt.&lt;br /&gt;
TYPE: the root password and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which timezone are you in? (&#039;?&#039; for a list) [UTC]. prompt.&lt;br /&gt;
TYPE:  America, with a capital A, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, What sub-timezone of &#039;America&#039; are you in? (&#039;?&#039; for list), prompt.&lt;br /&gt;
TYPE:  Chicago, with a capital C, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, HTTP/FTP proxy URL? (e.g. /http://proxy:8000&#039;, or &#039;none&#039;) [none], prompt.&lt;br /&gt;
PRESS:  enter for the default, none.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which NTP Client to run? (&#039;busybox&#039;, &#039;openntpd&#039;, &#039;chrony&#039; or &#039;none&#039;) [chrony], prompt.&lt;br /&gt;
PRESS:  enter for the default, chrony.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the list of mirrors stop and at --More--, prompt&lt;br /&gt;
PRESS: the letter &amp;quot;r&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
r) Add random from the above list&lt;br /&gt;
f) Detect and add the fastest mirror from above list&lt;br /&gt;
e) Edit /etc/apk/repositories with text editor&lt;br /&gt;
&lt;br /&gt;
At, Enter mirror number (1-72) or URL to add (or r/f/e/done) [1], prompt.&lt;br /&gt;
PRESS:  enter for the default number 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Setup a user? (enter a lower-case loginname, or &#039;no&#039;) [no], prompt.&lt;br /&gt;
PRESS: enter for the default no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, which ssh server? (&#039;openssh&#039;, &#039;dropbear&#039; or &#039;none&#039;), prompt.&lt;br /&gt;
TYPE: none and PRESS:  enter to continue.&lt;br /&gt;
&lt;br /&gt;
At, Available disks are:&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
        &lt;br /&gt;
At Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) [none], prompt.&lt;br /&gt;
TYPE: sda sdb and PRESS:  enter to continue.&lt;br /&gt;
&lt;br /&gt;
The following disks are selected:&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, &#039;crypt&#039;, &#039;lvm&#039; or &#039;?&#039; for help) [?], prompt.&lt;br /&gt;
TYPE:  lvm and PRESS: enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following disks are selected (with LVM):&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, or &#039;?&#039; for help) [?], prompt.&lt;br /&gt;
TYPE:  sys for system disk and PRESS: enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, WARNING: Erase the above disk(s) and continue? (y/n) [n], prompt.&lt;br /&gt;
        sda (15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb (15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
TYPE: y, for yes and PRESS: enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Partition #1 contains a vfat signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Partition #2 contains a ext4 signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Partition #1 contains a vfat signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Partition #2 contains a ext4 signature.&amp;lt;br&amp;gt;&lt;br /&gt;
Creating file systems&amp;lt;br&amp;gt;&lt;br /&gt;
mkfs.fat 4.2 ((2021-01-31)&amp;lt;br&amp;gt;&lt;br /&gt;
        Physical volume &amp;quot;/dev/md1&amp;quot; successfully created.&lt;br /&gt;
        Logical volume &amp;quot;lv_root&amp;quot; created.&lt;br /&gt;
* service lvm added to runlevel boot&lt;br /&gt;
Installing system on /dev/vg0/lv_root&amp;quot;&lt;br /&gt;
100% ######################################&lt;br /&gt;
=&amp;gt; initframfs: creating /boot/initramfs-rpi4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Installation is complete.  Please reboot.  DO NOT REBOOT!!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alpine installed the boot drive as a FD linux raid autodetect, IT WILL NOT BOOT on a Raspberry Pi. &lt;br /&gt;
The Raspberry Pi can only boot from fat16 or fat32 partition with boot and lba flags enabled. &lt;br /&gt;
&lt;br /&gt;
TYPE:  watch  cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
Personalities : [raid1]&lt;br /&gt;
md1 : active raid1 sdb2[1] sda2[0]&lt;br /&gt;
          14723072 blocks super 1.2 [2/2] [UU]&lt;br /&gt;
          {&amp;gt;....................] resyc - 2.7% (397521/14723072) finish=22.1min speed=8768K/sec&lt;br /&gt;
md0 : active raid1 sdb1[1] sda1[0]&lt;br /&gt;
          307136 blocks [2/2] [UU] &lt;br /&gt;
&lt;br /&gt;
The Raid MD1 is still resycing. Take a break, the drives should be finished in 20 to 30 minutes.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PRESS: ctrl + c to exit watch cat /proc/mdtstat&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Backup the boot raid partition first&amp;lt;br&amp;gt;&lt;br /&gt;
Insert mmcblk0&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  dd if=/dev/sda1 of=/dev/mmcblk0p1 bs=512&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unmount the RAID 1 filesystem&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  umount /dev/md0&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Stop the madam raid device&lt;br /&gt;
TYPE:  mdadm --stop /dev/md0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remove the Superblocks&lt;br /&gt;
TYPE:  mdadm --zero-superblock /dev/sda1 /dev/sdb1 /dev/mmcblk0p1 (due to dd backup copying)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
verify md0 has been removed&lt;br /&gt;
TYPE:  lsblk and or cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TYPE:  apk add nano or use vi to remove RAID /dev/md0 entries by editing /etc/fstab and /etc/mdadm.conf &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
reboot&lt;br /&gt;
&lt;br /&gt;
apk add sfdisk&lt;br /&gt;
&lt;br /&gt;
*** Warning*** &amp;lt;br&amp;gt;&lt;br /&gt;
Before executing the following commands mmcblk0, sda, and sdb must be the exact same size partitons. &amp;lt;br&amp;gt;&lt;br /&gt;
**************&amp;lt;br&amp;gt;&lt;br /&gt;
Copy mmcblk0 disk partition table to sda and sdb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sfdisk -d /dev/mmcblk0 |  sfdisk –force /dev/sda&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sfdisk -d /dev/mmcblk0 |  sfdisk –force /dev/sdb&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Copy mmcblk0p1 boot partition to sda1 and sdb1&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sda1 bs=512&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sdb1 bs=512&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Add mmcblk0 as a spare drive to RAID /dev/md1&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE:  madam --add /dev/md1 /dev/mmcblk0p2&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
View Raid One information&amp;lt;br&amp;gt;&lt;br /&gt;
TYPE: mdadm --detail /dev/md1&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/dev/md1&lt;br /&gt;
                        version : 1.2&lt;br /&gt;
          Creation Time        : Sat Jun 24 12:50:56 2023&lt;br /&gt;
             Raid Level : raid 1&lt;br /&gt;
             Array Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
          Used Dev Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
           Raid Devices : 2&lt;br /&gt;
          Total Devices : 3&lt;br /&gt;
            Persistence : Superblock is persistence&lt;br /&gt;
            &lt;br /&gt;
            Update Time : Sat Jun 24 14:30:11 2023&lt;br /&gt;
                      State : clean&lt;br /&gt;
         Active Devices : 2&lt;br /&gt;
        Working Devices : 3&lt;br /&gt;
         Failed Devices : 0&lt;br /&gt;
          Spare Devices : 1&lt;br /&gt;
txnintn&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23704</id>
		<title>User:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23704"/>
		<updated>2023-07-02T15:20:12Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title:  Alpine Linux install: LVM over Raid1 with a Micro SD spare.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Discussion:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Alpine Linux setup-alpine scripts when executed with two disks and the install medium, if both disks are selected, i.e., sda and sdb, the script will automatically configure a RAID1 installation.&amp;lt;br&amp;gt;&lt;br /&gt;
https://wiki.alpinelinux.org/wiki/Setting_up_the_build_environment_on_HDD#Basic_setup&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Additionally, LVM with a &#039;sys&#039; install can be selected during the setup-alpine script.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from the USB or the Micro SD port. By having a Micro SD RAID1 spare, if the primary USB drive fails, the Micro SD should be able to boot the system.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
NOTE:  A mirrored RAID array (level 1 or 5) protects you against hardware failure. It doesn&#039;t protect against rm -rf /, software errors, exploits, earthquakes, fire. Don&#039;t rely on RAID as a backup strategy.&amp;lt;br&amp;gt;&lt;br /&gt;
https://wiki.alpinelinux.org/wiki/Setting_up_a_software_RAID_array#Advice&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
LVM requires the Micro SD spare partition to be the same size as USB RAID1 partitions.  A larger capacity Micro SD drive 2nd partition can easily resized to match the USB partition.  During the install the setup-alpine script will maximize the size of 2nd partition on RAID1 drives&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tech Tip, not all Micro SD and USB drives are the same size.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ 16GB Drives&lt;br /&gt;
|-&lt;br /&gt;
! MFG / Model !! Size&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Industrial Micro SD || 14.84GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra Ultra Fit USB 3.1 || 14.34GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra USB 3.0 || 14.91GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Cruzer Glide USB 2.0 || 14.91GB&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+32GB Drives&lt;br /&gt;
! MFG / Model !! Size&lt;br /&gt;
|-&lt;br /&gt;
| Samsung SD Pro Endurance Micro SD || 29.81GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra SD || 29.72GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra Fit USB 3.1 Gen1 || 28.67GB&lt;br /&gt;
|-&lt;br /&gt;
| Silicon Power 5 USB 3.2 || 28.85GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra 3.0 OTG || 28.85GB&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ 64GB Drive&lt;br /&gt;
|-&lt;br /&gt;
! MFG / Model !! Size&lt;br /&gt;
|-&lt;br /&gt;
| Samsung EVO Select Micro SD || 59.69GB&lt;br /&gt;
|-&lt;br /&gt;
| Samsung Fit USB 3.1 || 59.75GB&lt;br /&gt;
|} &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Requirements:&lt;br /&gt;
&lt;br /&gt;
Raspberry PI 4&lt;br /&gt;
&lt;br /&gt;
Two Identical USB Drives - fit style drives recommended based on physical clearance issues.&lt;br /&gt;
&lt;br /&gt;
One Micro SD Drive with the same or larger capacity then the USB drives&lt;br /&gt;
 &lt;br /&gt;
One USB drive for the installation files.&lt;br /&gt;
&lt;br /&gt;
Preparation:&lt;br /&gt;
&lt;br /&gt;
Created the following on the USB RAID disks:&lt;br /&gt;
sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 using the rest of the disk with a fd linux raid partition, formatted ext4&lt;br /&gt;
&lt;br /&gt;
mmcblkx, sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 sized to match USB RAID partition, Linux 83 and formatted Ext4.  Do not use Linux Raid.&lt;br /&gt;
&lt;br /&gt;
The USB installation drive single partition fat 32 0c with boot and LBA flags.&lt;br /&gt;
Extract the contents of alpine-rpi-3.x.x-aarch.tar.gz to sdc1 (spare USB) partition.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi eprom must be set to boot USB port first and SD port second.&lt;br /&gt;
&lt;br /&gt;
Installation:&lt;br /&gt;
&lt;br /&gt;
Insert the &amp;quot;sda&amp;quot; USB disk into the bottom USB 3.0 port and the &amp;quot;sdb&amp;quot; USB drive into the upper USB 3.0 port.  Power up the system, after the system has failed to boot to the installed USB drives, the screen will change from white and red to black and white text, insert the installation USB (sdc) to start the install process. This will set the drive assignments properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After logging in as root.&lt;br /&gt;
To start the install, &lt;br /&gt;
TYPE:  setup-alpine and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Select keyboard layout: [none], prompt.&lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
At, Select variant (or &#039;abort&#039;):, prompt. &lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter system hostname (fully qualified form, e.g. &#039;foo.example.org&#039;) [localhost] prompt.&lt;br /&gt;
TYPE:  the localhost name, for example, rpi44gb and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [eth0], prompt. &lt;br /&gt;
PRESS: enter, to use the default, ethernet0 connection.&lt;br /&gt;
&lt;br /&gt;
Ip address for eth0? (or &#039;dhcp&#039;, &#039;none&#039;, &#039;?&#039;) [dhcp], prompt. &lt;br /&gt;
PRESS:  enter to use the default, dhcp.&lt;br /&gt;
&lt;br /&gt;
At the second,  Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [wlan0], prompt.&lt;br /&gt;
TYPE: done and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
Then at, Do you want to do and manual network configuration? (y/n) [n], prompt.&lt;br /&gt;
PRESS enter for the default, [n], for no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Change password for root, prompt.&lt;br /&gt;
TYPE: the root password, and PRESS:  enter.&lt;br /&gt;
At, Retype password, prompt.&lt;br /&gt;
TYPE: the root password and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which timezone are you in? (&#039;?&#039; for a list) [UTC]. prompt.&lt;br /&gt;
TYPE:  America, with a capital A, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, What sub-timezone of &#039;America&#039; are you in? (&#039;?&#039; for list), prompt.&lt;br /&gt;
TYPE:  Chicago, with a capital C, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, HTTP/FTP proxy URL? (e.g. /http://proxy:8000&#039;, or &#039;none&#039;) [none], prompt.&lt;br /&gt;
PRESS:  enter for the default, none.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which NTP Client to run? (&#039;busybox&#039;, &#039;openntpd&#039;, &#039;chrony&#039; or &#039;none&#039;) [chrony], prompt.&lt;br /&gt;
PRESS:  enter for the default, chrony.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the list of mirrors stop and at --More--, prompt&lt;br /&gt;
PRESS: the letter &amp;quot;r&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
r) Add random from the above list&lt;br /&gt;
f) Detect and add the fastest mirror from above list&lt;br /&gt;
e) Edit /etc/apk/repositories with text editor&lt;br /&gt;
&lt;br /&gt;
At, Enter mirror number (1-72) or URL to add (or r/f/e/done) [1], prompt.&lt;br /&gt;
PRESS:  enter for the default number 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Setup a user? (enter a lower-case loginname, or &#039;no&#039;) [no], prompt.&lt;br /&gt;
PRESS: enter for the default no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, which ssh server? (&#039;openssh&#039;, &#039;dropbear&#039; or &#039;none&#039;), prompt.&lt;br /&gt;
TYPE: none and PRESS:  enter to continue.&lt;br /&gt;
&lt;br /&gt;
At, Available disks are:&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
        &lt;br /&gt;
At Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) [none], prompt.&lt;br /&gt;
TYPE: sda sdb and PRESS:  enter to continue.&lt;br /&gt;
&lt;br /&gt;
The following disks are selected:&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, &#039;crypt&#039;, &#039;lvm&#039; or &#039;?&#039; for help) [?], prompt.&lt;br /&gt;
TYPE:  lvm and PRESS: enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following disks are selected (with LVM):&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, or &#039;?&#039; for help) [?], prompt.&lt;br /&gt;
TYPE:  sys for system disk and PRESS enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, WARNING: Erase the above disk(s) and continue? (y/n) [n], prompt.&lt;br /&gt;
        sda (15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb (15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
TYPE: y, for yes AMD PRESS: enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Partition #1 contains a vfat signature.&lt;br /&gt;
Partition #2 contains a ext4 signature.&lt;br /&gt;
Partition #1 contains a vfat signature.&lt;br /&gt;
Partition #2 contains a ext4 signature.&lt;br /&gt;
Creating file systems&lt;br /&gt;
mkfs.fat 4.2 ((2021-01-31)&lt;br /&gt;
        Physical volume &amp;quot;/dev/md1&amp;quot; successfully created.&lt;br /&gt;
        Logical volume &amp;quot;lv_root&amp;quot; created.&lt;br /&gt;
* service lvm added to runlevel boot&lt;br /&gt;
Installing system on /dev/vg0/lv_root&amp;quot;&lt;br /&gt;
100% ######################################&lt;br /&gt;
=&amp;gt; initframfs: creating /boot/initramfs-rpi4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Installation is complete.  Please reboot.  DO NOT REBOOT!!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alpine installed the boot drive as a FD linux raid autodetect, IT WILL NOT BOOT on a Raspberry Pi. &lt;br /&gt;
The Raspberry Pi can only boot from fat16 or fat32 partition with boot and lba flags enabled. &lt;br /&gt;
&lt;br /&gt;
TYPE:  watch  cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
Personalities : [raid1]&lt;br /&gt;
md1 : active raid1 sdb2[1] sda2[0]&lt;br /&gt;
          14723072 blocks super 1.2 [2/2] [UU]&lt;br /&gt;
          {&amp;gt;....................] resyc - 2.7% (397521/14723072) finish=22.1min speed=8768K/sec&lt;br /&gt;
md0 : active raid1 sdb1[1] sda1[0]&lt;br /&gt;
          307136 blocks [2/2] [UU] &lt;br /&gt;
&lt;br /&gt;
The Raid MD1 is still resycing. Take a break, the drives should be finished in 20 to 30 minutes.&lt;br /&gt;
&lt;br /&gt;
PRESS: ctrl + c to exit watch cat /proc/mdtstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Backup the boot raid partition first&lt;br /&gt;
Insert mmcblk0&lt;br /&gt;
TYPE:  dd if=/dev/sda1 of=/dev/mmcblk0p1 bs=512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unmount the RAID 1 filesystem&lt;br /&gt;
TYPE:  umount /dev/md0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Stop the madam raid device&lt;br /&gt;
TYPE:  mdadm --stop /dev/md0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remove the Superblocks&lt;br /&gt;
TYPE:  mdadm --zero-superblock /dev/sda1 /dev/sdb1 /dev/mmcblk0p1 (due to dd backup copying)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
verify md0 has been removed&lt;br /&gt;
TYPE:  lsblk and or cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TYPE:  apk add nano or use vi to remove RAID /dev/md0 entries by editing /etc/fstab and /etc/mdadm.conf &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
reboot&lt;br /&gt;
&lt;br /&gt;
apk add sfdisk&lt;br /&gt;
&lt;br /&gt;
*** Warning*** &lt;br /&gt;
Before executing the following commands mmcblk0, sda, and sdb must be the exact same size partitons. &lt;br /&gt;
**************&lt;br /&gt;
Copy mmcblk0 disk partition table to sda and sdb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sfdisk -d /dev/mmcblk0 |  sfdisk –force /dev/sda&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sfdisk -d /dev/mmcblk0 |  sfdisk –force /dev/sdb&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Copy mmcblk0p1 boot partition to sda1 and sdb1&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sda1 bs=512&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sdb1 bs=512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add mmcblk0 as a spare drive to RAID /dev/md1 &lt;br /&gt;
TYPE:  madam --add /dev/md1 /dev/mmcblk0p2&lt;br /&gt;
&lt;br /&gt;
View Raid One information&lt;br /&gt;
TYPE: mdadm --detail /dev/md1&lt;br /&gt;
&lt;br /&gt;
/dev/md1&lt;br /&gt;
                        version : 1.2&lt;br /&gt;
          Creation Time        : Sat Jun 24 12:50:56 2023&lt;br /&gt;
             Raid Level : raid 1&lt;br /&gt;
             Array Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
          Used Dev Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
           Raid Devices : 2&lt;br /&gt;
          Total Devices : 3&lt;br /&gt;
            Persistence : Superblock is persistence&lt;br /&gt;
            &lt;br /&gt;
            Update Time : Sat Jun 24 14:30:11 2023&lt;br /&gt;
                      State : clean&lt;br /&gt;
         Active Devices : 2&lt;br /&gt;
        Working Devices : 3&lt;br /&gt;
         Failed Devices : 0&lt;br /&gt;
          Spare Devices : 1&lt;br /&gt;
txnintn&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23703</id>
		<title>User:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23703"/>
		<updated>2023-07-02T14:09:54Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title:  Alpine Linux install: LVM over Raid1 with a Micro SD spare.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Discussion:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Alpine Linux setup-alpine scripts when executed with two disks and the install medium, if both disks are selected, i.e., sda and sdb, the script will automatically configure a RAID1 installation.&amp;lt;br&amp;gt;&lt;br /&gt;
https://wiki.alpinelinux.org/wiki/Setting_up_the_build_environment_on_HDD#Basic_setup&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Additionally, LVM with a &#039;sys&#039; install can be selected during the setup-alpine script.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from either a USB or a Micro SD port. By having a Micro SD RAID1 spare, if the primary USB drive fails the Micro SD should be able to boot the system.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
LVM requires the Micro SD spare partition to be the same size as USB RAID1 partitions.  A larger capacity Micro SD drive 2nd partition can easily resized to match the USB partition.  During the install the setup-alpine script will maximize the size of 2nd partition on RAID1 drives&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tech Tip, not all Micro SD and USB drives are the same size.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ 16GB Drives&lt;br /&gt;
|-&lt;br /&gt;
! MFG / Model !! Size&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Industrial Micro SD || 14.84GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra Ultra Fit USB 3.1 || 14.34GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Ultra USB 3.0 || 14.91GB&lt;br /&gt;
|-&lt;br /&gt;
| SanDisk Cruzer Glide USB 2.0 || 14.91GB&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
32GB&lt;br /&gt;
&lt;br /&gt;
Samsung SD Pro Endurance Micro SD	29.81GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra SD					29.72GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra Fit USB 3.1 Gen1		28.67GB&lt;br /&gt;
&lt;br /&gt;
Silicon Power 5 USB 3.2				28.85GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra 3.0 OTG				28.85GB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
64GB&lt;br /&gt;
&lt;br /&gt;
Samsung EVO Select Micro SD			59.69GB&lt;br /&gt;
&lt;br /&gt;
Samsung Fit USB 3.1					59.75GB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Requirements:&lt;br /&gt;
&lt;br /&gt;
Raspberry PI 4&lt;br /&gt;
&lt;br /&gt;
Two Identical USB Drives - fit style drives recommended based on physical clearance issues.&lt;br /&gt;
&lt;br /&gt;
One Micro SD Drive with the same or larger capacity then the USB drives&lt;br /&gt;
 &lt;br /&gt;
One USB drive for the installation files.&lt;br /&gt;
&lt;br /&gt;
Preparation:&lt;br /&gt;
&lt;br /&gt;
Created the following on the USB RAID disks:&lt;br /&gt;
sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 using the rest of the disk with a fd linux raid partition, formatted ext4&lt;br /&gt;
&lt;br /&gt;
mmcblkx, sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 sized to match USB RAID partition, Linux 83 and formatted Ext4.  Do not use Linux Raid.&lt;br /&gt;
&lt;br /&gt;
The USB installation drive single partition fat 32 0c with boot and LBA flags.&lt;br /&gt;
Extract the contents of alpine-rpi-3.x.x-aarch.tar.gz to sdc1 (spare USB) partition.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi eprom must be set to boot USB port first and SD port second.&lt;br /&gt;
&lt;br /&gt;
Installation:&lt;br /&gt;
&lt;br /&gt;
Insert the &amp;quot;sda&amp;quot; USB disk into the bottom USB 3.0 port and the &amp;quot;sdb&amp;quot; USB drive into the upper USB 3.0 port.  Power up the system, after the system has failed to boot to the installed USB drives, the screen will change from white and red to black and white text, insert the installation USB (sdc) to start the install process. This will set the drive assignments properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After logging in as root.&lt;br /&gt;
To start the install, &lt;br /&gt;
TYPE:  setup-alpine and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Select keyboard layout: [none], prompt.&lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
At, Select variant (or &#039;abort&#039;):, prompt. &lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter system hostname (fully qualified form, e.g. &#039;foo.example.org&#039;) [localhost] prompt.&lt;br /&gt;
TYPE:  the localhost name, for example, rpi44gb and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [eth0], prompt. &lt;br /&gt;
PRESS: enter, to use the default, ethernet0 connection.&lt;br /&gt;
&lt;br /&gt;
Ip address for eth0? (or &#039;dhcp&#039;, &#039;none&#039;, &#039;?&#039;) [dhcp], prompt. &lt;br /&gt;
PRESS:  enter to use the default, dhcp.&lt;br /&gt;
&lt;br /&gt;
At the second,  Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [wlan0], prompt.&lt;br /&gt;
TYPE: done and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
Then at, Do you want to do and manual network configuration? (y/n) [n], prompt.&lt;br /&gt;
PRESS enter for the default, [n], for no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Change password for root, prompt.&lt;br /&gt;
TYPE: the root password, and PRESS:  enter.&lt;br /&gt;
At, Retype password, prompt.&lt;br /&gt;
TYPE: the root password and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which timezone are you in? (&#039;?&#039; for a list) [UTC]. prompt.&lt;br /&gt;
TYPE:  America, with a capital A, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, What sub-timezone of &#039;America&#039; are you in? (&#039;?&#039; for list), prompt.&lt;br /&gt;
TYPE:  Chicago, with a capital C, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, HTTP/FTP proxy URL? (e.g. /http://proxy:8000&#039;, or &#039;none&#039;) [none], prompt.&lt;br /&gt;
PRESS:  enter for the default, none.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which NTP Client to run? (&#039;busybox&#039;, &#039;openntpd&#039;, &#039;chrony&#039; or &#039;none&#039;) [chrony], prompt.&lt;br /&gt;
PRESS:  enter for the default, chrony.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the list of mirrors stop and at --More--, prompt&lt;br /&gt;
PRESS: the letter &amp;quot;r&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
r) Add random from the above list&lt;br /&gt;
f) Detect and add the fastest mirror from above list&lt;br /&gt;
e) Edit /etc/apk/repositories with text editor&lt;br /&gt;
&lt;br /&gt;
At, Enter mirror number (1-72) or URL to add (or r/f/e/done) [1], prompt.&lt;br /&gt;
PRESS:  enter for the default number 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Setup a user? (enter a lower-case loginname, or &#039;no&#039;) [no], prompt.&lt;br /&gt;
PRESS: enter for the default no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, which ssh server? (&#039;openssh&#039;, &#039;dropbear&#039; or &#039;none&#039;), prompt.&lt;br /&gt;
TYPE: none and PRESS:  enter to continue.&lt;br /&gt;
&lt;br /&gt;
At, Available disks are:&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
        &lt;br /&gt;
At Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) [none], prompt.&lt;br /&gt;
TYPE: sda sdb and PRESS:  enter to continue.&lt;br /&gt;
&lt;br /&gt;
The following disks are selected:&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, &#039;crypt&#039;, &#039;lvm&#039; or &#039;?&#039; for help) [?], prompt.&lt;br /&gt;
TYPE:  lvm and PRESS: enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following disks are selected (with LVM):&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, or &#039;?&#039; for help) [?], prompt.&lt;br /&gt;
TYPE:  sys for system disk and PRESS enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, WARNING: Erase the above disk(s) and continue? (y/n) [n], prompt.&lt;br /&gt;
        sda (15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb (15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
TYPE: y, for yes AMD PRESS: enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Partition #1 contains a vfat signature.&lt;br /&gt;
Partition #2 contains a ext4 signature.&lt;br /&gt;
Partition #1 contains a vfat signature.&lt;br /&gt;
Partition #2 contains a ext4 signature.&lt;br /&gt;
Creating file systems&lt;br /&gt;
mkfs.fat 4.2 ((2021-01-31)&lt;br /&gt;
        Physical volume &amp;quot;/dev/md1&amp;quot; successfully created.&lt;br /&gt;
        Logical volume &amp;quot;lv_root&amp;quot; created.&lt;br /&gt;
* service lvm added to runlevel boot&lt;br /&gt;
Installing system on /dev/vg0/lv_root&amp;quot;&lt;br /&gt;
100% ######################################&lt;br /&gt;
=&amp;gt; initframfs: creating /boot/initramfs-rpi4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Installation is complete.  Please reboot.  DO NOT REBOOT!!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alpine installed the boot drive as a FD linux raid autodetect, IT WILL NOT BOOT on a Raspberry Pi. &lt;br /&gt;
The Raspberry Pi can only boot from fat16 or fat32 partition with boot and lba flags enabled. &lt;br /&gt;
&lt;br /&gt;
TYPE:  watch  cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
Personalities : [raid1]&lt;br /&gt;
md1 : active raid1 sdb2[1] sda2[0]&lt;br /&gt;
          14723072 blocks super 1.2 [2/2] [UU]&lt;br /&gt;
          {&amp;gt;....................] resyc - 2.7% (397521/14723072) finish=22.1min speed=8768K/sec&lt;br /&gt;
md0 : active raid1 sdb1[1] sda1[0]&lt;br /&gt;
          307136 blocks [2/2] [UU] &lt;br /&gt;
&lt;br /&gt;
The Raid MD1 is still resycing. Take a break, the drives should be finished in 20 to 30 minutes.&lt;br /&gt;
&lt;br /&gt;
PRESS: ctrl + c to exit watch cat /proc/mdtstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Backup the boot raid partition first&lt;br /&gt;
Insert mmcblk0&lt;br /&gt;
TYPE:  dd if=/dev/sda1 of=/dev/mmcblk0p1 bs=512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unmount the RAID 1 filesystem&lt;br /&gt;
TYPE:  umount /dev/md0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Stop the madam raid device&lt;br /&gt;
TYPE:  mdadm --stop /dev/md0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remove the Superblocks&lt;br /&gt;
TYPE:  mdadm --zero-superblock /dev/sda1 /dev/sdb1 /dev/mmcblk0p1 (due to dd backup copying)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
verify md0 has been removed&lt;br /&gt;
TYPE:  lsblk and or cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TYPE:  apk add nano or use vi to remove RAID /dev/md0 entries by editing /etc/fstab and /etc/mdadm.conf &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
reboot&lt;br /&gt;
&lt;br /&gt;
apk add sfdisk&lt;br /&gt;
&lt;br /&gt;
*** Warning*** &lt;br /&gt;
Before executing the following commands mmcblk0, sda, and sdb must be the exact same size partitons. &lt;br /&gt;
**************&lt;br /&gt;
Copy mmcblk0 disk partition table to sda and sdb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sfdisk -d /dev/mmcblk0 |  sfdisk –force /dev/sda&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sfdisk -d /dev/mmcblk0 |  sfdisk –force /dev/sdb&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Copy mmcblk0p1 boot partition to sda1 and sdb1&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sda1 bs=512&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sdb1 bs=512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add mmcblk0 as a spare drive to RAID /dev/md1 &lt;br /&gt;
TYPE:  madam --add /dev/md1 /dev/mmcblk0p2&lt;br /&gt;
&lt;br /&gt;
View Raid One information&lt;br /&gt;
TYPE: mdadm --detail /dev/md1&lt;br /&gt;
&lt;br /&gt;
/dev/md1&lt;br /&gt;
                        version : 1.2&lt;br /&gt;
          Creation Time        : Sat Jun 24 12:50:56 2023&lt;br /&gt;
             Raid Level : raid 1&lt;br /&gt;
             Array Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
          Used Dev Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
           Raid Devices : 2&lt;br /&gt;
          Total Devices : 3&lt;br /&gt;
            Persistence : Superblock is persistence&lt;br /&gt;
            &lt;br /&gt;
            Update Time : Sat Jun 24 14:30:11 2023&lt;br /&gt;
                      State : clean&lt;br /&gt;
         Active Devices : 2&lt;br /&gt;
        Working Devices : 3&lt;br /&gt;
         Failed Devices : 0&lt;br /&gt;
          Spare Devices : 1&lt;br /&gt;
txnintn&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23702</id>
		<title>User:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23702"/>
		<updated>2023-07-01T20:28:36Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title:  Alpine Linux install: LVM over Raid1 with a Micro SD spare.&lt;br /&gt;
&lt;br /&gt;
Discussion:&lt;br /&gt;
&lt;br /&gt;
Alpine Linux setup-alpine scripts when executed with two disks and the install medium, if both disks are selected, i.e., sda and sdb, the script will automatically configure a RAID1 installation. /https://wiki.alpinelinux.org/wiki/Setting_up_the_build_environment_on_HDD#Basic_setup&lt;br /&gt;
&lt;br /&gt;
Additionally, LVM with a &#039;sys&#039; install can be selected during the setup-alpine script.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from either a USB or a Micro SD port. By having a Micro SD RAID1 spare, if the primary USB drive fails the Micro SD should be able to boot the system.  LVM requires the Micro SD spare partition to be the same size as USB RAID1 partitions.  A larger capacity Micro SD drive 2nd partition can easily resized to match the USB partition.  During the install the setup-alpine script will maximize the size of 2nd partition on RAID1 drives.&lt;br /&gt;
&lt;br /&gt;
Tech Tip, not all Micro SD and USB drives are the same size.&lt;br /&gt;
&lt;br /&gt;
16GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Industrial Micro SD			14.84GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra Ultra Fit USB 3.1		14.34GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra USB 3.0			    14.91GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Cruzer Glide USB 2.0	 	14.91GB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
32GB&lt;br /&gt;
&lt;br /&gt;
Samsung SD Pro Endurance Micro SD	29.81GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra SD					29.72GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra Fit USB 3.1 Gen1		28.67GB&lt;br /&gt;
&lt;br /&gt;
Silicon Power 5 USB 3.2				28.85GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra 3.0 OTG				28.85GB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
64GB&lt;br /&gt;
&lt;br /&gt;
Samsung EVO Select Micro SD			59.69GB&lt;br /&gt;
&lt;br /&gt;
Samsung Fit USB 3.1					59.75GB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Requirements:&lt;br /&gt;
&lt;br /&gt;
Raspberry PI 4&lt;br /&gt;
&lt;br /&gt;
Two Identical USB Drives - fit style drives recommended based on physical clearance issues.&lt;br /&gt;
&lt;br /&gt;
One Micro SD Drive with the same or larger capacity then the USB drives&lt;br /&gt;
 &lt;br /&gt;
One USB drive for the installation files.&lt;br /&gt;
&lt;br /&gt;
Preparation:&lt;br /&gt;
&lt;br /&gt;
Created the following on the USB RAID disks:&lt;br /&gt;
sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 using the rest of the disk with a fd linux raid partition, formatted ext4&lt;br /&gt;
&lt;br /&gt;
mmcblkx, sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 sized to match USB RAID partition, Linux 83 and formatted Ext4.  Do not use Linux Raid.&lt;br /&gt;
&lt;br /&gt;
The USB installation drive single partition fat 32 0c with boot and LBA flags.&lt;br /&gt;
Extract the contents of alpine-rpi-3.x.x-aarch.tar.gz to sdc1 (spare USB) partition.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi eprom must be set to boot USB port first and SD port second.&lt;br /&gt;
&lt;br /&gt;
Installation:&lt;br /&gt;
&lt;br /&gt;
Insert the &amp;quot;sda&amp;quot; USB disk into the bottom USB 3.0 port and the &amp;quot;sdb&amp;quot; USB drive into the upper USB 3.0 port.  Power up the system, after the system has failed to boot to the installed USB drives, the screen will change from white and red to black and white text, insert the installation USB (sdc) to start the install process. This will set the drive assignments properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After logging in as root.&lt;br /&gt;
To start the install, &lt;br /&gt;
TYPE:  setup-alpine and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Select keyboard layout: [none], prompt.&lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
At, Select variant (or &#039;abort&#039;):, prompt. &lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter system hostname (fully qualified form, e.g. &#039;foo.example.org&#039;) [localhost] prompt.&lt;br /&gt;
TYPE:  the localhost name, for example, rpi44gb and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [eth0], prompt. &lt;br /&gt;
PRESS: enter, to use the default, ethernet0 connection.&lt;br /&gt;
&lt;br /&gt;
Ip address for eth0? (or &#039;dhcp&#039;, &#039;none&#039;, &#039;?&#039;) [dhcp], prompt. &lt;br /&gt;
PRESS:  enter to use the default, dhcp.&lt;br /&gt;
&lt;br /&gt;
At the second,  Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [wlan0], prompt.&lt;br /&gt;
TYPE: done and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
Then at, Do you want to do and manual network configuration? (y/n) [n], prompt.&lt;br /&gt;
PRESS enter for the default, [n], for no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Change password for root, prompt.&lt;br /&gt;
TYPE: the root password, and PRESS:  enter.&lt;br /&gt;
At, Retype password, prompt.&lt;br /&gt;
TYPE: the root password and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which timezone are you in? (&#039;?&#039; for a list) [UTC]. prompt.&lt;br /&gt;
TYPE:  America, with a capital A, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, What sub-timezone of &#039;America&#039; are you in? (&#039;?&#039; for list), prompt.&lt;br /&gt;
TYPE:  Chicago, with a capital C, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, HTTP/FTP proxy URL? (e.g. /http://proxy:8000&#039;, or &#039;none&#039;) [none], prompt.&lt;br /&gt;
PRESS:  enter for the default, none.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which NTP Client to run? (&#039;busybox&#039;, &#039;openntpd&#039;, &#039;chrony&#039; or &#039;none&#039;) [chrony], prompt.&lt;br /&gt;
PRESS:  enter for the default, chrony.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the list of mirrors stop and at --More--, prompt&lt;br /&gt;
PRESS: the letter &amp;quot;r&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
r) Add random from the above list&lt;br /&gt;
f) Detect and add the fastest mirror from above list&lt;br /&gt;
e) Edit /etc/apk/repositories with text editor&lt;br /&gt;
&lt;br /&gt;
At, Enter mirror number (1-72) or URL to add (or r/f/e/done) [1], prompt.&lt;br /&gt;
PRESS:  enter for the default number 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Setup a user? (enter a lower-case loginname, or &#039;no&#039;) [no], prompt.&lt;br /&gt;
PRESS: enter for the default no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, which ssh server? (&#039;openssh&#039;, &#039;dropbear&#039; or &#039;none&#039;), prompt.&lt;br /&gt;
TYPE: none and PRESS:  enter to continue.&lt;br /&gt;
&lt;br /&gt;
At, Available disks are:&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
        &lt;br /&gt;
At Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) [none], prompt.&lt;br /&gt;
TYPE: sda sdb and PRESS:  enter to continue.&lt;br /&gt;
&lt;br /&gt;
The following disks are selected:&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, &#039;crypt&#039;, &#039;lvm&#039; or &#039;?&#039; for help) [?], prompt.&lt;br /&gt;
TYPE:  lvm and PRESS: enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following disks are selected (with LVM):&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, or &#039;?&#039; for help) [?], prompt.&lt;br /&gt;
TYPE:  sys for system disk and PRESS enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, WARNING: Erase the above disk(s) and continue? (y/n) [n], prompt.&lt;br /&gt;
        sda (15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb (15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
TYPE: y, for yes AMD PRESS: enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Partition #1 contains a vfat signature.&lt;br /&gt;
Partition #2 contains a ext4 signature.&lt;br /&gt;
Partition #1 contains a vfat signature.&lt;br /&gt;
Partition #2 contains a ext4 signature.&lt;br /&gt;
Creating file systems&lt;br /&gt;
mkfs.fat 4.2 ((2021-01-31)&lt;br /&gt;
        Physical volume &amp;quot;/dev/md1&amp;quot; successfully created.&lt;br /&gt;
        Logical volume &amp;quot;lv_root&amp;quot; created.&lt;br /&gt;
* service lvm added to runlevel boot&lt;br /&gt;
Installing system on /dev/vg0/lv_root&amp;quot;&lt;br /&gt;
100% ######################################&lt;br /&gt;
=&amp;gt; initframfs: creating /boot/initramfs-rpi4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Installation is complete.  Please reboot.  DO NOT REBOOT!!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alpine installed the boot drive as a FD linux raid autodetect, IT WILL NOT BOOT on a Raspberry Pi. &lt;br /&gt;
The Raspberry Pi can only boot from fat16 or fat32 partition with boot and lba flags enabled. &lt;br /&gt;
&lt;br /&gt;
TYPE:  watch  cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
Personalities : [raid1]&lt;br /&gt;
md1 : active raid1 sdb2[1] sda2[0]&lt;br /&gt;
          14723072 blocks super 1.2 [2/2] [UU]&lt;br /&gt;
          {&amp;gt;....................] resyc - 2.7% (397521/14723072) finish=22.1min speed=8768K/sec&lt;br /&gt;
md0 : active raid1 sdb1[1] sda1[0]&lt;br /&gt;
          307136 blocks [2/2] [UU] &lt;br /&gt;
&lt;br /&gt;
The Raid MD1 is still resycing. Take a break, the drives should be finished in 20 to 30 minutes.&lt;br /&gt;
&lt;br /&gt;
PRESS: ctrl + c to exit watch cat /proc/mdtstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Backup the boot raid partition first&lt;br /&gt;
Insert mmcblk0&lt;br /&gt;
TYPE:  dd if=/dev/sda1 of=/dev/mmcblk0p1 bs=512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unmount the RAID 1 filesystem&lt;br /&gt;
TYPE:  umount /dev/md0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Stop the madam raid device&lt;br /&gt;
TYPE:  mdadm --stop /dev/md0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remove the Superblocks&lt;br /&gt;
TYPE:  mdadm --zero-superblock /dev/sda1 /dev/sdb1 /dev/mmcblk0p1 (due to dd backup copying)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
verify md0 has been removed&lt;br /&gt;
TYPE:  lsblk and or cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TYPE:  apk add nano or use vi to remove RAID /dev/md0 entries by editing /etc/fstab and /etc/mdadm.conf &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
reboot&lt;br /&gt;
&lt;br /&gt;
apk add sfdisk&lt;br /&gt;
&lt;br /&gt;
*** Warning*** &lt;br /&gt;
Before executing the following commands mmcblk0, sda, and sdb must be the exact same size partitons. &lt;br /&gt;
**************&lt;br /&gt;
Copy mmcblk0 disk partition table to sda and sdb&lt;br /&gt;
sfdisk -d /dev/mmcblk0 |  sfdisk –force /dev/sda&lt;br /&gt;
sfdisk -d /dev/mmcblk0 |  sfdisk –force /dev/sdb &lt;br /&gt;
&lt;br /&gt;
Copy mmcblk0p1 boot partition to sda1 and sdb1&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sda1 bs=512&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sdb1 bs=512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add mmcblk0 as a spare drive to RAID /dev/md1 &lt;br /&gt;
TYPE:  madam --add /dev/md1 /dev/mmcblk0p2&lt;br /&gt;
&lt;br /&gt;
View Raid One information&lt;br /&gt;
TYPE: mdadm --detail /dev/md1&lt;br /&gt;
&lt;br /&gt;
/dev/md1&lt;br /&gt;
                        version : 1.2&lt;br /&gt;
          Creation Time        : Sat Jun 24 12:50:56 2023&lt;br /&gt;
             Raid Level : raid 1&lt;br /&gt;
             Array Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
          Used Dev Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
           Raid Devices : 2&lt;br /&gt;
          Total Devices : 3&lt;br /&gt;
            Persistence : Superblock is persistence&lt;br /&gt;
            &lt;br /&gt;
            Update Time : Sat Jun 24 14:30:11 2023&lt;br /&gt;
                      State : clean&lt;br /&gt;
         Active Devices : 2&lt;br /&gt;
        Working Devices : 3&lt;br /&gt;
         Failed Devices : 0&lt;br /&gt;
          Spare Devices : 1&lt;br /&gt;
txnintn&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23701</id>
		<title>User:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23701"/>
		<updated>2023-07-01T20:27:06Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title:  Alpine Linux install: LVM over Raid1 with a Micro SD spare.&lt;br /&gt;
&lt;br /&gt;
Discussion:&lt;br /&gt;
&lt;br /&gt;
Alpine Linux setup-alpine scripts when executed with two disks and the install medium, if both disks are selected, i.e., sda and sdb, the script will automatically configure a RAID1 installation. /https://wiki.alpinelinux.org/wiki/Setting_up_the_build_environment_on_HDD#Basic_setup&lt;br /&gt;
&lt;br /&gt;
Additionally, LVM with a &#039;sys&#039; install can be selected during the setup-alpine script.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from either a USB or a Micro SD port. By having a Micro SD RAID1 spare, if the primary USB drive fails the Micro SD should be able to boot the system.  LVM requires the Micro SD spare partition to be the same size as USB RAID1 partitions.  A larger capacity Micro SD drive 2nd partition can easily resized to match the USB partition.  During the install the setup-alpine script will maximize the size of 2nd partition on RAID1 drives.&lt;br /&gt;
&lt;br /&gt;
Tech Tip, not all Micro SD and USB drives are the same size.&lt;br /&gt;
&lt;br /&gt;
16GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Industrial Micro SD			14.84GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra Ultra Fit USB 3.1		14.34GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra USB 3.0			    14.91GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Cruzer Glide USB 2.0	 	14.91GB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
32GB&lt;br /&gt;
&lt;br /&gt;
Samsung SD Pro Endurance Micro SD	29.81GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra SD					29.72GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra Fit USB 3.1 Gen1		28.67GB&lt;br /&gt;
&lt;br /&gt;
Silicon Power 5 USB 3.2				28.85GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra 3.0 OTG				28.85GB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
64GB&lt;br /&gt;
&lt;br /&gt;
Samsung EVO Select Micro SD			59.69GB&lt;br /&gt;
&lt;br /&gt;
Samsung Fit USB 3.1					59.75GB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Requirements:&lt;br /&gt;
&lt;br /&gt;
Raspberry PI 4&lt;br /&gt;
Two Identical USB Drives - fit style drives recommended based on physical clearance issues.&lt;br /&gt;
One Micro SD Drive with the same or larger capacity then the USB drives &lt;br /&gt;
One USB drive for the installation files.&lt;br /&gt;
&lt;br /&gt;
Preparation:&lt;br /&gt;
&lt;br /&gt;
Created the following on the USB RAID disks:&lt;br /&gt;
sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 using the rest of the disk with a fd linux raid partition, formatted ext4&lt;br /&gt;
&lt;br /&gt;
mmcblkx, sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 sized to match USB RAID partition, Linux 83 and formatted Ext4.  Do not use Linux Raid.&lt;br /&gt;
&lt;br /&gt;
The USB installation drive single partition fat 32 0c with boot and LBA flags.&lt;br /&gt;
Extract the contents of alpine-rpi-3.x.x-aarch.tar.gz to sdc1 (spare USB) partition.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi eprom must be set to boot USB port first and SD port second.&lt;br /&gt;
&lt;br /&gt;
Installation:&lt;br /&gt;
&lt;br /&gt;
Insert the &amp;quot;sda&amp;quot; USB disk into the bottom USB 3.0 port and the &amp;quot;sdb&amp;quot; USB drive into the upper USB 3.0 port.  Power up the system, after the system has failed to boot to the installed USB drives, the screen will change from white and red to black and white text, insert the installation USB (sdc) to start the install process. This will set the drive assignments properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After logging in as root.&lt;br /&gt;
To start the install, &lt;br /&gt;
TYPE:  setup-alpine and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Select keyboard layout: [none], prompt.&lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
At, Select variant (or &#039;abort&#039;):, prompt. &lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter system hostname (fully qualified form, e.g. &#039;foo.example.org&#039;) [localhost] prompt.&lt;br /&gt;
TYPE:  the localhost name, for example, rpi44gb and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [eth0], prompt. &lt;br /&gt;
PRESS: enter, to use the default, ethernet0 connection.&lt;br /&gt;
&lt;br /&gt;
Ip address for eth0? (or &#039;dhcp&#039;, &#039;none&#039;, &#039;?&#039;) [dhcp], prompt. &lt;br /&gt;
PRESS:  enter to use the default, dhcp.&lt;br /&gt;
&lt;br /&gt;
At the second,  Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [wlan0], prompt.&lt;br /&gt;
TYPE: done and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
Then at, Do you want to do and manual network configuration? (y/n) [n], prompt.&lt;br /&gt;
PRESS enter for the default, [n], for no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Change password for root, prompt.&lt;br /&gt;
TYPE: the root password, and PRESS:  enter.&lt;br /&gt;
At, Retype password, prompt.&lt;br /&gt;
TYPE: the root password and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which timezone are you in? (&#039;?&#039; for a list) [UTC]. prompt.&lt;br /&gt;
TYPE:  America, with a capital A, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, What sub-timezone of &#039;America&#039; are you in? (&#039;?&#039; for list), prompt.&lt;br /&gt;
TYPE:  Chicago, with a capital C, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, HTTP/FTP proxy URL? (e.g. /http://proxy:8000&#039;, or &#039;none&#039;) [none], prompt.&lt;br /&gt;
PRESS:  enter for the default, none.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which NTP Client to run? (&#039;busybox&#039;, &#039;openntpd&#039;, &#039;chrony&#039; or &#039;none&#039;) [chrony], prompt.&lt;br /&gt;
PRESS:  enter for the default, chrony.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the list of mirrors stop and at --More--, prompt&lt;br /&gt;
PRESS: the letter &amp;quot;r&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
r) Add random from the above list&lt;br /&gt;
f) Detect and add the fastest mirror from above list&lt;br /&gt;
e) Edit /etc/apk/repositories with text editor&lt;br /&gt;
&lt;br /&gt;
At, Enter mirror number (1-72) or URL to add (or r/f/e/done) [1], prompt.&lt;br /&gt;
PRESS:  enter for the default number 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Setup a user? (enter a lower-case loginname, or &#039;no&#039;) [no], prompt.&lt;br /&gt;
PRESS: enter for the default no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, which ssh server? (&#039;openssh&#039;, &#039;dropbear&#039; or &#039;none&#039;), prompt.&lt;br /&gt;
TYPE: none and PRESS:  enter to continue.&lt;br /&gt;
&lt;br /&gt;
At, Available disks are:&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
        &lt;br /&gt;
At Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) [none], prompt.&lt;br /&gt;
TYPE: sda sdb and PRESS:  enter to continue.&lt;br /&gt;
&lt;br /&gt;
The following disks are selected:&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, &#039;crypt&#039;, &#039;lvm&#039; or &#039;?&#039; for help) [?], prompt.&lt;br /&gt;
TYPE:  lvm and PRESS: enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following disks are selected (with LVM):&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, or &#039;?&#039; for help) [?], prompt.&lt;br /&gt;
TYPE:  sys for system disk and PRESS enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, WARNING: Erase the above disk(s) and continue? (y/n) [n], prompt.&lt;br /&gt;
        sda (15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb (15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
TYPE: y, for yes AMD PRESS: enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Partition #1 contains a vfat signature.&lt;br /&gt;
Partition #2 contains a ext4 signature.&lt;br /&gt;
Partition #1 contains a vfat signature.&lt;br /&gt;
Partition #2 contains a ext4 signature.&lt;br /&gt;
Creating file systems&lt;br /&gt;
mkfs.fat 4.2 ((2021-01-31)&lt;br /&gt;
        Physical volume &amp;quot;/dev/md1&amp;quot; successfully created.&lt;br /&gt;
        Logical volume &amp;quot;lv_root&amp;quot; created.&lt;br /&gt;
* service lvm added to runlevel boot&lt;br /&gt;
Installing system on /dev/vg0/lv_root&amp;quot;&lt;br /&gt;
100% ######################################&lt;br /&gt;
=&amp;gt; initframfs: creating /boot/initramfs-rpi4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Installation is complete.  Please reboot.  DO NOT REBOOT!!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alpine installed the boot drive as a FD linux raid autodetect, IT WILL NOT BOOT on a Raspberry Pi. &lt;br /&gt;
The Raspberry Pi can only boot from fat16 or fat32 partition with boot and lba flags enabled. &lt;br /&gt;
&lt;br /&gt;
TYPE:  watch  cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
Personalities : [raid1]&lt;br /&gt;
md1 : active raid1 sdb2[1] sda2[0]&lt;br /&gt;
          14723072 blocks super 1.2 [2/2] [UU]&lt;br /&gt;
          {&amp;gt;....................] resyc - 2.7% (397521/14723072) finish=22.1min speed=8768K/sec&lt;br /&gt;
md0 : active raid1 sdb1[1] sda1[0]&lt;br /&gt;
          307136 blocks [2/2] [UU] &lt;br /&gt;
&lt;br /&gt;
The Raid MD1 is still resycing. Take a break, the drives should be finished in 20 to 30 minutes.&lt;br /&gt;
&lt;br /&gt;
PRESS: ctrl + c to exit watch cat /proc/mdtstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Backup the boot raid partition first&lt;br /&gt;
Insert mmcblk0&lt;br /&gt;
TYPE:  dd if=/dev/sda1 of=/dev/mmcblk0p1 bs=512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unmount the RAID 1 filesystem&lt;br /&gt;
TYPE:  umount /dev/md0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Stop the madam raid device&lt;br /&gt;
TYPE:  mdadm --stop /dev/md0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remove the Superblocks&lt;br /&gt;
TYPE:  mdadm --zero-superblock /dev/sda1 /dev/sdb1 /dev/mmcblk0p1 (due to dd backup copying)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
verify md0 has been removed&lt;br /&gt;
TYPE:  lsblk and or cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TYPE:  apk add nano or use vi to remove RAID /dev/md0 entries by editing /etc/fstab and /etc/mdadm.conf &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
reboot&lt;br /&gt;
&lt;br /&gt;
apk add sfdisk&lt;br /&gt;
&lt;br /&gt;
*** Warning*** &lt;br /&gt;
Before executing the following commands mmcblk0, sda, and sdb must be the exact same size partitons. &lt;br /&gt;
**************&lt;br /&gt;
Copy mmcblk0 disk partition table to sda and sdb&lt;br /&gt;
sfdisk -d /dev/mmcblk0 |  sfdisk –force /dev/sda&lt;br /&gt;
sfdisk -d /dev/mmcblk0 |  sfdisk –force /dev/sdb &lt;br /&gt;
&lt;br /&gt;
Copy mmcblk0p1 boot partition to sda1 and sdb1&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sda1 bs=512&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sdb1 bs=512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add mmcblk0 as a spare drive to RAID /dev/md1 &lt;br /&gt;
TYPE:  madam --add /dev/md1 /dev/mmcblk0p2&lt;br /&gt;
&lt;br /&gt;
View Raid One information&lt;br /&gt;
TYPE: mdadm --detail /dev/md1&lt;br /&gt;
&lt;br /&gt;
/dev/md1&lt;br /&gt;
                        version : 1.2&lt;br /&gt;
          Creation Time        : Sat Jun 24 12:50:56 2023&lt;br /&gt;
             Raid Level : raid 1&lt;br /&gt;
             Array Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
          Used Dev Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
           Raid Devices : 2&lt;br /&gt;
          Total Devices : 3&lt;br /&gt;
            Persistence : Superblock is persistence&lt;br /&gt;
            &lt;br /&gt;
            Update Time : Sat Jun 24 14:30:11 2023&lt;br /&gt;
                      State : clean&lt;br /&gt;
         Active Devices : 2&lt;br /&gt;
        Working Devices : 3&lt;br /&gt;
         Failed Devices : 0&lt;br /&gt;
          Spare Devices : 1&lt;br /&gt;
txnintn&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23700</id>
		<title>User:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23700"/>
		<updated>2023-07-01T20:22:38Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title:  Alpine Linux install: LVM over Raid1 with a Micro SD spare.&lt;br /&gt;
&lt;br /&gt;
Discussion:&lt;br /&gt;
&lt;br /&gt;
Alpine Linux setup-alpine scripts when executed with two disks and the install medium, if both disks are selected, i.e., sda and sdb, the script will automatically configure a RAID1 installation. /https://wiki.alpinelinux.org/wiki/Setting_up_the_build_environment_on_HDD#Basic_setup&lt;br /&gt;
&lt;br /&gt;
Additionally, LVM with a &#039;sys&#039; install can be selected during the setup-alpine script.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from either a USB or a Micro SD port. By having a Micro SD RAID1 spare, if the primary USB drive fails the Micro SD should be able to boot the system.  LVM requires the Micro SD spare partition to be the same size as USB RAID1 partitions.  A larger capacity Micro SD drive 2nd partition can easily resized to match the USB partition.  During the install the setup-alpine script will maximize the size of 2nd partition on RAID1 drives.&lt;br /&gt;
&lt;br /&gt;
Tech Tip, not all Micro SD and USB drives are the same size.&lt;br /&gt;
&lt;br /&gt;
16GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Industrial Micro SD			14.84GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra Ultra Fit USB 3.1		14.34GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra USB 3.0			    14.91GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Cruzer Glide USB 2.0	 	14.91GB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
32GB&lt;br /&gt;
&lt;br /&gt;
Samsung SD Pro Endurance Micro SD	29.81GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra SD					29.72GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra Fit USB 3.1 Gen1		28.67GB&lt;br /&gt;
&lt;br /&gt;
Silicon Power 5 USB 3.2				28.85GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra 3.0 OTG				28.85GB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
64GB&lt;br /&gt;
&lt;br /&gt;
Samsung EVO Select Micro SD			59.69GB&lt;br /&gt;
&lt;br /&gt;
Samsung Fit USB 3.1					59.75GB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Requirements:&lt;br /&gt;
&lt;br /&gt;
Raspberry PI 4&lt;br /&gt;
Two Identical USB Drives - fit style drives recommended based on physical clearance issues.&lt;br /&gt;
One Micro SD Drive with the same or larger capacity then the USB drives &lt;br /&gt;
One USB drive for the installation files.&lt;br /&gt;
&lt;br /&gt;
Preparation:&lt;br /&gt;
&lt;br /&gt;
Created the following on the USB RAID disks:&lt;br /&gt;
sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 using the rest of the disk with a fd linux raid partition, formatted ext4&lt;br /&gt;
&lt;br /&gt;
mmcblkx, sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 sized to match USB RAID partition, Linux 83 and formatted Ext4.  Do not use Linux Raid.&lt;br /&gt;
&lt;br /&gt;
The USB installation drive single partition fat 32 0c with boot and LBA flags.&lt;br /&gt;
Extract the contents of alpine-rpi-3.x.x-aarch.tar.gz to sdc1 (spare USB) partition.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi eprom must be set to boot USB port first and SD port second.&lt;br /&gt;
&lt;br /&gt;
Installation:&lt;br /&gt;
&lt;br /&gt;
Insert the &amp;quot;sda&amp;quot; USB disk into the bottom USB 3.0 port and the &amp;quot;sdb&amp;quot; USB drive into the upper USB 3.0 port.  Power up the system, after the system has failed to boot to the installed USB drives, the screen will change from white and red to black and white text, insert the installation USB (sdc) to start the install process. This will set the drive assignments properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After logging in as root.&lt;br /&gt;
To start the install, &lt;br /&gt;
TYPE:  setup-alpine and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Select keyboard layout: [none], prompt.&lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
At, Select variant (or &#039;abort&#039;):, prompt. &lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter system hostname (fully qualified form, e.g. &#039;foo.example.org&#039;) [localhost] prompt.&lt;br /&gt;
TYPE:  the localhost name, for example, rpi44gb and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [eth0], prompt. &lt;br /&gt;
PRESS: enter, to use the default, ethernet0 connection.&lt;br /&gt;
&lt;br /&gt;
Ip address for eth0? (or &#039;dhcp&#039;, &#039;none&#039;, &#039;?&#039;) [dhcp], prompt. &lt;br /&gt;
PRESS:  enter to use the default, dhcp.&lt;br /&gt;
&lt;br /&gt;
At the second,  Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [wlan0], prompt.&lt;br /&gt;
TYPE: done and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
Then at, Do you want to do and manual network configuration? (y/n) [n], prompt.&lt;br /&gt;
PRESS enter for the default, [n], for no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Change password for root, prompt.&lt;br /&gt;
TYPE: the root password, and PRESS:  enter.&lt;br /&gt;
At, Retype password, prompt.&lt;br /&gt;
TYPE: the root password and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which timezone are you in? (&#039;?&#039; for a list) [UTC]. prompt.&lt;br /&gt;
TYPE:  America, with a capital A, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, What sub-timezone of &#039;America&#039; are you in? (&#039;?&#039; for list), prompt.&lt;br /&gt;
TYPE:  Chicago, with a capital C, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, HTTP/FTP proxy URL? (e.g. /http://proxy:8000&#039;, or &#039;none&#039;) [none], prompt.&lt;br /&gt;
PRESS:  enter for the default, none.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which NTP Client to run? (&#039;busybox&#039;, &#039;openntpd&#039;, &#039;chrony&#039; or &#039;none&#039;) [chrony], prompt.&lt;br /&gt;
PRESS:  enter for the default, chrony.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the list of mirrors stop and at --More--, prompt&lt;br /&gt;
PRESS: the letter &amp;quot;r&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
r) Add random from the above list&lt;br /&gt;
f) Detect and add the fastest mirror from above list&lt;br /&gt;
e) Edit /etc/apk/repositories with text editor&lt;br /&gt;
&lt;br /&gt;
At, Enter mirror number (1-72) or URL to add (or r/f/e/done) [1], prompt.&lt;br /&gt;
PRESS:  enter for the default number 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Setup a user? (enter a lower-case loginname, or &#039;no&#039;) [no], prompt.&lt;br /&gt;
PRESS: enter for the default no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, which ssh server? (&#039;openssh&#039;, &#039;dropbear&#039; or &#039;none&#039;), prompt.&lt;br /&gt;
TYPE: none and PRESS:  enter to continue.&lt;br /&gt;
&lt;br /&gt;
At, Available disks are:&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
        &lt;br /&gt;
At Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) [none], prompt.&lt;br /&gt;
TYPE: sda sdb and PRESS:  enter to continue.&lt;br /&gt;
&lt;br /&gt;
The following disks are selected:&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, &#039;crypt&#039;, &#039;lvm&#039; or &#039;?&#039; for help) [?], prompt.&lt;br /&gt;
TYPE:  lvm and PRESS: enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following disks are selected (with LVM):&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, or &#039;?&#039; for help) [?], prompt.&lt;br /&gt;
TYPE:  sys for system disk and PRESS enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, WARNING: Erase the above disk(s) and continue? (y/n) [n], prompt.&lt;br /&gt;
        sda (15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb (15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
TYPE: y, for yes AMD PRESS: enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Partition #1 contains a vfat signature.&lt;br /&gt;
Partition #2 contains a ext4 signature.&lt;br /&gt;
Partition #1 contains a vfat signature.&lt;br /&gt;
Partition #2 contains a ext4 signature.&lt;br /&gt;
Creating file systems&lt;br /&gt;
mkfs.fat 4.2 ((2021-01-31)&lt;br /&gt;
        Physical volume &amp;quot;/dev/md1&amp;quot; successfully created.&lt;br /&gt;
        Logical volume &amp;quot;lv_root&amp;quot; created.&lt;br /&gt;
* service lvm added to runlevel boot&lt;br /&gt;
Installing system on /dev/vg0/lv_root&amp;quot;&lt;br /&gt;
100% ######################################&lt;br /&gt;
=&amp;gt; initframfs: creating /boot/initramfs-rpi4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Installation is complete.  Please reboot.  DO NOT REBOOT!!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alpine installed the boot drive as a FD linux raid autodetect, IT WILL NOT BOOT on a Raspberry Pi. &lt;br /&gt;
The Raspberry Pi can only boot from fat16 or fat32 partition with boot and lba flags enabled. &lt;br /&gt;
&lt;br /&gt;
TYPE:  watch  cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Personalities : [raid1]&lt;br /&gt;
md1 : active raid1 sdb2[1] sda2[0]&lt;br /&gt;
          14723072 blocks super 1.2 [2/2] [UU]&lt;br /&gt;
          {&amp;gt;....................] resyc - 2.7% (397521/14723072) finish=22.1min speed=8768K/sec&lt;br /&gt;
md0 : active raid1 sdb1[1] sda1[0]&lt;br /&gt;
          307136 blocks [2/2] [UU] &lt;br /&gt;
&lt;br /&gt;
The Raid MD1 is still resycing. Take a break, the drives should be finished in 20 to 30 minutes.&lt;br /&gt;
&lt;br /&gt;
PRESS: ctrl + c to exit watch cat /proc/mtstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Backup the boot raid partition first&lt;br /&gt;
Insert mmcblk0&lt;br /&gt;
TYPE:  dd if=/dev/sda1 of=/dev/mmcblk0p1 bs=512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unmount the RAID 1 filesystem&lt;br /&gt;
TYPE:  umount /dev/md0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Stop the madam raid device&lt;br /&gt;
TYPE:  mdadm --stop /dev/md0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remove the Superblocks&lt;br /&gt;
TYPE:  mdadm --zero-superblock /dev/sda1 /dev/sdb1 /dev/mmcblk0p1 (due to dd backup copying)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
verify md0 has been removed&lt;br /&gt;
TYPE:  lsblk and or cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TYPE:  apk add nano or use vi to remove RAID /dev/md0 entries by editing /etc/fstab and /etc/mdadm.conf &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
reboot&lt;br /&gt;
&lt;br /&gt;
apk add sfdisk&lt;br /&gt;
&lt;br /&gt;
*** Warning*** &lt;br /&gt;
Before executing the following commands mmcblk0, sda, and sdb must be the exact same size partitons. &lt;br /&gt;
**************&lt;br /&gt;
 &lt;br /&gt;
sfdisk -d /dev/mmcblk0 |  sfdisk –force /dev/sda&lt;br /&gt;
sfdisk -d /dev/mmcblk0 |  sfdisk –force /dev/sdb &lt;br /&gt;
&lt;br /&gt;
Copy mmcblk0p1 boot partition to sda1 and sdb1&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sda1 bs=512&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sdb1 bs=512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add mmcblk0 as a spare drive to RAID /dev/md1 &lt;br /&gt;
TYPE:  madam --add /dev/md1 /dev/mmcblk0p2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TYPE: mdadm --detail /dev/md1&lt;br /&gt;
/dev/md1&lt;br /&gt;
                        version : 1.2&lt;br /&gt;
          Creation Time        : Sat Jun 24 12:50:56 2023&lt;br /&gt;
             Raid Level : raid 1&lt;br /&gt;
             Array Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
          Used Dev Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
           Raid Devices : 2&lt;br /&gt;
          Total Devices : 3&lt;br /&gt;
            Persistence : Superblock is persistence&lt;br /&gt;
            &lt;br /&gt;
            Update Time : Sat Jun 24 14:30:11 2023&lt;br /&gt;
                      State : clean&lt;br /&gt;
         Active Devices : 2&lt;br /&gt;
        Working Devices : 3&lt;br /&gt;
         Failed Devices : 0&lt;br /&gt;
          Spare Devices : 1&lt;br /&gt;
txnintn&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23699</id>
		<title>User:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23699"/>
		<updated>2023-07-01T20:20:50Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title:  Alpine Linux install: LVM over Raid1 with a Micro SD spare.&lt;br /&gt;
&lt;br /&gt;
Alpine Linux setup-alpine scripts when executed with two disks and the install medium, if both disks are selected, i.e., sda and sdb, the script will automatically configure a RAID1 installation. /https://wiki.alpinelinux.org/wiki/Setting_up_the_build_environment_on_HDD#Basic_setup&lt;br /&gt;
&lt;br /&gt;
Additionally, LVM with a &#039;sys&#039; install can be selected during the setup-alpine script.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from either a USB or a Micro SD port. By having a Micro SD RAID1 spare, if the primary USB drive fails the Micro SD should be able to boot the system.  LVM requires the Micro SD spare partition to be the same size as USB RAID1 partitions.  A larger capacity Micro SD drive 2nd partition can easily resized to match the USB partition.  During the install the setup-alpine script will maximize the size of 2nd partition on RAID1 drives.&lt;br /&gt;
&lt;br /&gt;
Tech Tip, not all Micro SD and USB drives are the same size.&lt;br /&gt;
&lt;br /&gt;
16GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Industrial Micro SD			14.84GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra Ultra Fit USB 3.1		14.34GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra USB 3.0			    14.91GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Cruzer Glide USB 2.0	 	14.91GB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
32GB&lt;br /&gt;
&lt;br /&gt;
Samsung SD Pro Endurance Micro SD	29.81GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra SD					29.72GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra Fit USB 3.1 Gen1		28.67GB&lt;br /&gt;
&lt;br /&gt;
Silicon Power 5 USB 3.2				28.85GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra 3.0 OTG				28.85GB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
64GB&lt;br /&gt;
&lt;br /&gt;
Samsung EVO Select Micro SD			59.69GB&lt;br /&gt;
&lt;br /&gt;
Samsung Fit USB 3.1					59.75GB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Requirements:&lt;br /&gt;
Raspberry PI 4&lt;br /&gt;
Two Identical USB Drives - fit style drives recommended based on physical clearance issues.&lt;br /&gt;
One Micro SD Drive with the same or larger capacity then the USB drives &lt;br /&gt;
One USB drive for the installation files.&lt;br /&gt;
&lt;br /&gt;
Preparation&lt;br /&gt;
Created the following on the USB RAID disks:&lt;br /&gt;
sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 using the rest of the disk with a fd linux raid partition, formatted ext4&lt;br /&gt;
&lt;br /&gt;
mmcblkx, sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 sized to match USB RAID partition, Linux 83 and formatted Ext4.  Do not use Linux Raid.&lt;br /&gt;
&lt;br /&gt;
The USB installation drive single partition fat 32 0c with boot and LBA flags.&lt;br /&gt;
Extract the contents of alpine-rpi-3.x.x-aarch.tar.gz to sdc1 (spare USB) partition.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi eprom must be set to boot USB port first and SD port second.&lt;br /&gt;
&lt;br /&gt;
Installation&lt;br /&gt;
&lt;br /&gt;
Insert the &amp;quot;sda&amp;quot; USB disk into the bottom USB 3.0 port and the &amp;quot;sdb&amp;quot; USB drive into the upper USB 3.0 port.  Power up the system, after the system has failed to boot to the installed USB drives, the screen will change from white and red to black and white text, insert the installation USB (sdc) to start the install process. This will set the drive assignments properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After logging in as root.&lt;br /&gt;
To start the install, &lt;br /&gt;
TYPE:  setup-alpine and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Select keyboard layout: [none], prompt.&lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
At, Select variant (or &#039;abort&#039;):, prompt. &lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter system hostname (fully qualified form, e.g. &#039;foo.example.org&#039;) [localhost] prompt.&lt;br /&gt;
TYPE:  the localhost name, for example, rpi44gb and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [eth0], prompt. &lt;br /&gt;
PRESS: enter, to use the default, ethernet0 connection.&lt;br /&gt;
&lt;br /&gt;
Ip address for eth0? (or &#039;dhcp&#039;, &#039;none&#039;, &#039;?&#039;) [dhcp], prompt. &lt;br /&gt;
PRESS:  enter to use the default, dhcp.&lt;br /&gt;
&lt;br /&gt;
At the second,  Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [wlan0], prompt.&lt;br /&gt;
TYPE: done and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
Then at, Do you want to do and manual network configuration? (y/n) [n], prompt.&lt;br /&gt;
PRESS enter for the default, [n], for no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Change password for root, prompt.&lt;br /&gt;
TYPE: the root password, and PRESS:  enter.&lt;br /&gt;
At, Retype password, prompt.&lt;br /&gt;
TYPE: the root password and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which timezone are you in? (&#039;?&#039; for a list) [UTC]. prompt.&lt;br /&gt;
TYPE:  America, with a capital A, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, What sub-timezone of &#039;America&#039; are you in? (&#039;?&#039; for list), prompt.&lt;br /&gt;
TYPE:  Chicago, with a capital C, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, HTTP/FTP proxy URL? (e.g. /http://proxy:8000&#039;, or &#039;none&#039;) [none], prompt.&lt;br /&gt;
PRESS:  enter for the default, none.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which NTP Client to run? (&#039;busybox&#039;, &#039;openntpd&#039;, &#039;chrony&#039; or &#039;none&#039;) [chrony], prompt.&lt;br /&gt;
PRESS:  enter for the default, chrony.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the list of mirrors stop and at --More--, prompt&lt;br /&gt;
PRESS: the letter &amp;quot;r&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
r) Add random from the above list&lt;br /&gt;
f) Detect and add the fastest mirror from above list&lt;br /&gt;
e) Edit /etc/apk/repositories with text editor&lt;br /&gt;
&lt;br /&gt;
At, Enter mirror number (1-72) or URL to add (or r/f/e/done) [1], prompt.&lt;br /&gt;
PRESS:  enter for the default number 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Setup a user? (enter a lower-case loginname, or &#039;no&#039;) [no], prompt.&lt;br /&gt;
PRESS: enter for the default no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, which ssh server? (&#039;openssh&#039;, &#039;dropbear&#039; or &#039;none&#039;), prompt.&lt;br /&gt;
TYPE: none and PRESS:  enter to continue.&lt;br /&gt;
&lt;br /&gt;
At, Available disks are:&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
        &lt;br /&gt;
At Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) [none], prompt.&lt;br /&gt;
TYPE: sda sdb and PRESS:  enter to continue.&lt;br /&gt;
&lt;br /&gt;
The following disks are selected:&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, &#039;crypt&#039;, &#039;lvm&#039; or &#039;?&#039; for help) [?], prompt.&lt;br /&gt;
TYPE:  lvm and PRESS: enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following disks are selected (with LVM):&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, or &#039;?&#039; for help) [?], prompt.&lt;br /&gt;
TYPE:  sys for system disk and PRESS enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, WARNING: Erase the above disk(s) and continue? (y/n) [n], prompt.&lt;br /&gt;
        sda (15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb (15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
TYPE: y, for yes AMD PRESS: enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Partition #1 contains a vfat signature.&lt;br /&gt;
Partition #2 contains a ext4 signature.&lt;br /&gt;
Partition #1 contains a vfat signature.&lt;br /&gt;
Partition #2 contains a ext4 signature.&lt;br /&gt;
Creating file systems&lt;br /&gt;
mkfs.fat 4.2 ((2021-01-31)&lt;br /&gt;
        Physical volume &amp;quot;/dev/md1&amp;quot; successfully created.&lt;br /&gt;
        Logical volume &amp;quot;lv_root&amp;quot; created.&lt;br /&gt;
* service lvm added to runlevel boot&lt;br /&gt;
Installing system on /dev/vg0/lv_root&amp;quot;&lt;br /&gt;
100% ######################################&lt;br /&gt;
=&amp;gt; initframfs: creating /boot/initramfs-rpi4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Installation is complete.  Please reboot.  DO NOT REBOOT!!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alpine installed the boot drive as a FD linux raid autodetect, IT WILL NOT BOOT on a Raspberry Pi. &lt;br /&gt;
The Raspberry Pi can only boot from fat16 or fat32 partition with boot and lba flags enabled. &lt;br /&gt;
&lt;br /&gt;
TYPE:  watch  cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Personalities : [raid1]&lt;br /&gt;
md1 : active raid1 sdb2[1] sda2[0]&lt;br /&gt;
          14723072 blocks super 1.2 [2/2] [UU]&lt;br /&gt;
          {&amp;gt;....................] resyc - 2.7% (397521/14723072) finish=22.1min speed=8768K/sec&lt;br /&gt;
md0 : active raid1 sdb1[1] sda1[0]&lt;br /&gt;
          307136 blocks [2/2] [UU] &lt;br /&gt;
&lt;br /&gt;
The Raid MD1 is still resycing. Take a break, the drives should be finished in 20 to 30 minutes.&lt;br /&gt;
&lt;br /&gt;
PRESS: ctrl + c to exit watch cat /proc/mtstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Backup the boot raid partition first&lt;br /&gt;
Insert mmcblk0&lt;br /&gt;
TYPE:  dd if=/dev/sda1 of=/dev/mmcblk0p1 bs=512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unmount the RAID 1 filesystem&lt;br /&gt;
TYPE:  umount /dev/md0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Stop the madam raid device&lt;br /&gt;
TYPE:  mdadm --stop /dev/md0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remove the Superblocks&lt;br /&gt;
TYPE:  mdadm --zero-superblock /dev/sda1 /dev/sdb1 /dev/mmcblk0p1 (due to dd backup copying)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
verify md0 has been removed&lt;br /&gt;
TYPE:  lsblk and or cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TYPE:  apk add nano or use vi to remove RAID /dev/md0 entries by editing /etc/fstab and /etc/mdadm.conf &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
reboot&lt;br /&gt;
&lt;br /&gt;
apk add sfdisk&lt;br /&gt;
&lt;br /&gt;
*** Warning*** &lt;br /&gt;
Before executing the following commands mmcblk0, sda, and sdb must be the exact same size partitons. &lt;br /&gt;
**************&lt;br /&gt;
 &lt;br /&gt;
sfdisk -d /dev/mmcblk0 |  sfdisk –force /dev/sda&lt;br /&gt;
sfdisk -d /dev/mmcblk0 |  sfdisk –force /dev/sdb &lt;br /&gt;
&lt;br /&gt;
Copy mmcblk0p1 boot partition to sda1 and sdb1&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sda1 bs=512&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sdb1 bs=512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add mmcblk0 as a spare drive to RAID /dev/md1 &lt;br /&gt;
TYPE:  madam --add /dev/md1 /dev/mmcblk0p2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TYPE: mdadm --detail /dev/md1&lt;br /&gt;
/dev/md1&lt;br /&gt;
                        version : 1.2&lt;br /&gt;
          Creation Time        : Sat Jun 24 12:50:56 2023&lt;br /&gt;
             Raid Level : raid 1&lt;br /&gt;
             Array Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
          Used Dev Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
           Raid Devices : 2&lt;br /&gt;
          Total Devices : 3&lt;br /&gt;
            Persistence : Superblock is persistence&lt;br /&gt;
            &lt;br /&gt;
            Update Time : Sat Jun 24 14:30:11 2023&lt;br /&gt;
                      State : clean&lt;br /&gt;
         Active Devices : 2&lt;br /&gt;
        Working Devices : 3&lt;br /&gt;
         Failed Devices : 0&lt;br /&gt;
          Spare Devices : 1&lt;br /&gt;
txnintn&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23698</id>
		<title>User:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23698"/>
		<updated>2023-07-01T20:19:08Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title:  Alpine Linux install: LVM over Raid1 with a Micro SD spare.&lt;br /&gt;
&lt;br /&gt;
Alpine Linux setup-alpine scripts when executed with two disks and the install medium, if both disks are selected, i.e., sda and sdb, the script will automatically configure a RAID1 installation. /https://wiki.alpinelinux.org/wiki/Setting_up_the_build_environment_on_HDD#Basic_setup&lt;br /&gt;
&lt;br /&gt;
Additionally, LVM with a &#039;sys&#039; install can be selected during the setup-alpine script.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from either a USB or a Micro SD port. By having a Micro SD RAID1 spare, if the primary USB drive fails the Micro SD should be able to boot the system.  LVM requires the Micro SD spare partition to be the same size as USB RAID1 partitions.  A larger capacity Micro SD drive 2nd partition can easily resized to match the USB partition.  During the install the setup-alpine script will maximize the size of 2nd partition on RAID1 drives.&lt;br /&gt;
&lt;br /&gt;
Tech Tip, not all Micro SD and USB drives are the same size.&lt;br /&gt;
&lt;br /&gt;
16GB&lt;br /&gt;
SanDisk Industrial Micro SD			14.84GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra Ultra Fit USB 3.1		14.34GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra USB 3.0			    14.91GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Cruzer Glide USB 2.0	 	14.91GB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
32GB&lt;br /&gt;
Samsung SD Pro Endurance Micro SD	29.81GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra SD					29.72GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra Fit USB 3.1 Gen1		28.67GB&lt;br /&gt;
&lt;br /&gt;
Silicon Power 5 USB 3.2				28.85GB&lt;br /&gt;
&lt;br /&gt;
SanDisk Ultra 3.0 OTG				28.85GB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
64GB&lt;br /&gt;
Samsung EVO Select Micro SD			59.69GB&lt;br /&gt;
&lt;br /&gt;
Samsung Fit USB 3.1					59.75GB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Requirements:&lt;br /&gt;
Raspberry PI 4&lt;br /&gt;
Two Identical USB Drives - fit style drives recommended based on physical clearance issues.&lt;br /&gt;
One Micro SD Drive with the same or larger capacity then the USB drives &lt;br /&gt;
One USB drive for the installation files.&lt;br /&gt;
&lt;br /&gt;
Preparation&lt;br /&gt;
Created the following on the USB RAID disks:&lt;br /&gt;
sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 using the rest of the disk with a fd linux raid partition, formatted ext4&lt;br /&gt;
&lt;br /&gt;
mmcblkx, sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 sized to match USB RAID partition, Linux 83 and formatted Ext4.  Do not use Linux Raid.&lt;br /&gt;
&lt;br /&gt;
The USB installation drive single partition fat 32 0c with boot and LBA flags.&lt;br /&gt;
Extract the contents of alpine-rpi-3.x.x-aarch.tar.gz to sdc1 (spare USB) partition.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi eprom must be set to boot USB port first and SD port second.&lt;br /&gt;
&lt;br /&gt;
Installation&lt;br /&gt;
&lt;br /&gt;
Insert the &amp;quot;sda&amp;quot; USB disk into the bottom USB 3.0 port and the &amp;quot;sdb&amp;quot; USB drive into the upper USB 3.0 port.  Power up the system, after the system has failed to boot to the installed USB drives, the screen will change from white and red to black and white text, insert the installation USB (sdc) to start the install process. This will set the drive assignments properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After logging in as root.&lt;br /&gt;
To start the install, &lt;br /&gt;
TYPE:  setup-alpine and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Select keyboard layout: [none], prompt.&lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
At, Select variant (or &#039;abort&#039;):, prompt. &lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter system hostname (fully qualified form, e.g. &#039;foo.example.org&#039;) [localhost] prompt.&lt;br /&gt;
TYPE:  the localhost name, for example, rpi44gb and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [eth0], prompt. &lt;br /&gt;
PRESS: enter, to use the default, ethernet0 connection.&lt;br /&gt;
&lt;br /&gt;
Ip address for eth0? (or &#039;dhcp&#039;, &#039;none&#039;, &#039;?&#039;) [dhcp], prompt. &lt;br /&gt;
PRESS:  enter to use the default, dhcp.&lt;br /&gt;
&lt;br /&gt;
At the second,  Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [wlan0], prompt.&lt;br /&gt;
TYPE: done and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
Then at, Do you want to do and manual network configuration? (y/n) [n], prompt.&lt;br /&gt;
PRESS enter for the default, [n], for no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Change password for root, prompt.&lt;br /&gt;
TYPE: the root password, and PRESS:  enter.&lt;br /&gt;
At, Retype password, prompt.&lt;br /&gt;
TYPE: the root password and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which timezone are you in? (&#039;?&#039; for a list) [UTC]. prompt.&lt;br /&gt;
TYPE:  America, with a capital A, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, What sub-timezone of &#039;America&#039; are you in? (&#039;?&#039; for list), prompt.&lt;br /&gt;
TYPE:  Chicago, with a capital C, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, HTTP/FTP proxy URL? (e.g. /http://proxy:8000&#039;, or &#039;none&#039;) [none], prompt.&lt;br /&gt;
PRESS:  enter for the default, none.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which NTP Client to run? (&#039;busybox&#039;, &#039;openntpd&#039;, &#039;chrony&#039; or &#039;none&#039;) [chrony], prompt.&lt;br /&gt;
PRESS:  enter for the default, chrony.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the list of mirrors stop and at --More--, prompt&lt;br /&gt;
PRESS: the letter &amp;quot;r&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
r) Add random from the above list&lt;br /&gt;
f) Detect and add the fastest mirror from above list&lt;br /&gt;
e) Edit /etc/apk/repositories with text editor&lt;br /&gt;
&lt;br /&gt;
At, Enter mirror number (1-72) or URL to add (or r/f/e/done) [1], prompt.&lt;br /&gt;
PRESS:  enter for the default number 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Setup a user? (enter a lower-case loginname, or &#039;no&#039;) [no], prompt.&lt;br /&gt;
PRESS: enter for the default no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, which ssh server? (&#039;openssh&#039;, &#039;dropbear&#039; or &#039;none&#039;), prompt.&lt;br /&gt;
TYPE: none and PRESS:  enter to continue.&lt;br /&gt;
&lt;br /&gt;
At, Available disks are:&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
        &lt;br /&gt;
At Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) [none], prompt.&lt;br /&gt;
TYPE: sda sdb and PRESS:  enter to continue.&lt;br /&gt;
&lt;br /&gt;
The following disks are selected:&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, &#039;crypt&#039;, &#039;lvm&#039; or &#039;?&#039; for help) [?], prompt.&lt;br /&gt;
TYPE:  lvm and PRESS: enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following disks are selected (with LVM):&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, or &#039;?&#039; for help) [?], prompt.&lt;br /&gt;
TYPE:  sys for system disk and PRESS enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, WARNING: Erase the above disk(s) and continue? (y/n) [n], prompt.&lt;br /&gt;
        sda (15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb (15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
TYPE: y, for yes AMD PRESS: enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Partition #1 contains a vfat signature.&lt;br /&gt;
Partition #2 contains a ext4 signature.&lt;br /&gt;
Partition #1 contains a vfat signature.&lt;br /&gt;
Partition #2 contains a ext4 signature.&lt;br /&gt;
Creating file systems&lt;br /&gt;
mkfs.fat 4.2 ((2021-01-31)&lt;br /&gt;
        Physical volume &amp;quot;/dev/md1&amp;quot; successfully created.&lt;br /&gt;
        Logical volume &amp;quot;lv_root&amp;quot; created.&lt;br /&gt;
* service lvm added to runlevel boot&lt;br /&gt;
Installing system on /dev/vg0/lv_root&amp;quot;&lt;br /&gt;
100% ######################################&lt;br /&gt;
=&amp;gt; initframfs: creating /boot/initramfs-rpi4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Installation is complete.  Please reboot.  DO NOT REBOOT!!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alpine installed the boot drive as a FD linux raid autodetect, IT WILL NOT BOOT on a Raspberry Pi. &lt;br /&gt;
The Raspberry Pi can only boot from fat16 or fat32 partition with boot and lba flags enabled. &lt;br /&gt;
&lt;br /&gt;
TYPE:  watch  cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Personalities : [raid1]&lt;br /&gt;
md1 : active raid1 sdb2[1] sda2[0]&lt;br /&gt;
          14723072 blocks super 1.2 [2/2] [UU]&lt;br /&gt;
          {&amp;gt;....................] resyc - 2.7% (397521/14723072) finish=22.1min speed=8768K/sec&lt;br /&gt;
md0 : active raid1 sdb1[1] sda1[0]&lt;br /&gt;
          307136 blocks [2/2] [UU] &lt;br /&gt;
&lt;br /&gt;
The Raid MD1 is still resycing. Take a break, the drives should be finished in 20 to 30 minutes.&lt;br /&gt;
&lt;br /&gt;
PRESS: ctrl + c to exit watch cat /proc/mtstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Backup the boot raid partition first&lt;br /&gt;
Insert mmcblk0&lt;br /&gt;
TYPE:  dd if=/dev/sda1 of=/dev/mmcblk0p1 bs=512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unmount the RAID 1 filesystem&lt;br /&gt;
TYPE:  umount /dev/md0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Stop the madam raid device&lt;br /&gt;
TYPE:  mdadm --stop /dev/md0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remove the Superblocks&lt;br /&gt;
TYPE:  mdadm --zero-superblock /dev/sda1 /dev/sdb1 /dev/mmcblk0p1 (due to dd backup copying)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
verify md0 has been removed&lt;br /&gt;
TYPE:  lsblk and or cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TYPE:  apk add nano or use vi to remove RAID /dev/md0 entries by editing /etc/fstab and /etc/mdadm.conf &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
reboot&lt;br /&gt;
&lt;br /&gt;
apk add sfdisk&lt;br /&gt;
*** Warning*** Before executing the following commands mmcblk0, sda, and sdb must be the exact same size partitons. &lt;br /&gt;
 &lt;br /&gt;
sfdisk -d /dev/mmcblk0 |  sfdisk –force /dev/sda&lt;br /&gt;
sfdisk -d /dev/mmcblk0 |  sfdisk –force /dev/sdb &lt;br /&gt;
&lt;br /&gt;
Copy mmcblk0p1 boot partition to sda1 and sdb1&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sda1 bs=512&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sdb1 bs=512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add mmcblk0 as a spare drive to RAID /dev/md1 &lt;br /&gt;
TYPE:  madam --add /dev/md1 /dev/mmcblk0p2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TYPE: mdadm --detail /dev/md1&lt;br /&gt;
/dev/md1&lt;br /&gt;
                        version : 1.2&lt;br /&gt;
          Creation Time        : Sat Jun 24 12:50:56 2023&lt;br /&gt;
             Raid Level : raid 1&lt;br /&gt;
             Array Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
          Used Dev Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
           Raid Devices : 2&lt;br /&gt;
          Total Devices : 3&lt;br /&gt;
            Persistence : Superblock is persistence&lt;br /&gt;
            &lt;br /&gt;
            Update Time : Sat Jun 24 14:30:11 2023&lt;br /&gt;
                      State : clean&lt;br /&gt;
         Active Devices : 2&lt;br /&gt;
        Working Devices : 3&lt;br /&gt;
         Failed Devices : 0&lt;br /&gt;
          Spare Devices : 1&lt;br /&gt;
txnintn&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23697</id>
		<title>User:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23697"/>
		<updated>2023-07-01T20:16:59Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title:  Alpine Linux install: LVM over Raid1 with a Micro SD spare.&lt;br /&gt;
&lt;br /&gt;
Alpine Linux setup-alpine scripts when executed with two disks and the install medium, if both disks are selected, i.e., sda and sdb, the script will automatically configure a RAID1 installation. /https://wiki.alpinelinux.org/wiki/Setting_up_the_build_environment_on_HDD#Basic_setup&lt;br /&gt;
&lt;br /&gt;
Additionally, LVM with a &#039;sys&#039; install can be selected during the setup-alpine script.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from either a USB or a Micro SD port. By having a Micro SD RAID1 spare, if the primary USB drive fails the Micro SD should be able to boot the system.  LVM requires the Micro SD spare partition to be the same size as USB RAID1 partitions.  A larger capacity Micro SD drive 2nd partition can easily resized to match the USB partition.  During the install the setup-alpine script will maximize the size of 2nd partition on RAID1 drives.&lt;br /&gt;
&lt;br /&gt;
Tech Tip, not all Micro SD and USB drives are the same size.&lt;br /&gt;
&lt;br /&gt;
16GB&lt;br /&gt;
SanDisk Industrial Micro SD			14.84GB&lt;br /&gt;
SanDisk Ultra Ultra Fit USB 3.1		14.34GB&lt;br /&gt;
SanDisk Ultra USB 3.0			14.91GB&lt;br /&gt;
SanDisk Cruzer Glide USB 2.0		14.91GB&lt;br /&gt;
&lt;br /&gt;
32GB&lt;br /&gt;
Samsung SD Pro Endurance Micro SD	29.81GB&lt;br /&gt;
SanDisk Ultra SD					29.72GB&lt;br /&gt;
SanDisk Ultra Fit USB 3.1 Gen1		28.67GB&lt;br /&gt;
Silicon Power 5 USB 3.2				28.85GB&lt;br /&gt;
SanDisk Ultra 3.0 OTG				28.85GB&lt;br /&gt;
&lt;br /&gt;
64GB&lt;br /&gt;
Samsung EVO Select Micro SD			59.69GB&lt;br /&gt;
Samsung Fit USB 3.1					59.75GB&lt;br /&gt;
&lt;br /&gt;
Requirements:&lt;br /&gt;
Raspberry PI 4&lt;br /&gt;
Two Identical USB Drives - fit style drives recommended based on physical clearance issues.&lt;br /&gt;
One Micro SD Drive with the same or larger capacity then the USB drives &lt;br /&gt;
One USB drive for the installation files.&lt;br /&gt;
&lt;br /&gt;
Preparation&lt;br /&gt;
Created the following on the USB RAID disks:&lt;br /&gt;
sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 using the rest of the disk with a fd linux raid partition, formatted ext4&lt;br /&gt;
&lt;br /&gt;
mmcblkx, sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 sized to match USB RAID partition, Linux 83 and formatted Ext4.  Do not use Linux Raid.&lt;br /&gt;
&lt;br /&gt;
The USB installation drive single partition fat 32 0c with boot and LBA flags.&lt;br /&gt;
Extract the contents of alpine-rpi-3.x.x-aarch.tar.gz to sdc1 (spare USB) partition.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi eprom must be set to boot USB port first and SD port second.&lt;br /&gt;
&lt;br /&gt;
Installation&lt;br /&gt;
&lt;br /&gt;
Insert the &amp;quot;sda&amp;quot; USB disk into the bottom USB 3.0 port and the &amp;quot;sdb&amp;quot; USB drive into the upper USB 3.0 port.  Power up the system, after the system has failed to boot to the installed USB drives, the screen will change from white and red to black and white text, insert the installation USB (sdc) to start the install process. This will set the drive assignments properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After logging in as root.&lt;br /&gt;
To start the install, &lt;br /&gt;
TYPE:  setup-alpine and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Select keyboard layout: [none], prompt.&lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
At, Select variant (or &#039;abort&#039;):, prompt. &lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter system hostname (fully qualified form, e.g. &#039;foo.example.org&#039;) [localhost] prompt.&lt;br /&gt;
TYPE:  the localhost name, for example, rpi44gb and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [eth0], prompt. &lt;br /&gt;
PRESS: enter, to use the default, ethernet0 connection.&lt;br /&gt;
&lt;br /&gt;
Ip address for eth0? (or &#039;dhcp&#039;, &#039;none&#039;, &#039;?&#039;) [dhcp], prompt. &lt;br /&gt;
PRESS:  enter to use the default, dhcp.&lt;br /&gt;
&lt;br /&gt;
At the second,  Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [wlan0], prompt.&lt;br /&gt;
TYPE: done and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
Then at, Do you want to do and manual network configuration? (y/n) [n], prompt.&lt;br /&gt;
PRESS enter for the default, [n], for no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Change password for root, prompt.&lt;br /&gt;
TYPE: the root password, and PRESS:  enter.&lt;br /&gt;
At, Retype password, prompt.&lt;br /&gt;
TYPE: the root password and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which timezone are you in? (&#039;?&#039; for a list) [UTC]. prompt.&lt;br /&gt;
TYPE:  America, with a capital A, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, What sub-timezone of &#039;America&#039; are you in? (&#039;?&#039; for list), prompt.&lt;br /&gt;
TYPE:  Chicago, with a capital C, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, HTTP/FTP proxy URL? (e.g. /http://proxy:8000&#039;, or &#039;none&#039;) [none], prompt.&lt;br /&gt;
PRESS:  enter for the default, none.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which NTP Client to run? (&#039;busybox&#039;, &#039;openntpd&#039;, &#039;chrony&#039; or &#039;none&#039;) [chrony], prompt.&lt;br /&gt;
PRESS:  enter for the default, chrony.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the list of mirrors stop and at --More--, prompt&lt;br /&gt;
PRESS: the letter &amp;quot;r&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
r) Add random from the above list&lt;br /&gt;
f) Detect and add the fastest mirror from above list&lt;br /&gt;
e) Edit /etc/apk/repositories with text editor&lt;br /&gt;
&lt;br /&gt;
At, Enter mirror number (1-72) or URL to add (or r/f/e/done) [1], prompt.&lt;br /&gt;
PRESS:  enter for the default number 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Setup a user? (enter a lower-case loginname, or &#039;no&#039;) [no], prompt.&lt;br /&gt;
PRESS: enter for the default no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, which ssh server? (&#039;openssh&#039;, &#039;dropbear&#039; or &#039;none&#039;), prompt.&lt;br /&gt;
TYPE: none and PRESS:  enter to continue.&lt;br /&gt;
&lt;br /&gt;
At, Available disks are:&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
        &lt;br /&gt;
At Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) [none], prompt.&lt;br /&gt;
TYPE: sda sdb and PRESS:  enter to continue.&lt;br /&gt;
&lt;br /&gt;
The following disks are selected:&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, &#039;crypt&#039;, &#039;lvm&#039; or &#039;?&#039; for help) [?], prompt.&lt;br /&gt;
TYPE:  lvm and PRESS: enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following disks are selected (with LVM):&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, or &#039;?&#039; for help) [?], prompt.&lt;br /&gt;
TYPE:  sys for system disk and PRESS enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, WARNING: Erase the above disk(s) and continue? (y/n) [n], prompt.&lt;br /&gt;
        sda (15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb (15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
TYPE: y, for yes AMD PRESS: enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Partition #1 contains a vfat signature.&lt;br /&gt;
Partition #2 contains a ext4 signature.&lt;br /&gt;
Partition #1 contains a vfat signature.&lt;br /&gt;
Partition #2 contains a ext4 signature.&lt;br /&gt;
Creating file systems&lt;br /&gt;
mkfs.fat 4.2 ((2021-01-31)&lt;br /&gt;
        Physical volume &amp;quot;/dev/md1&amp;quot; successfully created.&lt;br /&gt;
        Logical volume &amp;quot;lv_root&amp;quot; created.&lt;br /&gt;
* service lvm added to runlevel boot&lt;br /&gt;
Installing system on /dev/vg0/lv_root&amp;quot;&lt;br /&gt;
100% ######################################&lt;br /&gt;
=&amp;gt; initframfs: creating /boot/initramfs-rpi4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Installation is complete.  Please reboot.  DO NOT REBOOT!!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alpine installed the boot drive as a FD linux raid autodetect, IT WILL NOT BOOT on a Raspberry Pi. &lt;br /&gt;
The Raspberry Pi can only boot from fat16 or fat32 partition with boot and lba flags enabled. &lt;br /&gt;
&lt;br /&gt;
TYPE:  watch  cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Personalities : [raid1]&lt;br /&gt;
md1 : active raid1 sdb2[1] sda2[0]&lt;br /&gt;
          14723072 blocks super 1.2 [2/2] [UU]&lt;br /&gt;
          {&amp;gt;....................] resyc - 2.7% (397521/14723072) finish=22.1min speed=8768K/sec&lt;br /&gt;
md0 : active raid1 sdb1[1] sda1[0]&lt;br /&gt;
          307136 blocks [2/2] [UU] &lt;br /&gt;
&lt;br /&gt;
The Raid MD1 is still resycing. Take a break, the drives should be finished in 20 to 30 minutes.&lt;br /&gt;
&lt;br /&gt;
PRESS: ctrl + c to exit watch cat /proc/mtstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Backup the boot raid partition first&lt;br /&gt;
Insert mmcblk0&lt;br /&gt;
TYPE:  dd if=/dev/sda1 of=/dev/mmcblk0p1 bs=512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unmount the RAID 1 filesystem&lt;br /&gt;
TYPE:  umount /dev/md0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Stop the madam raid device&lt;br /&gt;
TYPE:  mdadm --stop /dev/md0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remove the Superblocks&lt;br /&gt;
TYPE:  mdadm --zero-superblock /dev/sda1 /dev/sdb1 /dev/mmcblk0p1 (due to dd backup copying)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
verify md0 has been removed&lt;br /&gt;
TYPE:  lsblk and or cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TYPE:  apk add nano or use vi to remove RAID /dev/md0 entries by editing /etc/fstab and /etc/mdadm.conf &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
reboot&lt;br /&gt;
&lt;br /&gt;
apk add sfdisk&lt;br /&gt;
*** Warning*** Before executing the following commands mmcblk0, sda, and sdb must be the exact same size partitons. &lt;br /&gt;
 &lt;br /&gt;
sfdisk -d /dev/mmcblk0 |  sfdisk –force /dev/sda&lt;br /&gt;
sfdisk -d /dev/mmcblk0 |  sfdisk –force /dev/sdb &lt;br /&gt;
&lt;br /&gt;
Copy mmcblk0p1 boot partition to sda1 and sdb1&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sda1 bs=512&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sdb1 bs=512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add mmcblk0 as a spare drive to RAID /dev/md1 &lt;br /&gt;
TYPE:  madam --add /dev/md1 /dev/mmcblk0p2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TYPE: mdadm --detail /dev/md1&lt;br /&gt;
/dev/md1&lt;br /&gt;
                        version : 1.2&lt;br /&gt;
          Creation Time        : Sat Jun 24 12:50:56 2023&lt;br /&gt;
             Raid Level : raid 1&lt;br /&gt;
             Array Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
          Used Dev Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
           Raid Devices : 2&lt;br /&gt;
          Total Devices : 3&lt;br /&gt;
            Persistence : Superblock is persistence&lt;br /&gt;
            &lt;br /&gt;
            Update Time : Sat Jun 24 14:30:11 2023&lt;br /&gt;
                      State : clean&lt;br /&gt;
         Active Devices : 2&lt;br /&gt;
        Working Devices : 3&lt;br /&gt;
         Failed Devices : 0&lt;br /&gt;
          Spare Devices : 1&lt;br /&gt;
txnintn&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23696</id>
		<title>User:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23696"/>
		<updated>2023-07-01T19:17:32Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title:  Alpine Linux install: LVM over Raid1 with a Micro SD spare.&lt;br /&gt;
&lt;br /&gt;
Alpine Linux setup-alpine scripts when executed with two disks and the install medium, if both disks are selected, i.e., sda and sdb, the script will automatically configure a RAID1 installation. /https://wiki.alpinelinux.org/wiki/Setting_up_the_build_environment_on_HDD#Basic_setup&lt;br /&gt;
&lt;br /&gt;
Additionally, LVM with a &#039;sys&#039; install can be selected during the setup-alpine script.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from either a USB or a Micro SD port. By having a Micro SD RAID1 spare, if the primary USB drive fails the Micro SD should be able to boot the system.  LVM requires the Micro SD spare partition to be the same size as USB RAID1 partitions.  A larger capacity Micro SD drive 2nd partition can easily resized to match the USB partition.  During the install the setup-alpine script will maximize the size of 2nd partition on RAID1 drives.&lt;br /&gt;
&lt;br /&gt;
Tech Tip, not all Micro SD and USB drives are the same size.&lt;br /&gt;
&lt;br /&gt;
16GB&lt;br /&gt;
SanDisk Industrial Micro SD			14.84GB&lt;br /&gt;
SanDisk Ultra Ultra Fit USB 3.1		14.34GB&lt;br /&gt;
SanDisk Ultra USB 3.0			14.91GB&lt;br /&gt;
SanDisk Cruzer Glide USB 2.0		14.91GB&lt;br /&gt;
&lt;br /&gt;
32GB&lt;br /&gt;
Samsung SD Pro Endurance Micro SD	29.81GB&lt;br /&gt;
SanDisk Ultra SD					29.72GB&lt;br /&gt;
SanDisk Ultra Fit USB 3.1 Gen1		28.67GB&lt;br /&gt;
Silicon Power 5 USB 3.2				28.85GB&lt;br /&gt;
SanDisk Ultra 3.0 OTG				28.85GB&lt;br /&gt;
&lt;br /&gt;
64GB&lt;br /&gt;
Samsung EVO Select Micro SD			59.69GB&lt;br /&gt;
Samsung Fit USB 3.1					59.75GB&lt;br /&gt;
&lt;br /&gt;
Requirements:&lt;br /&gt;
Raspberry PI 4&lt;br /&gt;
Two Identical USB Drives - fit style drives recommended based on physical clearance issues.&lt;br /&gt;
One Micro SD Drive with the same or larger capacity then the USB drives &lt;br /&gt;
One USB drive for the installation files.&lt;br /&gt;
&lt;br /&gt;
Preparation&lt;br /&gt;
Created the following on the USB RAID disks:&lt;br /&gt;
sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 using the rest of the disk with a fd linux raid partition, formatted ext4&lt;br /&gt;
&lt;br /&gt;
mmcblkx, sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 sized to match USB RAID partition, Linux 83 and formatted Ext4.  Do not use Linux Raid.&lt;br /&gt;
&lt;br /&gt;
The USB installation drive single partition fat 32 0c with boot and LBA flags.&lt;br /&gt;
Extract the contents of alpine-rpi-3.x.x-aarch.tar.gz to sdc1 (spare USB) partition.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi eprom must be set to boot USB port first and SD port second.&lt;br /&gt;
&lt;br /&gt;
Installation&lt;br /&gt;
&lt;br /&gt;
Insert the &amp;quot;sda&amp;quot; USB disk into the bottom USB 3.0 port and the &amp;quot;sdb&amp;quot; USB drive into the upper USB 3.0 port.  Power up the system, after the system has failed to boot to the installed USB drives, the screen will change from white and red to black and white text, insert the installation USB (sdc) to start the install process. This will set the drive assignments properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After logging in as root.&lt;br /&gt;
To start the install, &lt;br /&gt;
TYPE:  setup-alpine and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Select keyboard layout: [none], prompt.&lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
At, Select variant (or &#039;abort&#039;):, prompt. &lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter system hostname (fully qualified form, e.g. &#039;foo.example.org&#039;) [localhost] prompt.&lt;br /&gt;
TYPE:  the localhost name, for example, rpi44gb and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [eth0], prompt. &lt;br /&gt;
PRESS: enter, to use the default, ethernet0 connection.&lt;br /&gt;
&lt;br /&gt;
Ip address for eth0? (or &#039;dhcp&#039;, &#039;none&#039;, &#039;?&#039;) [dhcp], prompt. &lt;br /&gt;
PRESS:  enter to use the default, dhcp.&lt;br /&gt;
&lt;br /&gt;
At the second,  Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [wlan0], prompt.&lt;br /&gt;
TYPE: done and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
Then at, Do you want to do and manual network configuration? (y/n) [n], prompt.&lt;br /&gt;
PRESS enter for the default, [n], for no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Change password for root, prompt.&lt;br /&gt;
TYPE: the root password, and PRESS:  enter.&lt;br /&gt;
At, Retype password, prompt.&lt;br /&gt;
TYPE: the root password and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which timezone are you in? (&#039;?&#039; for a list) [UTC]. prompt.&lt;br /&gt;
TYPE:  America, with a capital A, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, What sub-timezone of &#039;America&#039; are you in? (&#039;?&#039; for list), prompt.&lt;br /&gt;
TYPE:  Chicago, with a capital C, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, HTTP/FTP proxy URL? (e.g. /http://proxy:8000&#039;, or &#039;none&#039;) [none], prompt.&lt;br /&gt;
PRESS:  enter for the default, none.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which NTP Client to run? (&#039;busybox&#039;, &#039;openntpd&#039;, &#039;chrony&#039; or &#039;none&#039;) [chrony], prompt.&lt;br /&gt;
PRESS:  enter for the default, chrony.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the list of mirrors stop and at --More--, prompt&lt;br /&gt;
PRESS: the letter &amp;quot;r&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
r) Add random from the above list&lt;br /&gt;
f) Detect and add the fastest mirror from above list&lt;br /&gt;
e) Edit /etc/apk/repositories with text editor&lt;br /&gt;
&lt;br /&gt;
At, Enter mirror number (1-72) or URL to add (or r/f/e/done) [1], prompt.&lt;br /&gt;
PRESS:  enter for the default number 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Setup a user? (enter a lower-case loginname, or &#039;no&#039;) [no], prompt.&lt;br /&gt;
PRESS: enter for the default no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, which ssh server? (&#039;openssh&#039;, &#039;dropbear&#039; or &#039;none&#039;), prompt.&lt;br /&gt;
TYPE: none and PRESS:  enter to continue.&lt;br /&gt;
&lt;br /&gt;
At, Available disks are:&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
        &lt;br /&gt;
At Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) [none], prompt.&lt;br /&gt;
TYPE: sda sdb and PRESS:  enter to continue.&lt;br /&gt;
&lt;br /&gt;
The following disks are selected:&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, &#039;crypt&#039;, &#039;lvm&#039; or &#039;?&#039; for help) [?], prompt.&lt;br /&gt;
TYPE:  lvm and PRESS: enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following disks are selected (with LVM):&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, or &#039;?&#039; for help) [?], prompt.&lt;br /&gt;
TYPE:  sys for system disk and PRESS enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, WARNING: Erase the above disk(s) and continue? (y/n) [n], prompt.&lt;br /&gt;
        sda (15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb (15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
TYPE: y, for yes AMD PRESS: enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Partition #1 contains a vfat signature.&lt;br /&gt;
Partition #2 contains a ext4 signature.&lt;br /&gt;
Partition #1 contains a vfat signature.&lt;br /&gt;
Partition #2 contains a ext4 signature.&lt;br /&gt;
Creating file systems&lt;br /&gt;
mkfs.fat 4.2 ((2021-01-31)&lt;br /&gt;
        Physical volume &amp;quot;/dev/md1&amp;quot; successfully created.&lt;br /&gt;
        Logical volume &amp;quot;lv_root&amp;quot; created.&lt;br /&gt;
* service lvm added to runlevel boot&lt;br /&gt;
Installing system on /dev/vg0/lv_root&amp;quot;&lt;br /&gt;
100% ######################################&lt;br /&gt;
=&amp;gt; initframfs: creating /boot/initramfs-rpi4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Installation is complete.  Please reboot.  DO NOT REBOOT!!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alpine installed the boot drive as a FD linux raid autodetect, IT WILL NOT BOOT on a Raspberry Pi. &lt;br /&gt;
The Raspberry Pi can only boot from fat16 or fat32 partition with boot and lba flags enabled. &lt;br /&gt;
&lt;br /&gt;
TYPE:  watch  cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Personalities : [raid1]&lt;br /&gt;
md1 : active raid1 sdb2[1] sda2[0]&lt;br /&gt;
          14723072 blocks super 1.2 [2/2] [UU]&lt;br /&gt;
          {&amp;gt;....................] resyc - 2.7% (397521/14723072) finish=22.1min speed=8768K/sec&lt;br /&gt;
md0 : active raid1 sdb1[1] sda1[0]&lt;br /&gt;
          307136 blocks [2/2] [UU] &lt;br /&gt;
&lt;br /&gt;
The Raid MD1 is still resycing. Take a break, the drives should be finished in 20 to 30 minutes.&lt;br /&gt;
&lt;br /&gt;
PRESS: ctrl + c to exit watch cat /proc/mtstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Backup the boot raid partition first&lt;br /&gt;
Insert mmcblk0&lt;br /&gt;
TYPE:  dd if=/dev/sda1 of=/dev/mmcblk0p1 bs=512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unmount the RAID 1 filesystem&lt;br /&gt;
TYPE:  umount /dev/md0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Stop the madam raid device&lt;br /&gt;
TYPE:  mdadm --stop /dev/md0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remove the Superblocks&lt;br /&gt;
TYPE:  mdadm --zero-superblock /dev/sda1 /dev/sdb1 /dev/mmcblk0p1 (due to dd backup copying)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
verify md0 has been removed&lt;br /&gt;
TYPE:  lsblk and or cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TYPE:  apk add nano or use vi to remove RAID /dev/md0 entries by editing /etc/fstab and /etc/mdadm.conf &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy mmcblk0p1 boot partition to sda1 and sdb1&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sda1 bs=512&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sdb1 bs=512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add mmcblk0 as a spare drive to RAID /dev/md1 &lt;br /&gt;
TYPE:  madam --add /dev/md1 /dev/mmcblk0p2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TYPE: mdadm --detail /dev/md1&lt;br /&gt;
/dev/md1&lt;br /&gt;
                        version : 1.2&lt;br /&gt;
          Creation Time        : Sat Jun 24 12:50:56 2023&lt;br /&gt;
             Raid Level : raid 1&lt;br /&gt;
             Array Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
          Used Dev Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
           Raid Devices : 2&lt;br /&gt;
          Total Devices : 3&lt;br /&gt;
            Persistence : Superblock is persistence&lt;br /&gt;
            &lt;br /&gt;
            Update Time : Sat Jun 24 14:30:11 2023&lt;br /&gt;
                      State : clean&lt;br /&gt;
         Active Devices : 2&lt;br /&gt;
        Working Devices : 3&lt;br /&gt;
         Failed Devices : 0&lt;br /&gt;
          Spare Devices : 1&lt;br /&gt;
txnintn&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23695</id>
		<title>User:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23695"/>
		<updated>2023-07-01T19:15:18Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title:  Alpine Linux install: LVM over Raid1 with a Micro SD spare.&lt;br /&gt;
&lt;br /&gt;
Alpine Linux setup-alpine scripts when executed with two disks and the install medium, if both disks are selected, i.e., sda and sdb, the script will automatically configure a RAID1 installation.&lt;br /&gt;
&lt;br /&gt;
Additionally, LVM with a &#039;sys&#039; install can be selected during the setup-alpine script.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from either a USB or a Micro SD port. By having a Micro SD RAID1 spare, if the primary USB drive fails the Micro SD should be able to boot the system.  LVM requires the Micro SD spare partition to be the same size as USB RAID1 partitions.  A larger capacity Micro SD drive 2nd partition can easily resized to match the USB partition.  During the install the setup-alpine script will maximize the size of 2nd partition on RAID1 drives.&lt;br /&gt;
&lt;br /&gt;
Tech Tip, not all Micro SD and USB drives are the same size.&lt;br /&gt;
&lt;br /&gt;
16GB&lt;br /&gt;
SanDisk Industrial Micro SD			14.84GB&lt;br /&gt;
SanDisk Ultra Ultra Fit USB 3.1		14.34GB&lt;br /&gt;
SanDisk Ultra USB 3.0			14.91GB&lt;br /&gt;
SanDisk Cruzer Glide USB 2.0		14.91GB&lt;br /&gt;
&lt;br /&gt;
32GB&lt;br /&gt;
Samsung SD Pro Endurance Micro SD	29.81GB&lt;br /&gt;
SanDisk Ultra SD					29.72GB&lt;br /&gt;
SanDisk Ultra Fit USB 3.1 Gen1		28.67GB&lt;br /&gt;
Silicon Power 5 USB 3.2				28.85GB&lt;br /&gt;
SanDisk Ultra 3.0 OTG				28.85GB&lt;br /&gt;
&lt;br /&gt;
64GB&lt;br /&gt;
Samsung EVO Select Micro SD			59.69GB&lt;br /&gt;
Samsung Fit USB 3.1					59.75GB&lt;br /&gt;
&lt;br /&gt;
Requirements:&lt;br /&gt;
Raspberry PI 4&lt;br /&gt;
Two Identical USB Drives - fit style drives recommended based on physical clearance issues.&lt;br /&gt;
One Micro SD Drive with the same or larger capacity then the USB drives &lt;br /&gt;
One USB drive for the installation files.&lt;br /&gt;
&lt;br /&gt;
Preparation&lt;br /&gt;
Created the following on the USB RAID disks:&lt;br /&gt;
sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 using the rest of the disk with a fd linux raid partition, formatted ext4&lt;br /&gt;
&lt;br /&gt;
mmcblkx, sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 sized to match USB RAID partition, Linux 83 and formatted Ext4.  Do not use Linux Raid.&lt;br /&gt;
&lt;br /&gt;
The USB installation drive single partition fat 32 0c with boot and LBA flags.&lt;br /&gt;
Extract the contents of alpine-rpi-3.x.x-aarch.tar.gz to sdc1 (spare USB) partition.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi eprom must be set to boot USB port first and SD port second.&lt;br /&gt;
&lt;br /&gt;
Installation&lt;br /&gt;
&lt;br /&gt;
Insert the &amp;quot;sda&amp;quot; USB disk into the bottom USB 3.0 port and the &amp;quot;sdb&amp;quot; USB drive into the upper USB 3.0 port.  Power up the system, after the system has failed to boot to the installed USB drives, the screen will change from white and red to black and white text, insert the installation USB (sdc) to start the install process. This will set the drive assignments properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After logging in as root.&lt;br /&gt;
To start the install, &lt;br /&gt;
TYPE:  setup-alpine and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Select keyboard layout: [none], prompt.&lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
At, Select variant (or &#039;abort&#039;):, prompt. &lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter system hostname (fully qualified form, e.g. &#039;foo.example.org&#039;) [localhost] prompt.&lt;br /&gt;
TYPE:  the localhost name, for example, rpi44gb and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [eth0], prompt. &lt;br /&gt;
PRESS: enter, to use the default, ethernet0 connection.&lt;br /&gt;
&lt;br /&gt;
Ip address for eth0? (or &#039;dhcp&#039;, &#039;none&#039;, &#039;?&#039;) [dhcp], prompt. &lt;br /&gt;
PRESS:  enter to use the default, dhcp.&lt;br /&gt;
&lt;br /&gt;
At the second,  Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [wlan0], prompt.&lt;br /&gt;
TYPE: done and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
Then at, Do you want to do and manual network configuration? (y/n) [n], prompt.&lt;br /&gt;
PRESS enter for the default, [n], for no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Change password for root, prompt.&lt;br /&gt;
TYPE: the root password, and PRESS:  enter.&lt;br /&gt;
At, Retype password, prompt.&lt;br /&gt;
TYPE: the root password and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which timezone are you in? (&#039;?&#039; for a list) [UTC]. prompt.&lt;br /&gt;
TYPE:  America, with a capital A, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, What sub-timezone of &#039;America&#039; are you in? (&#039;?&#039; for list), prompt.&lt;br /&gt;
TYPE:  Chicago, with a capital C, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, HTTP/FTP proxy URL? (e.g. /http://proxy:8000&#039;, or &#039;none&#039;) [none], prompt.&lt;br /&gt;
PRESS:  enter for the default, none.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which NTP Client to run? (&#039;busybox&#039;, &#039;openntpd&#039;, &#039;chrony&#039; or &#039;none&#039;) [chrony], prompt.&lt;br /&gt;
PRESS:  enter for the default, chrony.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the list of mirrors stop and at --More--, prompt&lt;br /&gt;
PRESS: the letter &amp;quot;r&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
r) Add random from the above list&lt;br /&gt;
f) Detect and add the fastest mirror from above list&lt;br /&gt;
e) Edit /etc/apk/repositories with text editor&lt;br /&gt;
&lt;br /&gt;
At, Enter mirror number (1-72) or URL to add (or r/f/e/done) [1], prompt.&lt;br /&gt;
PRESS:  enter for the default number 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Setup a user? (enter a lower-case loginname, or &#039;no&#039;) [no], prompt.&lt;br /&gt;
PRESS: enter for the default no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, which ssh server? (&#039;openssh&#039;, &#039;dropbear&#039; or &#039;none&#039;), prompt.&lt;br /&gt;
TYPE: none and PRESS:  enter to continue.&lt;br /&gt;
&lt;br /&gt;
At, Available disks are:&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
        &lt;br /&gt;
At Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) [none], prompt.&lt;br /&gt;
TYPE: sda sdb and PRESS:  enter to continue.&lt;br /&gt;
&lt;br /&gt;
The following disks are selected:&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, &#039;crypt&#039;, &#039;lvm&#039; or &#039;?&#039; for help) [?], prompt.&lt;br /&gt;
TYPE:  lvm and PRESS: enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following disks are selected (with LVM):&lt;br /&gt;
        sda	(15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb	(15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, or &#039;?&#039; for help) [?], prompt.&lt;br /&gt;
TYPE:  sys for system disk and PRESS enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, WARNING: Erase the above disk(s) and continue? (y/n) [n], prompt.&lt;br /&gt;
        sda (15.4 GB USB	SanDisk 3.2Gen1)                &lt;br /&gt;
        sdb (15.4 GB USB	SanDisk 3.2Gen1)&lt;br /&gt;
TYPE: y, for yes AMD PRESS: enter to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Partition #1 contains a vfat signature.&lt;br /&gt;
Partition #2 contains a ext4 signature.&lt;br /&gt;
Partition #1 contains a vfat signature.&lt;br /&gt;
Partition #2 contains a ext4 signature.&lt;br /&gt;
Creating file systems&lt;br /&gt;
mkfs.fat 4.2 ((2021-01-31)&lt;br /&gt;
        Physical volume &amp;quot;/dev/md1&amp;quot; successfully created.&lt;br /&gt;
        Logical volume &amp;quot;lv_root&amp;quot; created.&lt;br /&gt;
* service lvm added to runlevel boot&lt;br /&gt;
Installing system on /dev/vg0/lv_root&amp;quot;&lt;br /&gt;
100% ######################################&lt;br /&gt;
=&amp;gt; initframfs: creating /boot/initramfs-rpi4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Installation is complete.  Please reboot.  DO NOT REBOOT!!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alpine installed the boot drive as a FD linux raid autodetect, IT WILL NOT BOOT on a Raspberry Pi. &lt;br /&gt;
The Raspberry Pi can only boot from fat16 or fat32 partition with boot and lba flags enabled. &lt;br /&gt;
&lt;br /&gt;
TYPE:  watch  cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Personalities : [raid1]&lt;br /&gt;
md1 : active raid1 sdb2[1] sda2[0]&lt;br /&gt;
          14723072 blocks super 1.2 [2/2] [UU]&lt;br /&gt;
          {&amp;gt;....................] resyc - 2.7% (397521/14723072) finish=22.1min speed=8768K/sec&lt;br /&gt;
md0 : active raid1 sdb1[1] sda1[0]&lt;br /&gt;
          307136 blocks [2/2] [UU] &lt;br /&gt;
&lt;br /&gt;
The Raid MD1 is still resycing. Take a break, the drives should be finished in 20 to 30 minutes.&lt;br /&gt;
&lt;br /&gt;
PRESS: ctrl + c to exit watch cat /proc/mtstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Backup the boot raid partition first&lt;br /&gt;
Insert mmcblk0&lt;br /&gt;
TYPE:  dd if=/dev/sda1 of=/dev/mmcblk0p1 bs=512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unmount the RAID 1 filesystem&lt;br /&gt;
TYPE:  umount /dev/md0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Stop the madam raid device&lt;br /&gt;
TYPE:  mdadm --stop /dev/md0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remove the Superblocks&lt;br /&gt;
TYPE:  mdadm --zero-superblock /dev/sda1 /dev/sdb1 /dev/mmcblk0p1 (due to dd backup copying)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
verify md0 has been removed&lt;br /&gt;
TYPE:  lsblk and or cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TYPE:  apk add nano or use vi to remove RAID /dev/md0 entries by editing /etc/fstab and /etc/mdadm.conf &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy mmcblk0p1 boot partition to sda1 and sdb1&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sda1 bs=512&lt;br /&gt;
TYPE:  dd if=/dev/mmcblk0p1 of=/dev/sdb1 bs=512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add mmcblk0 as a spare drive to RAID /dev/md1 &lt;br /&gt;
TYPE:  madam --add /dev/md1 /dev/mmcblk0p2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TYPE: mdadm --detail /dev/md1&lt;br /&gt;
/dev/md1&lt;br /&gt;
                        version : 1.2&lt;br /&gt;
          Creation Time        : Sat Jun 24 12:50:56 2023&lt;br /&gt;
             Raid Level : raid 1&lt;br /&gt;
             Array Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
          Used Dev Size : 14723072 (14.04 GiB 15.08 GB)&lt;br /&gt;
           Raid Devices : 2&lt;br /&gt;
          Total Devices : 3&lt;br /&gt;
            Persistence : Superblock is persistence&lt;br /&gt;
            &lt;br /&gt;
            Update Time : Sat Jun 24 14:30:11 2023&lt;br /&gt;
                      State : clean&lt;br /&gt;
         Active Devices : 2&lt;br /&gt;
        Working Devices : 3&lt;br /&gt;
         Failed Devices : 0&lt;br /&gt;
          Spare Devices : 1&lt;br /&gt;
txnintn&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23694</id>
		<title>User:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23694"/>
		<updated>2023-07-01T19:14:17Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title:  Alpine Linux install: LVM over Raid1 with a Micro SD spare.&lt;br /&gt;
&lt;br /&gt;
Alpine Linux setup-alpine scripts when executed with two disks and the install medium, if both disks are selected, i.e., sda and sdb, the script will automatically configure a RAID1 installation.&lt;br /&gt;
&lt;br /&gt;
Additionally, LVM with a &#039;sys&#039; install can be selected during the setup-alpine script.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from either a USB or a Micro SD port. By having a Micro SD RAID1 spare, if the primary USB drive fails the Micro SD should be able to boot the system.  LVM requires the Micro SD spare partition to be the same size as USB RAID1 partitions.  A larger capacity Micro SD drive 2nd partition can easily resized to match the USB partition.  During the install the setup-alpine script will maximize the size of 2nd partition on RAID1 drives.&lt;br /&gt;
&lt;br /&gt;
Tech Tip, not all Micro SD and USB drives are the same size.&lt;br /&gt;
&lt;br /&gt;
16GB&lt;br /&gt;
SanDisk Industrial Micro SD			14.84GB&lt;br /&gt;
SanDisk Ultra Ultra Fit USB 3.1		14.34GB&lt;br /&gt;
SanDisk Ultra USB 3.0			14.91GB&lt;br /&gt;
SanDisk Cruzer Glide USB 2.0		14.91GB&lt;br /&gt;
&lt;br /&gt;
32GB&lt;br /&gt;
Samsung SD Pro Endurance Micro SD	29.81GB&lt;br /&gt;
SanDisk Ultra SD					29.72GB&lt;br /&gt;
SanDisk Ultra Fit USB 3.1 Gen1		28.67GB&lt;br /&gt;
Silicon Power 5 USB 3.2				28.85GB&lt;br /&gt;
SanDisk Ultra 3.0 OTG				28.85GB&lt;br /&gt;
&lt;br /&gt;
64GB&lt;br /&gt;
Samsung EVO Select Micro SD			59.69GB&lt;br /&gt;
Samsung Fit USB 3.1					59.75GB&lt;br /&gt;
&lt;br /&gt;
Requirements:&lt;br /&gt;
Raspberry PI 4&lt;br /&gt;
Two Identical USB Drives - fit style drives recommended based on physical clearance issues.&lt;br /&gt;
One Micro SD Drive with the same or larger capacity then the USB drives &lt;br /&gt;
One USB drive for the installation files.&lt;br /&gt;
&lt;br /&gt;
Preparation&lt;br /&gt;
Created the following on the USB RAID disks:&lt;br /&gt;
sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 using the rest of the disk with a fd linux raid partition, formatted ext4&lt;br /&gt;
&lt;br /&gt;
mmcblkx, sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 sized to match USB RAID partition, Linux 83 and formatted Ext4.  Do not use Linux Raid.&lt;br /&gt;
&lt;br /&gt;
The USB installation drive single partition fat 32 0c with boot and LBA flags.&lt;br /&gt;
Extract the contents of alpine-rpi-3.x.x-aarch.tar.gz to sdc1 (spare USB) partition.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi eprom must be set to boot USB port first and SD port second.&lt;br /&gt;
&lt;br /&gt;
Installation&lt;br /&gt;
&lt;br /&gt;
Insert the &amp;quot;sda&amp;quot; USB disk into the bottom USB 3.0 port and the &amp;quot;sdb&amp;quot; USB drive into the upper USB 3.0 port.  Power up the system, after the system has failed to boot to the installed USB drives, the screen will change from white and red to black and white text, insert the installation USB (sdc) to start the install process. This will set the drive assignments properly.&lt;br /&gt;
&lt;br /&gt;
After logging in as root.&lt;br /&gt;
To start the install, &lt;br /&gt;
TYPE:  setup-alpine and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Select keyboard layout: [none], prompt.&lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
At, Select variant (or &#039;abort&#039;):, prompt. &lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter system hostname (fully qualified form, e.g. &#039;foo.example.org&#039;) [localhost] prompt.&lt;br /&gt;
TYPE:  the localhost name, for example, rpi44gb and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [eth0], prompt. &lt;br /&gt;
PRESS: enter, to use the default, ethernet0 connection.&lt;br /&gt;
&lt;br /&gt;
Ip address for eth0? (or &#039;dhcp&#039;, &#039;none&#039;, &#039;?&#039;) [dhcp], prompt. &lt;br /&gt;
PRESS:  enter to use the default, dhcp.&lt;br /&gt;
&lt;br /&gt;
At the second,  Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [wlan0], prompt.&lt;br /&gt;
TYPE: done and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
Then at, Do you want to do and manual network configuration? (y/n) [n], prompt.&lt;br /&gt;
PRESS enter for the default, [n], for no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Change password for root, prompt.&lt;br /&gt;
TYPE: the root password, and PRESS:  enter.&lt;br /&gt;
At, Retype password, prompt.&lt;br /&gt;
TYPE: the root password and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which timezone are you in? (&#039;?&#039; for a list) [UTC]. prompt.&lt;br /&gt;
TYPE:  America, with a capital A, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, What sub-timezone of &#039;America&#039; are you in? (&#039;?&#039; for list), prompt.&lt;br /&gt;
TYPE:  Chicago, with a capital C, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, HTTP/FTP proxy URL? (e.g. /http://proxy:8000&#039;, or &#039;none&#039;) [none], prompt.&lt;br /&gt;
PRESS:  enter for the default, none.&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23693</id>
		<title>User:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23693"/>
		<updated>2023-07-01T19:13:36Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title:  Alpine Linux install: LVM over Raid1 with a Micro SD spare.&lt;br /&gt;
&lt;br /&gt;
Alpine Linux setup-alpine scripts when executed with two disks and the install medium, if both disks are selected, i.e., sda and sdb, the script will automatically configure a RAID1 installation.&lt;br /&gt;
&lt;br /&gt;
Additionally, LVM with a &#039;sys&#039; install can be selected during the setup-alpine script.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from either a USB or a Micro SD port. By having a Micro SD RAID1 spare, if the primary USB drive fails the Micro SD should be able to boot the system.  LVM requires the Micro SD spare partition to be the same size as USB RAID1 partitions.  A larger capacity Micro SD drive 2nd partition can easily resized to match the USB partition.  During the install the setup-alpine script will maximize the size of 2nd partition on RAID1 drives.&lt;br /&gt;
&lt;br /&gt;
Tech Tip, not all Micro SD and USB drives are the same size.&lt;br /&gt;
&lt;br /&gt;
16GB&lt;br /&gt;
SanDisk Industrial Micro SD			14.84GB&lt;br /&gt;
SanDisk Ultra Ultra Fit USB 3.1		14.34GB&lt;br /&gt;
SanDisk Ultra USB 3.0			14.91GB&lt;br /&gt;
SanDisk Cruzer Glide USB 2.0		14.91GB&lt;br /&gt;
&lt;br /&gt;
32GB&lt;br /&gt;
Samsung SD Pro Endurance Micro SD	29.81GB&lt;br /&gt;
SanDisk Ultra SD					29.72GB&lt;br /&gt;
SanDisk Ultra Fit USB 3.1 Gen1		28.67GB&lt;br /&gt;
Silicon Power 5 USB 3.2				28.85GB&lt;br /&gt;
SanDisk Ultra 3.0 OTG				28.85GB&lt;br /&gt;
&lt;br /&gt;
64GB&lt;br /&gt;
Samsung EVO Select Micro SD			59.69GB&lt;br /&gt;
Samsung Fit USB 3.1					59.75GB&lt;br /&gt;
&lt;br /&gt;
Requirements:&lt;br /&gt;
Raspberry PI 4&lt;br /&gt;
Two Identical USB Drives - fit style drives recommended based on physical clearance issues.&lt;br /&gt;
One Micro SD Drive with the same or larger capacity then the USB drives &lt;br /&gt;
One USB drive for the installation files.&lt;br /&gt;
&lt;br /&gt;
Preparation&lt;br /&gt;
Created the following on the USB RAID disks:&lt;br /&gt;
sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 using the rest of the disk with a fd linux raid partition, formatted ext4&lt;br /&gt;
&lt;br /&gt;
mmcblkx, sdx1 a 300MB Fat32 Oc Partition, with boot and lba flags as required by Raspberry PI. &lt;br /&gt;
sdx2 sized to match USB RAID partition, Linux 83 and formatted Ext4.  Do not use Linux Raid.&lt;br /&gt;
&lt;br /&gt;
The USB installation drive single partition fat 32 0c with boot and LBA flags.&lt;br /&gt;
Extract the contents of alpine-rpi-3.x.x-aarch.tar.gz to sdc1 (spare USB) partition.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi eprom must be set to boot USB port first and SD port second.&lt;br /&gt;
&lt;br /&gt;
Installation&lt;br /&gt;
&lt;br /&gt;
Insert the &amp;quot;sda&amp;quot; USB disk into the bottom USB 3.0 port and the &amp;quot;sdb&amp;quot; USB drive into the upper USB 3.0 port.  Power up the system, after the system has failed to boot to the installed USB drives, the screen will change from white and red to black and white text, insert the installation USB (sdc) to start the install process. This will set the drive assignments properly.&lt;br /&gt;
&lt;br /&gt;
After logging in as root.&lt;br /&gt;
To start the install, &lt;br /&gt;
TYPE:  setup-alpine and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Select keyboard layout: [none], prompt.&lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
At, Select variant (or &#039;abort&#039;):, prompt. &lt;br /&gt;
TYPE:  us and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter system hostname (fully qualified form, e.g. &#039;foo.example.org&#039;) [localhost] prompt.&lt;br /&gt;
TYPE:  the localhost name, for example, rpi44gb and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [eth0], prompt. &lt;br /&gt;
PRESS: enter, to use the default, ethernet0 connection.&lt;br /&gt;
&lt;br /&gt;
Ip address for eth0? (or &#039;dhcp&#039;, &#039;none&#039;, &#039;?&#039;) [dhcp], prompt. &lt;br /&gt;
PRESS:  enter to use the default, dhcp.&lt;br /&gt;
&lt;br /&gt;
At the second,  Enter &#039;?&#039; for help on bridges, bonding and vlans.&lt;br /&gt;
Which one do you want to initialize? (or &#039;?&#039; or &#039;done&#039; [wlan0], prompt.&lt;br /&gt;
TYPE: done and PRESS: enter.&lt;br /&gt;
&lt;br /&gt;
Then at, Do you want to do and manual network configuration? (y/n) [n], prompt.&lt;br /&gt;
PRESS enter for the default, [n], for no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Change password for root, prompt.&lt;br /&gt;
TYPE: the root password, and PRESS:  enter.&lt;br /&gt;
At, Retype password, prompt.&lt;br /&gt;
TYPE: the root password and PRESS:  enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At, Which timezone are you in? (&#039;?&#039; for a list) [UTC]. prompt.&lt;br /&gt;
TYPE:  America, with a capital A, and press enter.&lt;br /&gt;
&lt;br /&gt;
At, What sub-timezone of &#039;America&#039; are you in? (&#039;?&#039; for list), prompt.&lt;br /&gt;
TYPE:  Chicago, with a capital C, and press enter.&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23692</id>
		<title>User:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23692"/>
		<updated>2023-07-01T19:13:14Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title:  Alpine Linux install: LVM over Raid1 with a Micro SD spare.&lt;br /&gt;
&lt;br /&gt;
Alpine Linux setup-alpine scripts when executed with two disks and the install medium, if both disks are selected, i.e., sda and sdb, the script will automatically configure a RAID1 installation.&lt;br /&gt;
&lt;br /&gt;
Additionally, LVM with a &#039;sys&#039; install can be selected during the setup-alpine script.&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi requires fat 16 / 32 boot partition with boot and LBA flags enabled.  The Raspberry PI will boot from either a USB or a Micro SD port. By having a Micro SD RAID1 spare, if the primary USB drive fails the Micro SD should be able to boot the system.  LVM requires the Micro SD spare partition to be the same size as USB RAID1 partitions.  A larger capacity Micro SD drive 2nd partition can easily resized to match the USB partition.  During the install the setup-alpine script will maximize the size of 2nd partition on RAID1 drives.&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23691</id>
		<title>User:Txnintn</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Txnintn&amp;diff=23691"/>
		<updated>2023-07-01T19:11:50Z</updated>

		<summary type="html">&lt;p&gt;Txnintn: Title:  Alpine Linux install: LVM over Raid1 with a Micro SD spare.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title:  Alpine Linux install: LVM over Raid1 with a Micro SD spare.&lt;br /&gt;
&lt;br /&gt;
Alpine Linux setup-alpine scripts when executed with two disks and the install medium, if both disks are selected, i.e., sda and sdb, the script will automatically configure a RAID1 installation.&lt;/div&gt;</summary>
		<author><name>Txnintn</name></author>
	</entry>
</feed>