Add the actual task to test if chrooting works (bootloaders)

main^2
trivernis 2 years ago
parent 2b7ffea75e
commit 1fb4f55119
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -82,5 +82,5 @@ def main [cfg] {
info "Creating partitions manually" info "Creating partitions manually"
} }
info "Partitions created" info "Partitions created!"
} }

@ -24,6 +24,10 @@ def install_base_packages [] {
which which
base-devel base-devel
# chaotic aur
chaotic-keyring
chaotic-mirrorlist
# fonts # fonts
noto-fonts noto-fonts
noto-fonts-emoji noto-fonts-emoji
@ -61,4 +65,5 @@ def main [cfg] {
install_base_packages install_base_packages
cp /etc/pacman.conf /mnt/etc/pacman.conf cp /etc/pacman.conf /mnt/etc/pacman.conf
run bash -c 'genfstab -U /mnt >> /mnt/etc/fstab' run bash -c 'genfstab -U /mnt >> /mnt/etc/fstab'
info "Base packages installed!"
} }

@ -1,5 +1,41 @@
let RUN_IN_CHROOT = true; let RUN_IN_CHROOT = true;
def install_grub_pkgs [] {
(run pacman -S --noconfirm
grub
efibootmgr
crystal-grub-theme
os-prober
crystal-branding
)
}
def install_grub_efi [location: string] {
debug $"Installing grub to ($location)"
install_grub_pkgs
(run grub-install
--target=x86_64-efi
--efi-directory $location
--bootloader-id=crystal
--removable
)
(run grub-install
--target=x86_64-efi
--efi-directory $location
--bootloader-id=crystal
)
"\nGRUB_THEME=\"/usr/share/grub/themes/crystal/theme.txt\"" | save --append /etc/default/grub
run grub-mkconfig -o /boot/grub/grub.cfg
}
# Applies all system changes of `install-bootloader` # Applies all system changes of `install-bootloader`
def main [cfg] { def main [cfg] {
echo "Executing up task `install-bootloader` with config" $cfg debug "Installing bootloader with config ($cfg)"
if $cfg.preset == "GrubEfi" {
install_grub_efi $cfg.location
} else {
error make {msg: "Not implemented"}
}
} }

@ -23,4 +23,5 @@ def main [cfg] {
warn $"Unsupported kernel ($k)" warn $"Unsupported kernel ($k)"
} }
} }
info "Kernels installed!"
} }

Loading…
Cancel
Save