LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   A mistake at Chapter 6 has crashed the system (http://www.linuxquestions.org/questions/linux-from-scratch-13/a-mistake-at-chapter-6-has-crashed-the-system-930475/)

sunmoon 02-21-2012 07:02 AM

A mistake at Chapter 6 has crashed the system
 
The reference book is LFS 7.0.
Host system is Ubuntu 11.10.

I will try to recall all the steps I have done before the problem appeared, but it can be not precise...

I had to reload the system after Chapter 5.3 "Stripping", then continued from Chapter 5.4. It seems that at Chapter 6.4. "Entering the Chroot Environment" the root directory was not changed, because the directory /sources was not accessible. But I did not pay attention and continued up to Chapter "6.7. Linux-3.1 API Headers". So all the directories and links of chapters 6.5 and 6.6 where created over another root directory.

Moreover, it seems I entered as a root when creating directories after the message ".. have no permissions" appeared.

Then I rebooted the PC and I am observing the black screen now. Grub2 screen allows to access to rescue mode, but I have no idea what to do there to repair the system.

Now the questions: Could you, please, explain me what can be done to repair my host system, and why the fault has happen?

Regards...

spiky0011 02-21-2012 12:15 PM

Hi

Here is a good page to look
https://help.ubuntu.com/community/LiveCdRecovery

sunmoon 02-21-2012 12:35 PM

I assume the problem is that the files /etc/passwd and /etc/group were redefined on the host system by the commands in Chapter 6.6. Might be a good idea to restore them from another host. Other thoughts?

spiky0011 02-21-2012 12:40 PM

Hi

The link I posted shows how to create a new user
You could then give them root privilages.
Might be easier to reinstall if you have over written other dirs/files

sunmoon 02-21-2012 12:47 PM

Tnx, spiky0011
Yes, re-installation can be a solution but not for a LFS user .)
As I sad I still have access to the shell, the black screen appears and holds after the Ubuntu logo with dots. Looks like I still have a chance to recover.

stoat 02-21-2012 12:50 PM

Quote:

Originally Posted by sunmoon

I assume the problem is that the files /etc/passwd and /etc/group were redefined...

Both of those may have hidden backups. It's worth a try anyway.

sunmoon 02-21-2012 01:03 PM

Quote:

Originally Posted by stoat (Post 4608381)
Both of those may have hidden backups.

Helped!
Code:

cp /etc/group- /etc/group
cp /etc/passwd- /etc/passwd

I have working system now! :) Tnx a lot!


All times are GMT -5. The time now is 12:00 PM.