LinuxQuestions.org
Review your favorite Linux distribution.
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 02-17-2013, 10:51 AM   #1
giuliom_95
Member
 
Registered: Feb 2013
Distribution: LFS
Posts: 42

Rep: Reputation: Disabled
Problems with logging in after finishing the 7.2 LFS book


Hi all,
I've just finished to compile my own LFS. I've rebooted and it's all ok until I try to log in: every time after I insert the root credentials and it tolds me the last login date and that there are no new emails, it promts:
Code:
cannot run command `/bin/bash': No such file or directory
and asks me again to log in.
What can I do? the LFS version I've read is the 7.2
 
Old 02-17-2013, 11:15 AM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,614
Blog Entries: 1

Rep: Reputation: 226Reputation: 226Reputation: 226
Hi can you post fstab file
 
Old 02-17-2013, 11:25 AM   #3
giuliom_95
Member
 
Registered: Feb 2013
Distribution: LFS
Posts: 42

Original Poster
Rep: Reputation: Disabled
Code:
# Begin /etc/fstab

# file system  mount-point  type     options             dump  fsck
#                                                              order

/dev/sda6      /            ext3     defaults            1     1
proc           /proc        proc     nosuid,noexec,nodev 0     0
sysfs          /sys         sysfs    nosuid,noexec,nodev 0     0
devpts         /dev/pts     devpts   gid=5,mode=620      0     0
tmpfs          /run         tmpfs    defaults            0     0
devtmpfs       /dev         devtmpfs mode=0755,nosuid    0     0

# End /etc/fstab
 
Old 02-17-2013, 11:29 AM   #4
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,614
Blog Entries: 1

Rep: Reputation: 226Reputation: 226Reputation: 226
Hi

I have seen this problem I think I had it but cant find the thread, I,ll keep looking by the way fstab ok
 
Old 02-17-2013, 11:44 AM   #5
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,614
Blog Entries: 1

Rep: Reputation: 226Reputation: 226Reputation: 226
Can you post /etc/passwd file
 
Old 02-17-2013, 11:46 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by giuliom_95 View Post
Hi all,
I've just finished to compile my own LFS. I've rebooted and it's all ok until I try to log in: every time after I insert the root credentials and it tolds me the last login date and that there are no new emails, it promts:
Code:
cannot run command `/bin/bash': No such file or directory
and asks me again to log in.
What can I do? the LFS version I've read is the 7.2
The shell to start when logging in is defined in /etc/passwd and seems to point at /bin/bash.
- Do you have a correct root entry in /etc/passwd?
- Does /bin/bash exist?
 
Old 02-17-2013, 11:47 AM   #7
giuliom_95
Member
 
Registered: Feb 2013
Distribution: LFS
Posts: 42

Original Poster
Rep: Reputation: Disabled
Quote:
The shell to start when logging in is defined in /etc/passwd and seems to point at /bin/bash.
- Do you have a correct root entry in /etc/passwd?
- Does /bin/bash exist?
/bin/bash file exists and I think that the /etc/passwd file it's ok:
Quote:
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/dev/null:/bin/false
nobody:x:99:99:Unprivileged User:/dev/null:/bin/false

@spiky: Thanks for replies spiky, but I think that the problem is in the shadow package because also if I try to run 'su' by an "chrooted" system I get the same error! So I've tried to re-compile and re-install shadow but I haven't not got results... Other suggestions?

Last edited by giuliom_95; 02-17-2013 at 11:50 AM.
 
Old 02-17-2013, 11:49 AM   #8
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by giuliom_95 View Post
Thanks for replies spiky, but I think that the problem is in the shadow package because also if I try to run 'su' by an "chrooted" system I get the same error!
No, the problem is that bash cannot be found and/or executed.
 
Old 02-17-2013, 11:49 AM   #9
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,614
Blog Entries: 1

Rep: Reputation: 226Reputation: 226Reputation: 226
post /etc/passwd just to be sure
 
Old 02-17-2013, 11:53 AM   #10
giuliom_95
Member
 
Registered: Feb 2013
Distribution: LFS
Posts: 42

Original Poster
Rep: Reputation: Disabled
I've posted /etc/passwd up of this
 
Old 02-17-2013, 11:57 AM   #11
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Is bash executable?
Code:
cd /bin
./bash --version

# and
file bash
 
Old 02-17-2013, 12:18 PM   #12
giuliom_95
Member
 
Registered: Feb 2013
Distribution: LFS
Posts: 42

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by druuna View Post
Is bash executable?
Code:
cd /bin
./bash --version

# and
file bash
Yes the /bin/bash file is executable (-rwxr-xr-x) and the output of suggested commands are:
Code:
root:/bin# ./bash --version
GNU bash, version 4.2.36(1)-release (i686-pc-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Code:
root:/bin# file bash
bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.25, not stripped
 
Old 02-17-2013, 12:22 PM   #13
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,614
Blog Entries: 1

Rep: Reputation: 226Reputation: 226Reputation: 226
Hi

Not sure if I,m right or it will add info
Code:
echo $SHELL
Dont know if you can run that
 
Old 02-17-2013, 12:31 PM   #14
giuliom_95
Member
 
Registered: Feb 2013
Distribution: LFS
Posts: 42

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by spiky0011 View Post
Hi

Not sure if I,m right or it will add info
Code:
echo $SHELL
Dont know if you can run that
I can run this only by a chrooted system and I think that it's the same of the host OS but I'll however post the output:
Code:
root:/# echo $SHELL
/bin/bash
 
Old 02-17-2013, 12:48 PM   #15
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Just to be sure: You cannot log into LFS, so am I assuming correctly that all the commands shown above are done on your host and from within the chrooted environment?

I'm asking because this might look strange (not 100% sure):
Quote:
root:/bin# file bash
bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.25, not stripped
LFS 7.2 uses kernel/header version 3.5.2 and I would expect this to show and not 2.6.25. But like I said: Not 100% sure about that.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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] Which version of book to use for BLFS??? (LFS-6.7 used for building LFS) rkmv Linux From Scratch 3 02-21-2012 05:32 PM
LFS newbie stuck in Linux API headers step 5.5 LFS book 6.3 Vxplus Linux From Scratch 2 11-10-2008 08:13 PM
error using lfs while compiling lfs book's 6.12 (gcc-4.1.2) section aditya_gpch Linux From Scratch 3 04-24-2008 04:23 PM
LFS Book Chapter 6 - 1st step (chroot to /mnt/lfs) doens't work bauld Linux From Scratch 11 03-15-2006 12:31 AM


All times are GMT -5. The time now is 08:16 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration