Initramfs fails to mount LVM in VMWare VM with >3 GB RAM

3 posts / 0 new
Last post
#1 Tue, 2018-02-06 12:35
Disassembler
  • Disassembler's picture
  • Offline
  • Last seen: 1 month 3 weeks ago
  • Joined: 2018-02-06

Hi,

I'm trying to get Alpine 3.7 (virthardened) to run in VM on VMWare Workstation 14.1. The Alpine VM is set to boot from LVM but whenever I set more than 3 GB memory, initramfs on first boot after the installation fails with

mount: mounting /dev/vg0/lv_root on /sysroot failed: No such file or directory
Mounting root failed.
initramfs emergency recovery shell launched. Type 'exit' to continue boot
sh: can't access tty: job control turned off

What's even more funny is, that whenever I activate and mount the LVM manually in initramfs shell, the VM eventually starts.

lvm vgchange -ay
mount -t ext4 /dev/vg0/lv_root /sysroot
mount -t ext4 /dev/sda1 /sysroot/boot
exit

Whenever I set the RAM to 3 GB or less, the VM happily boots without any problems. For the test, it's enough to do the most basic installation of Alpine 3.7 with LVM (it's one of the questions in setup-apline).

This is my /etc/mkinitfs/mkinitfs.conf:

features="ata base ide scsi usb virtio ext4 lvm"

And these are relevant lines from /boot/extlinux.conf:

LINUX vmlinuz-virthardened
INITRD initramfs-virthardened
APPEND root=/dev/vg0/lv_root modules=sd-mod,usb-storage,ext4 pax_nouderef quiet rootfstype=ext4

Any ideas what needs to be adjusted or what can I check in order to provide more details?

Tue, 2018-02-06 14:08
Disassembler
  • Disassembler's picture
  • Offline
  • Last seen: 1 month 3 weeks ago
  • Joined: 2018-02-06

After some more tests, it looks like it's related to the compatibility with VMWare and its drivers.

Oracle VirtualBox 5.2.6 - Works without problems
VMWare Workstation 12.5.7 - Works without problems
VMWare Workstation 14.1.1 - Problems as described above. Also the "standard" Alpine 3.7 image fails to boot with the same message, so I can't even try to install it on 14.1.1

I have opened https://bugs.alpinelinux.org/issues/8476 as it seems that it's some driver or compatibility issue.

Tue, 2018-02-06 16:03 (Reply to #2)
Disassembler
  • Disassembler's picture
  • Offline
  • Last seen: 1 month 3 weeks ago
  • Joined: 2018-02-06

Found the problem. It's not related to the VMWare version but to the VMWare features enabled on the VM.
Turns out that mem.hotadd in vmx definition was the culprit. If it's set to "TRUE", VM exhibits the problems I've written above. If it's set to "FALSE" or not set at all (which defaults to "FALSE"), the VM then starts normally even with more than 3 GB RAM.

Log in or register to post comments