Compare commits

...

5 Commits

Author SHA1 Message Date
Will Woods
e02832be2e remove anaconda-copy-ks.sh
anaconda-copy-ks.sh is included in the 'anaconda' dracut module, so we
don't need to install it here anymore.
2012-02-16 16:20:17 -05:00
Will Woods
c9d73c919f use --prefix=/run/initramfs when building initramfs
Having the initramfs at /run/initramfs means that it will be retained at
/run/initramfs once we switch to the root image. We want that.
2012-02-16 15:03:11 -05:00
Will Woods
959b0684c4 add anaconda dracut module
Install the anaconda dracut module during 'install', use it when
rebuilding initramfs, and clean it up afterward.

Also install '.buildstamp' into the initramfs (the anconda module wants
it).
2012-02-16 15:02:35 -05:00
Will Woods
5cf1f985f0 runtime-postinstall: remove references to loader
No more loader. Bye-bye, loader.
2012-02-15 12:11:19 -05:00
Will Woods
e024b35dc2 runtime-postinstall: remove keymap stuff
anaconda no longer contains the keymap overrides and systemd should be
handling keymap stuff for us, so this isn't necessary.
2012-02-15 12:11:19 -05:00
6 changed files with 10 additions and 29 deletions

View File

@ -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

View File

@ -21,7 +21,7 @@ removepkg plymouth*
removefrom ${product.name}-logos /usr/share/plymouth/* removefrom ${product.name}-logos /usr/share/plymouth/*
## we don't create new initramfs/bootloader conf inside anaconda ## we don't create new initramfs/bootloader conf inside anaconda
## (that happens inside the target system after we install dracut/grubby) ## (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 ## 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 removefrom dracut --allbut /usr/lib/dracut/modules.d/30convertfs/convertfs.sh
## we don't run SELinux (not in enforcing, anyway) ## we don't run SELinux (not in enforcing, anyway)

View File

@ -33,10 +33,12 @@ installpkg kernel
%endif %endif
## extra dracut modules ## extra dracut modules
installpkg dracut-network installpkg dracut-network anaconda-dracut
## required for dracut ## required for dracut
installpkg kbd kbd-misc installpkg kbd kbd-misc
## required for anaconda-dracut (img-lib etc.)
installpkg tar xz dmidecode curl
## basic system stuff ## basic system stuff
installpkg systemd-sysv systemd-units installpkg systemd-sysv systemd-units

View File

@ -3,23 +3,11 @@
<%page args="root, basearch, libdir, configdir"/> <%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] PYTHONDIR = glob("usr/"+libdir+"/python?.?")[0]
stubs = ("list-harddrives", "loadkeys", "raidstart", "raidstop") stubs = ("list-harddrives", "loadkeys", "raidstart", "raidstop")
configdir = configdir + "/common" 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_stubs()
move usr/share/anaconda/restart-anaconda usr/bin move usr/share/anaconda/restart-anaconda usr/bin
move ${PYTHONDIR}/site-packages/pyanaconda/sitecustomize.py ${PYTHONDIR}/site-packages 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 initscripts /lib/systemd/system/fedora* /lib/systemd/fedora*
removefrom lvm2 /lib/systemd/system/* removefrom lvm2 /lib/systemd/system/*
removefrom mdadm /lib/systemd/system/* removefrom mdadm /lib/systemd/system/*
## finally, make /init -> /sbin/init symlink
symlink /sbin/init init
## install some basic configuration files ## install some basic configuration files
append etc/resolv.conf "" append etc/resolv.conf ""
@ -67,7 +53,7 @@ install ${configdir}/pam.sshd etc/pam.d/login
install ${configdir}/pam.sshd etc/pam.d/remote install ${configdir}/pam.sshd etc/pam.d/remote
## set up "install" user account ## 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:::" append etc/shadow "install::14438:0:99999:7:::"
## remove root password ## remove root password
replace "root:\*:" "root::" etc/shadow 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/accessibility bool true
gconfset /desktop/gnome/interface/at-spi-corba 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 move usr/libexec/anaconda/auditd sbin
## for compatibility with Ancient Anaconda Traditions ## for compatibility with Ancient Anaconda Traditions

View File

@ -234,7 +234,8 @@ class Lorax(BaseLoraxClass):
runtime=runtime, templatedir=templatedir) runtime=runtime, templatedir=templatedir)
logger.info("rebuilding initramfs images") 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) treebuilder.rebuild_initrds(add_args=dracut_args)
logger.info("populating output tree and building boot images") logger.info("populating output tree and building boot images")

View File

@ -174,11 +174,10 @@ class TreeBuilder(object):
'''Rebuild all the initrds in the tree. If backup is specified, each '''Rebuild all the initrds in the tree. If backup is specified, each
initrd will be renamed with backup as a suffix before rebuilding. initrd will be renamed with backup as a suffix before rebuilding.
If backup is empty, the existing initrd files will be overwritten.''' 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: if not backup:
dracut.append("--force") 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? # Hush some dracut warnings. TODO: bind-mount proc in place?
open(joinpaths(self.vars.inroot,"/proc/modules"),"w") open(joinpaths(self.vars.inroot,"/proc/modules"),"w")
@ -188,7 +187,7 @@ class TreeBuilder(object):
initrd = joinpaths(self.vars.inroot, kernel.initrd.path) initrd = joinpaths(self.vars.inroot, kernel.initrd.path)
os.rename(initrd, initrd + backup) os.rename(initrd, initrd + backup)
check_call(["chroot", self.vars.inroot] + \ 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")) os.unlink(joinpaths(self.vars.inroot,"/proc/modules"))
def build(self): def build(self):