#!/bin/sh -e # $Id$ # TO: /sbin/manual-install . /etc/profile if [ "x$1" = "x" ]; then echo "This is a manual installer." echo "Just mount your root partition on /mnt, boot parition on /mnt/boot." echo -n "Ready to continue? [no] " read choice if [ "x$choice" = "x" -o "x$choice" = "xno" ]; then echo "Exiting." exit 1 fi else disk="$1" root="$2" fi echo -n 'Copying files, this might take a while... ' cp -a /bin /etc/ /home /lib /lib64 /root /run /sbin /usr /var /mnt/ cp /bzImage /mnt/boot/ cp /ramfs.gz /mnt/boot/ echo 'done' mkdir -p /mnt/dev mkdir -p /mnt/tmp mkdir -p /mnt/proc mkdir -p /mnt/sys mkdir -p /mnt/mnt rm -f /mnt/etc/resolv.conf if [ "x$1" = "x" ]; then echo '' echo 'Press Ctrl-C here if you want to configure bootloader yourself!' echo '' fi if [ -e "/sys/firmware/efi" ]; then mkdir -p /mnt/boot/efi/boot cp /usr/share/limine/BOOTX64.EFI /mnt/boot/efi/boot/ else if [ "x$1" = "x" ]; then echo '' lsblk echo -n 'Type your disk name (e.g. sda): ' read disk fi limine bios-install /dev/$disk cp /usr/share/limine/limine-bios.sys /mnt/boot/ fi if [ "x$1" = "x" ]; then echo '' lsblk echo -n 'Type your root partition name (e.g. sda2): ' read root fi export `blkid /dev/$root --output export` cat > /mnt/boot/limine.conf << EOF timeout: 10 /SVR4/OpenWare protocol: linux kernel_path: boot():/bzImage kernel_cmdline: loglevel=4 rootfstype=xfs root=UUID=$UUID module_path: boot():/ramfs.gz /SVR4/OpenWare (Single) protocol: linux kernel_path: boot():/bzImage kernel_cmdline: loglevel=4 rootfstype=xfs root=UUID=$UUID single module_path: boot():/ramfs.gz EOF echo 'Installation complete, you may reboot now'