User talk:Txnintn: Difference between revisions

From Alpine Linux
mNo edit summary
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Title<br>


Install Alpine Linux on a Raspberry PI 4 in Diskless Mode.<br>
== How to do a manual LVM install on a Raspberry Pi 4. ==


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

Latest revision as of 16:26, 12 August 2023

How to do a manual LVM install on a Raspberry Pi 4.

Insert USB Alpine Linux setup disk into usb2.0 port.
Power on the Raspberry Pi
At the rainbow splash screen, plug in your SDA drive.
Type root at the prompt and press enter.

  1. source title

Setting up Logical Volumes with LVM

Type modprobe dm-mod
Type echo dm-mod >> /etc/modules-load.d/dm.conf

Type setup-keymap us us and press enter

Type setup-hostname ha-1836 and press enter

Type setup-interfaces and press enter

rc-service networking start

Setup-timezone -z America/Chicago and press enter

rc-update add networking boot

rc-update add seedrng boot

rc-update add acpid default

vi /etc/hosts

setup-ntp

setup-apkrepos

apk update

setup-sshd

apk add lvm2 e2fsprogs lsblk

rc-update add lvm

pvcreate /dev/sda2

vgcreate vg0 /dev/sda2

lvcreate -n lv_root -L 8G vg0

rc-update add lvm boot

mkfs.ext4 /dev/vg0/lv_root

initialize volume group
vgchange -ay

mount -t ext4 /dev/vg0/root /mnt/
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
setup-disk -m sys /mount
reboot and remove setup usb drive.