aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-installer/anaconda/files/0062-Mount-var-volatile-during-install.patch
blob: 0779bd0ddede071132a18d8cc4d348d850a889e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
From fce95243765de1a1ae23741b4b9ed26a63285600 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Mon, 30 Jul 2018 16:19:27 +0800
Subject: [PATCH 62/65] Mount /var/volatile during install

The installed system needs /var/volatile clean, otherwise it
caused systemd's journalctl failed to record boot log.

Upstream-Status: Inappropriate [oe specific]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 pyanaconda/storage/osinstall.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/pyanaconda/storage/osinstall.py b/pyanaconda/storage/osinstall.py
index c2036ad..6eb2f21 100644
--- a/pyanaconda/storage/osinstall.py
+++ b/pyanaconda/storage/osinstall.py
@@ -406,6 +406,7 @@ class FSSet(object):
         self._sysfs = None
         self._proc = None
         self._devshm = None
+        self._volatile = None
         self._usb = None
         self._selinux = None
         self._run = None
@@ -447,6 +448,12 @@ class FSSet(object):
         return self._devshm
 
     @property
+    def volatile(self):
+        if not self._volatile:
+            self._volatile = NoDevice(fmt=get_format("tmpfs", device="tmpfs", mountpoint="/var/volatile"))
+        return self._volatile
+
+    @property
     def usb(self):
         if not self._usb:
             self._usb = NoDevice(fmt=get_format("usbfs", device="usbfs", mountpoint="/proc/bus/usb"))
@@ -693,6 +700,7 @@ class FSSet(object):
         """
         devices = list(self.mountpoints.values()) + self.swap_devices
         devices.extend([self.dev, self.devshm, self.devpts, self.sysfs,
+                        self.volatile,
                         self.proc, self.selinux, self.usb, self.run])
         if isinstance(_platform, EFI):
             devices.append(self.efivars)
@@ -752,6 +760,7 @@ class FSSet(object):
         """ unmount filesystems, except swap if swapoff == False """
         devices = list(self.mountpoints.values()) + self.swap_devices
         devices.extend([self.dev, self.devshm, self.devpts, self.sysfs,
+                        self.volatile,
                         self.proc, self.usb, self.selinux, self.run])
         if isinstance(_platform, EFI):
             devices.append(self.efivars)
-- 
2.7.4