Bug 1511 - kernel make install报错
Summary: kernel make install报错
Status: RESOLVED FIXED
Alias: None
Product: Anolis OS 8
Classification: Anolis OS
Component: Images&Installations (show other bugs) Images&Installations
Version: ---
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: Jacob
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-28 10:15 UTC by 常怀鑫(一斋)
Modified: 2022-07-06 13:40 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 常怀鑫(一斋) alibaba_cloud_group 2022-06-28 10:15:09 UTC
Description of problem:

[linux]$ sudo make install
sh ./arch/x86/boot/install.sh 5.18.0-rc2+ \
	arch/x86/boot/bzImage System.map "/boot"
cp: cannot stat '/boot/bls.conf': No such file or directory
sed: can't read /boot/loader/entries/e47b41ace70a476f85c252ab3e9e58cf-0-rescue.conf: No such file or directory
make: *** [arch/x86/Makefile:274: install] Error 2


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:
No Error return
Comment 1 葛立伟 alibaba_cloud_group 2022-07-06 13:40:45 UTC
rpm安装的时候drauct脚本回去找image同级目录下的bls.conf,举个例子:
[root@localhost linux-5.10.112-11.an8]# rpm -ql kernel-core | grep 'bls.conf\|vmlinu'
/boot/.vmlinuz-4.19.91-26.an8.x86_64.hmac
/boot/vmlinuz-4.19.91-26.an8.x86_64
/lib/modules/4.19.91-26.an8.x86_64/.vmlinuz.hmac
/lib/modules/4.19.91-26.an8.x86_64/bls.conf
/lib/modules/4.19.91-26.an8.x86_64/vmlinuz


/bin/kernel-install add 4.19.91-26.an8.x86_64 /lib/modules/4.19.91-26.an8.x86_64/vmlinuz

但是make install 使用的image目录是/boot,这个目录下没有bls.conf
sh ./arch/x86/boot/install.sh 5.18.0-rc2+ \
	arch/x86/boot/bzImage System.map "/boot"



可以使用generate_bls_conf.sh生成bls.conf 之后copy到/boot目录;
也可以升级dracut到最新版本(亲测8.6的dracut没有这个问题),因为下面这个commit已经fix了这个问题。
https://github.com/dracutdevs/dracut/commit/ff366790a6e30175f243d54c2922a8c781030ede