Add wip arch-prtable

This commit is contained in:
Tobias Reisinger 2023-01-27 17:01:48 +01:00
parent a9682980d3
commit 8364becef3
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
9 changed files with 82 additions and 12 deletions

View file

@ -1,6 +1,6 @@
# Maintainer: Tobias Reisinger <tobias@msrg.cc>
# shellcheck disable=SC2034
pkgname=serguzim-system-portalo
pkgname=serguzim-system-portable
pkgver=1
pkgrel=1
epoch=
@ -10,11 +10,11 @@ url="https://git.serguzim.me/serguzim/system"
license=("unknown")
groups=()
depends=(
"intel-ucode"
#"intel-ucode"
"amdgpu-fan"
"xf86-video-amdgpu"
"vulkan-radeon"
#"amdgpu-fan"
#"xf86-video-amdgpu"
#"vulkan-radeon"
)
source=(
"boot_loader_entries_portable.conf"

View file

@ -1,5 +1,5 @@
LABEL=arch_portable / ext4 rw,relatime 0 1
LABEL=BOOT_PORTABLE /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 2
LABEL=BOOT_PRTBLE /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 2
LABEL=home_portable /home ext4 rw,relatime 0 2

View file

@ -1 +1 @@
portalo
portable

View file

@ -1,5 +1,5 @@
[Match]
Name=enp0s31f6
Type=ether
[Network]
DHCP=yes

58
arch-portable/format_disk.sh Executable file
View file

@ -0,0 +1,58 @@
#!/usr/bin/env bash
device="$1"
echo "Target device is $device"
[ -b "$1" ] || exit
echo "Continue?"
read -r
part_boot="${device}1"
part_root="${device}2"
part_home="${device}3"
sudo umount "$part_home" "$part_boot" "$part_root"
set -e
sudo sfdisk "$device" << EOF
,500M,c
,64G,L
,+,L
EOF
sudo mkfs.vfat -n "BOOT_PRTBLE" "$part_boot"
yes | sudo mkfs.ext4 -L "arch_portable" "$part_root"
yes | sudo mkfs.ext4 -L "home_portable" "$part_home"
mount_root=$(mktemp -d)
mount_boot="$mount_root/boot"
mount_home="$mount_root/home"
sudo mount "$part_root" "$mount_root"
sudo mkdir "$mount_boot"
sudo mkdir "$mount_home"
sudo mount "$part_boot" "$mount_boot"
sudo mount "$part_home" "$mount_home"
sudo pacstrap -Kc "$mount_root" base linux linux-firmware #\
#--asdeps mkinitcpio xdg-desktop-portal-gtk wireplumber pipewire-jack
flags=(--root "$mount_root") #--noconfirm)
pacman -Qq "${flags[@]}" | sudo pacman -S "${flags[@]}" --asdeps -
cd "../arch" || exit
paru -Ui --rebuild "${flags[@]}" \
--overwrite "$mount_root/etc/mkinitcpio.conf" \
--overwrite "$mount_root/etc/pacman.conf" \
--overwrite "$mount_root/etc/xdg/reflector/reflector.conf"
cd "../arch-portable" || exit
paru -Ui --rebuild "${flags[@]}" \
--overwrite "$mount_root/etc/fstab"