install

installer
Log | Files | Refs | README | LICENSE | git clone https://git.ne02ptzero.me/git/install

commit e4dfdb1d7a41cd1055f0ef14c1430236c2694130
parent 1c6b0f9c4e5081ea1b173f88ce50e124ecf08b48
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Mon, 19 Dec 2016 18:23:58 +0100

Add(Kernel Virtual File Systems Install)

Diffstat:
Mscreens/install/install.py | 15+++++++++++++++
1 file changed, 15 insertions(+), 0 deletions(-)

diff --git a/screens/install/install.py b/screens/install/install.py @@ -119,6 +119,7 @@ class Install: # Link between the host and the install self.exec(["ln", "-sv", self.mnt_point + "/tools", "/"]) self.phase_1_install() + self.mnt_kfs() os.chdir(self.org_pwd) self.skeleton(self.mnt_point) self.copy_files(self.mnt_point) @@ -758,3 +759,17 @@ class Install: self.dlg.infobox("Creating defaultfiles...") for f in files: shutil.copyfile(directory + f[0], path + f[1]) + + # This function mounts kernel file system on the future installation + # /dev, /proc, /sys, /run + def mnt_kfs(self): + self.dlg.infobox("Mounting kernel file systems") + self.e(["mkdir", "-pv", self.mnt_point + "/{dev,proc,sys,run}"], shell=True) + self.e(["mknod", "-m", "600", self.mnt_point + "/dev/console", "c", "5", "1"]) + self.e(["mknod", "-m", "660", self.mnt_point + "/dev/null", "c", "1", "3"]) + self.e(["mount", "-v", "--bind", "/dev", self.mnt_point + "/dev"]) + self.e(["mount", "-vt", "devpts", "devpts", self.mnt_point + "/dev/pts", "-o", "gid=5,mode=620"]) + self.e(["mount", "-vt", "proc", "proc", self.mnt_point + "/proc"]) + self.e(["mount", "-vt", "sysfs", "sysfs", self.mnt_point + "/sys"]) + self.e(["mount", "-vt", "tmpfs", "tmpfs", self.mnt_point + "/run"]) +