Linux From Scratch

󰈭 527字

安装时使用LFS11.1版本。

Tips

踩坑

8.15. Tcl-8.6.12

使用make test测试tcl包时,http.test的几个测试中全部fail,然后测试便阻塞在了http11.test中

通过向/etc/hosts中加入信息使其合法即可解决问题:

1cat > /etc/hosts << "EOF"
2127.0.0.1 localhost
3::1 localhost
4EOF

解决方案及报错均如链接所示。

8.16. Expect-5.45.4

make test测试时报错:

The system has no more ptys. Ask your system administrator to create more.

事实上不需要使用lfs FAQ中的方法重新编译内核,挂载host机器上的硬盘即可。

解决方案:“The system has no more ptys. Ask your system administrator to create more.” – Post9

Grub引导

根据10.4的指导,grub的配置采用guide中的极简内容,无法通过grub进行引导,kernlepanic。

1VFS: Cannot open root device "sda2" 
2or unknown-block(0,0): error -6
3Please append a correct "root=" boot option; here are the available 
4partitions:
5...
6Kernel panic - not syncing: VFS: Unable to mount root fs on 
7unknown-block(0,0)

在更换为root=UUID=....后仍未果,经过查询,kernel无法理解UUID,必须要使用initrd才行,将引导archlinux的initrd装入后即可成功。

参考: https://www.mail-archive.com/lfs-support@linuxfromscratch.org/msg19471.html

grub正确配置:(偷了一些archlinux不知道干什么的kernelmod)

 1menuentry "GNU/Linux, Linux 5.16.9-lfs'11.1" {
 2	load_video
 3	insmod gzio
 4	insmod part_gpt
 5	insmod fat
 6	set root='hd0,gpt1'
 7	if [ x$feature_platform_search_hint = xy ]; then
 8	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  67E3-17ED
 9	else
10	  search --no-floppy --fs-uuid --set=root 67E3-17ED
11	fi
12	echo	'Loading Linux 5.16.9-lfs-11.1 ...'
13	linux	/vmlinuz-5.16.9-lfs-11.1 root=UUID=db63f094-a871-4850-86ab-565817bfa6c6 rw loglevel=3 quiet snd_hda_intel.dmic_detect=0 ibt=off
14	echo	'Loading initial ramdisk ...'
15	initrd	/initramfs-linux.img
16}
嗨! 这里是 rqdmap 的个人博客, 我正关注 GNU/Linux 桌面系统, Linux 内核, 后端开发, Python, Rust 以及一切有趣的计算机技术! 希望我的内容能对你有所帮助~
如果你遇到了任何问题, 包括但不限于: 博客内容说明不清楚或错误; 样式版面混乱等问题, 请通过邮箱 rqdmap@gmail.com 联系我!
修改记录:
  • 2023-09-01 18:14:49单独划分ACM专题; 移动部分博客进入黑洞归档
  • 2023-05-29 23:05:14大幅重构了python脚本的目录结构,实现了若干操作博客内容、sqlite的助手函数;修改原本的文本数 据库(ok)为sqlite数据库,通过嵌入front-matter的page_id将源文件与网页文件相关联
  • 2023-05-08 21:44:36博客架构修改升级
  • 2022-11-16 01:27:34迁移老博客文章内容
Linux From Scratch