Add wip arch-prtable
This commit is contained in:
parent
a9682980d3
commit
8364becef3
9 changed files with 82 additions and 12 deletions
58
arch-portable/format_disk.sh
Executable file
58
arch-portable/format_disk.sh
Executable 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"
|
Loading…
Add table
Add a link
Reference in a new issue