Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
e02832be2e | ||
|
c9d73c919f | ||
|
959b0684c4 | ||
|
5cf1f985f0 | ||
|
e024b35dc2 |
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Copy over kickstart files from the initrd to the sysroot before pivot
|
||||
cp /*cfg /*ks /sysroot/ 2> /dev/null
|
||||
|
@ -21,7 +21,7 @@ removepkg plymouth*
|
||||
removefrom ${product.name}-logos /usr/share/plymouth/*
|
||||
## we don't create new initramfs/bootloader conf inside anaconda
|
||||
## (that happens inside the target system after we install dracut/grubby)
|
||||
removepkg dracut-network grubby
|
||||
removepkg dracut-network grubby anaconda-dracut
|
||||
## In order to execute the /usr move on upgrades we need convertfs from dracut
|
||||
removefrom dracut --allbut /usr/lib/dracut/modules.d/30convertfs/convertfs.sh
|
||||
## we don't run SELinux (not in enforcing, anyway)
|
||||
|
@ -33,10 +33,12 @@ installpkg kernel
|
||||
%endif
|
||||
|
||||
## extra dracut modules
|
||||
installpkg dracut-network
|
||||
installpkg dracut-network anaconda-dracut
|
||||
|
||||
## required for dracut
|
||||
installpkg kbd kbd-misc
|
||||
## required for anaconda-dracut (img-lib etc.)
|
||||
installpkg tar xz dmidecode curl
|
||||
|
||||
## basic system stuff
|
||||
installpkg systemd-sysv systemd-units
|
||||
|
@ -3,23 +3,11 @@
|
||||
|
||||
<%page args="root, basearch, libdir, configdir"/>
|
||||
<%
|
||||
# TODO: make systemd handle the keymaps and drop this from lorax/anaconda
|
||||
filearch = 'ppc' if basearch == 'ppc64' else basearch
|
||||
KEYMAP_OVERRIDE = "usr/share/anaconda/keymaps-override-%s" % filearch
|
||||
PYTHONDIR = glob("usr/"+libdir+"/python?.?")[0]
|
||||
stubs = ("list-harddrives", "loadkeys", "raidstart", "raidstop")
|
||||
configdir = configdir + "/common"
|
||||
%>
|
||||
|
||||
## create_keymaps()
|
||||
%if basearch not in ("s390", "s390x"):
|
||||
%if exists(KEYMAP_OVERRIDE):
|
||||
move ${KEYMAP_OVERRIDE} etc/keymaps.gz
|
||||
%else:
|
||||
runcmd ${root}/usr/libexec/anaconda/getkeymaps ${basearch} ${root}/etc/keymaps.gz ${root}
|
||||
%endif
|
||||
%endif
|
||||
|
||||
## move_stubs()
|
||||
move usr/share/anaconda/restart-anaconda usr/bin
|
||||
move ${PYTHONDIR}/site-packages/pyanaconda/sitecustomize.py ${PYTHONDIR}/site-packages
|
||||
@ -45,8 +33,6 @@ removefrom ConsoleKit /lib/systemd/system/*
|
||||
removefrom initscripts /lib/systemd/system/fedora* /lib/systemd/fedora*
|
||||
removefrom lvm2 /lib/systemd/system/*
|
||||
removefrom mdadm /lib/systemd/system/*
|
||||
## finally, make /init -> /sbin/init symlink
|
||||
symlink /sbin/init init
|
||||
|
||||
## install some basic configuration files
|
||||
append etc/resolv.conf ""
|
||||
@ -67,7 +53,7 @@ install ${configdir}/pam.sshd etc/pam.d/login
|
||||
install ${configdir}/pam.sshd etc/pam.d/remote
|
||||
|
||||
## set up "install" user account
|
||||
append etc/passwd "install:x:0:0:root:/root:/sbin/loader"
|
||||
append etc/passwd "install:x:0:0:root:/root:/sbin/anaconda"
|
||||
append etc/shadow "install::14438:0:99999:7:::"
|
||||
## remove root password
|
||||
replace "root:\*:" "root::" etc/shadow
|
||||
@ -104,9 +90,6 @@ gconfset /apps/metacity/global_keybindings/switch_to_workspace_right string disa
|
||||
gconfset /desktop/gnome/interface/accessibility bool true
|
||||
gconfset /desktop/gnome/interface/at-spi-corba bool true
|
||||
|
||||
## get_anaconda_portions()
|
||||
move usr/${libdir}/anaconda/loader sbin
|
||||
move usr/share/anaconda/loader.tr etc
|
||||
move usr/libexec/anaconda/auditd sbin
|
||||
|
||||
## for compatibility with Ancient Anaconda Traditions
|
||||
|
@ -234,7 +234,8 @@ class Lorax(BaseLoraxClass):
|
||||
runtime=runtime, templatedir=templatedir)
|
||||
|
||||
logger.info("rebuilding initramfs images")
|
||||
dracut_args=["--xz", "--add", "livenet", "--add", "convertfs", "--omit", "plymouth"]
|
||||
dracut_args=["--xz", "--add", "anaconda", "--omit", "plymouth",
|
||||
"--install", "/.buildstamp"]
|
||||
treebuilder.rebuild_initrds(add_args=dracut_args)
|
||||
|
||||
logger.info("populating output tree and building boot images")
|
||||
|
@ -174,11 +174,10 @@ class TreeBuilder(object):
|
||||
'''Rebuild all the initrds in the tree. If backup is specified, each
|
||||
initrd will be renamed with backup as a suffix before rebuilding.
|
||||
If backup is empty, the existing initrd files will be overwritten.'''
|
||||
dracut = ["dracut", "--noprefix", "--nomdadmconf", "--nolvmconf"] + add_args
|
||||
dracut = ["dracut", "--prefix=/run/initramfs",
|
||||
"--nomdadmconf", "--nolvmconf"] + add_args
|
||||
if not backup:
|
||||
dracut.append("--force")
|
||||
hooks = [("99anaconda-copy-ks.sh", "/lib/dracut/hooks/pre-pivot")]
|
||||
hook_commands = self.copy_dracut_hooks(hooks)
|
||||
|
||||
# Hush some dracut warnings. TODO: bind-mount proc in place?
|
||||
open(joinpaths(self.vars.inroot,"/proc/modules"),"w")
|
||||
@ -188,7 +187,7 @@ class TreeBuilder(object):
|
||||
initrd = joinpaths(self.vars.inroot, kernel.initrd.path)
|
||||
os.rename(initrd, initrd + backup)
|
||||
check_call(["chroot", self.vars.inroot] + \
|
||||
dracut + hook_commands + [kernel.initrd.path, kernel.version])
|
||||
dracut + [kernel.initrd.path, kernel.version])
|
||||
os.unlink(joinpaths(self.vars.inroot,"/proc/modules"))
|
||||
|
||||
def build(self):
|
||||
|
Loading…
Reference in New Issue
Block a user