udev: create /dev/mapper/dmroot -> xvda3 symlink when its mounted directly
When root device is available read-write (TemplateVM/StandaloneVM), its mounted directly, instead of using device-mapper layer. But /dev/mapper/dmroot still needs to exists (it is pointed from /etc/fstab), otherwise various tools, including grub-mkconfig get confused. Create a symlink using udev rule. It is already done in initramfs, and in case of Fedora that udev rule/symlink survive switching to non-initramfs udev, but not on Debian. So, add appropriate udev rules file. Fixes QubesOS/qubes-issues#3178
This commit is contained in:
parent
915c8f0cf7
commit
f7b8a79ce6
@ -118,7 +118,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
/lib/udev/rules.d/99-qubes-*.rules
|
/lib/udev/rules.d/*-qubes-*.rules
|
||||||
/usr/lib/qubes/udev-*
|
/usr/lib/qubes/udev-*
|
||||||
%{_sbindir}/meminfo-writer
|
%{_sbindir}/meminfo-writer
|
||||||
%{_unitdir}/qubes-meminfo-writer.service
|
%{_unitdir}/qubes-meminfo-writer.service
|
||||||
|
@ -5,6 +5,7 @@ install:
|
|||||||
cp udev-qubes-block.rules $(DESTDIR)$(SYSLIBDIR)/udev/rules.d/99-qubes-block.rules
|
cp udev-qubes-block.rules $(DESTDIR)$(SYSLIBDIR)/udev/rules.d/99-qubes-block.rules
|
||||||
cp udev-qubes-usb.rules $(DESTDIR)$(SYSLIBDIR)/udev/rules.d/99-qubes-usb.rules
|
cp udev-qubes-usb.rules $(DESTDIR)$(SYSLIBDIR)/udev/rules.d/99-qubes-usb.rules
|
||||||
cp udev-qubes-misc.rules $(DESTDIR)$(SYSLIBDIR)/udev/rules.d/99-qubes-misc.rules
|
cp udev-qubes-misc.rules $(DESTDIR)$(SYSLIBDIR)/udev/rules.d/99-qubes-misc.rules
|
||||||
|
cp udev-qubes-dmroot.rules $(DESTDIR)$(SYSLIBDIR)/udev/rules.d/90-qubes-dmroot.rules
|
||||||
|
|
||||||
mkdir -p $(DESTDIR)$(SCRIPTSDIR)
|
mkdir -p $(DESTDIR)$(SCRIPTSDIR)
|
||||||
cp udev-block-add-change $(DESTDIR)$(SCRIPTSDIR)
|
cp udev-block-add-change $(DESTDIR)$(SCRIPTSDIR)
|
||||||
|
5
udev/udev-qubes-dmroot.rules
Normal file
5
udev/udev-qubes-dmroot.rules
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Create /dev/mapper/dmroot symlink on TemplateVM/StandaloneVM to make
|
||||||
|
# grub-mkconfig happy.
|
||||||
|
# On TemplateBasedVM, it is really a device mapper device.
|
||||||
|
|
||||||
|
SUBSYSTEM=="block", ENV{ID_PART_ENTRY_NAME}=="Root\x20filesystem", ATTR{ro}=="0", SYMLINK+="mapper/dmroot"
|
Loading…
Reference in New Issue
Block a user