Installing the Bcache Module
You can use either the RPM package or the ISO image for installation.
Installing the RPM Package
- If the kernel RPM package is used for installation, you need to install CentOS 7.6 or openEuler on the server in advance.
- The RPM package used in this section is the package generated in Compiling the Kernel.
- Upload the kernel RPM package generated in Compiling the Kernel to the /home/kernel-rpm directory.
1 2
mkdir -p /home/kernel-rpm cp /root/rpmbuild/RPMS/aarch64/* /home/kernel-rpm
- Install the kernel RPM package.
- CentOS 7.6
1 2
cd /home/kernel-rpm yum -y install kernel-4.14.0-115.10.1.el7a.aarch64.rpm kernel-devel-4.14.0-115.10.1.el7a.aarch64.rpm kernel-headers-4.14.0-115.10.1.el7a.aarch64.rpm
- openEuler 20.03
1 2
cd /home/kernel-rpm dnf -y install kernel-4.19.90-2003.4.0.0036.aarch64.rpm kernel-devel-4.19.90-2003.4.0.0036.aarch64.rpm
- CentOS 7.6
- Install the dependencies. (Perform this step only for openEuler 20.03. Skip this step for CentOS 7.6.)
1yum install libblkid
- Check the default kernel startup item.
1grub2-editenv list

Check the default kernel version number.
- Modify the default kernel startup item.
- CentOS 7.6
Check the kernels that can be configured in the current environment.
cat /etc/grub2-efi.cfg | grep CentOS
Set the default boot kernel.
grub2-set-default "CentOS Linux (4.14.0-115.10.1.el7a.aarch64) 7 (AltArch)"
In the preceding command, CentOS Linux (4.14.0-115.10.1.el7a.aarch64) 7 (AltArch) indicates the newly installed kernel version.
- openEuler 20.03
Check the kernels that can be configured in the current environment.
cat /etc/grub2-efi.cfg | grep openEuler
Set the default boot kernel.
grub2-set-default "openEuler (4.19.90-2003.4.0.0036.aarch64) 20.03 (LTS)"
In the preceding command, openEuler (4.19.90-2003.4.0.0036.aarch64) 20.03 (LTS) indicates the newly installed kernel version.
- CentOS 7.6
- Reboot the system.
1reboot
- Verify the bcache module.
1modinfo bcache
- Verify the page size.
1getconf PAGESIZE
Installing the ISO Image
Before installing the ISO image, modify its kernel and add bcache-tools to it.
- Download the native image file and mount it to the local drive.
- Copy all files in the native image to the new directory.
- CentOS 7.6
1 2 3 4
mkdir -p /home/centos7.6-iso cd /home/centos7.6-iso cp -r /mnt/* ./ cp /mnt/.discinfo /mnt/.treeinfo ./
- openEuler 20.03
1 2 3 4
mkdir -p /home/openEuler20.03-iso cd /home/openEuler20.03-iso cp -r /mnt/* ./ cp /mnt/.discinfo /mnt/.treeinfo ./
- CentOS 7.6
- Replace the original kernel RPM package with the RPM package generated in Compiling the Kernel.
1cp /root/rpmbuild/RPMS/aarch64/* ./Packages
The extension name of the generated kernel RPM package is different from that of the original RPM package in the image. You need to manually delete the original RPM package. You can run the rm -f package_name command to delete the original RPM package in the ISO image based on the RPM package names in /root/rpmbuild/RPMS/aarch64.
Example:
/home/centos7.6-iso/Packages/kernel-4.14.0-115.el7.0.1.aarch64.rpm
/home/centos7.6-iso/Packages/kernel-4.14.0-115.el7a.0.1.aarch64.rpm
In this case, you need to manually delete /home/centos7.6-iso/Packages/kernel-4.14.0-115.el7a.0.1.aarch64.rpm.
- Generate repodata again.
- CentOS 7.6
1createrepo -g repodata/aced7d22b338fdf7c0a71ffcf32614e058f4422c42476d1f4b9e9364d567702f-c7-x86_64-comps.xml ./
- openEuler 20.03
1createrepo -g repodata/normal.xml ./
- CentOS 7.6
- Generate the ISO file.
- CentOS 7.6
1genisoimage -e images/efiboot.img -no-emul-boot -T -J -R -c boot.catalog -hide boot.catalog -V "CentOS 7 aarch64" -o /home/centos7.6-bcache.iso .
The centos7.6-bcache.iso image is generated in the /home/ directory.
- openEuler 20.03
1 2
cd /opt/mkeuleros/ sh mkeuleros.sh -f config/aarch64/standard.conf -n openEuler -v 20.03-LTS -s SP1 -a aarch64 -r file:///home/openEuler20.03-iso/
Generate the image openEuler-20.03-LTS-aarch64-dvd.iso in the /result/ directory.
- CentOS 7.6
- Install the system.
- Select when installing the system.

- After selecting the required , select on the right.

- Continue with the installation process.
- Select when installing the system.
- Verify the page size.
1getconf PAGESIZE
- Verify the bcache module.
1modinfo bcache

