Update
This commit is contained in:
parent
6a200991c3
commit
d441feab19
|
@ -1,9 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
edition="$(basename $(pwd))"
|
|
||||||
mkdir -pv ../boot/{fd,iso,qcow2,shell_scripts,txt} 2>/dev/null
|
|
||||||
# mkdir -pv ../make_iso 2>/dev/null
|
|
||||||
mkdir -pv ../sf 2>/dev/null
|
|
||||||
mkdir -pv ../work_${edition} 2>/dev/null
|
|
||||||
|
|
||||||
echo "Ready"
|
|
|
@ -1,15 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
edition="$(basename $(pwd))"
|
|
||||||
sudo rm -rfv ../work_${edition}
|
|
||||||
status="$?"
|
|
||||||
|
|
||||||
mkdir ../work_${edition}
|
|
||||||
|
|
||||||
notify-send -a "$(basename $(pwd)): Reset" -t 10000 "finished" "$(date '+%Y.%m.%d %H:%M:%S')"
|
|
||||||
|
|
||||||
echo "Ready"
|
|
||||||
if [ "$status" == 0 ]; then
|
|
||||||
sleep 5
|
|
||||||
kill $(ps x | grep konsole | grep $0 | awk '{print $1}')
|
|
||||||
fi
|
|
|
@ -1,21 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
edition="$(basename $(pwd))"
|
|
||||||
sudo rm -rfv ../work_${edition}
|
|
||||||
status="$?"
|
|
||||||
rm -v airootfs/opt/extra-drivers/*.pkg.tar.*
|
|
||||||
status=$(( $status + "$?" ))
|
|
||||||
rm -v airootfs/root/packages/*.pkg.tar.*
|
|
||||||
status=$(( $status + "$?" ))
|
|
||||||
rm -v airootfs/usr/share/packages/*.pkg.tar.*
|
|
||||||
status=$(( $status + "$?" ))
|
|
||||||
|
|
||||||
mkdir ../work_${edition}
|
|
||||||
|
|
||||||
notify-send -a "$(basename $(pwd)): Reset" -t 10000 "finished" "$(date '+%Y.%m.%d %H:%M:%S')"
|
|
||||||
|
|
||||||
echo "Ready"
|
|
||||||
if [ "$status" == 0 ]; then
|
|
||||||
sleep 5
|
|
||||||
kill $(ps x | grep konsole | grep $0 | awk '{print $1}')
|
|
||||||
fi
|
|
|
@ -1,15 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
sudo sed -i -e "s/#Server/Server/g" /etc/pacman.d/mirrorlist.pacnew
|
|
||||||
sudo cp /etc/pacman.d/mirrorlist.pacnew /etc/pacman.d/mirrorlist
|
|
||||||
sudo reflector --save /etc/pacman.d/mirrorlist -c "CA,FI,FR,DE,IS,IE,IT,JP,KZ,LV,LU,NZ,NO,PL,PT,RU,SG,ES,SE,CH,TW,TH, " --protocol https --latest 50 --fastest 50 --sort rate
|
|
||||||
|
|
||||||
cp -vf "/etc/pacman.d/mirrorlist" "./airootfs/etc/pacman.d/"
|
|
||||||
|
|
||||||
notify-send -a "$(basename $(pwd)): Prepare" -t 10000 "finished" "$(date '+%Y.%m.%d %H:%M:%S')"
|
|
||||||
|
|
||||||
echo "Ready"
|
|
||||||
if [ "$status" == 0 ]; then
|
|
||||||
sleep 5
|
|
||||||
kill $(ps x | grep konsole | grep $0 | awk '{print $1}')
|
|
||||||
fi
|
|
|
@ -1,49 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
cp -vf "/etc/pacman.d/mirrorlist" "./airootfs/etc/pacman.d/"
|
|
||||||
|
|
||||||
sudo pacman -Sy --config pacman_sys.conf
|
|
||||||
|
|
||||||
sudo pacman -Sw --config pacman_sys.conf --noconfirm --cachedir "./airootfs/opt/extra-drivers" r8168-dkms
|
|
||||||
|
|
||||||
# sudo mv -vf "./airootfs/opt/extra-drivers/linux"* "./airootfs/usr/share/packages/"
|
|
||||||
sudo rm -vf "./airootfs/opt/extra-drivers/linux"*
|
|
||||||
|
|
||||||
packs=(
|
|
||||||
dracut
|
|
||||||
grub-dracut
|
|
||||||
grub
|
|
||||||
systemd-boot-dracut
|
|
||||||
libxvmc
|
|
||||||
linux-api-headers
|
|
||||||
linux-cachyos
|
|
||||||
linux-cachyos-headers
|
|
||||||
linux-cachyos-zfs
|
|
||||||
melawy-dracut-initramfs
|
|
||||||
melawy-dracut-ukify
|
|
||||||
melawy-refind-menu-generator
|
|
||||||
melawy-refind-theme-nier-a2
|
|
||||||
melawy-plymouth-theme-nier-a2
|
|
||||||
os-prober
|
|
||||||
refind
|
|
||||||
update-grub
|
|
||||||
xf86-video-intel
|
|
||||||
)
|
|
||||||
|
|
||||||
for pack in ${packs[@]}
|
|
||||||
do
|
|
||||||
sudo pacman -Sw --config pacman_sys.conf --noconfirm --cachedir "./airootfs/usr/share/packages" $pack
|
|
||||||
done
|
|
||||||
|
|
||||||
sudo paccache -rvk 1 --cachedir "./airootfs/opt/extra-drivers"
|
|
||||||
sudo paccache -rvk 1 --cachedir "./airootfs/usr/share/packages"
|
|
||||||
|
|
||||||
# sudo rm "./airootfs/opt/extra-drivers/linux"*
|
|
||||||
|
|
||||||
notify-send -a "$(basename $(pwd)): Prepare" -t 10000 "finished" "$(date '+%Y.%m.%d %H:%M:%S')"
|
|
||||||
|
|
||||||
echo "Ready"
|
|
||||||
if [ "$status" == 0 ]; then
|
|
||||||
sleep 5
|
|
||||||
kill $(ps x | grep konsole | grep $0 | awk '{print $1}')
|
|
||||||
fi
|
|
|
@ -1,11 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
sudo chown -R 1000:1000 ./airootfs/opt/extra-drivers/
|
|
||||||
sudo chown -R 1000:1000 ./airootfs/usr/share/packages/
|
|
||||||
sudo chown -R 1000:1000 ../boot/iso
|
|
||||||
|
|
||||||
echo "Ready"
|
|
||||||
if [ "$status" == 0 ]; then
|
|
||||||
sleep 5
|
|
||||||
kill $(ps x | grep konsole | grep $0 | awk '{print $1}')
|
|
||||||
fi
|
|
|
@ -1,44 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
edition="$(basename $(pwd))"
|
|
||||||
date_tag=$(date +%Y.%m.%d)
|
|
||||||
std_iso_name="Melawy-Linux-${date_tag}-x86_64"
|
|
||||||
iso_name="${edition}-${date_tag}-x86_64"
|
|
||||||
iso_dir="${edition}-${date_tag}"
|
|
||||||
|
|
||||||
mkdir -p "../sf/${iso_dir}"
|
|
||||||
sudo ./mkarchiso_last_my -v "."
|
|
||||||
|
|
||||||
if [ "$?" -eq 0 ]; then
|
|
||||||
cp -vf "../work_${edition}/iso/arch/pkglist.x86_64.txt" "../sf/${iso_dir}/${iso_name}-pkglist.txt"
|
|
||||||
|
|
||||||
mv "../sf/${iso_dir}/${std_iso_name}.iso" "../sf/${iso_dir}/${iso_name}.iso"
|
|
||||||
|
|
||||||
echo "Sign ../sf/${iso_dir}/${iso_name}.iso.sig ../sf/${iso_dir}/${iso_name}.iso"
|
|
||||||
if [ -f "../sf/${iso_dir}/${iso_name}.iso.sig" ]; then rm "../sf/${iso_dir}/${iso_name}.iso.sig"; fi
|
|
||||||
gpg --detach-sign --local-user BC8B600E8DDA1F4CB77B10D2BA803A261A5EE6B8 --output "../sf/${iso_dir}/${iso_name}.iso.sig" "../sf/${iso_dir}/${iso_name}.iso"
|
|
||||||
|
|
||||||
|
|
||||||
cd "../sf/${iso_dir}"
|
|
||||||
|
|
||||||
echo "md5sum ${iso_name}.iso"
|
|
||||||
md5sum "${iso_name}.iso" > "${iso_name}.iso.md5"
|
|
||||||
|
|
||||||
echo "sha1sum ${iso_name}.iso"
|
|
||||||
sha1sum "${iso_name}.iso" > "${iso_name}.iso.sha1"
|
|
||||||
|
|
||||||
echo "sha256sum ${iso_name}.iso"
|
|
||||||
sha256sum "${iso_name}.iso" > "${iso_name}.iso.sha256"
|
|
||||||
|
|
||||||
cd ".."
|
|
||||||
|
|
||||||
mktorrent --verbose --comment="https://melawy.ru" --announce="udp://fosstorrents.com:6969/announce,udp://tracker.opentrackr.org:1337/announce,udp://opentracker.i2p.rocks:6969/announce,udp://open.demonii.com:1337/announce,udp://tracker.openbittorrent.com:6969/announce,http://tracker.openbittorrent.com:80/announce,udp://open.stealth.si:80/announce,udp://tracker.torrent.eu.org:451/announce,udp://exodus.desync.com:6969/announce,udp://tracker1.bt.moack.co.kr:80/announce,udp://tracker.moeking.me:6969/announce,udp://explodie.org:6969/announce,https://tracker.tamersunion.org:443/announce,udp://uploads.gamecoast.net:6969/announce,udp://tracker.tiny-vps.com:6969/announce,udp://tracker.bittor.pw:1337/announce,udp://retracker01-msk-virt.corbina.net:80/announce,udp://movies.zsw.ca:6969/announce,udp://isk.richardsw.club:6969/announce,https://tracker.renfei.net:443/announce,https://tr.burnabyhighstar.com:443/announce,http://fosstorrents.com:6969/announce" --output="${iso_dir}/${iso_name}.torrent" "${iso_dir}"
|
|
||||||
|
|
||||||
notify-send -a "$(basename $(pwd)): Sign" -t 10000 "finished" "$(date '+%Y.%m.%d %H:%M:%S')"
|
|
||||||
|
|
||||||
echo "Ready"
|
|
||||||
if [ "$status" == 0 ]; then
|
|
||||||
sleep 5
|
|
||||||
kill $(ps x | grep konsole | grep $0 | awk '{print $1}')
|
|
||||||
fi
|
|
||||||
fi
|
|
|
@ -1,43 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
edition="$(basename $(pwd))"
|
|
||||||
date_tag="$(date +%Y.%m.%d)"
|
|
||||||
|
|
||||||
iso_name="${edition}-${date_tag}-x86_64"
|
|
||||||
iso_dir="${edition}-${date_tag}"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cp -vf "../work_${edition}/iso/arch/pkglist.x86_64.txt" "../sf/${iso_dir}/${iso_name}-pkglist.txt"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo "Sign ../sf/${iso_dir}/${iso_name}.iso.sig ../sf/${iso_dir}/${iso_name}.iso"
|
|
||||||
if [ -f "../sf/${iso_dir}/${iso_name}.iso.sig" ]; then rm "../sf/${iso_dir}/${iso_name}.iso.sig"; fi
|
|
||||||
gpg --detach-sign --local-user BC8B600E8DDA1F4CB77B10D2BA803A261A5EE6B8 --output "../sf/${iso_dir}/${iso_name}.iso.sig" "../sf/${iso_dir}/${iso_name}.iso"
|
|
||||||
|
|
||||||
|
|
||||||
cd "../sf/${iso_dir}"
|
|
||||||
|
|
||||||
echo "md5sum ${iso_name}.iso"
|
|
||||||
md5sum "${iso_name}.iso" > "${iso_name}.iso.md5"
|
|
||||||
|
|
||||||
echo "sha1sum ${iso_name}.iso"
|
|
||||||
sha1sum "${iso_name}.iso" > "${iso_name}.iso.sha1"
|
|
||||||
|
|
||||||
echo "sha256sum ${iso_name}.iso"
|
|
||||||
sha256sum "${iso_name}.iso" > "${iso_name}.iso.sha256"
|
|
||||||
|
|
||||||
cd ".."
|
|
||||||
|
|
||||||
mktorrent --verbose --comment="https://melawy.ru" --announce="udp://fosstorrents.com:6969/announce,udp://tracker.opentrackr.org:1337/announce,udp://opentracker.i2p.rocks:6969/announce,udp://open.demonii.com:1337/announce,udp://tracker.openbittorrent.com:6969/announce,http://tracker.openbittorrent.com:80/announce,udp://open.stealth.si:80/announce,udp://tracker.torrent.eu.org:451/announce,udp://exodus.desync.com:6969/announce,udp://tracker1.bt.moack.co.kr:80/announce,udp://tracker.moeking.me:6969/announce,udp://explodie.org:6969/announce,https://tracker.tamersunion.org:443/announce,udp://uploads.gamecoast.net:6969/announce,udp://tracker.tiny-vps.com:6969/announce,udp://tracker.bittor.pw:1337/announce,udp://retracker01-msk-virt.corbina.net:80/announce,udp://movies.zsw.ca:6969/announce,udp://isk.richardsw.club:6969/announce,https://tracker.renfei.net:443/announce,https://tr.burnabyhighstar.com:443/announce,http://fosstorrents.com:6969/announce" --output="${iso_dir}/${iso_name}.torrent" "${iso_dir}"
|
|
||||||
|
|
||||||
notify-send -a "$(basename $(pwd)): Sign" -t 10000 "finished" "$(date '+%Y.%m.%d %H:%M:%S')"
|
|
||||||
|
|
||||||
echo "Ready"
|
|
||||||
if [ "$status" == 0 ]; then
|
|
||||||
sleep 5
|
|
||||||
kill $(ps x | grep konsole | grep $0 | awk '{print $1}')
|
|
||||||
fi
|
|
|
@ -1,9 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
sudo chown -R 1000:1000 ../sf
|
|
||||||
|
|
||||||
echo "Ready"
|
|
||||||
if [ "$status" == 0 ]; then
|
|
||||||
sleep 5
|
|
||||||
kill $(ps x | grep konsole | grep $0 | awk '{print $1}')
|
|
||||||
fi
|
|
|
@ -58,10 +58,10 @@ HOOKS=(base udev modconf kms sd-vconsole memdisk archiso archiso_loop_mnt archis
|
||||||
#COMPRESSION="gzip"
|
#COMPRESSION="gzip"
|
||||||
#COMPRESSION="bzip2"
|
#COMPRESSION="bzip2"
|
||||||
#COMPRESSION="lzma"
|
#COMPRESSION="lzma"
|
||||||
#COMPRESSION="xz"
|
COMPRESSION="xz"
|
||||||
#COMPRESSION="lzop"
|
#COMPRESSION="lzop"
|
||||||
#COMPRESSION="lz4"
|
#COMPRESSION="lz4"
|
||||||
COMPRESSION="zstd"
|
#COMPRESSION="zstd"
|
||||||
|
|
||||||
# COMPRESSION_OPTIONS
|
# COMPRESSION_OPTIONS
|
||||||
# Additional options for the compressor
|
# Additional options for the compressor
|
||||||
|
|
|
@ -3,28 +3,28 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# With: reflector @/etc/xdg/reflector/reflector.conf
|
# With: reflector @/etc/xdg/reflector/reflector.conf
|
||||||
# When: 2023-12-19 05:14:30 UTC
|
# When: 2023-12-23 11:39:24 UTC
|
||||||
# From: https://archlinux.org/mirrors/status/json/
|
# From: https://archlinux.org/mirrors/status/json/
|
||||||
# Retrieved: 2023-12-19 05:13:06 UTC
|
# Retrieved: 2023-12-23 11:38:53 UTC
|
||||||
# Last Check: 2023-12-19 05:01:52 UTC
|
# Last Check: 2023-12-23 11:12:26 UTC
|
||||||
|
|
||||||
Server = http://archlinux.thaller.ws/$repo/os/$arch
|
Server = https://pkg.adfinis.com/archlinux/$repo/os/$arch
|
||||||
Server = https://archlinux.thaller.ws/$repo/os/$arch
|
|
||||||
Server = rsync://archlinux.mailtunnel.eu/archlinux/$repo/os/$arch
|
|
||||||
Server = https://mirror.f4st.host/archlinux/$repo/os/$arch
|
|
||||||
Server = https://mirror.cyberbits.eu/archlinux/$repo/os/$arch
|
|
||||||
Server = http://ftp.halifax.rwth-aachen.de/archlinux/$repo/os/$arch
|
|
||||||
Server = https://de.arch.mirror.kescher.at/$repo/os/$arch
|
|
||||||
Server = rsync://de.arch.mirror.kescher.at/mirror/arch/$repo/os/$arch
|
|
||||||
Server = http://mirror.theo546.fr/archlinux/$repo/os/$arch
|
|
||||||
Server = https://mirror.theo546.fr/archlinux/$repo/os/$arch
|
|
||||||
Server = rsync://mirror.theo546.fr/archlinux/$repo/os/$arch
|
|
||||||
Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch
|
|
||||||
Server = http://arch.sakamoto.pl/$repo/os/$arch
|
|
||||||
Server = https://arch.sakamoto.pl/$repo/os/$arch
|
|
||||||
Server = rsync://archlinux.thaller.ws/archlinux/$repo/os/$arch
|
|
||||||
Server = http://mirror.ubrco.de/archlinux/$repo/os/$arch
|
|
||||||
Server = rsync://mirror.ubrco.de/archlinux/$repo/os/$arch
|
|
||||||
Server = http://archlinux.mailtunnel.eu/$repo/os/$arch
|
|
||||||
Server = http://mirror.f4st.host/archlinux/$repo/os/$arch
|
Server = http://mirror.f4st.host/archlinux/$repo/os/$arch
|
||||||
|
Server = https://mirror.sunred.org/archlinux/$repo/os/$arch
|
||||||
|
Server = http://mirror.sunred.org/archlinux/$repo/os/$arch
|
||||||
|
Server = https://archlinux.mailtunnel.eu/$repo/os/$arch
|
||||||
|
Server = http://pkg.adfinis.com/archlinux/$repo/os/$arch
|
||||||
|
Server = https://archlinux.thaller.ws/$repo/os/$arch
|
||||||
|
Server = http://mirror.ubrco.de/archlinux/$repo/os/$arch
|
||||||
|
Server = https://mirror.ubrco.de/archlinux/$repo/os/$arch
|
||||||
|
Server = http://ftp.halifax.rwth-aachen.de/archlinux/$repo/os/$arch
|
||||||
|
Server = http://archlinux.thaller.ws/$repo/os/$arch
|
||||||
|
Server = https://mirror.moson.org/arch/$repo/os/$arch
|
||||||
|
Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch
|
||||||
|
Server = https://mirror.f4st.host/archlinux/$repo/os/$arch
|
||||||
|
Server = rsync://sync.mirror.sunred.org/archlinux/$repo/os/$arch
|
||||||
|
Server = rsync://archlinux.thaller.ws/archlinux/$repo/os/$arch
|
||||||
|
Server = rsync://pkg.adfinis.com/archlinux/$repo/os/$arch
|
||||||
|
Server = rsync://mirror.ubrco.de/archlinux/$repo/os/$arch
|
||||||
|
Server = rsync://archlinux.mailtunnel.eu/archlinux/$repo/os/$arch
|
||||||
Server = rsync://mirror.f4st.host/archlinux/$repo/os/$arch
|
Server = rsync://mirror.f4st.host/archlinux/$repo/os/$arch
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
[Network]
|
||||||
|
IPv6PrivacyExtensions=yes
|
|
@ -5,6 +5,9 @@
|
||||||
Name=en*
|
Name=en*
|
||||||
Name=eth*
|
Name=eth*
|
||||||
|
|
||||||
|
[Link]
|
||||||
|
RequiredForOnline=routable
|
||||||
|
|
||||||
[Network]
|
[Network]
|
||||||
DHCP=yes
|
DHCP=yes
|
||||||
MulticastDNS=yes
|
MulticastDNS=yes
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
[Match]
|
[Match]
|
||||||
Name=wl*
|
Name=wl*
|
||||||
|
|
||||||
|
[Link]
|
||||||
|
RequiredForOnline=routable
|
||||||
|
|
||||||
[Network]
|
[Network]
|
||||||
DHCP=yes
|
DHCP=yes
|
||||||
MulticastDNS=yes
|
MulticastDNS=yes
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
[Match]
|
[Match]
|
||||||
Name=ww*
|
Name=ww*
|
||||||
|
|
||||||
|
[Link]
|
||||||
|
RequiredForOnline=routable
|
||||||
|
|
||||||
[Network]
|
[Network]
|
||||||
DHCP=yes
|
DHCP=yes
|
||||||
IPv6PrivacyExtensions=yes
|
IPv6PrivacyExtensions=yes
|
||||||
|
|
|
@ -6,16 +6,17 @@ get_cmdline() {
|
||||||
local param
|
local param
|
||||||
for param in $(</proc/cmdline); do
|
for param in $(</proc/cmdline); do
|
||||||
case "${param}" in
|
case "${param}" in
|
||||||
$1=*) echo "${param##*=}";
|
"${1}="*)
|
||||||
|
echo "${param##*=}"
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
mirror=$(get_cmdline mirror)
|
mirror="$(get_cmdline mirror)"
|
||||||
[[ $mirror = auto ]] && mirror=$(get_cmdline archiso_http_srv)
|
[[ "$mirror" == 'auto' ]] && mirror="$(get_cmdline archiso_http_srv)"
|
||||||
[[ $mirror ]] || exit 0
|
[[ -n "$mirror" ]] || exit 0
|
||||||
|
|
||||||
mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig
|
mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig
|
||||||
cat >/etc/pacman.d/mirrorlist <<EOF
|
cat >/etc/pacman.d/mirrorlist <<EOF
|
||||||
|
|
|
@ -19,9 +19,8 @@ bugout () {
|
||||||
stat_fail
|
stat_fail
|
||||||
}
|
}
|
||||||
|
|
||||||
echo_card_indices()
|
echo_card_indices() {
|
||||||
{
|
if [[ -f /proc/asound/cards ]]; then
|
||||||
if [ -f /proc/asound/cards ] ; then
|
|
||||||
sed -n -e's/^[[:space:]]*\([0-7]\)[[:space:]].*/\1/p' /proc/asound/cards
|
sed -n -e's/^[[:space:]]*\([0-7]\)[[:space:]].*/\1/p' /proc/asound/cards
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -34,7 +33,7 @@ echo_card_indices()
|
||||||
# $2 <control>
|
# $2 <control>
|
||||||
# $3 <level>
|
# $3 <level>
|
||||||
unmute_and_set_level() {
|
unmute_and_set_level() {
|
||||||
{ [ "$3" ] &&[ "$2" ] && [ "$1" ] ; } || bugout
|
[[ -n "$3" && -n "$2" && -n "$1" ]] || bugout
|
||||||
systemd-cat -t "livecdsound" printf "Setting: %s on card: %s to %s\n" "$2" "$1" "$3"
|
systemd-cat -t "livecdsound" printf "Setting: %s on card: %s to %s\n" "$2" "$1" "$3"
|
||||||
systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "$3" unmute
|
systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "$3" unmute
|
||||||
return 0
|
return 0
|
||||||
|
@ -42,9 +41,8 @@ unmute_and_set_level(){
|
||||||
|
|
||||||
# $1 <card id>
|
# $1 <card id>
|
||||||
# $2 <control>
|
# $2 <control>
|
||||||
mute_and_zero_level()
|
mute_and_zero_level() {
|
||||||
{
|
[[ -n "$1" && -n "$2" ]] || bugout
|
||||||
{ [ "$1" ] && [ "$2" ] ; } || bugout
|
|
||||||
systemd-cat -t "livecdsound" printf "Muting control: %s on card: %s\n" "$2" "$1"
|
systemd-cat -t "livecdsound" printf "Muting control: %s on card: %s\n" "$2" "$1"
|
||||||
systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "0%" mute
|
systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "0%" mute
|
||||||
return 0
|
return 0
|
||||||
|
@ -53,17 +51,15 @@ mute_and_zero_level()
|
||||||
# $1 <card ID>
|
# $1 <card ID>
|
||||||
# $2 <control>
|
# $2 <control>
|
||||||
# $3 "on" | "off"
|
# $3 "on" | "off"
|
||||||
switch_control()
|
switch_control() {
|
||||||
{
|
[[ -n "$3" && -n "$1" ]] || bugout
|
||||||
{ [ "$3" ] && [ "$1" ] ; } || bugout
|
|
||||||
systemd-cat -t "livecdsound" printf "Switching control: %s on card: %s to %s\n" "$2" "$1" "$3"
|
systemd-cat -t "livecdsound" printf "Switching control: %s on card: %s to %s\n" "$2" "$1" "$3"
|
||||||
systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "$3"
|
systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "$3"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# $1 <card ID>
|
# $1 <card ID>
|
||||||
sanify_levels_on_card()
|
sanify_levels_on_card() {
|
||||||
{
|
|
||||||
unmute_and_set_level "$1" "Front" "80%"
|
unmute_and_set_level "$1" "Front" "80%"
|
||||||
unmute_and_set_level "$1" "Master" "80%"
|
unmute_and_set_level "$1" "Master" "80%"
|
||||||
unmute_and_set_level "$1" "Master Mono" "80%"
|
unmute_and_set_level "$1" "Master Mono" "80%"
|
||||||
|
@ -134,8 +130,7 @@ sanify_levels_on_card()
|
||||||
}
|
}
|
||||||
|
|
||||||
# $1 <card ID> | "all"
|
# $1 <card ID> | "all"
|
||||||
sanify_levels()
|
sanify_levels() {
|
||||||
{
|
|
||||||
local ttsdml_returnstatus=0
|
local ttsdml_returnstatus=0
|
||||||
local card
|
local card
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
@ -148,59 +143,55 @@ sanify_levels()
|
||||||
sanify_levels_on_card "$1" || ttsdml_returnstatus=1
|
sanify_levels_on_card "$1" || ttsdml_returnstatus=1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
return $ttsdml_returnstatus
|
return "$ttsdml_returnstatus"
|
||||||
}
|
}
|
||||||
|
|
||||||
# List all cards that *should* be usable for PCM audio. In my experience,
|
# List all cards that *should* be usable for PCM audio. In my experience,
|
||||||
# the console speaker (handled by the pcsp driver) isn't a suitable playback
|
# the console speaker (handled by the pcsp driver) isn't a suitable playback
|
||||||
# device, so we'll exclude it.
|
# device, so we'll exclude it.
|
||||||
list_non_pcsp_cards()
|
list_non_pcsp_cards() {
|
||||||
{
|
|
||||||
for card in $(echo_card_indices); do
|
for card in $(echo_card_indices); do
|
||||||
local cardfile="/proc/asound/card${card}/id"
|
local cardfile="/proc/asound/card${card}/id"
|
||||||
if [ -r "$cardfile" ] && [ -f "$cardfile" ] && \
|
if [[ -r "$cardfile" && -f "$cardfile" && "$(cat "$cardfile")" != pcsp ]]; then
|
||||||
[ "$(cat "$cardfile")" != pcsp ]; then
|
|
||||||
echo "$card"
|
echo "$card"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# Properly initialize the sound card so that we have audio at boot.
|
# Properly initialize the sound card so that we have audio at boot.
|
||||||
unmute_all_cards()
|
unmute_all_cards() {
|
||||||
{
|
|
||||||
sanify_levels all
|
sanify_levels all
|
||||||
}
|
}
|
||||||
|
|
||||||
is_numeric() {
|
is_numeric() {
|
||||||
local str=$1
|
local str="$1"
|
||||||
[[ "$str" =~ ^[0-9]+$ ]]
|
[[ "$str" =~ ^[0-9]+$ ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
set_default_card() {
|
set_default_card() {
|
||||||
local card=$1
|
local card="$1"
|
||||||
sed -e "s/%card%/$card/g" </usr/local/share/livecd-sound/asound.conf.in \
|
sed -e "s/%card%/$card/g" </usr/local/share/livecd-sound/asound.conf.in \
|
||||||
>/etc/asound.conf
|
>/etc/asound.conf
|
||||||
}
|
}
|
||||||
|
|
||||||
play_on_card() {
|
play_on_card() {
|
||||||
local card=$1 file=$2
|
local card="$1" file="$2"
|
||||||
aplay -q "-Dplughw:$card,0" "$file"
|
aplay -q "-Dplughw:$card,0" "$file"
|
||||||
}
|
}
|
||||||
|
|
||||||
# If there are multiple usable sound cards, prompt the user to choose one,
|
# If there are multiple usable sound cards, prompt the user to choose one,
|
||||||
# using auditory feedback.
|
# using auditory feedback.
|
||||||
pick_a_card()
|
pick_a_card() {
|
||||||
{
|
|
||||||
set -f
|
set -f
|
||||||
usable_cards="$(list_non_pcsp_cards)"
|
usable_cards="$(list_non_pcsp_cards)"
|
||||||
num_usable_cards="$(wc -w <<<"$usable_cards")"
|
num_usable_cards="$(wc -w <<<"$usable_cards")"
|
||||||
|
|
||||||
if [ "$num_usable_cards" -eq 1 ]; then
|
if (( num_usable_cards == 1 )); then
|
||||||
systemd-cat -t "livecdsound" printf "Only one sound card is detected\n"
|
systemd-cat -t "livecdsound" printf "Only one sound card is detected\n"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
systemd-cat -t "livecdsound" printf "multiple sound cards detected\n"
|
systemd-cat -t "livecdsound" printf "multiple sound cards detected\n"
|
||||||
for card in $usable_cards; do
|
for card in "${usable_cards[@]}"; do
|
||||||
if ! is_numeric "$card"; then
|
if ! is_numeric "$card"; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
@ -208,7 +199,7 @@ pick_a_card()
|
||||||
done
|
done
|
||||||
wait
|
wait
|
||||||
sleep 1
|
sleep 1
|
||||||
for card in $usable_cards; do
|
for card in "${usable_cards[@]}"; do
|
||||||
if ! is_numeric "$card"; then
|
if ! is_numeric "$card"; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
@ -221,7 +212,7 @@ pick_a_card()
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ $# -eq 0 ]]; then
|
if (( $# == 0 )); then
|
||||||
echo "error: No argument passed."
|
echo "error: No argument passed."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
title Melawy Linux x86_64 UEFI Default
|
title Melawy Linux install medium x86_64 UEFI Default
|
||||||
sort-key 01
|
sort-key 01
|
||||||
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos
|
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos
|
||||||
initrd /%INSTALL_DIR%/boot/intel-ucode.img
|
initrd /%INSTALL_DIR%/boot/intel-ucode.img
|
||||||
initrd /%INSTALL_DIR%/boot/amd-ucode.img
|
initrd /%INSTALL_DIR%/boot/amd-ucode.img
|
||||||
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img
|
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img
|
||||||
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=10G copytoram=n module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm,pcspkr nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 nvme_load=yes quiet splash bgrt_disable add_efi_memmap
|
options archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID% cow_spacesize=10G copytoram=n module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm,pcspkr nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 nvme_load=yes quiet splash bgrt_disable add_efi_memmap
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
title Melawy Linux x86_64 UEFI NVIDIA (latest cards only)
|
title Melawy Linux install medium x86_64 UEFI NVIDIA (latest cards only)
|
||||||
sort-key 02
|
sort-key 02
|
||||||
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos
|
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos
|
||||||
initrd /%INSTALL_DIR%/boot/intel-ucode.img
|
initrd /%INSTALL_DIR%/boot/intel-ucode.img
|
||||||
initrd /%INSTALL_DIR%/boot/amd-ucode.img
|
initrd /%INSTALL_DIR%/boot/amd-ucode.img
|
||||||
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img
|
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img
|
||||||
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=10G copytoram=n nvidia nvidia-drm.modeset=1 nouveau.modeset=0 i915.modeset=1 radeon.modeset=1 nvme_load=yes module_blacklist=pcspkr quiet splash bgrt_disable add_efi_memmap
|
options archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID% cow_spacesize=10G copytoram=n nvidia nvidia-drm.modeset=1 nouveau.modeset=0 i915.modeset=1 radeon.modeset=1 nvme_load=yes module_blacklist=pcspkr quiet splash bgrt_disable add_efi_memmap
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
title Melawy Linux x86_64 UEFI EFI Default
|
title Melawy Linux install medium x86_64 UEFI EFI Default
|
||||||
sort-key 03
|
sort-key 03
|
||||||
efi /%INSTALL_DIR%/boot/x86_64/linux-cachyos.efi
|
efi /%INSTALL_DIR%/boot/x86_64/linux-cachyos.efi
|
||||||
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=10G copytoram=n module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm,pcspkr nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 nvme_load=yes quiet splash bgrt_disable add_efi_memmap
|
options archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID% cow_spacesize=10G copytoram=n module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm,pcspkr nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 nvme_load=yes quiet splash bgrt_disable add_efi_memmap
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
title Melawy Linux x86_64 UEFI EFI NVIDIA (latest cards only)
|
title Melawy Linux install medium x86_64 UEFI EFI NVIDIA (latest cards only)
|
||||||
sort-key 04
|
sort-key 04
|
||||||
efi /%INSTALL_DIR%/boot/x86_64/linux-cachyos.efi
|
efi /%INSTALL_DIR%/boot/x86_64/linux-cachyos.efi
|
||||||
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=10G copytoram=n nvidia nvidia-drm.modeset=1 nouveau.modeset=0 i915.modeset=1 radeon.modeset=1 nvme_load=yes module_blacklist=pcspkr quiet splash bgrt_disable add_efi_memmap
|
options archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID% cow_spacesize=10G copytoram=n nvidia nvidia-drm.modeset=1 nouveau.modeset=0 i915.modeset=1 radeon.modeset=1 nvme_load=yes module_blacklist=pcspkr quiet splash bgrt_disable add_efi_memmap
|
||||||
|
|
|
@ -12,12 +12,18 @@ insmod udf
|
||||||
insmod all_video
|
insmod all_video
|
||||||
insmod font
|
insmod font
|
||||||
if loadfont "${prefix}/fonts/unicode.pf2" ; then
|
if loadfont "${prefix}/fonts/unicode.pf2" ; then
|
||||||
|
insmod all_video
|
||||||
set gfxmode="auto"
|
set gfxmode="auto"
|
||||||
terminal_input console
|
terminal_input console
|
||||||
terminal_output console
|
terminal_output console
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Enable serial console
|
# Enable serial console
|
||||||
|
insmod serial
|
||||||
|
insmod usbserial_common
|
||||||
|
insmod usbserial_ftdi
|
||||||
|
insmod usbserial_pl2303
|
||||||
|
insmod usbserial_usbdebug
|
||||||
if serial --unit=0 --speed=115200; then
|
if serial --unit=0 --speed=115200; then
|
||||||
terminal_input --append serial
|
terminal_input --append serial
|
||||||
terminal_output --append serial
|
terminal_output --append serial
|
||||||
|
@ -32,41 +38,62 @@ if [ -z "${ARCHISO_UUID}" ]; then
|
||||||
probe --set ARCHISO_UUID --fs-uuid "${root}"
|
probe --set ARCHISO_UUID --fs-uuid "${root}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Get a human readable platform identifier
|
||||||
|
if [ "${grub_platform}" == 'efi' ]; then
|
||||||
|
archiso_platform='UEFI'
|
||||||
|
if [ "${grub_cpu}" == 'x86_64' ]; then
|
||||||
|
archiso_platform="x64 ${archiso_platform}"
|
||||||
|
elif [ "${grub_cpu}" == 'i386' ]; then
|
||||||
|
archiso_platform="IA32 ${archiso_platform}"
|
||||||
|
else
|
||||||
|
archiso_platform="${grub_cpu} ${archiso_platform}"
|
||||||
|
fi
|
||||||
|
elif [ "${grub_platform}" == 'pc' ]; then
|
||||||
|
archiso_platform='BIOS'
|
||||||
|
else
|
||||||
|
archiso_platform="${grub_cpu} ${grub_platform}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Set default menu entry
|
# Set default menu entry
|
||||||
default="Melawy Linux"
|
default="Melawy Linux"
|
||||||
timeout=15
|
timeout=15
|
||||||
timeout_style=menu
|
timeout_style=menu
|
||||||
|
|
||||||
# GRUB init tune for accessibility
|
|
||||||
play 600 988 1 1319 4
|
|
||||||
|
|
||||||
# Menu entries
|
# Menu entries
|
||||||
|
|
||||||
menuentry "Melawy Linux install medium (x86_64, UEFI)" --class arch --class gnu-linux --class gnu --class os --id 'Melawy Linux' {
|
menuentry "Melawy Linux install medium (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'Melawy Linux' {
|
||||||
set gfxpayload=keep
|
set gfxpayload=keep
|
||||||
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID} cow_spacesize=10G copytoram=n quiet splash bgrt_disable add_efi_memmap
|
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-cachyos archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID} cow_spacesize=10G copytoram=n quiet splash bgrt_disable add_efi_memmap
|
||||||
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img
|
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-cachyos.img
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry "Melawy Linux install medium with speakup screen reader (x86_64, UEFI)" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'Melawy-accessibility' {
|
menuentry "Melawy Linux install medium with speakup screen reader (%ARCH%, ${archiso_platform})" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'Melawy-accessibility' {
|
||||||
set gfxpayload=keep
|
set gfxpayload=keep
|
||||||
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID} accessibility=on cow_spacesize=10G copytoram=n quiet splash bgrt_disable add_efi_memmap
|
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-cachyos archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID} accessibility=on cow_spacesize=10G copytoram=n quiet splash bgrt_disable add_efi_memmap
|
||||||
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img
|
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-cachyos.img
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "${grub_platform}" == "efi" ]; then
|
|
||||||
if [ "${grub_cpu}" == "x86_64" ]; then
|
if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
|
||||||
menuentry "Run Memtest86+ (RAM test)" --class memtest86 --class gnu --class tool {
|
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
||||||
set gfxpayload=800x600,1024x768
|
set gfxpayload=800x600,1024x768
|
||||||
linux /boot/memtest86+/memtest.efi
|
linux /boot/memtest86+/memtest.efi
|
||||||
}
|
}
|
||||||
menuentry "UEFI Shell" {
|
fi
|
||||||
insmod chain
|
if [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
|
||||||
|
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
||||||
|
set gfxpayload=800x600,1024x768
|
||||||
|
linux /boot/memtest86+/memtest
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
if [ "${grub_platform}" == 'efi' ]; then
|
||||||
|
if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
|
||||||
|
menuentry 'UEFI Shell' --class efi {
|
||||||
chainloader /shellx64.efi
|
chainloader /shellx64.efi
|
||||||
}
|
}
|
||||||
elif [ "${grub_cpu}" == "i386" ]; then
|
elif [ "${grub_cpu}" == "i386" -a -f '/shellia32.efi' ]; then
|
||||||
menuentry "UEFI Shell" {
|
menuentry 'UEFI Shell' --class efi {
|
||||||
insmod chain
|
|
||||||
chainloader /shellia32.efi
|
chainloader /shellia32.efi
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
@ -76,12 +103,16 @@ if [ "${grub_platform}" == "efi" ]; then
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
menuentry "System restart" --class reboot --class restart {
|
menuentry 'System shutdown' --class shutdown --class poweroff {
|
||||||
echo "System rebooting..."
|
echo 'System shutting down...'
|
||||||
|
halt
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry 'System restart' --class reboot --class restart {
|
||||||
|
echo 'System rebooting...'
|
||||||
reboot
|
reboot
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry "System shutdown" --class shutdown --class poweroff {
|
|
||||||
echo "System shutting down..."
|
# GRUB init tune for accessibility
|
||||||
halt
|
play 600 988 1 1319 4
|
||||||
}
|
|
||||||
|
|
|
@ -0,0 +1,80 @@
|
||||||
|
# https://www.supergrubdisk.org/wiki/Loopback.cfg
|
||||||
|
|
||||||
|
# Search for the ISO volume
|
||||||
|
search --no-floppy --set=archiso_img_dev --file "${iso_path}"
|
||||||
|
probe --set archiso_img_dev_uuid --fs-uuid "${archiso_img_dev}"
|
||||||
|
|
||||||
|
# Get a human readable platform identifier
|
||||||
|
if [ "${grub_platform}" == 'efi' ]; then
|
||||||
|
archiso_platform='UEFI'
|
||||||
|
if [ "${grub_cpu}" == 'x86_64' ]; then
|
||||||
|
archiso_platform="x64 ${archiso_platform}"
|
||||||
|
elif [ "${grub_cpu}" == 'i386' ]; then
|
||||||
|
archiso_platform="IA32 ${archiso_platform}"
|
||||||
|
else
|
||||||
|
archiso_platform="${grub_cpu} ${archiso_platform}"
|
||||||
|
fi
|
||||||
|
elif [ "${grub_platform}" == 'pc' ]; then
|
||||||
|
archiso_platform='BIOS'
|
||||||
|
else
|
||||||
|
archiso_platform="${grub_cpu} ${grub_platform}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set default menu entry
|
||||||
|
default="Melawy Linux"
|
||||||
|
timeout=15
|
||||||
|
timeout_style=menu
|
||||||
|
|
||||||
|
|
||||||
|
# Menu entries
|
||||||
|
|
||||||
|
menuentry "Melawy Linux install medium (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' {
|
||||||
|
set gfxpayload=keep
|
||||||
|
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" cow_spacesize=10G copytoram=n quiet splash bgrt_disable add_efi_memma
|
||||||
|
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-cachyos.img
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry "Melawy Linux install medium with speakup screen reader (%ARCH%, ${archiso_platform})" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'archlinux-accessibility' {
|
||||||
|
set gfxpayload=keep
|
||||||
|
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" cow_spacesize=10G copytoram=n quiet splash bgrt_disable add_efi_memmap accessibility=on
|
||||||
|
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-cachyos.img
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
|
||||||
|
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
||||||
|
set gfxpayload=800x600,1024x768
|
||||||
|
linux /boot/memtest86+/memtest.efi
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
if [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
|
||||||
|
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
||||||
|
set gfxpayload=800x600,1024x768
|
||||||
|
linux /boot/memtest86+/memtest
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
if [ "${grub_platform}" == 'efi' ]; then
|
||||||
|
if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
|
||||||
|
menuentry 'UEFI Shell' --class efi {
|
||||||
|
chainloader /shellx64.efi
|
||||||
|
}
|
||||||
|
elif [ "${grub_cpu}" == "i386" -a -f '/shellia32.efi' ]; then
|
||||||
|
menuentry 'UEFI Shell' --class efi {
|
||||||
|
chainloader /shellia32.efi
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' {
|
||||||
|
fwsetup
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
menuentry 'System shutdown' --class shutdown --class poweroff {
|
||||||
|
echo 'System shutting down...'
|
||||||
|
halt
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry 'System restart' --class reboot --class restart {
|
||||||
|
echo 'System rebooting...'
|
||||||
|
reboot
|
||||||
|
}
|
|
@ -862,7 +862,7 @@ _make_common_bootmode_systemd-boot() {
|
||||||
efiboot_files+=("${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootia32.efi"
|
efiboot_files+=("${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootia32.efi"
|
||||||
"${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi")
|
"${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi")
|
||||||
fi
|
fi
|
||||||
efiboot_files+=("${profile}/efiboot/"
|
efiboot_files+=("${work_dir}/loader/"
|
||||||
"${pacstrap_dir}/boot/vmlinuz-"*
|
"${pacstrap_dir}/boot/vmlinuz-"*
|
||||||
"${pacstrap_dir}/boot/initramfs-"*".img"
|
"${pacstrap_dir}/boot/initramfs-"*".img"
|
||||||
"${pacstrap_dir}/boot/linux-"*
|
"${pacstrap_dir}/boot/linux-"*
|
||||||
|
@ -872,39 +872,39 @@ _make_common_bootmode_systemd-boot() {
|
||||||
_make_efibootimg "$efiboot_imgsize"
|
_make_efibootimg "$efiboot_imgsize"
|
||||||
}
|
}
|
||||||
|
|
||||||
_make_common_bootmode_systemd-boot_conf.isofs() {
|
_make_common_bootmode_systemd-boot_conf() {
|
||||||
local _conf
|
local _conf
|
||||||
|
|
||||||
# Copy systemd-boot configuration files
|
install -d -m 0755 -- "${work_dir}/loader" "${work_dir}/loader/entries"
|
||||||
install -d -m 0755 -- "${isofs_dir}/loader/entries"
|
|
||||||
install -m 0644 -- "${profile}/efiboot/loader/loader.conf" "${isofs_dir}/loader/"
|
|
||||||
for _conf in "${profile}/efiboot/loader/entries/"*".conf"; do
|
|
||||||
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
|
|
||||||
s|%INSTALL_DIR%|${install_dir}|g;
|
|
||||||
s|%ARCH%|${arch}|g" \
|
|
||||||
"${_conf}" >"${isofs_dir}/loader/entries/${_conf##*/}"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
_make_common_bootmode_systemd-boot_conf.esp() {
|
install -m 0644 -- "${profile}/efiboot/loader/loader.conf" "${work_dir}/loader"
|
||||||
local _conf
|
|
||||||
|
|
||||||
# Copy systemd-boot configuration files
|
|
||||||
mmd -i "${efibootimg}" ::/loader ::/loader/entries
|
|
||||||
mcopy -i "${efibootimg}" "${profile}/efiboot/loader/loader.conf" ::/loader/
|
|
||||||
for _conf in "${profile}/efiboot/loader/entries/"*".conf"; do
|
for _conf in "${profile}/efiboot/loader/entries/"*".conf"; do
|
||||||
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
|
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
|
||||||
s|%ARCHISO_UUID%|${iso_uuid}|g;
|
s|%ARCHISO_UUID%|${iso_uuid}|g;
|
||||||
s|%INSTALL_DIR%|${install_dir}|g;
|
s|%INSTALL_DIR%|${install_dir}|g;
|
||||||
s|%ARCH%|${arch}|g" \
|
s|%ARCH%|${arch}|g" \
|
||||||
"${_conf}" | mcopy -i "${efibootimg}" - "::/loader/entries/${_conf##*/}"
|
"${_conf}" >"${work_dir}/loader/entries/${_conf##*/}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Copy systemd-boot configuration files to ISO 9660
|
||||||
|
_make_common_bootmode_systemd-boot_conf.isofs() {
|
||||||
|
cp -r --remove-destination -- "${work_dir}/loader" "${isofs_dir}/"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Copy systemd-boot configuration files to FAT image
|
||||||
|
_make_common_bootmode_systemd-boot_conf.esp() {
|
||||||
|
mcopy -i "${efibootimg}" -s "${work_dir}/loader" ::/
|
||||||
|
}
|
||||||
|
|
||||||
# Prepare systemd-boot for booting when written to a disk (isohybrid)
|
# Prepare systemd-boot for booting when written to a disk (isohybrid)
|
||||||
_make_bootmode_uefi-x64.systemd-boot.esp() {
|
_make_bootmode_uefi-x64.systemd-boot.esp() {
|
||||||
_msg_info "Setting up systemd-boot for x64 UEFI booting..."
|
_msg_info "Setting up systemd-boot for x64 UEFI booting..."
|
||||||
|
|
||||||
|
# Prepare configuration files
|
||||||
|
_run_once _make_common_bootmode_systemd-boot_conf
|
||||||
|
|
||||||
|
# Prepare a FAT image for the EFI system partition
|
||||||
_run_once _make_common_bootmode_systemd-boot
|
_run_once _make_common_bootmode_systemd-boot
|
||||||
|
|
||||||
# Copy systemd-boot EFI binary to the default/fallback boot path
|
# Copy systemd-boot EFI binary to the default/fallback boot path
|
||||||
|
@ -929,6 +929,9 @@ _make_bootmode_uefi-x64.systemd-boot.esp() {
|
||||||
|
|
||||||
# Prepare systemd-boot for El Torito booting
|
# Prepare systemd-boot for El Torito booting
|
||||||
_make_bootmode_uefi-x64.systemd-boot.eltorito() {
|
_make_bootmode_uefi-x64.systemd-boot.eltorito() {
|
||||||
|
# Prepare configuration files
|
||||||
|
_run_once _make_common_bootmode_systemd-boot_conf
|
||||||
|
|
||||||
# El Torito UEFI boot requires an image containing the EFI system partition.
|
# El Torito UEFI boot requires an image containing the EFI system partition.
|
||||||
# uefi-x64.systemd-boot.eltorito has the same requirements as uefi-x64.systemd-boot.esp
|
# uefi-x64.systemd-boot.eltorito has the same requirements as uefi-x64.systemd-boot.esp
|
||||||
_run_once _make_bootmode_uefi-x64.systemd-boot.esp
|
_run_once _make_bootmode_uefi-x64.systemd-boot.esp
|
||||||
|
@ -958,6 +961,10 @@ _make_bootmode_uefi-x64.systemd-boot.eltorito() {
|
||||||
_make_bootmode_uefi-ia32.systemd-boot.esp() {
|
_make_bootmode_uefi-ia32.systemd-boot.esp() {
|
||||||
_msg_info "Setting up systemd-boot for IA32 UEFI booting..."
|
_msg_info "Setting up systemd-boot for IA32 UEFI booting..."
|
||||||
|
|
||||||
|
# Prepare configuration files
|
||||||
|
_run_once _make_common_bootmode_systemd-boot_conf
|
||||||
|
|
||||||
|
# Prepare a FAT image for the EFI system partition
|
||||||
_run_once _make_common_bootmode_systemd-boot
|
_run_once _make_common_bootmode_systemd-boot
|
||||||
|
|
||||||
# Copy systemd-boot EFI binary to the default/fallback boot path
|
# Copy systemd-boot EFI binary to the default/fallback boot path
|
||||||
|
@ -981,6 +988,9 @@ _make_bootmode_uefi-ia32.systemd-boot.esp() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_make_bootmode_uefi-ia32.systemd-boot.eltorito() {
|
_make_bootmode_uefi-ia32.systemd-boot.eltorito() {
|
||||||
|
# Prepare configuration files
|
||||||
|
_run_once _make_common_bootmode_systemd-boot_conf
|
||||||
|
|
||||||
# El Torito UEFI boot requires an image containing the EFI system partition.
|
# El Torito UEFI boot requires an image containing the EFI system partition.
|
||||||
# uefi-ia32.systemd-boot.eltorito has the same requirements as uefi-ia32.systemd-boot.esp
|
# uefi-ia32.systemd-boot.eltorito has the same requirements as uefi-ia32.systemd-boot.esp
|
||||||
_run_once _make_bootmode_uefi-ia32.systemd-boot.esp
|
_run_once _make_bootmode_uefi-ia32.systemd-boot.esp
|
||||||
|
|
|
@ -283,6 +283,7 @@
|
||||||
- vpnc
|
- vpnc
|
||||||
- whois
|
- whois
|
||||||
- wireguard-tools
|
- wireguard-tools
|
||||||
|
- shadowsocks-electron-bin
|
||||||
- wireless-regdb
|
- wireless-regdb
|
||||||
- wireless_tools
|
- wireless_tools
|
||||||
- wpa_supplicant
|
- wpa_supplicant
|
||||||
|
@ -730,8 +731,8 @@
|
||||||
- ffmpeg-obs
|
- ffmpeg-obs
|
||||||
- audacious
|
- audacious
|
||||||
- elisa
|
- elisa
|
||||||
- haruna
|
# - haruna
|
||||||
- mpv
|
# - mpv
|
||||||
|
|
||||||
- name: "Picture editors (minimal) (full)"
|
- name: "Picture editors (minimal) (full)"
|
||||||
description: "Add the photo and picture editors"
|
description: "Add the photo and picture editors"
|
||||||
|
|
|
@ -283,6 +283,7 @@
|
||||||
- vpnc
|
- vpnc
|
||||||
- whois
|
- whois
|
||||||
- wireguard-tools
|
- wireguard-tools
|
||||||
|
- shadowsocks-electron-bin
|
||||||
- wireless-regdb
|
- wireless-regdb
|
||||||
- wireless_tools
|
- wireless_tools
|
||||||
- wpa_supplicant
|
- wpa_supplicant
|
||||||
|
@ -730,8 +731,8 @@
|
||||||
- ffmpeg-obs
|
- ffmpeg-obs
|
||||||
- audacious
|
- audacious
|
||||||
- elisa
|
- elisa
|
||||||
- haruna
|
# - haruna
|
||||||
- mpv
|
# - mpv
|
||||||
|
|
||||||
- name: "Picture editors (minimal) (full)"
|
- name: "Picture editors (minimal) (full)"
|
||||||
description: "Add the photo and picture editors"
|
description: "Add the photo and picture editors"
|
||||||
|
|
|
@ -283,6 +283,7 @@
|
||||||
- vpnc
|
- vpnc
|
||||||
- whois
|
- whois
|
||||||
- wireguard-tools
|
- wireguard-tools
|
||||||
|
- shadowsocks-electron-bin
|
||||||
- wireless-regdb
|
- wireless-regdb
|
||||||
- wireless_tools
|
- wireless_tools
|
||||||
- wpa_supplicant
|
- wpa_supplicant
|
||||||
|
@ -730,8 +731,8 @@
|
||||||
- ffmpeg-obs
|
- ffmpeg-obs
|
||||||
- audacious
|
- audacious
|
||||||
- elisa
|
- elisa
|
||||||
- haruna
|
# - haruna
|
||||||
- mpv
|
# - mpv
|
||||||
|
|
||||||
- name: "Picture editors (minimal) (full)"
|
- name: "Picture editors (minimal) (full)"
|
||||||
description: "Add the photo and picture editors"
|
description: "Add the photo and picture editors"
|
||||||
|
|
|
@ -283,6 +283,7 @@
|
||||||
- vpnc
|
- vpnc
|
||||||
- whois
|
- whois
|
||||||
- wireguard-tools
|
- wireguard-tools
|
||||||
|
- shadowsocks-electron-bin
|
||||||
- wireless-regdb
|
- wireless-regdb
|
||||||
- wireless_tools
|
- wireless_tools
|
||||||
- wpa_supplicant
|
- wpa_supplicant
|
||||||
|
@ -730,8 +731,8 @@
|
||||||
- ffmpeg-obs
|
- ffmpeg-obs
|
||||||
- audacious
|
- audacious
|
||||||
- elisa
|
- elisa
|
||||||
- haruna
|
# - haruna
|
||||||
- mpv
|
# - mpv
|
||||||
|
|
||||||
- name: "Picture editors (minimal) (full)"
|
- name: "Picture editors (minimal) (full)"
|
||||||
description: "Add the photo and picture editors"
|
description: "Add the photo and picture editors"
|
||||||
|
|
|
@ -230,6 +230,7 @@ openvpn
|
||||||
ppp
|
ppp
|
||||||
pptpclient
|
pptpclient
|
||||||
rp-pppoe
|
rp-pppoe
|
||||||
|
shadowsocks-electron-bin
|
||||||
systemd-resolvconf
|
systemd-resolvconf
|
||||||
traceroute
|
traceroute
|
||||||
usb_modeswitch
|
usb_modeswitch
|
||||||
|
@ -547,8 +548,6 @@ vlc-luajit
|
||||||
audacious
|
audacious
|
||||||
elisa
|
elisa
|
||||||
ffmpeg-obs
|
ffmpeg-obs
|
||||||
haruna
|
|
||||||
mpv
|
|
||||||
vlc-luajit
|
vlc-luajit
|
||||||
|
|
||||||
## Picture editors (minimal) (full)
|
## Picture editors (minimal) (full)
|
||||||
|
|
|
@ -58,10 +58,10 @@ HOOKS=(base udev modconf kms sd-vconsole memdisk archiso archiso_loop_mnt archis
|
||||||
#COMPRESSION="gzip"
|
#COMPRESSION="gzip"
|
||||||
#COMPRESSION="bzip2"
|
#COMPRESSION="bzip2"
|
||||||
#COMPRESSION="lzma"
|
#COMPRESSION="lzma"
|
||||||
#COMPRESSION="xz"
|
COMPRESSION="xz"
|
||||||
#COMPRESSION="lzop"
|
#COMPRESSION="lzop"
|
||||||
#COMPRESSION="lz4"
|
#COMPRESSION="lz4"
|
||||||
COMPRESSION="zstd"
|
#COMPRESSION="zstd"
|
||||||
|
|
||||||
# COMPRESSION_OPTIONS
|
# COMPRESSION_OPTIONS
|
||||||
# Additional options for the compressor
|
# Additional options for the compressor
|
||||||
|
|
|
@ -3,28 +3,28 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# With: reflector @/etc/xdg/reflector/reflector.conf
|
# With: reflector @/etc/xdg/reflector/reflector.conf
|
||||||
# When: 2023-12-19 05:14:30 UTC
|
# When: 2023-12-23 11:39:24 UTC
|
||||||
# From: https://archlinux.org/mirrors/status/json/
|
# From: https://archlinux.org/mirrors/status/json/
|
||||||
# Retrieved: 2023-12-19 05:13:06 UTC
|
# Retrieved: 2023-12-23 11:38:53 UTC
|
||||||
# Last Check: 2023-12-19 05:01:52 UTC
|
# Last Check: 2023-12-23 11:12:26 UTC
|
||||||
|
|
||||||
Server = http://archlinux.thaller.ws/$repo/os/$arch
|
Server = https://pkg.adfinis.com/archlinux/$repo/os/$arch
|
||||||
Server = https://archlinux.thaller.ws/$repo/os/$arch
|
|
||||||
Server = rsync://archlinux.mailtunnel.eu/archlinux/$repo/os/$arch
|
|
||||||
Server = https://mirror.f4st.host/archlinux/$repo/os/$arch
|
|
||||||
Server = https://mirror.cyberbits.eu/archlinux/$repo/os/$arch
|
|
||||||
Server = http://ftp.halifax.rwth-aachen.de/archlinux/$repo/os/$arch
|
|
||||||
Server = https://de.arch.mirror.kescher.at/$repo/os/$arch
|
|
||||||
Server = rsync://de.arch.mirror.kescher.at/mirror/arch/$repo/os/$arch
|
|
||||||
Server = http://mirror.theo546.fr/archlinux/$repo/os/$arch
|
|
||||||
Server = https://mirror.theo546.fr/archlinux/$repo/os/$arch
|
|
||||||
Server = rsync://mirror.theo546.fr/archlinux/$repo/os/$arch
|
|
||||||
Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch
|
|
||||||
Server = http://arch.sakamoto.pl/$repo/os/$arch
|
|
||||||
Server = https://arch.sakamoto.pl/$repo/os/$arch
|
|
||||||
Server = rsync://archlinux.thaller.ws/archlinux/$repo/os/$arch
|
|
||||||
Server = http://mirror.ubrco.de/archlinux/$repo/os/$arch
|
|
||||||
Server = rsync://mirror.ubrco.de/archlinux/$repo/os/$arch
|
|
||||||
Server = http://archlinux.mailtunnel.eu/$repo/os/$arch
|
|
||||||
Server = http://mirror.f4st.host/archlinux/$repo/os/$arch
|
Server = http://mirror.f4st.host/archlinux/$repo/os/$arch
|
||||||
|
Server = https://mirror.sunred.org/archlinux/$repo/os/$arch
|
||||||
|
Server = http://mirror.sunred.org/archlinux/$repo/os/$arch
|
||||||
|
Server = https://archlinux.mailtunnel.eu/$repo/os/$arch
|
||||||
|
Server = http://pkg.adfinis.com/archlinux/$repo/os/$arch
|
||||||
|
Server = https://archlinux.thaller.ws/$repo/os/$arch
|
||||||
|
Server = http://mirror.ubrco.de/archlinux/$repo/os/$arch
|
||||||
|
Server = https://mirror.ubrco.de/archlinux/$repo/os/$arch
|
||||||
|
Server = http://ftp.halifax.rwth-aachen.de/archlinux/$repo/os/$arch
|
||||||
|
Server = http://archlinux.thaller.ws/$repo/os/$arch
|
||||||
|
Server = https://mirror.moson.org/arch/$repo/os/$arch
|
||||||
|
Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch
|
||||||
|
Server = https://mirror.f4st.host/archlinux/$repo/os/$arch
|
||||||
|
Server = rsync://sync.mirror.sunred.org/archlinux/$repo/os/$arch
|
||||||
|
Server = rsync://archlinux.thaller.ws/archlinux/$repo/os/$arch
|
||||||
|
Server = rsync://pkg.adfinis.com/archlinux/$repo/os/$arch
|
||||||
|
Server = rsync://mirror.ubrco.de/archlinux/$repo/os/$arch
|
||||||
|
Server = rsync://archlinux.mailtunnel.eu/archlinux/$repo/os/$arch
|
||||||
Server = rsync://mirror.f4st.host/archlinux/$repo/os/$arch
|
Server = rsync://mirror.f4st.host/archlinux/$repo/os/$arch
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[Autologin]
|
[Autologin]
|
||||||
Relogin=false
|
Relogin=false
|
||||||
User=
|
|
||||||
Session=plasma
|
Session=plasma
|
||||||
|
User=
|
||||||
|
|
||||||
[General]
|
[General]
|
||||||
HaltCommand=/usr/bin/systemctl poweroff
|
HaltCommand=/usr/bin/systemctl poweroff
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
[Network]
|
||||||
|
IPv6PrivacyExtensions=yes
|
|
@ -5,6 +5,9 @@
|
||||||
Name=en*
|
Name=en*
|
||||||
Name=eth*
|
Name=eth*
|
||||||
|
|
||||||
|
[Link]
|
||||||
|
RequiredForOnline=routable
|
||||||
|
|
||||||
[Network]
|
[Network]
|
||||||
DHCP=yes
|
DHCP=yes
|
||||||
MulticastDNS=yes
|
MulticastDNS=yes
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
[Match]
|
[Match]
|
||||||
Name=wl*
|
Name=wl*
|
||||||
|
|
||||||
|
[Link]
|
||||||
|
RequiredForOnline=routable
|
||||||
|
|
||||||
[Network]
|
[Network]
|
||||||
DHCP=yes
|
DHCP=yes
|
||||||
MulticastDNS=yes
|
MulticastDNS=yes
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
[Match]
|
[Match]
|
||||||
Name=ww*
|
Name=ww*
|
||||||
|
|
||||||
|
[Link]
|
||||||
|
RequiredForOnline=routable
|
||||||
|
|
||||||
[Network]
|
[Network]
|
||||||
DHCP=yes
|
DHCP=yes
|
||||||
IPv6PrivacyExtensions=yes
|
IPv6PrivacyExtensions=yes
|
||||||
|
|
|
@ -6,16 +6,17 @@ get_cmdline() {
|
||||||
local param
|
local param
|
||||||
for param in $(</proc/cmdline); do
|
for param in $(</proc/cmdline); do
|
||||||
case "${param}" in
|
case "${param}" in
|
||||||
$1=*) echo "${param##*=}";
|
"${1}="*)
|
||||||
|
echo "${param##*=}"
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
mirror=$(get_cmdline mirror)
|
mirror="$(get_cmdline mirror)"
|
||||||
[[ $mirror = auto ]] && mirror=$(get_cmdline archiso_http_srv)
|
[[ "$mirror" == 'auto' ]] && mirror="$(get_cmdline archiso_http_srv)"
|
||||||
[[ $mirror ]] || exit 0
|
[[ -n "$mirror" ]] || exit 0
|
||||||
|
|
||||||
mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig
|
mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig
|
||||||
cat >/etc/pacman.d/mirrorlist <<EOF
|
cat >/etc/pacman.d/mirrorlist <<EOF
|
||||||
|
|
|
@ -19,9 +19,8 @@ bugout () {
|
||||||
stat_fail
|
stat_fail
|
||||||
}
|
}
|
||||||
|
|
||||||
echo_card_indices()
|
echo_card_indices() {
|
||||||
{
|
if [[ -f /proc/asound/cards ]]; then
|
||||||
if [ -f /proc/asound/cards ] ; then
|
|
||||||
sed -n -e's/^[[:space:]]*\([0-7]\)[[:space:]].*/\1/p' /proc/asound/cards
|
sed -n -e's/^[[:space:]]*\([0-7]\)[[:space:]].*/\1/p' /proc/asound/cards
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -34,7 +33,7 @@ echo_card_indices()
|
||||||
# $2 <control>
|
# $2 <control>
|
||||||
# $3 <level>
|
# $3 <level>
|
||||||
unmute_and_set_level() {
|
unmute_and_set_level() {
|
||||||
{ [ "$3" ] &&[ "$2" ] && [ "$1" ] ; } || bugout
|
[[ -n "$3" && -n "$2" && -n "$1" ]] || bugout
|
||||||
systemd-cat -t "livecdsound" printf "Setting: %s on card: %s to %s\n" "$2" "$1" "$3"
|
systemd-cat -t "livecdsound" printf "Setting: %s on card: %s to %s\n" "$2" "$1" "$3"
|
||||||
systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "$3" unmute
|
systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "$3" unmute
|
||||||
return 0
|
return 0
|
||||||
|
@ -42,9 +41,8 @@ unmute_and_set_level(){
|
||||||
|
|
||||||
# $1 <card id>
|
# $1 <card id>
|
||||||
# $2 <control>
|
# $2 <control>
|
||||||
mute_and_zero_level()
|
mute_and_zero_level() {
|
||||||
{
|
[[ -n "$1" && -n "$2" ]] || bugout
|
||||||
{ [ "$1" ] && [ "$2" ] ; } || bugout
|
|
||||||
systemd-cat -t "livecdsound" printf "Muting control: %s on card: %s\n" "$2" "$1"
|
systemd-cat -t "livecdsound" printf "Muting control: %s on card: %s\n" "$2" "$1"
|
||||||
systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "0%" mute
|
systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "0%" mute
|
||||||
return 0
|
return 0
|
||||||
|
@ -53,17 +51,15 @@ mute_and_zero_level()
|
||||||
# $1 <card ID>
|
# $1 <card ID>
|
||||||
# $2 <control>
|
# $2 <control>
|
||||||
# $3 "on" | "off"
|
# $3 "on" | "off"
|
||||||
switch_control()
|
switch_control() {
|
||||||
{
|
[[ -n "$3" && -n "$1" ]] || bugout
|
||||||
{ [ "$3" ] && [ "$1" ] ; } || bugout
|
|
||||||
systemd-cat -t "livecdsound" printf "Switching control: %s on card: %s to %s\n" "$2" "$1" "$3"
|
systemd-cat -t "livecdsound" printf "Switching control: %s on card: %s to %s\n" "$2" "$1" "$3"
|
||||||
systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "$3"
|
systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "$3"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# $1 <card ID>
|
# $1 <card ID>
|
||||||
sanify_levels_on_card()
|
sanify_levels_on_card() {
|
||||||
{
|
|
||||||
unmute_and_set_level "$1" "Front" "80%"
|
unmute_and_set_level "$1" "Front" "80%"
|
||||||
unmute_and_set_level "$1" "Master" "80%"
|
unmute_and_set_level "$1" "Master" "80%"
|
||||||
unmute_and_set_level "$1" "Master Mono" "80%"
|
unmute_and_set_level "$1" "Master Mono" "80%"
|
||||||
|
@ -134,8 +130,7 @@ sanify_levels_on_card()
|
||||||
}
|
}
|
||||||
|
|
||||||
# $1 <card ID> | "all"
|
# $1 <card ID> | "all"
|
||||||
sanify_levels()
|
sanify_levels() {
|
||||||
{
|
|
||||||
local ttsdml_returnstatus=0
|
local ttsdml_returnstatus=0
|
||||||
local card
|
local card
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
@ -148,59 +143,55 @@ sanify_levels()
|
||||||
sanify_levels_on_card "$1" || ttsdml_returnstatus=1
|
sanify_levels_on_card "$1" || ttsdml_returnstatus=1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
return $ttsdml_returnstatus
|
return "$ttsdml_returnstatus"
|
||||||
}
|
}
|
||||||
|
|
||||||
# List all cards that *should* be usable for PCM audio. In my experience,
|
# List all cards that *should* be usable for PCM audio. In my experience,
|
||||||
# the console speaker (handled by the pcsp driver) isn't a suitable playback
|
# the console speaker (handled by the pcsp driver) isn't a suitable playback
|
||||||
# device, so we'll exclude it.
|
# device, so we'll exclude it.
|
||||||
list_non_pcsp_cards()
|
list_non_pcsp_cards() {
|
||||||
{
|
|
||||||
for card in $(echo_card_indices); do
|
for card in $(echo_card_indices); do
|
||||||
local cardfile="/proc/asound/card${card}/id"
|
local cardfile="/proc/asound/card${card}/id"
|
||||||
if [ -r "$cardfile" ] && [ -f "$cardfile" ] && \
|
if [[ -r "$cardfile" && -f "$cardfile" && "$(cat "$cardfile")" != pcsp ]]; then
|
||||||
[ "$(cat "$cardfile")" != pcsp ]; then
|
|
||||||
echo "$card"
|
echo "$card"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# Properly initialize the sound card so that we have audio at boot.
|
# Properly initialize the sound card so that we have audio at boot.
|
||||||
unmute_all_cards()
|
unmute_all_cards() {
|
||||||
{
|
|
||||||
sanify_levels all
|
sanify_levels all
|
||||||
}
|
}
|
||||||
|
|
||||||
is_numeric() {
|
is_numeric() {
|
||||||
local str=$1
|
local str="$1"
|
||||||
[[ "$str" =~ ^[0-9]+$ ]]
|
[[ "$str" =~ ^[0-9]+$ ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
set_default_card() {
|
set_default_card() {
|
||||||
local card=$1
|
local card="$1"
|
||||||
sed -e "s/%card%/$card/g" </usr/local/share/livecd-sound/asound.conf.in \
|
sed -e "s/%card%/$card/g" </usr/local/share/livecd-sound/asound.conf.in \
|
||||||
>/etc/asound.conf
|
>/etc/asound.conf
|
||||||
}
|
}
|
||||||
|
|
||||||
play_on_card() {
|
play_on_card() {
|
||||||
local card=$1 file=$2
|
local card="$1" file="$2"
|
||||||
aplay -q "-Dplughw:$card,0" "$file"
|
aplay -q "-Dplughw:$card,0" "$file"
|
||||||
}
|
}
|
||||||
|
|
||||||
# If there are multiple usable sound cards, prompt the user to choose one,
|
# If there are multiple usable sound cards, prompt the user to choose one,
|
||||||
# using auditory feedback.
|
# using auditory feedback.
|
||||||
pick_a_card()
|
pick_a_card() {
|
||||||
{
|
|
||||||
set -f
|
set -f
|
||||||
usable_cards="$(list_non_pcsp_cards)"
|
usable_cards="$(list_non_pcsp_cards)"
|
||||||
num_usable_cards="$(wc -w <<<"$usable_cards")"
|
num_usable_cards="$(wc -w <<<"$usable_cards")"
|
||||||
|
|
||||||
if [ "$num_usable_cards" -eq 1 ]; then
|
if (( num_usable_cards == 1 )); then
|
||||||
systemd-cat -t "livecdsound" printf "Only one sound card is detected\n"
|
systemd-cat -t "livecdsound" printf "Only one sound card is detected\n"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
systemd-cat -t "livecdsound" printf "multiple sound cards detected\n"
|
systemd-cat -t "livecdsound" printf "multiple sound cards detected\n"
|
||||||
for card in $usable_cards; do
|
for card in "${usable_cards[@]}"; do
|
||||||
if ! is_numeric "$card"; then
|
if ! is_numeric "$card"; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
@ -208,7 +199,7 @@ pick_a_card()
|
||||||
done
|
done
|
||||||
wait
|
wait
|
||||||
sleep 1
|
sleep 1
|
||||||
for card in $usable_cards; do
|
for card in "${usable_cards[@]}"; do
|
||||||
if ! is_numeric "$card"; then
|
if ! is_numeric "$card"; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
@ -221,7 +212,7 @@ pick_a_card()
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ $# -eq 0 ]]; then
|
if (( $# == 0 )); then
|
||||||
echo "error: No argument passed."
|
echo "error: No argument passed."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
title Melawy Linux x86_64 UEFI Default
|
title Melawy Linux install medium x86_64 UEFI Default
|
||||||
sort-key 01
|
sort-key 01
|
||||||
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos
|
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos
|
||||||
initrd /%INSTALL_DIR%/boot/intel-ucode.img
|
initrd /%INSTALL_DIR%/boot/intel-ucode.img
|
||||||
initrd /%INSTALL_DIR%/boot/amd-ucode.img
|
initrd /%INSTALL_DIR%/boot/amd-ucode.img
|
||||||
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img
|
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img
|
||||||
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=10G copytoram=n module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm,pcspkr nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 nvme_load=yes quiet splash bgrt_disable add_efi_memmap
|
options archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID% cow_spacesize=10G copytoram=n module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm,pcspkr nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 nvme_load=yes quiet splash bgrt_disable add_efi_memmap
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
title Melawy Linux x86_64 UEFI NVIDIA (latest cards only)
|
title Melawy Linux install medium x86_64 UEFI NVIDIA (latest cards only)
|
||||||
sort-key 02
|
sort-key 02
|
||||||
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos
|
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos
|
||||||
initrd /%INSTALL_DIR%/boot/intel-ucode.img
|
initrd /%INSTALL_DIR%/boot/intel-ucode.img
|
||||||
initrd /%INSTALL_DIR%/boot/amd-ucode.img
|
initrd /%INSTALL_DIR%/boot/amd-ucode.img
|
||||||
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img
|
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img
|
||||||
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=10G copytoram=n nvidia nvidia-drm.modeset=1 nouveau.modeset=0 i915.modeset=1 radeon.modeset=1 nvme_load=yes module_blacklist=pcspkr quiet splash bgrt_disable add_efi_memmap
|
options archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID% cow_spacesize=10G copytoram=n nvidia nvidia-drm.modeset=1 nouveau.modeset=0 i915.modeset=1 radeon.modeset=1 nvme_load=yes module_blacklist=pcspkr quiet splash bgrt_disable add_efi_memmap
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
title Melawy Linux x86_64 UEFI EFI Default
|
title Melawy Linux install medium x86_64 UEFI EFI Default
|
||||||
sort-key 03
|
sort-key 03
|
||||||
efi /%INSTALL_DIR%/boot/x86_64/linux-cachyos.efi
|
efi /%INSTALL_DIR%/boot/x86_64/linux-cachyos.efi
|
||||||
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=10G copytoram=n module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm,pcspkr nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 nvme_load=yes quiet splash bgrt_disable add_efi_memmap
|
options archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID% cow_spacesize=10G copytoram=n module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm,pcspkr nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 nvme_load=yes quiet splash bgrt_disable add_efi_memmap
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
title Melawy Linux x86_64 UEFI EFI NVIDIA (latest cards only)
|
title Melawy Linux install medium x86_64 UEFI EFI NVIDIA (latest cards only)
|
||||||
sort-key 04
|
sort-key 04
|
||||||
efi /%INSTALL_DIR%/boot/x86_64/linux-cachyos.efi
|
efi /%INSTALL_DIR%/boot/x86_64/linux-cachyos.efi
|
||||||
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=10G copytoram=n nvidia nvidia-drm.modeset=1 nouveau.modeset=0 i915.modeset=1 radeon.modeset=1 nvme_load=yes module_blacklist=pcspkr quiet splash bgrt_disable add_efi_memmap
|
options archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID% cow_spacesize=10G copytoram=n nvidia nvidia-drm.modeset=1 nouveau.modeset=0 i915.modeset=1 radeon.modeset=1 nvme_load=yes module_blacklist=pcspkr quiet splash bgrt_disable add_efi_memmap
|
||||||
|
|
|
@ -12,12 +12,18 @@ insmod udf
|
||||||
insmod all_video
|
insmod all_video
|
||||||
insmod font
|
insmod font
|
||||||
if loadfont "${prefix}/fonts/unicode.pf2" ; then
|
if loadfont "${prefix}/fonts/unicode.pf2" ; then
|
||||||
|
insmod all_video
|
||||||
set gfxmode="auto"
|
set gfxmode="auto"
|
||||||
terminal_input console
|
terminal_input console
|
||||||
terminal_output console
|
terminal_output console
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Enable serial console
|
# Enable serial console
|
||||||
|
insmod serial
|
||||||
|
insmod usbserial_common
|
||||||
|
insmod usbserial_ftdi
|
||||||
|
insmod usbserial_pl2303
|
||||||
|
insmod usbserial_usbdebug
|
||||||
if serial --unit=0 --speed=115200; then
|
if serial --unit=0 --speed=115200; then
|
||||||
terminal_input --append serial
|
terminal_input --append serial
|
||||||
terminal_output --append serial
|
terminal_output --append serial
|
||||||
|
@ -32,41 +38,62 @@ if [ -z "${ARCHISO_UUID}" ]; then
|
||||||
probe --set ARCHISO_UUID --fs-uuid "${root}"
|
probe --set ARCHISO_UUID --fs-uuid "${root}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Get a human readable platform identifier
|
||||||
|
if [ "${grub_platform}" == 'efi' ]; then
|
||||||
|
archiso_platform='UEFI'
|
||||||
|
if [ "${grub_cpu}" == 'x86_64' ]; then
|
||||||
|
archiso_platform="x64 ${archiso_platform}"
|
||||||
|
elif [ "${grub_cpu}" == 'i386' ]; then
|
||||||
|
archiso_platform="IA32 ${archiso_platform}"
|
||||||
|
else
|
||||||
|
archiso_platform="${grub_cpu} ${archiso_platform}"
|
||||||
|
fi
|
||||||
|
elif [ "${grub_platform}" == 'pc' ]; then
|
||||||
|
archiso_platform='BIOS'
|
||||||
|
else
|
||||||
|
archiso_platform="${grub_cpu} ${grub_platform}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Set default menu entry
|
# Set default menu entry
|
||||||
default="Melawy Linux"
|
default="Melawy Linux"
|
||||||
timeout=15
|
timeout=15
|
||||||
timeout_style=menu
|
timeout_style=menu
|
||||||
|
|
||||||
# GRUB init tune for accessibility
|
|
||||||
play 600 988 1 1319 4
|
|
||||||
|
|
||||||
# Menu entries
|
# Menu entries
|
||||||
|
|
||||||
menuentry "Melawy Linux install medium (x86_64, UEFI)" --class arch --class gnu-linux --class gnu --class os --id 'Melawy Linux' {
|
menuentry "Melawy Linux install medium (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'Melawy Linux' {
|
||||||
set gfxpayload=keep
|
set gfxpayload=keep
|
||||||
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID} cow_spacesize=10G copytoram=n quiet splash bgrt_disable add_efi_memmap
|
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-cachyos archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID} cow_spacesize=10G copytoram=n quiet splash bgrt_disable add_efi_memmap
|
||||||
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img
|
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-cachyos.img
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry "Melawy Linux install medium with speakup screen reader (x86_64, UEFI)" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'Melawy-accessibility' {
|
menuentry "Melawy Linux install medium with speakup screen reader (%ARCH%, ${archiso_platform})" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'Melawy-accessibility' {
|
||||||
set gfxpayload=keep
|
set gfxpayload=keep
|
||||||
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID} accessibility=on cow_spacesize=10G copytoram=n quiet splash bgrt_disable add_efi_memmap
|
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-cachyos archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID} accessibility=on cow_spacesize=10G copytoram=n quiet splash bgrt_disable add_efi_memmap
|
||||||
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img
|
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-cachyos.img
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "${grub_platform}" == "efi" ]; then
|
|
||||||
if [ "${grub_cpu}" == "x86_64" ]; then
|
if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
|
||||||
menuentry "Run Memtest86+ (RAM test)" --class memtest86 --class gnu --class tool {
|
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
||||||
set gfxpayload=800x600,1024x768
|
set gfxpayload=800x600,1024x768
|
||||||
linux /boot/memtest86+/memtest.efi
|
linux /boot/memtest86+/memtest.efi
|
||||||
}
|
}
|
||||||
menuentry "UEFI Shell" {
|
fi
|
||||||
insmod chain
|
if [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
|
||||||
|
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
||||||
|
set gfxpayload=800x600,1024x768
|
||||||
|
linux /boot/memtest86+/memtest
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
if [ "${grub_platform}" == 'efi' ]; then
|
||||||
|
if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
|
||||||
|
menuentry 'UEFI Shell' --class efi {
|
||||||
chainloader /shellx64.efi
|
chainloader /shellx64.efi
|
||||||
}
|
}
|
||||||
elif [ "${grub_cpu}" == "i386" ]; then
|
elif [ "${grub_cpu}" == "i386" -a -f '/shellia32.efi' ]; then
|
||||||
menuentry "UEFI Shell" {
|
menuentry 'UEFI Shell' --class efi {
|
||||||
insmod chain
|
|
||||||
chainloader /shellia32.efi
|
chainloader /shellia32.efi
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
@ -76,12 +103,16 @@ if [ "${grub_platform}" == "efi" ]; then
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
menuentry "System restart" --class reboot --class restart {
|
menuentry 'System shutdown' --class shutdown --class poweroff {
|
||||||
echo "System rebooting..."
|
echo 'System shutting down...'
|
||||||
|
halt
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry 'System restart' --class reboot --class restart {
|
||||||
|
echo 'System rebooting...'
|
||||||
reboot
|
reboot
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry "System shutdown" --class shutdown --class poweroff {
|
|
||||||
echo "System shutting down..."
|
# GRUB init tune for accessibility
|
||||||
halt
|
play 600 988 1 1319 4
|
||||||
}
|
|
||||||
|
|
|
@ -0,0 +1,80 @@
|
||||||
|
# https://www.supergrubdisk.org/wiki/Loopback.cfg
|
||||||
|
|
||||||
|
# Search for the ISO volume
|
||||||
|
search --no-floppy --set=archiso_img_dev --file "${iso_path}"
|
||||||
|
probe --set archiso_img_dev_uuid --fs-uuid "${archiso_img_dev}"
|
||||||
|
|
||||||
|
# Get a human readable platform identifier
|
||||||
|
if [ "${grub_platform}" == 'efi' ]; then
|
||||||
|
archiso_platform='UEFI'
|
||||||
|
if [ "${grub_cpu}" == 'x86_64' ]; then
|
||||||
|
archiso_platform="x64 ${archiso_platform}"
|
||||||
|
elif [ "${grub_cpu}" == 'i386' ]; then
|
||||||
|
archiso_platform="IA32 ${archiso_platform}"
|
||||||
|
else
|
||||||
|
archiso_platform="${grub_cpu} ${archiso_platform}"
|
||||||
|
fi
|
||||||
|
elif [ "${grub_platform}" == 'pc' ]; then
|
||||||
|
archiso_platform='BIOS'
|
||||||
|
else
|
||||||
|
archiso_platform="${grub_cpu} ${grub_platform}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set default menu entry
|
||||||
|
default="Melawy Linux"
|
||||||
|
timeout=15
|
||||||
|
timeout_style=menu
|
||||||
|
|
||||||
|
|
||||||
|
# Menu entries
|
||||||
|
|
||||||
|
menuentry "Melawy Linux install medium (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' {
|
||||||
|
set gfxpayload=keep
|
||||||
|
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" cow_spacesize=10G copytoram=n quiet splash bgrt_disable add_efi_memma
|
||||||
|
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-cachyos.img
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry "Melawy Linux install medium with speakup screen reader (%ARCH%, ${archiso_platform})" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'archlinux-accessibility' {
|
||||||
|
set gfxpayload=keep
|
||||||
|
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" cow_spacesize=10G copytoram=n quiet splash bgrt_disable add_efi_memmap accessibility=on
|
||||||
|
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-cachyos.img
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
|
||||||
|
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
||||||
|
set gfxpayload=800x600,1024x768
|
||||||
|
linux /boot/memtest86+/memtest.efi
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
if [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
|
||||||
|
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
||||||
|
set gfxpayload=800x600,1024x768
|
||||||
|
linux /boot/memtest86+/memtest
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
if [ "${grub_platform}" == 'efi' ]; then
|
||||||
|
if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
|
||||||
|
menuentry 'UEFI Shell' --class efi {
|
||||||
|
chainloader /shellx64.efi
|
||||||
|
}
|
||||||
|
elif [ "${grub_cpu}" == "i386" -a -f '/shellia32.efi' ]; then
|
||||||
|
menuentry 'UEFI Shell' --class efi {
|
||||||
|
chainloader /shellia32.efi
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' {
|
||||||
|
fwsetup
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
menuentry 'System shutdown' --class shutdown --class poweroff {
|
||||||
|
echo 'System shutting down...'
|
||||||
|
halt
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry 'System restart' --class reboot --class restart {
|
||||||
|
echo 'System rebooting...'
|
||||||
|
reboot
|
||||||
|
}
|
|
@ -862,7 +862,7 @@ _make_common_bootmode_systemd-boot() {
|
||||||
efiboot_files+=("${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootia32.efi"
|
efiboot_files+=("${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootia32.efi"
|
||||||
"${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi")
|
"${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi")
|
||||||
fi
|
fi
|
||||||
efiboot_files+=("${profile}/efiboot/"
|
efiboot_files+=("${work_dir}/loader/"
|
||||||
"${pacstrap_dir}/boot/vmlinuz-"*
|
"${pacstrap_dir}/boot/vmlinuz-"*
|
||||||
"${pacstrap_dir}/boot/initramfs-"*".img"
|
"${pacstrap_dir}/boot/initramfs-"*".img"
|
||||||
"${pacstrap_dir}/boot/linux-"*
|
"${pacstrap_dir}/boot/linux-"*
|
||||||
|
@ -872,39 +872,39 @@ _make_common_bootmode_systemd-boot() {
|
||||||
_make_efibootimg "$efiboot_imgsize"
|
_make_efibootimg "$efiboot_imgsize"
|
||||||
}
|
}
|
||||||
|
|
||||||
_make_common_bootmode_systemd-boot_conf.isofs() {
|
_make_common_bootmode_systemd-boot_conf() {
|
||||||
local _conf
|
local _conf
|
||||||
|
|
||||||
# Copy systemd-boot configuration files
|
install -d -m 0755 -- "${work_dir}/loader" "${work_dir}/loader/entries"
|
||||||
install -d -m 0755 -- "${isofs_dir}/loader/entries"
|
|
||||||
install -m 0644 -- "${profile}/efiboot/loader/loader.conf" "${isofs_dir}/loader/"
|
|
||||||
for _conf in "${profile}/efiboot/loader/entries/"*".conf"; do
|
|
||||||
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
|
|
||||||
s|%INSTALL_DIR%|${install_dir}|g;
|
|
||||||
s|%ARCH%|${arch}|g" \
|
|
||||||
"${_conf}" >"${isofs_dir}/loader/entries/${_conf##*/}"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
_make_common_bootmode_systemd-boot_conf.esp() {
|
install -m 0644 -- "${profile}/efiboot/loader/loader.conf" "${work_dir}/loader"
|
||||||
local _conf
|
|
||||||
|
|
||||||
# Copy systemd-boot configuration files
|
|
||||||
mmd -i "${efibootimg}" ::/loader ::/loader/entries
|
|
||||||
mcopy -i "${efibootimg}" "${profile}/efiboot/loader/loader.conf" ::/loader/
|
|
||||||
for _conf in "${profile}/efiboot/loader/entries/"*".conf"; do
|
for _conf in "${profile}/efiboot/loader/entries/"*".conf"; do
|
||||||
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
|
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
|
||||||
s|%ARCHISO_UUID%|${iso_uuid}|g;
|
s|%ARCHISO_UUID%|${iso_uuid}|g;
|
||||||
s|%INSTALL_DIR%|${install_dir}|g;
|
s|%INSTALL_DIR%|${install_dir}|g;
|
||||||
s|%ARCH%|${arch}|g" \
|
s|%ARCH%|${arch}|g" \
|
||||||
"${_conf}" | mcopy -i "${efibootimg}" - "::/loader/entries/${_conf##*/}"
|
"${_conf}" >"${work_dir}/loader/entries/${_conf##*/}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Copy systemd-boot configuration files to ISO 9660
|
||||||
|
_make_common_bootmode_systemd-boot_conf.isofs() {
|
||||||
|
cp -r --remove-destination -- "${work_dir}/loader" "${isofs_dir}/"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Copy systemd-boot configuration files to FAT image
|
||||||
|
_make_common_bootmode_systemd-boot_conf.esp() {
|
||||||
|
mcopy -i "${efibootimg}" -s "${work_dir}/loader" ::/
|
||||||
|
}
|
||||||
|
|
||||||
# Prepare systemd-boot for booting when written to a disk (isohybrid)
|
# Prepare systemd-boot for booting when written to a disk (isohybrid)
|
||||||
_make_bootmode_uefi-x64.systemd-boot.esp() {
|
_make_bootmode_uefi-x64.systemd-boot.esp() {
|
||||||
_msg_info "Setting up systemd-boot for x64 UEFI booting..."
|
_msg_info "Setting up systemd-boot for x64 UEFI booting..."
|
||||||
|
|
||||||
|
# Prepare configuration files
|
||||||
|
_run_once _make_common_bootmode_systemd-boot_conf
|
||||||
|
|
||||||
|
# Prepare a FAT image for the EFI system partition
|
||||||
_run_once _make_common_bootmode_systemd-boot
|
_run_once _make_common_bootmode_systemd-boot
|
||||||
|
|
||||||
# Copy systemd-boot EFI binary to the default/fallback boot path
|
# Copy systemd-boot EFI binary to the default/fallback boot path
|
||||||
|
@ -929,6 +929,9 @@ _make_bootmode_uefi-x64.systemd-boot.esp() {
|
||||||
|
|
||||||
# Prepare systemd-boot for El Torito booting
|
# Prepare systemd-boot for El Torito booting
|
||||||
_make_bootmode_uefi-x64.systemd-boot.eltorito() {
|
_make_bootmode_uefi-x64.systemd-boot.eltorito() {
|
||||||
|
# Prepare configuration files
|
||||||
|
_run_once _make_common_bootmode_systemd-boot_conf
|
||||||
|
|
||||||
# El Torito UEFI boot requires an image containing the EFI system partition.
|
# El Torito UEFI boot requires an image containing the EFI system partition.
|
||||||
# uefi-x64.systemd-boot.eltorito has the same requirements as uefi-x64.systemd-boot.esp
|
# uefi-x64.systemd-boot.eltorito has the same requirements as uefi-x64.systemd-boot.esp
|
||||||
_run_once _make_bootmode_uefi-x64.systemd-boot.esp
|
_run_once _make_bootmode_uefi-x64.systemd-boot.esp
|
||||||
|
@ -958,6 +961,10 @@ _make_bootmode_uefi-x64.systemd-boot.eltorito() {
|
||||||
_make_bootmode_uefi-ia32.systemd-boot.esp() {
|
_make_bootmode_uefi-ia32.systemd-boot.esp() {
|
||||||
_msg_info "Setting up systemd-boot for IA32 UEFI booting..."
|
_msg_info "Setting up systemd-boot for IA32 UEFI booting..."
|
||||||
|
|
||||||
|
# Prepare configuration files
|
||||||
|
_run_once _make_common_bootmode_systemd-boot_conf
|
||||||
|
|
||||||
|
# Prepare a FAT image for the EFI system partition
|
||||||
_run_once _make_common_bootmode_systemd-boot
|
_run_once _make_common_bootmode_systemd-boot
|
||||||
|
|
||||||
# Copy systemd-boot EFI binary to the default/fallback boot path
|
# Copy systemd-boot EFI binary to the default/fallback boot path
|
||||||
|
@ -981,6 +988,9 @@ _make_bootmode_uefi-ia32.systemd-boot.esp() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_make_bootmode_uefi-ia32.systemd-boot.eltorito() {
|
_make_bootmode_uefi-ia32.systemd-boot.eltorito() {
|
||||||
|
# Prepare configuration files
|
||||||
|
_run_once _make_common_bootmode_systemd-boot_conf
|
||||||
|
|
||||||
# El Torito UEFI boot requires an image containing the EFI system partition.
|
# El Torito UEFI boot requires an image containing the EFI system partition.
|
||||||
# uefi-ia32.systemd-boot.eltorito has the same requirements as uefi-ia32.systemd-boot.esp
|
# uefi-ia32.systemd-boot.eltorito has the same requirements as uefi-ia32.systemd-boot.esp
|
||||||
_run_once _make_bootmode_uefi-ia32.systemd-boot.esp
|
_run_once _make_bootmode_uefi-ia32.systemd-boot.esp
|
||||||
|
|
|
@ -283,6 +283,7 @@
|
||||||
- vpnc
|
- vpnc
|
||||||
- whois
|
- whois
|
||||||
- wireguard-tools
|
- wireguard-tools
|
||||||
|
- shadowsocks-electron-bin
|
||||||
- wireless-regdb
|
- wireless-regdb
|
||||||
- wireless_tools
|
- wireless_tools
|
||||||
- wpa_supplicant
|
- wpa_supplicant
|
||||||
|
@ -730,8 +731,8 @@
|
||||||
- ffmpeg-obs
|
- ffmpeg-obs
|
||||||
- audacious
|
- audacious
|
||||||
- elisa
|
- elisa
|
||||||
- haruna
|
# - haruna
|
||||||
- mpv
|
# - mpv
|
||||||
|
|
||||||
- name: "Picture editors (minimal) (full)"
|
- name: "Picture editors (minimal) (full)"
|
||||||
description: "Add the photo and picture editors"
|
description: "Add the photo and picture editors"
|
||||||
|
|
|
@ -283,6 +283,7 @@
|
||||||
- vpnc
|
- vpnc
|
||||||
- whois
|
- whois
|
||||||
- wireguard-tools
|
- wireguard-tools
|
||||||
|
- shadowsocks-electron-bin
|
||||||
- wireless-regdb
|
- wireless-regdb
|
||||||
- wireless_tools
|
- wireless_tools
|
||||||
- wpa_supplicant
|
- wpa_supplicant
|
||||||
|
@ -730,8 +731,8 @@
|
||||||
- ffmpeg-obs
|
- ffmpeg-obs
|
||||||
- audacious
|
- audacious
|
||||||
- elisa
|
- elisa
|
||||||
- haruna
|
# - haruna
|
||||||
- mpv
|
# - mpv
|
||||||
|
|
||||||
- name: "Picture editors (minimal) (full)"
|
- name: "Picture editors (minimal) (full)"
|
||||||
description: "Add the photo and picture editors"
|
description: "Add the photo and picture editors"
|
||||||
|
|
|
@ -283,6 +283,7 @@
|
||||||
- vpnc
|
- vpnc
|
||||||
- whois
|
- whois
|
||||||
- wireguard-tools
|
- wireguard-tools
|
||||||
|
- shadowsocks-electron-bin
|
||||||
- wireless-regdb
|
- wireless-regdb
|
||||||
- wireless_tools
|
- wireless_tools
|
||||||
- wpa_supplicant
|
- wpa_supplicant
|
||||||
|
@ -730,8 +731,8 @@
|
||||||
- ffmpeg-obs
|
- ffmpeg-obs
|
||||||
- audacious
|
- audacious
|
||||||
- elisa
|
- elisa
|
||||||
- haruna
|
# - haruna
|
||||||
- mpv
|
# - mpv
|
||||||
|
|
||||||
- name: "Picture editors (minimal) (full)"
|
- name: "Picture editors (minimal) (full)"
|
||||||
description: "Add the photo and picture editors"
|
description: "Add the photo and picture editors"
|
||||||
|
|
|
@ -283,6 +283,7 @@
|
||||||
- vpnc
|
- vpnc
|
||||||
- whois
|
- whois
|
||||||
- wireguard-tools
|
- wireguard-tools
|
||||||
|
- shadowsocks-electron-bin
|
||||||
- wireless-regdb
|
- wireless-regdb
|
||||||
- wireless_tools
|
- wireless_tools
|
||||||
- wpa_supplicant
|
- wpa_supplicant
|
||||||
|
@ -730,8 +731,8 @@
|
||||||
- ffmpeg-obs
|
- ffmpeg-obs
|
||||||
- audacious
|
- audacious
|
||||||
- elisa
|
- elisa
|
||||||
- haruna
|
# - haruna
|
||||||
- mpv
|
# - mpv
|
||||||
|
|
||||||
- name: "Picture editors (minimal) (full)"
|
- name: "Picture editors (minimal) (full)"
|
||||||
description: "Add the photo and picture editors"
|
description: "Add the photo and picture editors"
|
||||||
|
|
|
@ -58,10 +58,10 @@ HOOKS=(base udev modconf kms sd-vconsole memdisk archiso archiso_loop_mnt archis
|
||||||
#COMPRESSION="gzip"
|
#COMPRESSION="gzip"
|
||||||
#COMPRESSION="bzip2"
|
#COMPRESSION="bzip2"
|
||||||
#COMPRESSION="lzma"
|
#COMPRESSION="lzma"
|
||||||
#COMPRESSION="xz"
|
COMPRESSION="xz"
|
||||||
#COMPRESSION="lzop"
|
#COMPRESSION="lzop"
|
||||||
#COMPRESSION="lz4"
|
#COMPRESSION="lz4"
|
||||||
COMPRESSION="zstd"
|
#COMPRESSION="zstd"
|
||||||
|
|
||||||
# COMPRESSION_OPTIONS
|
# COMPRESSION_OPTIONS
|
||||||
# Additional options for the compressor
|
# Additional options for the compressor
|
||||||
|
|
|
@ -3,28 +3,28 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# With: reflector @/etc/xdg/reflector/reflector.conf
|
# With: reflector @/etc/xdg/reflector/reflector.conf
|
||||||
# When: 2023-12-19 05:14:30 UTC
|
# When: 2023-12-23 11:39:24 UTC
|
||||||
# From: https://archlinux.org/mirrors/status/json/
|
# From: https://archlinux.org/mirrors/status/json/
|
||||||
# Retrieved: 2023-12-19 05:13:06 UTC
|
# Retrieved: 2023-12-23 11:38:53 UTC
|
||||||
# Last Check: 2023-12-19 05:01:52 UTC
|
# Last Check: 2023-12-23 11:12:26 UTC
|
||||||
|
|
||||||
Server = http://archlinux.thaller.ws/$repo/os/$arch
|
Server = https://pkg.adfinis.com/archlinux/$repo/os/$arch
|
||||||
Server = https://archlinux.thaller.ws/$repo/os/$arch
|
|
||||||
Server = rsync://archlinux.mailtunnel.eu/archlinux/$repo/os/$arch
|
|
||||||
Server = https://mirror.f4st.host/archlinux/$repo/os/$arch
|
|
||||||
Server = https://mirror.cyberbits.eu/archlinux/$repo/os/$arch
|
|
||||||
Server = http://ftp.halifax.rwth-aachen.de/archlinux/$repo/os/$arch
|
|
||||||
Server = https://de.arch.mirror.kescher.at/$repo/os/$arch
|
|
||||||
Server = rsync://de.arch.mirror.kescher.at/mirror/arch/$repo/os/$arch
|
|
||||||
Server = http://mirror.theo546.fr/archlinux/$repo/os/$arch
|
|
||||||
Server = https://mirror.theo546.fr/archlinux/$repo/os/$arch
|
|
||||||
Server = rsync://mirror.theo546.fr/archlinux/$repo/os/$arch
|
|
||||||
Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch
|
|
||||||
Server = http://arch.sakamoto.pl/$repo/os/$arch
|
|
||||||
Server = https://arch.sakamoto.pl/$repo/os/$arch
|
|
||||||
Server = rsync://archlinux.thaller.ws/archlinux/$repo/os/$arch
|
|
||||||
Server = http://mirror.ubrco.de/archlinux/$repo/os/$arch
|
|
||||||
Server = rsync://mirror.ubrco.de/archlinux/$repo/os/$arch
|
|
||||||
Server = http://archlinux.mailtunnel.eu/$repo/os/$arch
|
|
||||||
Server = http://mirror.f4st.host/archlinux/$repo/os/$arch
|
Server = http://mirror.f4st.host/archlinux/$repo/os/$arch
|
||||||
|
Server = https://mirror.sunred.org/archlinux/$repo/os/$arch
|
||||||
|
Server = http://mirror.sunred.org/archlinux/$repo/os/$arch
|
||||||
|
Server = https://archlinux.mailtunnel.eu/$repo/os/$arch
|
||||||
|
Server = http://pkg.adfinis.com/archlinux/$repo/os/$arch
|
||||||
|
Server = https://archlinux.thaller.ws/$repo/os/$arch
|
||||||
|
Server = http://mirror.ubrco.de/archlinux/$repo/os/$arch
|
||||||
|
Server = https://mirror.ubrco.de/archlinux/$repo/os/$arch
|
||||||
|
Server = http://ftp.halifax.rwth-aachen.de/archlinux/$repo/os/$arch
|
||||||
|
Server = http://archlinux.thaller.ws/$repo/os/$arch
|
||||||
|
Server = https://mirror.moson.org/arch/$repo/os/$arch
|
||||||
|
Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch
|
||||||
|
Server = https://mirror.f4st.host/archlinux/$repo/os/$arch
|
||||||
|
Server = rsync://sync.mirror.sunred.org/archlinux/$repo/os/$arch
|
||||||
|
Server = rsync://archlinux.thaller.ws/archlinux/$repo/os/$arch
|
||||||
|
Server = rsync://pkg.adfinis.com/archlinux/$repo/os/$arch
|
||||||
|
Server = rsync://mirror.ubrco.de/archlinux/$repo/os/$arch
|
||||||
|
Server = rsync://archlinux.mailtunnel.eu/archlinux/$repo/os/$arch
|
||||||
Server = rsync://mirror.f4st.host/archlinux/$repo/os/$arch
|
Server = rsync://mirror.f4st.host/archlinux/$repo/os/$arch
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
[Network]
|
||||||
|
IPv6PrivacyExtensions=yes
|
|
@ -5,6 +5,9 @@
|
||||||
Name=en*
|
Name=en*
|
||||||
Name=eth*
|
Name=eth*
|
||||||
|
|
||||||
|
[Link]
|
||||||
|
RequiredForOnline=routable
|
||||||
|
|
||||||
[Network]
|
[Network]
|
||||||
DHCP=yes
|
DHCP=yes
|
||||||
MulticastDNS=yes
|
MulticastDNS=yes
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
[Match]
|
[Match]
|
||||||
Name=wl*
|
Name=wl*
|
||||||
|
|
||||||
|
[Link]
|
||||||
|
RequiredForOnline=routable
|
||||||
|
|
||||||
[Network]
|
[Network]
|
||||||
DHCP=yes
|
DHCP=yes
|
||||||
MulticastDNS=yes
|
MulticastDNS=yes
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
[Match]
|
[Match]
|
||||||
Name=ww*
|
Name=ww*
|
||||||
|
|
||||||
|
[Link]
|
||||||
|
RequiredForOnline=routable
|
||||||
|
|
||||||
[Network]
|
[Network]
|
||||||
DHCP=yes
|
DHCP=yes
|
||||||
IPv6PrivacyExtensions=yes
|
IPv6PrivacyExtensions=yes
|
||||||
|
|
|
@ -6,16 +6,17 @@ get_cmdline() {
|
||||||
local param
|
local param
|
||||||
for param in $(</proc/cmdline); do
|
for param in $(</proc/cmdline); do
|
||||||
case "${param}" in
|
case "${param}" in
|
||||||
$1=*) echo "${param##*=}";
|
"${1}="*)
|
||||||
|
echo "${param##*=}"
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
mirror=$(get_cmdline mirror)
|
mirror="$(get_cmdline mirror)"
|
||||||
[[ $mirror = auto ]] && mirror=$(get_cmdline archiso_http_srv)
|
[[ "$mirror" == 'auto' ]] && mirror="$(get_cmdline archiso_http_srv)"
|
||||||
[[ $mirror ]] || exit 0
|
[[ -n "$mirror" ]] || exit 0
|
||||||
|
|
||||||
mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig
|
mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig
|
||||||
cat >/etc/pacman.d/mirrorlist <<EOF
|
cat >/etc/pacman.d/mirrorlist <<EOF
|
||||||
|
|
|
@ -19,9 +19,8 @@ bugout () {
|
||||||
stat_fail
|
stat_fail
|
||||||
}
|
}
|
||||||
|
|
||||||
echo_card_indices()
|
echo_card_indices() {
|
||||||
{
|
if [[ -f /proc/asound/cards ]]; then
|
||||||
if [ -f /proc/asound/cards ] ; then
|
|
||||||
sed -n -e's/^[[:space:]]*\([0-7]\)[[:space:]].*/\1/p' /proc/asound/cards
|
sed -n -e's/^[[:space:]]*\([0-7]\)[[:space:]].*/\1/p' /proc/asound/cards
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -34,7 +33,7 @@ echo_card_indices()
|
||||||
# $2 <control>
|
# $2 <control>
|
||||||
# $3 <level>
|
# $3 <level>
|
||||||
unmute_and_set_level() {
|
unmute_and_set_level() {
|
||||||
{ [ "$3" ] &&[ "$2" ] && [ "$1" ] ; } || bugout
|
[[ -n "$3" && -n "$2" && -n "$1" ]] || bugout
|
||||||
systemd-cat -t "livecdsound" printf "Setting: %s on card: %s to %s\n" "$2" "$1" "$3"
|
systemd-cat -t "livecdsound" printf "Setting: %s on card: %s to %s\n" "$2" "$1" "$3"
|
||||||
systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "$3" unmute
|
systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "$3" unmute
|
||||||
return 0
|
return 0
|
||||||
|
@ -42,9 +41,8 @@ unmute_and_set_level(){
|
||||||
|
|
||||||
# $1 <card id>
|
# $1 <card id>
|
||||||
# $2 <control>
|
# $2 <control>
|
||||||
mute_and_zero_level()
|
mute_and_zero_level() {
|
||||||
{
|
[[ -n "$1" && -n "$2" ]] || bugout
|
||||||
{ [ "$1" ] && [ "$2" ] ; } || bugout
|
|
||||||
systemd-cat -t "livecdsound" printf "Muting control: %s on card: %s\n" "$2" "$1"
|
systemd-cat -t "livecdsound" printf "Muting control: %s on card: %s\n" "$2" "$1"
|
||||||
systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "0%" mute
|
systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "0%" mute
|
||||||
return 0
|
return 0
|
||||||
|
@ -53,17 +51,15 @@ mute_and_zero_level()
|
||||||
# $1 <card ID>
|
# $1 <card ID>
|
||||||
# $2 <control>
|
# $2 <control>
|
||||||
# $3 "on" | "off"
|
# $3 "on" | "off"
|
||||||
switch_control()
|
switch_control() {
|
||||||
{
|
[[ -n "$3" && -n "$1" ]] || bugout
|
||||||
{ [ "$3" ] && [ "$1" ] ; } || bugout
|
|
||||||
systemd-cat -t "livecdsound" printf "Switching control: %s on card: %s to %s\n" "$2" "$1" "$3"
|
systemd-cat -t "livecdsound" printf "Switching control: %s on card: %s to %s\n" "$2" "$1" "$3"
|
||||||
systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "$3"
|
systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "$3"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# $1 <card ID>
|
# $1 <card ID>
|
||||||
sanify_levels_on_card()
|
sanify_levels_on_card() {
|
||||||
{
|
|
||||||
unmute_and_set_level "$1" "Front" "80%"
|
unmute_and_set_level "$1" "Front" "80%"
|
||||||
unmute_and_set_level "$1" "Master" "80%"
|
unmute_and_set_level "$1" "Master" "80%"
|
||||||
unmute_and_set_level "$1" "Master Mono" "80%"
|
unmute_and_set_level "$1" "Master Mono" "80%"
|
||||||
|
@ -134,8 +130,7 @@ sanify_levels_on_card()
|
||||||
}
|
}
|
||||||
|
|
||||||
# $1 <card ID> | "all"
|
# $1 <card ID> | "all"
|
||||||
sanify_levels()
|
sanify_levels() {
|
||||||
{
|
|
||||||
local ttsdml_returnstatus=0
|
local ttsdml_returnstatus=0
|
||||||
local card
|
local card
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
@ -148,59 +143,55 @@ sanify_levels()
|
||||||
sanify_levels_on_card "$1" || ttsdml_returnstatus=1
|
sanify_levels_on_card "$1" || ttsdml_returnstatus=1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
return $ttsdml_returnstatus
|
return "$ttsdml_returnstatus"
|
||||||
}
|
}
|
||||||
|
|
||||||
# List all cards that *should* be usable for PCM audio. In my experience,
|
# List all cards that *should* be usable for PCM audio. In my experience,
|
||||||
# the console speaker (handled by the pcsp driver) isn't a suitable playback
|
# the console speaker (handled by the pcsp driver) isn't a suitable playback
|
||||||
# device, so we'll exclude it.
|
# device, so we'll exclude it.
|
||||||
list_non_pcsp_cards()
|
list_non_pcsp_cards() {
|
||||||
{
|
|
||||||
for card in $(echo_card_indices); do
|
for card in $(echo_card_indices); do
|
||||||
local cardfile="/proc/asound/card${card}/id"
|
local cardfile="/proc/asound/card${card}/id"
|
||||||
if [ -r "$cardfile" ] && [ -f "$cardfile" ] && \
|
if [[ -r "$cardfile" && -f "$cardfile" && "$(cat "$cardfile")" != pcsp ]]; then
|
||||||
[ "$(cat "$cardfile")" != pcsp ]; then
|
|
||||||
echo "$card"
|
echo "$card"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# Properly initialize the sound card so that we have audio at boot.
|
# Properly initialize the sound card so that we have audio at boot.
|
||||||
unmute_all_cards()
|
unmute_all_cards() {
|
||||||
{
|
|
||||||
sanify_levels all
|
sanify_levels all
|
||||||
}
|
}
|
||||||
|
|
||||||
is_numeric() {
|
is_numeric() {
|
||||||
local str=$1
|
local str="$1"
|
||||||
[[ "$str" =~ ^[0-9]+$ ]]
|
[[ "$str" =~ ^[0-9]+$ ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
set_default_card() {
|
set_default_card() {
|
||||||
local card=$1
|
local card="$1"
|
||||||
sed -e "s/%card%/$card/g" </usr/local/share/livecd-sound/asound.conf.in \
|
sed -e "s/%card%/$card/g" </usr/local/share/livecd-sound/asound.conf.in \
|
||||||
>/etc/asound.conf
|
>/etc/asound.conf
|
||||||
}
|
}
|
||||||
|
|
||||||
play_on_card() {
|
play_on_card() {
|
||||||
local card=$1 file=$2
|
local card="$1" file="$2"
|
||||||
aplay -q "-Dplughw:$card,0" "$file"
|
aplay -q "-Dplughw:$card,0" "$file"
|
||||||
}
|
}
|
||||||
|
|
||||||
# If there are multiple usable sound cards, prompt the user to choose one,
|
# If there are multiple usable sound cards, prompt the user to choose one,
|
||||||
# using auditory feedback.
|
# using auditory feedback.
|
||||||
pick_a_card()
|
pick_a_card() {
|
||||||
{
|
|
||||||
set -f
|
set -f
|
||||||
usable_cards="$(list_non_pcsp_cards)"
|
usable_cards="$(list_non_pcsp_cards)"
|
||||||
num_usable_cards="$(wc -w <<<"$usable_cards")"
|
num_usable_cards="$(wc -w <<<"$usable_cards")"
|
||||||
|
|
||||||
if [ "$num_usable_cards" -eq 1 ]; then
|
if (( num_usable_cards == 1 )); then
|
||||||
systemd-cat -t "livecdsound" printf "Only one sound card is detected\n"
|
systemd-cat -t "livecdsound" printf "Only one sound card is detected\n"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
systemd-cat -t "livecdsound" printf "multiple sound cards detected\n"
|
systemd-cat -t "livecdsound" printf "multiple sound cards detected\n"
|
||||||
for card in $usable_cards; do
|
for card in "${usable_cards[@]}"; do
|
||||||
if ! is_numeric "$card"; then
|
if ! is_numeric "$card"; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
@ -208,7 +199,7 @@ pick_a_card()
|
||||||
done
|
done
|
||||||
wait
|
wait
|
||||||
sleep 1
|
sleep 1
|
||||||
for card in $usable_cards; do
|
for card in "${usable_cards[@]}"; do
|
||||||
if ! is_numeric "$card"; then
|
if ! is_numeric "$card"; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
@ -221,7 +212,7 @@ pick_a_card()
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ $# -eq 0 ]]; then
|
if (( $# == 0 )); then
|
||||||
echo "error: No argument passed."
|
echo "error: No argument passed."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
title Melawy Linux x86_64 UEFI Default
|
title Melawy Linux install medium x86_64 UEFI Default
|
||||||
sort-key 01
|
sort-key 01
|
||||||
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos
|
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos
|
||||||
initrd /%INSTALL_DIR%/boot/intel-ucode.img
|
initrd /%INSTALL_DIR%/boot/intel-ucode.img
|
||||||
initrd /%INSTALL_DIR%/boot/amd-ucode.img
|
initrd /%INSTALL_DIR%/boot/amd-ucode.img
|
||||||
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img
|
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img
|
||||||
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=10G copytoram=n module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm,pcspkr nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 nvme_load=yes quiet splash bgrt_disable add_efi_memmap
|
options archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID% cow_spacesize=10G copytoram=n module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm,pcspkr nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 nvme_load=yes quiet splash bgrt_disable add_efi_memmap
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
title Melawy Linux x86_64 UEFI NVIDIA (latest cards only)
|
title Melawy Linux install medium x86_64 UEFI NVIDIA (latest cards only)
|
||||||
sort-key 02
|
sort-key 02
|
||||||
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos
|
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos
|
||||||
initrd /%INSTALL_DIR%/boot/intel-ucode.img
|
initrd /%INSTALL_DIR%/boot/intel-ucode.img
|
||||||
initrd /%INSTALL_DIR%/boot/amd-ucode.img
|
initrd /%INSTALL_DIR%/boot/amd-ucode.img
|
||||||
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img
|
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img
|
||||||
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=10G copytoram=n nvidia nvidia-drm.modeset=1 nouveau.modeset=0 i915.modeset=1 radeon.modeset=1 nvme_load=yes module_blacklist=pcspkr quiet splash bgrt_disable add_efi_memmap
|
options archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID% cow_spacesize=10G copytoram=n nvidia nvidia-drm.modeset=1 nouveau.modeset=0 i915.modeset=1 radeon.modeset=1 nvme_load=yes module_blacklist=pcspkr quiet splash bgrt_disable add_efi_memmap
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
title Melawy Linux x86_64 UEFI EFI Default
|
title Melawy Linux install medium x86_64 UEFI EFI Default
|
||||||
sort-key 03
|
sort-key 03
|
||||||
efi /%INSTALL_DIR%/boot/x86_64/linux-cachyos.efi
|
efi /%INSTALL_DIR%/boot/x86_64/linux-cachyos.efi
|
||||||
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=10G copytoram=n module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm,pcspkr nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 nvme_load=yes quiet splash bgrt_disable add_efi_memmap
|
options archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID% cow_spacesize=10G copytoram=n module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm,pcspkr nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 nvme_load=yes quiet splash bgrt_disable add_efi_memmap
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
title Melawy Linux x86_64 UEFI EFI NVIDIA (latest cards only)
|
title Melawy Linux install medium x86_64 UEFI EFI NVIDIA (latest cards only)
|
||||||
sort-key 04
|
sort-key 04
|
||||||
efi /%INSTALL_DIR%/boot/x86_64/linux-cachyos.efi
|
efi /%INSTALL_DIR%/boot/x86_64/linux-cachyos.efi
|
||||||
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=10G copytoram=n nvidia nvidia-drm.modeset=1 nouveau.modeset=0 i915.modeset=1 radeon.modeset=1 nvme_load=yes module_blacklist=pcspkr quiet splash bgrt_disable add_efi_memmap
|
options archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID% cow_spacesize=10G copytoram=n nvidia nvidia-drm.modeset=1 nouveau.modeset=0 i915.modeset=1 radeon.modeset=1 nvme_load=yes module_blacklist=pcspkr quiet splash bgrt_disable add_efi_memmap
|
||||||
|
|
|
@ -12,12 +12,18 @@ insmod udf
|
||||||
insmod all_video
|
insmod all_video
|
||||||
insmod font
|
insmod font
|
||||||
if loadfont "${prefix}/fonts/unicode.pf2" ; then
|
if loadfont "${prefix}/fonts/unicode.pf2" ; then
|
||||||
|
insmod all_video
|
||||||
set gfxmode="auto"
|
set gfxmode="auto"
|
||||||
terminal_input console
|
terminal_input console
|
||||||
terminal_output console
|
terminal_output console
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Enable serial console
|
# Enable serial console
|
||||||
|
insmod serial
|
||||||
|
insmod usbserial_common
|
||||||
|
insmod usbserial_ftdi
|
||||||
|
insmod usbserial_pl2303
|
||||||
|
insmod usbserial_usbdebug
|
||||||
if serial --unit=0 --speed=115200; then
|
if serial --unit=0 --speed=115200; then
|
||||||
terminal_input --append serial
|
terminal_input --append serial
|
||||||
terminal_output --append serial
|
terminal_output --append serial
|
||||||
|
@ -32,41 +38,62 @@ if [ -z "${ARCHISO_UUID}" ]; then
|
||||||
probe --set ARCHISO_UUID --fs-uuid "${root}"
|
probe --set ARCHISO_UUID --fs-uuid "${root}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Get a human readable platform identifier
|
||||||
|
if [ "${grub_platform}" == 'efi' ]; then
|
||||||
|
archiso_platform='UEFI'
|
||||||
|
if [ "${grub_cpu}" == 'x86_64' ]; then
|
||||||
|
archiso_platform="x64 ${archiso_platform}"
|
||||||
|
elif [ "${grub_cpu}" == 'i386' ]; then
|
||||||
|
archiso_platform="IA32 ${archiso_platform}"
|
||||||
|
else
|
||||||
|
archiso_platform="${grub_cpu} ${archiso_platform}"
|
||||||
|
fi
|
||||||
|
elif [ "${grub_platform}" == 'pc' ]; then
|
||||||
|
archiso_platform='BIOS'
|
||||||
|
else
|
||||||
|
archiso_platform="${grub_cpu} ${grub_platform}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Set default menu entry
|
# Set default menu entry
|
||||||
default="Melawy Linux"
|
default="Melawy Linux"
|
||||||
timeout=15
|
timeout=15
|
||||||
timeout_style=menu
|
timeout_style=menu
|
||||||
|
|
||||||
# GRUB init tune for accessibility
|
|
||||||
play 600 988 1 1319 4
|
|
||||||
|
|
||||||
# Menu entries
|
# Menu entries
|
||||||
|
|
||||||
menuentry "Melawy Linux install medium (x86_64, UEFI)" --class arch --class gnu-linux --class gnu --class os --id 'Melawy Linux' {
|
menuentry "Melawy Linux install medium (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'Melawy Linux' {
|
||||||
set gfxpayload=keep
|
set gfxpayload=keep
|
||||||
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID} cow_spacesize=10G copytoram=n quiet splash bgrt_disable add_efi_memmap
|
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-cachyos archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID} cow_spacesize=10G copytoram=n quiet splash bgrt_disable add_efi_memmap
|
||||||
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img
|
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-cachyos.img
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry "Melawy Linux install medium with speakup screen reader (x86_64, UEFI)" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'Melawy-accessibility' {
|
menuentry "Melawy Linux install medium with speakup screen reader (%ARCH%, ${archiso_platform})" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'Melawy-accessibility' {
|
||||||
set gfxpayload=keep
|
set gfxpayload=keep
|
||||||
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID} accessibility=on cow_spacesize=10G copytoram=n quiet splash bgrt_disable add_efi_memmap
|
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-cachyos archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID} accessibility=on cow_spacesize=10G copytoram=n quiet splash bgrt_disable add_efi_memmap
|
||||||
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img
|
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-cachyos.img
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "${grub_platform}" == "efi" ]; then
|
|
||||||
if [ "${grub_cpu}" == "x86_64" ]; then
|
if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
|
||||||
menuentry "Run Memtest86+ (RAM test)" --class memtest86 --class gnu --class tool {
|
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
||||||
set gfxpayload=800x600,1024x768
|
set gfxpayload=800x600,1024x768
|
||||||
linux /boot/memtest86+/memtest.efi
|
linux /boot/memtest86+/memtest.efi
|
||||||
}
|
}
|
||||||
menuentry "UEFI Shell" {
|
fi
|
||||||
insmod chain
|
if [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
|
||||||
|
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
||||||
|
set gfxpayload=800x600,1024x768
|
||||||
|
linux /boot/memtest86+/memtest
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
if [ "${grub_platform}" == 'efi' ]; then
|
||||||
|
if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
|
||||||
|
menuentry 'UEFI Shell' --class efi {
|
||||||
chainloader /shellx64.efi
|
chainloader /shellx64.efi
|
||||||
}
|
}
|
||||||
elif [ "${grub_cpu}" == "i386" ]; then
|
elif [ "${grub_cpu}" == "i386" -a -f '/shellia32.efi' ]; then
|
||||||
menuentry "UEFI Shell" {
|
menuentry 'UEFI Shell' --class efi {
|
||||||
insmod chain
|
|
||||||
chainloader /shellia32.efi
|
chainloader /shellia32.efi
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
@ -76,12 +103,16 @@ if [ "${grub_platform}" == "efi" ]; then
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
menuentry "System restart" --class reboot --class restart {
|
menuentry 'System shutdown' --class shutdown --class poweroff {
|
||||||
echo "System rebooting..."
|
echo 'System shutting down...'
|
||||||
|
halt
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry 'System restart' --class reboot --class restart {
|
||||||
|
echo 'System rebooting...'
|
||||||
reboot
|
reboot
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry "System shutdown" --class shutdown --class poweroff {
|
|
||||||
echo "System shutting down..."
|
# GRUB init tune for accessibility
|
||||||
halt
|
play 600 988 1 1319 4
|
||||||
}
|
|
||||||
|
|
|
@ -0,0 +1,80 @@
|
||||||
|
# https://www.supergrubdisk.org/wiki/Loopback.cfg
|
||||||
|
|
||||||
|
# Search for the ISO volume
|
||||||
|
search --no-floppy --set=archiso_img_dev --file "${iso_path}"
|
||||||
|
probe --set archiso_img_dev_uuid --fs-uuid "${archiso_img_dev}"
|
||||||
|
|
||||||
|
# Get a human readable platform identifier
|
||||||
|
if [ "${grub_platform}" == 'efi' ]; then
|
||||||
|
archiso_platform='UEFI'
|
||||||
|
if [ "${grub_cpu}" == 'x86_64' ]; then
|
||||||
|
archiso_platform="x64 ${archiso_platform}"
|
||||||
|
elif [ "${grub_cpu}" == 'i386' ]; then
|
||||||
|
archiso_platform="IA32 ${archiso_platform}"
|
||||||
|
else
|
||||||
|
archiso_platform="${grub_cpu} ${archiso_platform}"
|
||||||
|
fi
|
||||||
|
elif [ "${grub_platform}" == 'pc' ]; then
|
||||||
|
archiso_platform='BIOS'
|
||||||
|
else
|
||||||
|
archiso_platform="${grub_cpu} ${grub_platform}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set default menu entry
|
||||||
|
default="Melawy Linux"
|
||||||
|
timeout=15
|
||||||
|
timeout_style=menu
|
||||||
|
|
||||||
|
|
||||||
|
# Menu entries
|
||||||
|
|
||||||
|
menuentry "Melawy Linux install medium (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' {
|
||||||
|
set gfxpayload=keep
|
||||||
|
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" cow_spacesize=10G copytoram=n quiet splash bgrt_disable add_efi_memma
|
||||||
|
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-cachyos.img
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry "Melawy Linux install medium with speakup screen reader (%ARCH%, ${archiso_platform})" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'archlinux-accessibility' {
|
||||||
|
set gfxpayload=keep
|
||||||
|
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" cow_spacesize=10G copytoram=n quiet splash bgrt_disable add_efi_memmap accessibility=on
|
||||||
|
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-cachyos.img
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
|
||||||
|
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
||||||
|
set gfxpayload=800x600,1024x768
|
||||||
|
linux /boot/memtest86+/memtest.efi
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
if [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
|
||||||
|
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
||||||
|
set gfxpayload=800x600,1024x768
|
||||||
|
linux /boot/memtest86+/memtest
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
if [ "${grub_platform}" == 'efi' ]; then
|
||||||
|
if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
|
||||||
|
menuentry 'UEFI Shell' --class efi {
|
||||||
|
chainloader /shellx64.efi
|
||||||
|
}
|
||||||
|
elif [ "${grub_cpu}" == "i386" -a -f '/shellia32.efi' ]; then
|
||||||
|
menuentry 'UEFI Shell' --class efi {
|
||||||
|
chainloader /shellia32.efi
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' {
|
||||||
|
fwsetup
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
menuentry 'System shutdown' --class shutdown --class poweroff {
|
||||||
|
echo 'System shutting down...'
|
||||||
|
halt
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry 'System restart' --class reboot --class restart {
|
||||||
|
echo 'System rebooting...'
|
||||||
|
reboot
|
||||||
|
}
|
|
@ -862,7 +862,7 @@ _make_common_bootmode_systemd-boot() {
|
||||||
efiboot_files+=("${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootia32.efi"
|
efiboot_files+=("${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootia32.efi"
|
||||||
"${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi")
|
"${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi")
|
||||||
fi
|
fi
|
||||||
efiboot_files+=("${profile}/efiboot/"
|
efiboot_files+=("${work_dir}/loader/"
|
||||||
"${pacstrap_dir}/boot/vmlinuz-"*
|
"${pacstrap_dir}/boot/vmlinuz-"*
|
||||||
"${pacstrap_dir}/boot/initramfs-"*".img"
|
"${pacstrap_dir}/boot/initramfs-"*".img"
|
||||||
"${pacstrap_dir}/boot/linux-"*
|
"${pacstrap_dir}/boot/linux-"*
|
||||||
|
@ -872,39 +872,39 @@ _make_common_bootmode_systemd-boot() {
|
||||||
_make_efibootimg "$efiboot_imgsize"
|
_make_efibootimg "$efiboot_imgsize"
|
||||||
}
|
}
|
||||||
|
|
||||||
_make_common_bootmode_systemd-boot_conf.isofs() {
|
_make_common_bootmode_systemd-boot_conf() {
|
||||||
local _conf
|
local _conf
|
||||||
|
|
||||||
# Copy systemd-boot configuration files
|
install -d -m 0755 -- "${work_dir}/loader" "${work_dir}/loader/entries"
|
||||||
install -d -m 0755 -- "${isofs_dir}/loader/entries"
|
|
||||||
install -m 0644 -- "${profile}/efiboot/loader/loader.conf" "${isofs_dir}/loader/"
|
|
||||||
for _conf in "${profile}/efiboot/loader/entries/"*".conf"; do
|
|
||||||
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
|
|
||||||
s|%INSTALL_DIR%|${install_dir}|g;
|
|
||||||
s|%ARCH%|${arch}|g" \
|
|
||||||
"${_conf}" >"${isofs_dir}/loader/entries/${_conf##*/}"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
_make_common_bootmode_systemd-boot_conf.esp() {
|
install -m 0644 -- "${profile}/efiboot/loader/loader.conf" "${work_dir}/loader"
|
||||||
local _conf
|
|
||||||
|
|
||||||
# Copy systemd-boot configuration files
|
|
||||||
mmd -i "${efibootimg}" ::/loader ::/loader/entries
|
|
||||||
mcopy -i "${efibootimg}" "${profile}/efiboot/loader/loader.conf" ::/loader/
|
|
||||||
for _conf in "${profile}/efiboot/loader/entries/"*".conf"; do
|
for _conf in "${profile}/efiboot/loader/entries/"*".conf"; do
|
||||||
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
|
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
|
||||||
s|%ARCHISO_UUID%|${iso_uuid}|g;
|
s|%ARCHISO_UUID%|${iso_uuid}|g;
|
||||||
s|%INSTALL_DIR%|${install_dir}|g;
|
s|%INSTALL_DIR%|${install_dir}|g;
|
||||||
s|%ARCH%|${arch}|g" \
|
s|%ARCH%|${arch}|g" \
|
||||||
"${_conf}" | mcopy -i "${efibootimg}" - "::/loader/entries/${_conf##*/}"
|
"${_conf}" >"${work_dir}/loader/entries/${_conf##*/}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Copy systemd-boot configuration files to ISO 9660
|
||||||
|
_make_common_bootmode_systemd-boot_conf.isofs() {
|
||||||
|
cp -r --remove-destination -- "${work_dir}/loader" "${isofs_dir}/"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Copy systemd-boot configuration files to FAT image
|
||||||
|
_make_common_bootmode_systemd-boot_conf.esp() {
|
||||||
|
mcopy -i "${efibootimg}" -s "${work_dir}/loader" ::/
|
||||||
|
}
|
||||||
|
|
||||||
# Prepare systemd-boot for booting when written to a disk (isohybrid)
|
# Prepare systemd-boot for booting when written to a disk (isohybrid)
|
||||||
_make_bootmode_uefi-x64.systemd-boot.esp() {
|
_make_bootmode_uefi-x64.systemd-boot.esp() {
|
||||||
_msg_info "Setting up systemd-boot for x64 UEFI booting..."
|
_msg_info "Setting up systemd-boot for x64 UEFI booting..."
|
||||||
|
|
||||||
|
# Prepare configuration files
|
||||||
|
_run_once _make_common_bootmode_systemd-boot_conf
|
||||||
|
|
||||||
|
# Prepare a FAT image for the EFI system partition
|
||||||
_run_once _make_common_bootmode_systemd-boot
|
_run_once _make_common_bootmode_systemd-boot
|
||||||
|
|
||||||
# Copy systemd-boot EFI binary to the default/fallback boot path
|
# Copy systemd-boot EFI binary to the default/fallback boot path
|
||||||
|
@ -929,6 +929,9 @@ _make_bootmode_uefi-x64.systemd-boot.esp() {
|
||||||
|
|
||||||
# Prepare systemd-boot for El Torito booting
|
# Prepare systemd-boot for El Torito booting
|
||||||
_make_bootmode_uefi-x64.systemd-boot.eltorito() {
|
_make_bootmode_uefi-x64.systemd-boot.eltorito() {
|
||||||
|
# Prepare configuration files
|
||||||
|
_run_once _make_common_bootmode_systemd-boot_conf
|
||||||
|
|
||||||
# El Torito UEFI boot requires an image containing the EFI system partition.
|
# El Torito UEFI boot requires an image containing the EFI system partition.
|
||||||
# uefi-x64.systemd-boot.eltorito has the same requirements as uefi-x64.systemd-boot.esp
|
# uefi-x64.systemd-boot.eltorito has the same requirements as uefi-x64.systemd-boot.esp
|
||||||
_run_once _make_bootmode_uefi-x64.systemd-boot.esp
|
_run_once _make_bootmode_uefi-x64.systemd-boot.esp
|
||||||
|
@ -958,6 +961,10 @@ _make_bootmode_uefi-x64.systemd-boot.eltorito() {
|
||||||
_make_bootmode_uefi-ia32.systemd-boot.esp() {
|
_make_bootmode_uefi-ia32.systemd-boot.esp() {
|
||||||
_msg_info "Setting up systemd-boot for IA32 UEFI booting..."
|
_msg_info "Setting up systemd-boot for IA32 UEFI booting..."
|
||||||
|
|
||||||
|
# Prepare configuration files
|
||||||
|
_run_once _make_common_bootmode_systemd-boot_conf
|
||||||
|
|
||||||
|
# Prepare a FAT image for the EFI system partition
|
||||||
_run_once _make_common_bootmode_systemd-boot
|
_run_once _make_common_bootmode_systemd-boot
|
||||||
|
|
||||||
# Copy systemd-boot EFI binary to the default/fallback boot path
|
# Copy systemd-boot EFI binary to the default/fallback boot path
|
||||||
|
@ -981,6 +988,9 @@ _make_bootmode_uefi-ia32.systemd-boot.esp() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_make_bootmode_uefi-ia32.systemd-boot.eltorito() {
|
_make_bootmode_uefi-ia32.systemd-boot.eltorito() {
|
||||||
|
# Prepare configuration files
|
||||||
|
_run_once _make_common_bootmode_systemd-boot_conf
|
||||||
|
|
||||||
# El Torito UEFI boot requires an image containing the EFI system partition.
|
# El Torito UEFI boot requires an image containing the EFI system partition.
|
||||||
# uefi-ia32.systemd-boot.eltorito has the same requirements as uefi-ia32.systemd-boot.esp
|
# uefi-ia32.systemd-boot.eltorito has the same requirements as uefi-ia32.systemd-boot.esp
|
||||||
_run_once _make_bootmode_uefi-ia32.systemd-boot.esp
|
_run_once _make_bootmode_uefi-ia32.systemd-boot.esp
|
||||||
|
|
|
@ -283,6 +283,7 @@
|
||||||
- vpnc
|
- vpnc
|
||||||
- whois
|
- whois
|
||||||
- wireguard-tools
|
- wireguard-tools
|
||||||
|
- shadowsocks-electron-bin
|
||||||
- wireless-regdb
|
- wireless-regdb
|
||||||
- wireless_tools
|
- wireless_tools
|
||||||
- wpa_supplicant
|
- wpa_supplicant
|
||||||
|
@ -730,8 +731,8 @@
|
||||||
- ffmpeg-obs
|
- ffmpeg-obs
|
||||||
- audacious
|
- audacious
|
||||||
- elisa
|
- elisa
|
||||||
- haruna
|
# - haruna
|
||||||
- mpv
|
# - mpv
|
||||||
|
|
||||||
- name: "Picture editors (minimal) (full)"
|
- name: "Picture editors (minimal) (full)"
|
||||||
description: "Add the photo and picture editors"
|
description: "Add the photo and picture editors"
|
||||||
|
|
|
@ -283,6 +283,7 @@
|
||||||
- vpnc
|
- vpnc
|
||||||
- whois
|
- whois
|
||||||
- wireguard-tools
|
- wireguard-tools
|
||||||
|
- shadowsocks-electron-bin
|
||||||
- wireless-regdb
|
- wireless-regdb
|
||||||
- wireless_tools
|
- wireless_tools
|
||||||
- wpa_supplicant
|
- wpa_supplicant
|
||||||
|
@ -730,8 +731,8 @@
|
||||||
- ffmpeg-obs
|
- ffmpeg-obs
|
||||||
- audacious
|
- audacious
|
||||||
- elisa
|
- elisa
|
||||||
- haruna
|
# - haruna
|
||||||
- mpv
|
# - mpv
|
||||||
|
|
||||||
- name: "Picture editors (minimal) (full)"
|
- name: "Picture editors (minimal) (full)"
|
||||||
description: "Add the photo and picture editors"
|
description: "Add the photo and picture editors"
|
||||||
|
|
|
@ -283,6 +283,7 @@
|
||||||
- vpnc
|
- vpnc
|
||||||
- whois
|
- whois
|
||||||
- wireguard-tools
|
- wireguard-tools
|
||||||
|
- shadowsocks-electron-bin
|
||||||
- wireless-regdb
|
- wireless-regdb
|
||||||
- wireless_tools
|
- wireless_tools
|
||||||
- wpa_supplicant
|
- wpa_supplicant
|
||||||
|
@ -730,8 +731,8 @@
|
||||||
- ffmpeg-obs
|
- ffmpeg-obs
|
||||||
- audacious
|
- audacious
|
||||||
- elisa
|
- elisa
|
||||||
- haruna
|
# - haruna
|
||||||
- mpv
|
# - mpv
|
||||||
|
|
||||||
- name: "Picture editors (minimal) (full)"
|
- name: "Picture editors (minimal) (full)"
|
||||||
description: "Add the photo and picture editors"
|
description: "Add the photo and picture editors"
|
||||||
|
|
|
@ -283,6 +283,7 @@
|
||||||
- vpnc
|
- vpnc
|
||||||
- whois
|
- whois
|
||||||
- wireguard-tools
|
- wireguard-tools
|
||||||
|
- shadowsocks-electron-bin
|
||||||
- wireless-regdb
|
- wireless-regdb
|
||||||
- wireless_tools
|
- wireless_tools
|
||||||
- wpa_supplicant
|
- wpa_supplicant
|
||||||
|
@ -730,8 +731,8 @@
|
||||||
- ffmpeg-obs
|
- ffmpeg-obs
|
||||||
- audacious
|
- audacious
|
||||||
- elisa
|
- elisa
|
||||||
- haruna
|
# - haruna
|
||||||
- mpv
|
# - mpv
|
||||||
|
|
||||||
- name: "Picture editors (minimal) (full)"
|
- name: "Picture editors (minimal) (full)"
|
||||||
description: "Add the photo and picture editors"
|
description: "Add the photo and picture editors"
|
||||||
|
|
|
@ -230,6 +230,7 @@ openvpn
|
||||||
ppp
|
ppp
|
||||||
pptpclient
|
pptpclient
|
||||||
rp-pppoe
|
rp-pppoe
|
||||||
|
shadowsocks-electron-bin
|
||||||
systemd-resolvconf
|
systemd-resolvconf
|
||||||
traceroute
|
traceroute
|
||||||
usb_modeswitch
|
usb_modeswitch
|
||||||
|
|
Loading…
Reference in New Issue