diff options
author | William Harrington <kb0iic@berzerkula.org> | 2021-12-11 00:52:08 -0600 |
---|---|---|
committer | William Harrington <kb0iic@berzerkula.org> | 2021-12-11 00:52:08 -0600 |
commit | 2c8204d6325a1a6607392d5905227b9043da17cc (patch) | |
tree | 5a2d9047d0a3fb5664c17284b92c6e572507d062 /setupdisk.sh | |
parent | f699702e72de8200632cfb95350ad51bb68c4b6f (diff) |
Major updates.
Diffstat (limited to 'setupdisk.sh')
-rw-r--r-- | setupdisk.sh | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/setupdisk.sh b/setupdisk.sh index 659a621..6d4f2c6 100644 --- a/setupdisk.sh +++ b/setupdisk.sh @@ -1,36 +1,36 @@ -#!/bin/bash - -printf "%b" " ${IGRN}Creating primary partition at \ -${IWHT}${LFS_DISK}${RST}...\n" -sudo fdisk "${LFS_DISK}" >/dev/null 2>&1 << EOF -o -n -p -1 - -+14G -a -1 -n -p -2 - - -p -w -q -EOF -retval=$? -if [[ "$retval" -ne 0 ]]; then - printf "%b" " ${IGRN}Creating partition ${IWHT}${LFS_DISK}${LFS_PART} " - fail "FAILED!" - exit 1 -fi -printf "%b" " ${IGRN}Formatting ${IWHT}${LFS_DISK}${LFS_PART} with \ -${IWHT}${LFS_FS}${IGRN} filesystem and label ${IWHT}${LFS_VER}${RST}\n" -if ! sudo /sbin/mkfs -t "${LFS_FS,,}" -L "${LFS_VER}" -F "${LFS_DISK}${LFS_PART}" >/dev/null 2>&1; then - printf "%b" " ${IGRN}Creating ${IWHT}${LFS_FS}${IGRN} filesystem at \ -${IWHT}${LFS_DISK}${LFS_PART} " - fail "FAILED!" - exit 1 -fi +#!/bin/bash
+
+printf "%b" " ${IGRN}Creating primary partition at \
+${IWHT}${LFS_DISK}${RST}...\n"
+sudo fdisk "${LFS_DISK}" >/dev/null 2>&1 << EOF
+o
+n
+p
+1
+
++14G
+a
+1
+n
+p
+2
+
+
+p
+w
+q
+EOF
+retval=$?
+if [[ "$retval" -ne 0 ]]; then
+ printf "%b" " ${IGRN}Creating partition ${IWHT}${LFS_DISK}${LFS_PART} "
+ fail "FAILED!"
+ exit 1
+fi
+printf "%b" " ${IGRN}Formatting ${IWHT}${LFS_DISK}${LFS_PART} with \
+${IWHT}${LFS_FS}${IGRN} filesystem and label ${IWHT}${LFS_VER}${RST}\n"
+if ! sudo /sbin/mkfs -t "${LFS_FS,,}" -L "${LFS_VER}" -F "${LFS_DISK}${LFS_PART}" >/dev/null 2>&1; then
+ printf "%b" " ${IGRN}Creating ${IWHT}${LFS_FS}${IGRN} filesystem at \
+${IWHT}${LFS_DISK}${LFS_PART} "
+ fail "FAILED!"
+ exit 1
+fi
|