LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 06-04-2023, 05:17 AM   #1
enrico68
LQ Newbie
 
Registered: Jun 2023
Posts: 2

Rep: Reputation: 0
4.2 Creating a Limited Directory Layout in the LFS Filesystem [Solved]


Hello forum members and LFS users,

this is my very first attempt at building LFS, and I am having issues as to the commands in chapter 4.2, which must be run as root. Linux Mint is my current host system.

I am having issues running the below commands as root (doing sudo before running them:

mkdir -pv $LFS/{etc,var} $LFS/usr/{bin,lib,sbin}

for i in bin lib sbin; do
ln -sv usr/$i $LFS/$i
done


case $(uname -m) in
x86_64) mkdir -pv $LFS/lib64 ;;
esac


I am having issues such as: ln: failed to create symbolic link '/bin/bin': Permission denied

or: sudo: case: command not found: bash: syntax error near unexpected token `)'


I am not a software developer nor a System Admin, just curious as to how Linux works. My previous experience with Linux was Gentoo, which I learned how to install pretty well, but LFS is another story...

Any help is much appreciated, and I fear it won't be my first request for assistance...

Thank you in advance to all of you for any support. While I wait for an answer, I will goggle the errors and see if I can find any potential work around....

Last edited by enrico68; 06-12-2023 at 08:51 AM.
 
Old 06-09-2023, 06:14 PM   #2
wiigelec
Member
 
Registered: Nov 2021
Distribution: Devuan
Posts: 67

Rep: Reputation: Disabled
the issue is sudo doesn’t handle multiple commands

sudo - su into a root shell then run the commands, or use sudo bash -c ‘command_string’

https://www.oreilly.com/library/view...4/ch17s15.html
 
Old 06-10-2023, 05:52 AM   #3
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,156

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
better put the commands in a script and then run the script with sudo
 
Old 06-12-2023, 08:56 AM   #4
enrico68
LQ Newbie
 
Registered: Jun 2023
Posts: 2

Original Poster
Rep: Reputation: 0
Than you both for your support,

It was a very newbie mistake on my part when using the sudo command with the LFS instructions, I resolved after reading your replies and the link provided by wiigelec.

I marked the thread as solved.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LFS v10 4.2. Creating a limited directory layout milton27b Linux From Scratch 2 01-24-2021 03:11 PM
Selecting the correct keyboard layout corresponding to my laptop's physical layout nidra Linux - Newbie 2 08-28-2017 08:14 AM
[SOLVED] LFS 6.7 : $LFS/sources and $LFS/tools folders missing prakashsince92 Linux From Scratch 5 12-09-2010 02:26 PM
Fedora13 - KDE 4.4.5, KXKB won't change layout if particular layout is selected CzarEjey Linux - Desktop 0 09-03-2010 02:12 AM
Switching keyboard layout - Mandriva2006 - K.D.E. Windows Layout! itz2000 Mandriva 3 08-13-2006 06:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 07:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration