QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1911|回复: 16

LFS 6.1 can't login

[复制链接]
发表于 2005-8-6 00:14:53 | 显示全部楼层 |阅读模式
Hi folks,

Finally I finished the building of LFS 6.1.  Having edited FC3 Host /etc/grub.con manually and with command "shutdown -r now" to reboot the PC.

LFS 6.1 booted but can't login.

local.localdomain login:
(I suppose it is LFS login)

Tried
Login = root/LFS/lls
Password = lfs_password/host_password

Always mentioning "Login incorrect"

On Host's console I can login LFS with
$ su - lfs
password = lfs_password
lfs~:#

Repeated following steps and met with failure;

1)
8.3. Linux-2.6.11.12
http://www.linuxfromscratch.org/ ... apter08/kernel.html
and
8.4. Making the LFS System Bootable
http://www.linuxfromscratch.org/ ... chapter08/grub.html

Recompiled kernel and then ran
root:/sources/linux-2.6.11.12# dd if=/boot/grub/stage1 of=/dev/fd0 bs=512 count=1[code:1]
1+0 records in
1+0 records out[/code:1]
root:/sources/linux-2.6.11.12# dd if=/boot/grub/stage2 of=/dev/fd0 bs=512 seek=1[code:1]
198+1 records in
198+1 records out[/code:1]

Rescue floppy can't be created.  Tested on PCs to boot, not working

2)
root:/sources/linux-2.6.11.12# grub

grub> root (hd0,5) [Enter]

Error 21: Selected disk does not exist

grub> setup (hd0) [Enter]

Error 12: Invalid device requested

grub> root

Pressing Tab no function

3)
root:/sources/linux-2.6.11.12# shutdown -r now

LFS kernel was not found on the boot loader.  I have to start FC3 Host to edit /etc/grub.conf manually.

Kindly advise.  TIA

B.R.
satimis
 楼主| 发表于 2005-8-6 02:25:00 | 显示全部楼层

LFS 6.1 is up

Hi folks,

Finally LFS 6.1 is up running:

After booting it prompted
localhost.localdomain login: root
password:
-bash-3.0# ls /boot/[code:1]
Config-2.6.11.12.grub lfskernel-2.6.11.12 system.map-2.6.11.12[/code:1]

Only a black screen displayed because no desktop package installed.  Editor -vim

SOLUTION
=========

Copied Root password of FC3 Host on /etc/shadow to /mnt/lfs/etc/shadow

B.R.
satimis
回复

使用道具 举报

发表于 2005-8-6 09:02:26 | 显示全部楼层
    
回复

使用道具 举报

 楼主| 发表于 2005-8-6 11:20:54 | 显示全部楼层
Hi applepie,

    
I don't know its cause and I still need to find it out if possible.

I completed
6.54. Shadow-4.0.9
http://www.linuxfromscratch.org/lfs/view/stable/chapter06/shadow.html

There was root password entry on /mnt/lfs/etc/shadow but it did not work.  I just copied the password of lfs-user from /etc/shadow of the FC3 Host to /mnt/lfs/etc/shadow using it as the root password of LFS 6.1.  Then it worked.

Strange !!!

satimis
回复

使用道具 举报

发表于 2005-8-6 13:16:09 | 显示全部楼层
did u set a new password for root after installing the Shadow?
回复

使用道具 举报

 楼主| 发表于 2005-8-6 15:18:59 | 显示全部楼层
Hi applepie,

did u set a new password for root after installing the Shadow?
IIRC, it asked for root password and I typed in the lfs-user password of the FCHost.  But it did not work on login.

There was entry on /mnt/lfs/etc/shadow.  I copied the lfs-user password of the Host from /etc/shadow to /mnt/lfs/etc/shadow.  Then it worked.  That is the story.

B.R.
satimis
回复

使用道具 举报

发表于 2005-8-6 22:12:48 | 显示全部楼层
after you chroot /mnt/lfs, when the installation of Shadow is completed, you must set a password for root. and make sure the password is saved in "/etc/shadow"(/mnt/lfs/etc/shadow).
回复

使用道具 举报

 楼主| 发表于 2005-8-6 23:09:08 | 显示全部楼层
Hi blackwolf,

after you chroot /mnt/lfs, when the installation of Shadow is completed, you must set a password for root. and make sure the password is saved in "/etc/shadow"(/mnt/lfs/etc/shadow).
Sorry, I don't follow.

On building LFS 6.1 I ran "chroot" several times because taking several days to complete.  I'm not allowed leaving the PC switched on unattended.

In going through my Notes, before 6.9. Linux-Libc-Headers-2.6.11.2 the PC was started with "chroot" run.  Then continued through 6.54. Shadow-4.0.  The next "chroot" was before 7.6. Configuring the Linux Console.

Checking /mnt/lfs/etc/shadow found entry having been made there as root password supposed but it did not work.  Then I copied the password of lfs-user, the Host, from /etc/shadow to /mnt/lfs/etc/shadow making the same as root password of LFS 6.1.  Then it worked.

B.R.
satimis
回复

使用道具 举报

发表于 2005-8-7 11:26:07 | 显示全部楼层
In the Chapter 6 and later, If you restart the host computer, you must chroot first before you do anything.
回复

使用道具 举报

 楼主| 发表于 2005-8-7 19:07:23 | 显示全部楼层
Hi blackwolf,

In the Chapter 6 and later, If you restart the host computer, you must chroot first before you do anything.
Each time rebooting the Host computer after "chroot" I repeated;
6.8.1. Creating Initial Device Nodes
6.8.2. Mounting tmpfs and Populating /dev

The Host computer, a PC for testing, has been restarted several times because I can't complete building LFS in one day.  Beside I'm not allowed to leave the computer switched on unattended.  

B.R.
satimis
回复

使用道具 举报

发表于 2005-8-8 09:56:05 | 显示全部楼层
After the Shadow is installed.
run:
[code:1]passwd root[/code:1]
to set password for root of LFS system.
回复

使用道具 举报

 楼主| 发表于 2005-8-8 10:05:16 | 显示全部楼层
Hi blackwolf,

After the Shadow is installed.......
I did this step keying the password of the Host's lfs-user as the root password of LFS 6.1  I also discovered on /mnt/lfs/etc/shadow there was entry.  But it did not work.  I have to manually copy the password of the Host's lfs-user from file /etc/shadow to /mnt/lfs/etc/shadow, then login as root LFS 6.1 worked.  There was a little bid strange here I failed to discover its cause.

B.R.
satimis
回复

使用道具 举报

发表于 2005-8-8 10:20:36 | 显示全部楼层
create another userID and set its password by "passwd". Try to login with this new userID. Can it working?
回复

使用道具 举报

 楼主| 发表于 2005-8-8 10:29:39 | 显示全部楼层
Hi blackwolf,

create another userID and set its password by "passwd"...
Whether you suggested;

1) Start LFS 6.1
2) # password user_name
3) key in password
4) reboot LFS 6.1
5) login as user_name
password

NOT on FC3 Host

Tks

B.R.
satimis
回复

使用道具 举报

 楼主| 发表于 2005-8-8 14:37:51 | 显示全部楼层
Hi blackwolf,

Further to my last posting, performed following test;

Started LFS 6.1and login as root

# useradd ABC
# passwd ABC
NewPassword
Re-Enter

logout and relogin as ABC.  It worked without problem.

satimis
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-10-6 16:49 , Processed in 0.062094 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表