LinuxQuestions.org
Help answer threads with 0 replies.
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 01-26-2015, 04:33 AM   #1
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
/bin/bash command not find, strange behavior of passwd , kworker is dying after start


Hi,
I finished LFS 7.6 book, system is bootable, but after login as root (on real lfs) I got message
Code:
lfs login: root
Cannot execute /bin/bash : No such file or directory
and I am loged out. Moreover after 20 or 30 sec. It appears message
Quote:
kworker is dying
and login prompt disappears completely, but system is responsive, after ctrlaltdel it shutdowns cleanly. To try to handle these issues I chrooted form host build system, now as (ch)root
Code:
 
root:/# su
Cannot execute /bin/bash : No such file or directory
so 'su' has the same issue. This is happening only with root account. I've created users piotr, barbara and
Code:
barbara $ su piotr
works fine but
Code:
barbara $ su 
Cannot execute /bin/bash : No such file or directory
From /etc/passwd
Code:
root:x:0:0:root:/root:/bin/bash 
bin:x:1:1:bin:/dev/null:/bin/false
daemon:x:6:6:Daemon User:/dev/null:/bin/false
messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false
nobody:x:99:99:Unprivileged User:/dev/null:/bin/false
The path in chroot environment is set to
Code:
root:/# echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin

Last edited by igadoter; 01-26-2015 at 07:59 AM. Reason: partially resolved
 
Old 01-26-2015, 08:16 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
You have not then installed bash. Install it again.

Check whether you have installed it in /tools/bin. If so make a symlink from there to /bin.

Code:
ln -s /tools/bin/bash /bin/bash
 
Old 01-26-2015, 09:27 AM   #3
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Quote:
Originally Posted by veerain View Post
You have not then installed bash. Install it again.

Check whether you have installed it in /tools/bin. If so make a symlink from there to /bin.

Code:
ln -s /tools/bin/bash /bin/bash
No!
If you are in the new booted LFS, /tools is no longer needed and should NOT be referenced, you should remove it ( it's a good idea to keep a copy of it so that you don't have to rebuild the tool chain all the time ), your new LFS should have bash in /bin/bash make sure it was installed as veerain said.
 
Old 01-26-2015, 11:39 AM   #4
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717

Original Poster
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
I don't know the cause of such strange behavior. But I fixed this with 'chsh' (change shell) command, as chroot
Code:
root/# chsh -s /bin/bash root
There is no problem now. Out of that everything was fine, there is /bin/bash, all entries in /etc/passwd are ok. This is issue concerning 'shadow' package. I hope this solution might be helpful for others.
 
Old 01-27-2015, 04:08 AM   #5
EmaRsk
Member
 
Registered: Mar 2006
Distribution: Mint, WSL Ubuntu
Posts: 134

Rep: Reputation: 32
Maybe there was an extra space after "/bin/bash" in your /etc/passwd ?
There is one in your copy-paste, and in your error messages before the ":".

Last edited by EmaRsk; 01-27-2015 at 04:10 AM.
 
  


Reply

Tags
/bin/bash, kworker, passwd



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
[SOLVED] strange behavior of find tkmsr Linux - Newbie 16 01-07-2011 04:05 PM
strange behavior of find tkmsr Debian 8 05-12-2010 08:31 AM
Really strange problem - RedHat /bin/sh vs /bin/bash leeharris Programming 4 02-13-2009 06:35 AM
Unexpected Behavior (passwd command) Penguin666 Linux - General 3 11-19-2003 11:34 PM
linux command error message bash: /usr/bin/find: No such file or directory sundaram123 Linux - General 8 04-02-2002 07:18 AM

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

All times are GMT -5. The time now is 10:08 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