From 377cf487ed432ba763d9e82d4c1afe531604d863 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 10 Nov 2014 14:11:28 -0500 Subject: [PATCH] cloud-atomic: Forcibly power off after %post to work around bug The system loops with: mkdir: cannot create directory '/oldsys': Read-only filesystem mkdir: cannot create directory '/oldsys/sys': Read-only filesystem mount: mount point /oldsys/sys does not exist ... drauct Warning: Killing all remaining processes ... --- begin loop --- Unable to unlink device node for atomicos-root Unable to unlink device node for live-base rm: cannot remove /lib/drauct/hooks/shutdown/30-dm-shutdown.sh: Read-only filesystem rm: cannot remove /lib/drauct/hooks/shutdown/30-md-shutdown.sh: Read-only filesystem --- end loop --- Not entirely sure what's at fault here, but this is a quick hack to get an image building. --- fedora-cloud-atomic.ks | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fedora-cloud-atomic.ks b/fedora-cloud-atomic.ks index 63106d1..5465ed9 100644 --- a/fedora-cloud-atomic.ks +++ b/fedora-cloud-atomic.ks @@ -136,3 +136,10 @@ echo "(Don't worry -- that out-of-space error was expected.)" %end +%post --nochroot +# Work around anaconda/dracut/lvm bug +sync +sync +sync +systemctl reboot -f -f +%end