This section describes how to modify the hardware device drivers that are loaded during OS startup.
You have logged in to the VM.
logfile=/var/log/dracut.log # fileloglvl=7 ... ... # additional kernel modules to the default add_drivers+="ahci megaraid_sas mpt3sas mpt2sas virtio_blk virtio_scsi virtio_net"
# List of modules that you want to include in your initramfs. # They will be loaded at boot time in the order below. # # Syntax: module_name [args ...] # # You must run update-initramfs(8) to effect this change. # # Examples: # # raid1 # sd_mod ahci megaraid_sas mpt3sas mpt2sas virtio_blk virtio_scsi virtio_net
After the installation is complete, add add_drivers+="ahci megaraid_sas mpt3sas mpt2sas virtio_blk virtio_scsi virtio_net" to the end of the /etc/dracut.conf file by performing operations similar to those for Red Hat and Oracle Linux 7.3.
apt-get install initramfs-tools
After the installation is complete, add the ahci, megaraid_sas, mpt3sas, mpt2sas, and virtio_blk virtio_scsi virtio_net drivers to the end of the /etc/initramfs-tools/modules file by performing operations similar to those for Ubuntu 14.04.
sudo apt-get dist-upgrade
... # INITRD_MODULES="ahci megaraid_sas mpt3sas mpt2sas virtio_blk virtio_scsi virtio_net" ## Type: string(yes) ...
You can enter multiple RAID drivers and separate them with spaces. The RAID driver names can be obtained from the purchased hardware devices. Multiple types of drivers can be added at the same time, such as mpt3sas, mpt2sas, and megaraid_sas. If any hardware driver cannot be installed here, you can install it after the BMS is created.
For Rad Hat/Oracle Linux/EulerOS/SUSE 12/SUSE 15/Ubuntu 16.04/Ubuntu 18.04/CentOS/XenServer run the dracut -f command.
... Some kernel modules could not be included This is not necessarily an error: pcmcia sdhci_acpi swap
Run the following commands to check whether the ahci, megaraid_sas, mpt3sas, and mpt2sas drivers have been loaded:
lsinitramfs /boot/initrd.img-`uname -r` |grep ahci
lsinitramfs /boot/initrd.img-`uname -r` |grep megaraid_sas
lsinitramfs /boot/initrd.img-`uname -r` |grep mpt3sas
lsinitramfs /boot/initrd.img-`uname -r` |grep mpt2sas
linux-a5d6:/boot/grub # blkid /dev/sda1: UUID="c23d47f8-ef1b-4c4e-9a3b-5ae138ef7184" TYPE="swap" /dev/sda2: UUID="27644978-e244-4a8c-996a-03119fdaff71" TYPE="ext3"
If some disk partitions do not have UUIDs, check whether the VM OS is properly installed. If it is not, install it again.
Original menu.lst file
Modified menu.lst file
Original device.map file
(hd0) /dev/disk/by-id/ata-QEMU_HARDDISK_QM00001 ~
Modified device.map file
(hd0) /dev/sda
Original fstab file
Modified fstab file
Modified mtab file
If the /dev/sr0 configuration item does not exist, skip this step.
Original bootloader file
Modified bootloader file
If SUSE 11 SP4 uses LVM, replace the virtual disks in the VM file with the actual physical disks.
If some disk partitions do not have UUIDs, check whether the VM OS is properly installed. If it is not, install it again.
Original menu.lst file
Modified menu.lst file
Original device.map file
(hd0) /dev/disk/by-id/ata-QEMU_HARDDISK_QM00001
Modified device.map file
(hd0) /dev/sda ~
Original fstab file
Modified fstab file
Original bootloader file
Modified bootloader file
After the configuration is complete, run the mkinitrd command. If the value of resume is not by-uuid, run the reboot and then mkinitrd commands to ensure that the value of resume is by-uuid.
Set GRUB_DISABLE_LINUX_UUID to true.
... # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to linux GRUB_DISABLE_LINUX_UUID=true # Uncomment to disable generation of recovery mode menu entries ...
Then, run the sudo update-grub2 command.
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces (5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface to inet loopback ~ ~