#!/bin/bash in="${1:-sda}" drive="/dev/${in}" echo -e "\n\t Welcome to the Linux From Scratch - Live ISO Project \n \t2.4. Creating a New Partition Minimum Layout For a MBR Grub boot is a root and swap partition. \t This Assumes using a drive $drive \t Command: fdisk $drive This loads up the partitioning program \t Commands: n(ew) 1(st) [enter](start) +2G(size) n(ew) 2(nd) [enter](start) [enter](rest) ***\n" echo -e "\n\t 2.5. Creating a File System on the Partition \tCommand: mkfs -v -t ext4 ${drive}2 \tCommand: mkswap ${drive}1 \n\tCommand: export LFS=/mnt/lfs \tCommand: umask 022 ***\n" echo -e "\n\t2.7. Mounting the New Partition \n \tCommands:\n mkdir -pv \$LFS \n mount -v -t ext4 ${drive}2 \$LFS chown root:root \$LFS chmod 755 \$LFS /sbin/swapon -v ${drive}1 " printf "\n\t *** Finished ***\n"