Linux From Scratch

Views

安装时使用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}

修改记录:
  • 2022-11-16 01:27:34迁移老博客文章内容