LinuxSir.cn,穿越时空的Linuxsir!

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

[已解决]LFS制作完成,并能正常使用,但是引导过程提示错误

[复制链接]
发表于 2010-8-3 21:13:37 | 显示全部楼层 |阅读模式
宿主OS:redflag-6.0-sp3
包:lfs-packages-6.6.tar
参考:lfs-6.6英文文档
制作完成lfs,重启之后,在引导界面。
提示:
swapon:/dev/sda8:stat faild:No such file or directory
Mounting root file system in read-only mode…
checking file system…
fsck.ext3:No such file or dirctory while trying to opn /dev/sda10
/dev/sda10:
The superblock could not be read or does describe a correct ext2 filesystem.if the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else),then the superblock is corrupt,and you might try running esfsck with an alternate superblock:
e2fsck -b 8193 <device>

=======================
root:/# more /etc/fstab
# Begin /etc/fstab

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

/dev/sda10     /               ext3   defaults        1     1
/dev/sda8      swap         swap   pri=1           0     0
proc              /proc         proc   defaults        0     0
sysfs             /sys           sysfs  defaults        0     0
devpts          /dev/pts     devpts gid=4,mode=620  0     0
tmpfs            /dev/shm    tmpfs  defaults        0     0
# End /etc/fstab
=======================

root:/# fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Disk identifier: 0xea67ea67

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1894    15213523+   7  HPFS/NTFS
/dev/sda2            1895       19457   141074797+   f  W95 Ext'd (LBA)
/dev/sda5            1895        7650    46235038+   7  HPFS/NTFS
/dev/sda6            7651       11522    31101808+   7  HPFS/NTFS
/dev/sda7           11523       13373    14868126   83  Linux
/dev/sda8           13374       13495      979933+  82  Linux swap / Solaris
/dev/sda9           13496       17958    35840000   83  Linux
/dev/sda10          17958       19457    12048705   83  Linux
===============================
/boot/grub/grub.cfg

menuentry "GNU/Linux, with Linux 2.6.32.8-lfs-6.6" {
        insmod ext2
        set root=(hd0,10)
        search --no-floppy --fs-uuid --set 11c7d93a-3a17-4e23-985f-36717d36c7ad
        linux   /boot/vmlinux-2.6.32.8-lfs-6.6 root=/dev/sda10 ro
}
 楼主| 发表于 2010-8-3 21:15:19 | 显示全部楼层
顺便补充下:kernel肯定支持ext2、ext3、ext4
已经测试过以下办法,仍然不行:
$umount /dev/sda10
$e2fsck -b 8193 /dev/sda10
仍然提示:
The superblock could not be read or does describe a correct ext2 filesystem.if the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else),then the superblock is corrupt,and you might try running esfsck with an alternate superblock:
e2fsck -b 8193 <device>

然后参考:http://www.linuxsir.cn/bbs/showthread.php?t=167666
$mke2fs -n /dev/sda10
$e2fsck -b 32768 /dev/sda10
修复一下,重启,依然提示:如上错误。
回复 支持 反对

使用道具 举报

发表于 2010-8-3 23:48:26 | 显示全部楼层
应该是kernel的问题,我以前也碰见过,kernel编译时要选支持SATA硬盘
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-8-4 07:28:30 | 显示全部楼层
请问kernel的SATA的驱动位置,这样我好重新编译,谢谢了。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-8-4 11:40:36 | 显示全部楼层
Post by cqcya;2106634
应该是kernel的问题,我以前也碰见过,kernel编译时要选支持SATA硬盘


你是对的,我用make menuconfig查看了下Device Drivers中ATA的选项确实没有编译进内核。现在只能重新编译一下内核,再看看。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-8-4 13:10:12 | 显示全部楼层
非常感谢,重新编译并添加ATA支持后,LFS制作完成,并成功进入。
回复 支持 反对

使用道具 举报

发表于 2010-8-4 13:18:28 | 显示全部楼层
Post by gzl1100;2106675
非常感谢,重新编译并添加ATA支持后,LFS制作完成,并成功进入。

嘿嘿不用谢,多作几次就有经验了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-8-4 20:58:51 | 显示全部楼层
经过重新编译,并添加STAT驱动,已经能够正常使用LFS,但是在引导过程提示:
mount:mount point /dev/pts does not exist
mount:mount point /dev/shm does not exist           [fail]
请问我的LFS到底那里出错了,如何修复。

/etc/fstab

/dev/sda10 / ext3 defaults 1 1
/dev/sda8 swap swap pri=1 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
devpts /dev/pts devpts gid=4,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
回复 支持 反对

使用道具 举报

发表于 2010-8-4 21:15:47 | 显示全部楼层
问题还是出来kernel,你看看Chapter 8. Making the LFS System Bootable,The /dev/shm mount point for tmpfs is included to allow enabling POSIX-shared memory. The kernel must have the required support built into it for this to work (more about this is in the next section). Please note that very little software currently uses POSIX-shared memory. Therefore, consider the /dev/shm mount point optional. For more information, see Documentation/filesystems/tmpfs.txt in the kernel source tree.

中文:/dev/shm 挂载点是为了tmpfs能包括启用POSIX共享内存。 这需要内核必须在编的时候支持这个选项才能起作用 (更多相关信息在下一章)。请注意, 目前很少软件使用POSIX共享内存。因而,认为/dev/shm加载点是可选的。 更多信息,请参考内核源码目录中的Documentation/filesystems/tmpfs.txt。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-8-4 21:44:35 | 显示全部楼层
如果在/etc/fstab中注释掉
#devpts /dev/pts devpts gid=4,mode=620 0 0
#tmpfs /dev/shm tmpfs defaults 0 0
按照字面意思应该不会对LFS OS有影响。如果以后我继续BLFS会不会有影响?
回复 支持 反对

使用道具 举报

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

本版积分规则

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