Added previous progress

This commit is contained in:
Patrick 2024-11-09 20:59:14 +01:00
parent e8fd1488a5
commit c0f3491adc
5 changed files with 933 additions and 225 deletions

7
resources/grub.cfg Normal file
View file

@ -0,0 +1,7 @@
set timeout=0
set default=0
menuentry "Linux" {
linux /boot/vmlinuz root=/dev/sr0
initrd /boot/initrd.img
}

42
resources/install.sh Executable file
View file

@ -0,0 +1,42 @@
#!/bin/bash
# linux-deployment-scripts
# Copyright (C) 2024 VM-Experiments
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
parted -s /dev/sda mklabel msdos
parted -s /dev/sda mkpart primary linux-swap 0% 2GiB
parted -s /dev/sda mkpart primary ext4 2GiB 100%
mkswap /dev/sda1
mkfs.ext4 /dev/sda2
mount /dev/sda2 /mnt
swapon /dev/sda1
tar -xzvf /rootfs.tar.gz -C /mnt
genfstab -U /mnt >>/mnt/etc/fstab
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt /bin/bash -c "grub-mkconfig -o /boot/grub/grub.cfg"
chroot /mnt /bin/bash -c "grub-install /dev/sda"
umount -R /mnt
reboot