#!/bin/sh -e # $Id$ # TO: /sbin/setup . /etc/profile clear echo 'Welcome to SVR4/OpenWare setup.' echo 'In this setup, you:' echo ' 1. select the install disk' echo ' 2. create partitions' echo -n 'Ready to continue? [no] ' read choice if [ "x$choice" = "x" -o "x$choice" = "xno" ]; then echo 'Exiting.' exit 1 fi clear echo '1. Select the install disk' echo 'Type your disk here. Bootloader will get installed there.' echo 'Type quit to quit here.' echo 'WARNING! It will overwrite your entire bootloader.' echo '' lsblk echo -n 'Disk name (e.g. sda)? [quit] ' read choice if [ "x$choice" = "x" -o "x$choice" = "xquit" ]; then echo 'Exiting.' exit 1 fi disk="$choice" clear echo '2. Create partitions' echo 'You can create partitions here.' echo 'You must create 2 partitions:' echo ' 1. Boot partition' echo ' 2. Root partition' echo 'You must mark boot partition as bootable - or it will be unbootable!' echo 'Press enter to start cfdisk.' read choice while true; do cfdisk /dev/$disk clear if [ `blkid /dev/${disk}* | wc -l` -lt 3 ]; then echo 'You have less than 2 partitions!' read choice continue fi blkid /dev/${disk}* echo -n 'Are you satisified with this choice? [no] ' read choice if [ "x$choice" = "xyes" ]; then break fi done boot=`ls -d /dev/${disk}* | head -n2 | tail -n1` root=`ls -d /dev/${disk}* | head -n3 | tail -n1` mkfs.fat -F 32 $boot mkfs.xfs -f $root mount $root /mnt mkdir -p /mnt/boot mount $boot /mnt/boot /sbin/manual-install $disk `echo $root | sed 's/\/dev\///'` umount /mnt/boot umount /mnt