{{Header}} {{Title| title=VM Live Mode: Alternative ro-mode-init Configuration }} {{#seo: |description=VM Live Mode System |image=Alternativeremode123123.jpg }} {{live}} {{grub-live}} [[image:Alternativeremode123123.jpg|thumb]] {{intro| The ro-mode-init automatically enables live-mode if it detects that the disk is set to read-only. This is an alternative to the default [[grub-live]] based method documented on [[VM Live Mode|VM Live Mode]]. }} = Introduction = ro-mode-init is currently less tested than grub-live ([[Live Mode]]). {{Testers-Only}} {{mbox | image = [[File:Ambox_warning_pn.svg.png|40px]] | text = * Does not work on newer builds of {{project_name_short}} because these come with dracut by default. * This is for systems with initramfs-tools only. }} ro-mode-init has not been ported to dracut yet. Theoretically this probably possible but this has not happened yet. = Preliminary Steps = {{Box|text= {{project_name_Live_Backup}} '''2.''' Install ro-mode-init. {{Box|text= {{Install Package |package=ro-mode-init }} }} '''3.''' Update initial ramdisk. Required for now but not forever. * https://forums.whonix.org/t/whonix-live-mode-amnesia-amnesic-non-persistent-anti-forensics/3894/206 * https://github.com/{{project_name_short}}/derivative-maker/commit/69d0de6222afad9ace440054a0dad7c567d57e50 {{CodeSelect|code= sudo update-initramfs -u }} '''4.''' Set the VM disk to read-only. The [[#Read-only_VM_Setting|read-only VM]] setting is necessary (see below), otherwise the VM disk will always boot into persistent mode. }} = Read-only VM Setting = == VirtualBox == === Read-only disk on VirtualBox === To boot into live mode, apply the following steps. {{VirtualBox_Read_Only_Disk}} === Read-write disk on VirtualBox === To boot into read-write mode again, simply revert this change. # Power off the machine. # From the command line run. Use the syntax below. {{CodeSelect|code= VBoxManage setextradata vmname "VBoxInternal/Devices/lsilogicsas/0/LUN#0/AttachedDriver/Config/ReadOnly" }} Replace vmname with the name of the actual VM name. == KVM == === Read-only disk on KVM === To boot into live mode, apply the following steps: # Power off the machine. # Set the hard disk to read-only in the virt-manager GUI. # Power on the machine and select to boot into live mode. === Read-write disk on KVM === To boot into normal mode again, simply revert this change: # Power off the machine. # Set the hard disk to read-write in the virt-manager GUI. # Power on the machine and boot into read-write mode. = Live Mode Indicator Systray = https://github.com/{{project_name_short}}/desktop-config-dist/blob/master/usr/share/livecheck/livecheck.sh = Debugging = An inconsistent filesystem will likely result in errors during booting in live mode. For instance, inconsistencies can arise when the VM is killed instead of performing a normal shutdown in persistent mode. Therefore to ensure it is consistent, run fsck in persistent mode. Debian automatically does this during boot. VMs running in live mode can be killed without problems. In the case of non-fsck related errors using ro-mode-init (like dropping to an initramfs shell), add the following to the kernel command line/GRUB menu for easier debugging: {{CodeSelect|code= debug=1 break=init-premount }} = Footnotes = {{reflist|close=1}} [[Category:Documentation]] {{Footer}}