diff options
author | William Harrington <kb0iic@berzerkula.org> | 2021-03-15 21:37:32 -0500 |
---|---|---|
committer | William Harrington <kb0iic@berzerkula.org> | 2021-03-15 21:37:32 -0500 |
commit | 36bdd88a911512bf029d15a362a4de1da3d288fd (patch) | |
tree | 94bcf468885eb059839df8a861f1f4b2e5ea1a1c /lfs.sh | |
parent | 28622b4d27d53c8a6d3cc35e9637f3f869157f72 (diff) |
Setup lfs environment and disk setup.
Diffstat (limited to 'lfs.sh')
-rwxr-xr-x | lfs.sh | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -0,0 +1,33 @@ +#!/bin/bash + +export LFS_VER=LFS10_1 +export LFS=/mnt/lfs +export LFS_TGT=x86_64-lfs-linux-gnu +export LFS_DISK=/dev/sdb +export LFS_ROOT=1 +export LFS_PWD=lfs + +[[ -d /mnt/lfs ]] || sudo mkdir ${LFS} + +if ! grep -q "${LFS}" /proc/mounts; then + source setupdisk.sh "${LFS_DISK}" "${LFS_ROOT}" + sudo mount "${LFS_DISK}${LFS_ROOT}" "${LFS}" + sudo chown -v $USER "$LFS" +fi + +mkdir -pv ${LFS}/tools +mkdir -pv ${LFS}/bin +mkdir -pv ${LFS}/etc +mkdir -pv ${LFS}/lib +mkdir -pv ${LFS}/sbin +mkdir -pv ${LFS}/usr +mkdir -pv ${LFS}/var + +case $(uname -m) in + x86_64) mkdir -pv ${LFS}/lib64 ;; +esac + +#sudo groupadd lfs +#sudo useradd -s /bin/bash -g lfs -m -k /dev/null lfs + +#echo -e "${LFS_PWD}\n${LFS_PWD}\n" | sudo passwd lfs |