LinuxQuestions.org
Visit the LQ Articles and Editorials section
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
 
LinkBack Search this Thread
Old 07-09-2005, 07:34 AM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,358

Rep: Reputation: 50
How to login root shell


Hi folks,

FC3
===

After booting the PC how to login root shell with bash prompt as

root:/#

I already re-ran following commands
[root@localhost ~]# export LFS=/mnt/lfs
[root@localhost ~]# mkdir -p $LFS/{proc,sys}
[root@localhost ~]# mount -t proc proc $LFS/proc
[root@localhost ~]# mount -t sysfs sysfs $LFS/sys
[root@localhost ~]# mount -f -t ramfs ramfs $LFS/dev
[root@localhost ~]# mount -f -t tmpfs tmpfs $LFS/dev/shm
[root@localhost ~]# mount -f -t devpts -o gid=4,mode=620 devpts $LFS/dev/pts

and could not figure out.

Yesterday I stopped after finishing " 6.9.1. Installation of Linux-Libc-Headers"
http://www.sg.linuxfromscratch.org/l...c-headers.html

Please help. TIA

B.R.
satimis
 
Old 07-09-2005, 03:41 PM   #2
[|RoA|]RoadRunner
Member
 
Registered: Jul 2005
Distribution: LFS
Posts: 43

Rep: Reputation: 15
You must also entering the chroot environment, as described here.
 
Old 07-10-2005, 06:19 AM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,358

Original Poster
Rep: Reputation: 50
Hi [|RoA|]RoadRunner,

Tks for your advice.

Quote:
You must also entering the chroot environment, as described here.
Noted.

Whether I need to repeat following steps in addition which I already completed before turning off the FC3 host box

6.8. Populating /dev
http://www.sg.linuxfromscratch.org/l...6/devices.html


OR
===
I have to only repeat following steps which I also completed before turning down the FC3 box.

6.7. Creating the passwd, group, and log Files
http://www.sg.linuxfromscratch.org/l.../pwdgroup.html
# exec /tools/bin/bash --login +h

Then 6.8. Populating /dev
# mount -n -t ramfs none /dev
# mount -t devpts -o gid=4,mode=620 none /dev/pts
# mount -t tmpfs none /dev/shm

TIA

B.R.
satimis
 
Old 07-10-2005, 02:55 PM   #4
[|RoA|]RoadRunner
Member
 
Registered: Jul 2005
Distribution: LFS
Posts: 43

Rep: Reputation: 15
Hi,

You are right! There are many commands which must typed to come at 6.9.1 again.

You can start to type all commands from chapter 6 up to the 6.9.1, and then go on to the end . Then there will come a few errors about " file exist " and so, but You can ignore it ( You then know that Your first attempt was successful )

But You can save time and type some things not again. Namely You can skip chapter 6.5, 6.6; And in 6.7 You can skip safely the creation of the /etc/group file.
 
Old 07-10-2005, 08:43 PM   #5
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,358

Original Poster
Rep: Reputation: 50
Hi [|RoA|]RoadRunner,

Tks for your advice.

Quote:
But You can save time and type some things not again. Namely You can skip chapter 6.5, 6.6; And in 6.7 You can skip safely the creation of the /etc/group file.
Please advise whether I have to re-run following commands;

1)
6.4. Changing Ownership
chown -R 0:0 /tools

2)
6.7. Creating the passwd, group, and log Files
Create the /etc/passwd file by running the following command:

cat > /etc/passwd << "EOF"
root:x:0:0:root:/root:/bin/bash
EOF

exec /tools/bin/bash --login +h

touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
chgrp utmp /var/run/utmp /var/log/lastlog
chmod 664 /var/run/utmp /var/log/lastlog

TIA

B.R.
satimis
 
Old 07-10-2005, 09:07 PM   #6
kjordan
Member
 
Registered: Jul 2004
Distribution: LFS, I felt the itch and scratched it
Posts: 227

Rep: Reputation: 31
No, you don't need to rerun those.
 
Old 07-11-2005, 01:36 PM   #7
[|RoA|]RoadRunner
Member
 
Registered: Jul 2005
Distribution: LFS
Posts: 43

Rep: Reputation: 15
kjordan is right.

Satimis, don't be afraid. The commands in the chapters 6.0 to 6.9.1 don't destroy anything, even if You type it twice or triple .

Go and make Your LFS running.
 
Old 07-11-2005, 08:07 PM   #8
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,358

Original Poster
Rep: Reputation: 50
Hi [|RoA|]RoadRunner,

Tks for your advice.

Quote:
..... don't be afraid. The commands in the chapters 6.0 to 6.9.1 don't destroy anything, even if You type it twice or triple
Noted with thanks.

I'll continue building LFS 6.0 disregarding success of failure. After finish I'll do another round but on LFS 6.1 instead which was released on July 10, 2005, last Sunday.

B.R.
satimis
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between normal shell and login shell Manish Linux - General 7 11-14-2012 08:30 AM
wrong login shell prevent root login cefs99 Linux - Security 4 05-31-2006 08:28 AM
How to check in a script whether the shell is login or non login? frankie_DJ Programming 5 09-06-2005 06:01 AM
root login shell tcsh does not allow "su" CooManChu Linux - Security 2 12-24-2004 02:23 PM
Unable to launch X apps with non login root shell kc00l Slackware 2 11-24-2003 03:32 AM


All times are GMT -5. The time now is 10:47 PM.

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