From ce96b13c0d1459c78b9ada3209f5180e754f56f4 Mon Sep 17 00:00:00 2001 From: Rohan Garg Date: Mon, 10 Nov 2014 15:41:36 +0100 Subject: [PATCH] Add a initramfs module that updates the initramfs post install --- settings.conf | 1 + src/modules/initramfs/README.md | 5 +++++ src/modules/initramfs/main.py | 23 +++++++++++++++++++++++ src/modules/initramfs/module.desc | 5 +++++ 4 files changed, 34 insertions(+) create mode 100644 src/modules/initramfs/README.md create mode 100644 src/modules/initramfs/main.py create mode 100644 src/modules/initramfs/module.desc diff --git a/settings.conf b/settings.conf index 917c757d8..fdf655394 100644 --- a/settings.conf +++ b/settings.conf @@ -43,6 +43,7 @@ install: - networkcfg - hwclock - services +# - initramfs - grubcfg - grub - umount diff --git a/src/modules/initramfs/README.md b/src/modules/initramfs/README.md new file mode 100644 index 000000000..bebd3eb56 --- /dev/null +++ b/src/modules/initramfs/README.md @@ -0,0 +1,5 @@ +## initramfs module + +This module is specific to Debian based distros. Post installation on Debian +the initramfs needs to be updated so as to not interrupt the boot process +with a error about fsck.ext4 not being found. diff --git a/src/modules/initramfs/main.py b/src/modules/initramfs/main.py new file mode 100644 index 000000000..9dba1db69 --- /dev/null +++ b/src/modules/initramfs/main.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 +# encoding: utf-8 +# === This file is part of Calamares - === +# +# Copyright 2014, Philip Müller +# +# Calamares is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Calamares is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Calamares. If not, see . + +from libcalamares.utils import check_chroot_call + +def run(): + return check_chroot_call(["update-initramfs", "-k", "all", "-u"]) diff --git a/src/modules/initramfs/module.desc b/src/modules/initramfs/module.desc new file mode 100644 index 000000000..321a03782 --- /dev/null +++ b/src/modules/initramfs/module.desc @@ -0,0 +1,5 @@ +--- +type: "job" +name: "initramfs" +interface: "python" +script: "main.py"