LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 839|回复: 8

lfs登录不上去

[复制链接]
发表于 2009-9-24 22:39:54 | 显示全部楼层 |阅读模式
LFS SVN 20090917
login之后提示no mail,然后又出login
grub启动选项:
root (hd0,7)
kernel /boot/lfskernel-2.6.30.5 root=/dev/sda8 ro
boot

我用的是linux-2.6.30.5,不是最新的2.6.31,有没有什么问题?

chroot不进去,提示段错误
貌似是/etc有问题
前一次chroot问题删除 /etc就行了

不过cat > ... << "EOF"
...
EOF
都是照抄的啊

  1. 24/09/2009 22:37:12
  2. root (/mnt/lfs/etc)
  3. << ls
  4. bashrc   group-   inittab      ld.so.conf   login.access  modprobe.conf  passwd     rc.d         shadow       vimrc
  5. default  grub     inputrc      lfs-release  login.defs    mtab           passwd-    resolv.conf  sysconfig
  6. fstab    gshadow  iproute2     limits       man_db.conf   nsswitch.conf  profile    rpc          syslog.conf
  7. group    hosts    ld.so.cache  localtime    mke2fs.conf   opt            protocols  services     udev
复制代码
发表于 2009-9-25 06:39:25 | 显示全部楼层
跟内核版本无关,反而是抄的哪些是什麽请详细说明
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-9-25 20:23:28 | 显示全部楼层
  1. 25/09/2009 20:19:58                                                        
  2. root (/mnt/lfs/etc)                                                        
  3. << cat fstab                                                               
  4. # /etc/fstab                                                               
  5. # <file-system>                                 <mount-point>   <type>  <options>  <dump>  <fsck-order>                                               
  6. #                                                                          
  7. UUID=b4b6ed6d-d7e5-4017-b04c-5082d76a57f2       /               ext3    defaults   1       1                                                         
  8. UUID=52ef0edb-bf12-44c6-86f1-d6ef527bfe1b       swap            swap    pri=1              0       0                                                  
  9. /dev/sda7                                       /home           ext4    defaults   0       0                                                         
  10. proc                                            /proc           proc    defaults        0          0                                                  
  11. sysfs                                           /sys            sysfs   defaults        0          0                                                  
  12. devpts                                          /dev/pts        devpts  gid=4,mode=620  0          0                                                  
  13. tmpfs                                           /dev/shm        tmpfs   defaults        0          0                                                  
  14. # End of file
  15. 25/09/2009 20:20:03
  16. root (/mnt/lfs/etc)
  17. << cat group        
  18. root:x:0:           
  19. bin:x:1:            
  20. sys:x:2:            
  21. kmem:x:3:           
  22. tty:x:4:            
  23. tape:x:5:           
  24. daemon:x:6:         
  25. floppy:x:7:         
  26. disk:x:8:           
  27. lp:x:9:            
  28. dialout:x:10:      
  29. audio:x:11:         
  30. video:x:12:         
  31. utmp:x:13:         
  32. usb:x:14:           
  33. cdrom:x:15:         
  34. mail:x:34:         
  35. nogroup:x:99:      
  36. 25/09/2009 20:20:10
  37. root (/mnt/lfs/etc)
  38. << cat passwd      
  39. root:x:0:0:root:/root:/bin/bash
  40. bin:x:1:1:bin:/dev/null:/bin/false
  41. nobody:x:99:99:Unprivileged User:/dev/null:/bin/false
  42. 25/09/2009 20:20:12                                 
  43. root (/mnt/lfs/etc)                                 
  44. << cat ld.so.conf                                    
  45. # Begin /etc/ld.so.conf                              
  46. /usr/local/lib
  47. /opt/lib
  48. # End /etc/ld.so.conf
  49. 25/09/2009 20:20:24
  50. root (/mnt/lfs/etc)
  51. << cat inittab
  52. # Begin /etc/inittab
  53. id:3:initdefault:
  54. si::sysinit:/etc/rc.d/init.d/rc sysinit
  55. l0:0:wait:/etc/rc.d/init.d/rc 0
  56. l1:S1:wait:/etc/rc.d/init.d/rc 1
  57. l2:2:wait:/etc/rc.d/init.d/rc 2
  58. l3:3:wait:/etc/rc.d/init.d/rc 3
  59. l4:4:wait:/etc/rc.d/init.d/rc 4
  60. l5:5:wait:/etc/rc.d/init.d/rc 5
  61. l6:6:wait:/etc/rc.d/init.d/rc 6
  62. ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
  63. su:S016:once:/sbin/sulogin
  64. 1:2345:respawn:/sbin/agetty tty1 9600
  65. 2:2345:respawn:/sbin/agetty tty2 9600
  66. 3:2345:respawn:/sbin/agetty tty3 9600
  67. 4:2345:respawn:/sbin/agetty tty4 9600
  68. 5:2345:respawn:/sbin/agetty tty5 9600
  69. 6:2345:respawn:/sbin/agetty tty6 9600
  70. # End /etc/inittab
复制代码
有什么问题?
ps:Grub启动选项加init=/bin/bash可以登上去
回复 支持 反对

使用道具 举报

发表于 2009-9-25 22:02:46 | 显示全部楼层
UUID 看不懂实际分区名称,分区布局为何?

/ 就是 sda8?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-9-25 22:53:08 | 显示全部楼层
  1. >> l /dev/disk/by-uuid/
  2. 总用量 0
  3. lrwxrwxrwx 1 root root 10  9月 25 18:37 41d4a83d-236f-47d2-9edd-37b674f2af63 -> ../../sda1
  4. lrwxrwxrwx 1 root root 10  9月 25 18:37 52ef0edb-bf12-44c6-86f1-d6ef527bfe1b -> ../../sda5
  5. lrwxrwxrwx 1 root root 10  9月 25 18:37 62269d28-0b16-446d-8134-c6c20ec743d8 -> ../../sda7
  6. lrwxrwxrwx 1 root root 10  9月 25 18:37 ac5da2e9-842d-45b8-91f5-1039dff2d1c4 -> ../../sda2
  7. lrwxrwxrwx 1 root root 10  9月 25 18:37 b4b6ed6d-d7e5-4017-b04c-5082d76a57f2 -> ../../sda8
  8. lrwxrwxrwx 1 root root 10  9月 25 18:37 c206abf8-7009-4560-bd59-12d74c1f0cc1 -> ../../sda6
复制代码
/ -> /dev/sda8
swap -> /dev/sda5
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-9-26 08:01:21 | 显示全部楼层
  1. 26/09/2009 08:00:28
  2. root (/mnt/lfs)
  3. << mv etc{,-old}
  4. 26/09/2009 08:00:35
  5. root (/mnt/lfs)
  6. << chroot "$LFS" /usr/bin/env -i     HOME=/root TERM="$TERM" PS1='\u:\w\$ '     PATH=/bin:/usr/bin:/sbin:/usr/sbin     /bin/bash --login
  7. I have no name!:/# ls
  8. bin   dev      home  lost+found  mnt  pkg   root  sources  sys  tools  var
  9. boot  etc-old  lib   media       opt  proc  sbin  srv      tmp  usr    xorg--compile.log
  10. I have no name!:/# mv etc{-old,}
  11. I have no name!:/# ls
  12. bin   dev  home  lost+found  mnt  pkg   root  sources  sys  tools  var
  13. boot  etc  lib   media       opt  proc  sbin  srv      tmp  usr    xorg--compile.log
  14. I have no name!:/# exec /bin/bash --login
  15. 段错误
  16. 26/09/2009 08:01:09
  17. root (/mnt/lfs)
  18. <<
复制代码
/etc有问题
回复 支持 反对

使用道具 举报

发表于 2009-9-26 08:29:25 | 显示全部楼层
I have no name! 应该是 /etc/passwd 未定义时引起的问题
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-9-27 18:41:41 | 显示全部楼层
跟`I have no name!'没关系
主要是exec /bin/bash --login段错误的问题
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-9-28 19:12:58 | 显示全部楼层
解决了
是/etc/profile和/etc/bashrc有问题
回复 支持 反对

使用道具 举报

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

本版积分规则

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