From 2025a6a1dfdcdc3b39f6f96633aedcd06efa426c Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Fri, 13 Sep 2013 15:25:39 -0700 Subject: [PATCH] livemedia-creator: Update example kickstart for rhel7 (#922064) Based on fedora live kickstart. Removes the ec2 example because RHEL7 doesn't include cloud-init and I have no way to test the results. --- docs/fedora-livemedia-ec2.ks | 120 ------------------ ...fedora-livemedia.ks => rhel7-livemedia.ks} | 24 +--- lorax.spec | 1 + 3 files changed, 6 insertions(+), 139 deletions(-) delete mode 100644 docs/fedora-livemedia-ec2.ks rename docs/{fedora-livemedia.ks => rhel7-livemedia.ks} (95%) diff --git a/docs/fedora-livemedia-ec2.ks b/docs/fedora-livemedia-ec2.ks deleted file mode 100644 index 79ec1bcc..00000000 --- a/docs/fedora-livemedia-ec2.ks +++ /dev/null @@ -1,120 +0,0 @@ -# Build a basic Fedora AMI using livemedia-creator -lang en_US.UTF-8 -keyboard us -timezone --utc America/New_York -auth --useshadow --enablemd5 -selinux --enforcing -firewall --service=ssh -bootloader --location=none -network --bootproto=dhcp --device=eth0 --onboot=on --activate -services --enabled=network,sshd,rsyslog -shutdown - -# By default the root password is emptied -rootpw --plaintext removethispw - -# -# Define how large you want your rootfs to be -# NOTE: S3-backed AMIs have a limit of 10G -# -zerombr -clearpart --all -part / --size 10000 --fstype ext4 --ondisk sda -part biosboot --size=1 -part swap --size=512 - -# -# Repositories -url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/19/x86_64/os/" - -# -# -# Add all the packages after the base packages -# -%packages --nobase -@core -system-config-securitylevel-tui -audit -pciutils -bash -coreutils -kernel - -e2fsprogs -passwd -policycoreutils -chkconfig -rootfiles -yum -vim-minimal -acpid -openssh-clients -openssh-server -curl -sudo - -#Allow for dhcp access -dhclient -iputils - --firstboot --biosdevname - -# package to setup cloudy bits for us -cloud-init - -grub --dracut-config-rescue -%end - -# more ec2-ify -%post --erroronfail - -# create ec2-user -/usr/sbin/useradd ec2-user -/bin/echo -e 'ec2-user\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers - -# fstab mounting is different for x86_64 and i386 -cat < /etc/fstab -/dev/xvda1 / ext4 defaults 1 1 -/dev/xvda2 /mnt ext3 defaults 0 0 -/dev/xvda3 swap swap defaults 0 0 -EOL - -if [ ! -d /lib64 ] ; then -# workaround xen performance issue (bz 651861) -echo "hwcap 1 nosegneg" > /etc/ld.so.conf.d/libc6-xen.conf -fi - -# Install grub.conf -# idle=nomwait is to allow xen images to boot and not try use cpu features that are not supported -INITRD=`ls /boot/initramfs-* | head -n1` -KERNEL=`ls /boot/vmlinuz-* | head -n1` -mkdir /boot/grub -pushd /boot/grub -cat < grub.conf -default 0 -timeout 0 - -title Fedora Linux - root (hd0) - kernel $KERNEL root=/dev/xvda1 idle=halt - initrd $INITRD -EOL -# symlink grub.conf to menu.lst for use by EC2 pv-grub -ln -s grub.conf menu.lst -popd - -# the firewall rules get saved as .old without this we end up not being able -# ssh in as iptables blocks access -rename -v .old "" /etc/sysconfig/*old - -# setup systemd to boot to the right runlevel -rm /etc/systemd/system/default.target -ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target - -# remove the root password -passwd -d root > /dev/null - -%end - diff --git a/docs/fedora-livemedia.ks b/docs/rhel7-livemedia.ks similarity index 95% rename from docs/fedora-livemedia.ks rename to docs/rhel7-livemedia.ks index 6d59a229..fb1a75b0 100644 --- a/docs/fedora-livemedia.ks +++ b/docs/rhel7-livemedia.ks @@ -3,18 +3,19 @@ sshpw --username=root --plaintext randOmStrinGhERE # Firewall configuration firewall --enabled --service=mdns # Use network installation -url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/19/x86_64/os/" +url --url=http://repo/rhel7.0/Server/os +repo --name=optional --baseurl=http://repo/rhel7.0/Server/optional/os # X Window System configuration information xconfig --startxonboot # Root password rootpw --plaintext removethispw # Network information -network --bootproto=dhcp --device=eth0 --onboot=on --activate +network --bootproto=dhcp --onboot=on --activate # System authorization information auth --useshadow --enablemd5 # System keyboard -keyboard us +keyboard --xlayouts=us --vckeymap=us # System language lang en_US.UTF-8 # SELinux configuration @@ -346,9 +347,6 @@ gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults # Turn off PackageKit-command-not-found while uninstalled sed -i -e 's/^SoftwareSourceSearch=true/SoftwareSourceSearch=false/' /etc/PackageKit/CommandNotFound.conf -# Use the animated laughlin background by default -gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -t str -s /desktop/gnome/background/picture_filename /usr/share/backgrounds/laughlin/default-tod/laughlin.xml - EOF # Remove root password @@ -361,27 +359,15 @@ cat /dev/null > /etc/fstab %end %packages -@admin-tools -@standard -@base-x @core -@dial-up @fonts +@x11 @gnome-desktop -@graphical-internet -@hardware-support @input-methods -#@office -#@printing -#@sound-and-video anaconda isomd5sum kernel -laughlin-backgrounds-animated-gnome memtest86+ -nss-mdns --ibus-pinyin-db-open-phrase --smartmontools grub2-efi grub2 shim diff --git a/lorax.spec b/lorax.spec index 049a4121..363f953d 100644 --- a/lorax.spec +++ b/lorax.spec @@ -73,6 +73,7 @@ make DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} install %files %defattr(-,root,root,-) %doc COPYING AUTHORS README.livemedia-creator +%doc docs/rhel7-livemedia.ks %{python_sitelib}/pylorax %{python_sitelib}/*.egg-info %{_sbindir}/lorax