차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
linuxfromscratch [2024/06/07 19:38] – [Glibc 2.39 Testsuite Fail] baecylinuxfromscratch [2024/06/16 23:14] (현재) – [PS1 설정] baecy
줄 1: 줄 1:
-====== Linux From Scratch ======+===== 토막 상식 =====
  
 +==== for, echo and sed =====
 +
 +<code bash>
 +for i in $(echo "ldapadd, ldapcompare, ldapdelete, ldapexop, ldapmodify, slapschema, slaptest" | sed 's/,/ /g') ; do find /usr/bin -type f -name $i ; done
 +</code>
 ==== Grep && Tar ==== ==== Grep && Tar ====
  
줄 168: 줄 173:
 PS1_USER='\[$(tput setaf 75)\][ \[$(tput sgr0)\]\w \[$(tput setaf 75)\]] \[$(tput sgr0)\]\$\n' PS1_USER='\[$(tput setaf 75)\][ \[$(tput sgr0)\]\w \[$(tput setaf 75)\]] \[$(tput sgr0)\]\$\n'
 PS1_HEAD='\[$(tput setaf 229)\]\u\[$(tput setaf 199)\]@\[$(tput setaf 215)\]\h ' PS1_HEAD='\[$(tput setaf 229)\]\u\[$(tput setaf 199)\]@\[$(tput setaf 215)\]\h '
-if [ "$(awk '$5=="/" {print $1}' </proc/1/mountinfo)" != "$(awk '$5=="/" {print $1}' </proc/$$/mountinfo)" ] ; th +if [ "$(awk '$5=="/" {print $1}' </proc/1/mountinfo)" != "$(awk '$5=="/" {print $1}' </proc/$$/mountinfo)" ] ; then
-en                                                                                                                +
     if [ $(id -u) -eq 0 ] ; then     if [ $(id -u) -eq 0 ] ; then
         PS1="<Chroot>${PS1_HEAD}${PS1_ROOT}"         PS1="<Chroot>${PS1_HEAD}${PS1_ROOT}"
     else     else
-        PS1="<Chroot>${PS1_HEAD}${PS1_USER}"                                                                      +        PS1="<Chroot>${PS1_HEAD}${PS1_USER}"
     fi     fi
 else else
     if [ $(id -u) -eq 0 ] ; then     if [ $(id -u) -eq 0 ] ; then
-        PS1="${PS1_HEAD}${PS1_ROOT}"                                                                              +        PS1="${PS1_HEAD}${PS1_ROOT}"
     else     else
         PS1="${PS1_HEAD}${PS1_USER}"         PS1="${PS1_HEAD}${PS1_USER}"
줄 189: 줄 193:
 LFS 진행에 필요한 패키지 설치 LFS 진행에 필요한 패키지 설치
  
-<codelang=bash >+<code bash >
 sudo apt install build-essentials bison gawk m4 texinfo texinfo  ## 필수 사항 sudo apt install build-essentials bison gawk m4 texinfo texinfo  ## 필수 사항
 sudo apt install gettext libisl-dev                              ## 선택 사항 sudo apt install gettext libisl-dev                              ## 선택 사항
줄 332: 줄 336:
  
 ==== Textinfo Dir File Rebuild ==== ==== Textinfo Dir File Rebuild ====
 +
 <code lang=bash> <code lang=bash>
 pushd /usr/share/info pushd /usr/share/info
줄 338: 줄 343:
     do install-info $f dir 2>/dev/null     do install-info $f dir 2>/dev/null
   done   done
-popd</code> \\+popd 
 +</code>
  
 +----
 ==== Swap file ==== ==== Swap file ====
 +
 <code cmd=true cmdout=6,7> <code cmd=true cmdout=6,7>
 export LFS=/mnt/lfs export LFS=/mnt/lfs
줄 350: 줄 358:
 no label, UUID=890ba9a5-da48-4374-84ce-b71b91863e00 no label, UUID=890ba9a5-da48-4374-84ce-b71b91863e00
 sudo swapon $LFS_SWAP sudo swapon $LFS_SWAP
-sudo echo "$LFS_SWAP  swap  swap  defaults  0  0" >> /etc/fstab</code>\\+sudo echo "$LFS_SWAP  swap  swap  defaults  0  0" >> /etc/fstab 
 +</code> 
 + 
 +---- 
 +==== Binutils 설치하기 전에 ISL 설치하기 ==== 
 + 
 +GMP를 먼저 설치 
  
-==== Binutils 설치하기 전에 ISL 설치하기 (실패) ==== 
-GMP를 먼저 설치 \\ 
 <code lang=bash> <code lang=bash>
 ./configure --prefix=/usr    \ ./configure --prefix=/usr    \
줄 361: 줄 373:
 make make
 make check 2>&1 | tee gmp-check.log make check 2>&1 | tee gmp-check.log
-## 책에서는 199이라고 나오지만 실제는 200이 나옴 
 awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log
-</code>\\ +</code> 
-LFS 12.1 기준으로 8.20 참고 \\ + 
-[[https://libisl.sourceforge.io/|ISL Homepage]]에서 받아서 준비 \\+[[https://libisl.sourceforge.io/|ISL Homepage]]에서 받아서 준비 
 <code lang=bash> <code lang=bash>
-./configure --prefix=/usr --sysconfdir=/etc --disable-static --with-gmp=system+./configure --prefix=/usr --disable-static --with-gmp=system
 make make
-make install</code> \\+make install 
 +</code>
  
-==== BLFS 시작하기 전에 필요한 패키지 ==== +----
-sudo, nfs-utils(또는 sshfs), openssh, wget+
  
 ==== $LFS/sources에서 디렉토리 검색 ==== ==== $LFS/sources에서 디렉토리 검색 ====
 +
 <code lang=bash> <code lang=bash>
 alias dirfind="find -mindepth 1 -maxdepth 1 -type d | sed 's@^./@@'" alias dirfind="find -mindepth 1 -maxdepth 1 -type d | sed 's@^./@@'"
줄 380: 줄 393:
 rm -rf $(dirfind)  ## 설치 완료된 소스 디렉토리 삭제 rm -rf $(dirfind)  ## 설치 완료된 소스 디렉토리 삭제
 ## 설치 완료된 패키지 디렉토리만 삭제할거면 다음과 같이 ## 설치 완료된 패키지 디렉토리만 삭제할거면 다음과 같이
-alias SearchAndDestroy='find -mindepth 1 -maxdepth 1 -type d -exec rm -rf {} \;'</code> \\+alias SearchAndDestroy='find -mindepth 1 -maxdepth 1 -type d -exec rm -rf {} \;' 
 +</code>
  
 +----
 ==== SBU 측정 ==== ==== SBU 측정 ====
 <code lang=bash> <code lang=bash>
  • linuxfromscratch.1717789135.txt.gz
  • 마지막으로 수정됨: 2024/06/07 19:38
  • 저자 baecy