Archive

Last modified by Administrator on 2022/01/30 10:10

Blog - posts for June 2015

Jun 18 2015

CentOS 7: Differences on the ground floor

As you might expect, CentOS 7 has its package differences from CentOS 6. What does looks like from the ground, though? There have been a number of changes, as you might expect.

Well, let's start with my base-level kickstart file which sets up a fairly minimal system:

Kickstart file
#version=RHEL7

# Standard CentOS kickstart configuration.

authconfig --enableshadow --passalgo=sha512

install
reboot
eula --agreed
# Since we want to install packages that aren't on the minimal disc, we can't actually install from the disc. We can't
# specify additional repo entries that are Base, as they get ignored (name collision).
url --mirrorlist=http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os

firewall --enabled --service=ssh
firstboot --disable

ignoredisk --only-use=sda,sdb,sdc

keyboard --vckeymap=us --xlayouts='us'
lang en_US.UTF-8

network --bootproto dhcp --device=eth0 --noipv6
repo --name=Base --mirrorlist=http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os --cost=100
repo --name=Updates --mirrorlist=http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=updates --cost=90

rootpw --iscrypted __PASSWORD_HASH_GOES_HERE__
selinux --enforcing
services --enabled="chronyd"
timezone --utc America/Los_Angeles --isUtc
bootloader --append="rhgb quiet crashkernel=auto" --location=mbr --driveorder="sda,sdb,sdc" --boot-drive=sda

zerombr
clearpart --all --initlabel
part /boot --fstype=ext4 --size=128 --ondrive=sda
part swap --size=256 --ondrive=sda
part / --fstype=ext4 --grow --ondrive=sda
part /var --fstype=ext4 --grow --ondrive=sdb
part /tmp --fstype=ext4 --grow --ondrive=sdc

%packages --nobase
@core

# No need for Adaptec drivers.
-aic94xx-firmware

# No need for sound drivers.
-alsa-*

# No need for firmware loaders.
-fxload

# No need for IBM Power Linux RAID drivers.
-iprutils

# No need for PVR drivers.
-ivtv-firmware

# No need for wireless drivers.
-iwl*-firmware
-NetworkManager*
-wpa_supplicant

# No need for Infiniband drivers.
-rdma

# No need for network teaming.
-jansson
-libnl3
-libnl3-cli
-libteam
-teamd

# No need for virtualization utilities
-tuned
-virt-what

# VMware kernel compilation requirements.
gcc
kernel-headers

# Useful utilities.
deltarpm
man
rsync
%end

%pre
%end

%post
# Declare that the disks don't support SMART.
/bin/cat /etc/tempfiles.d/disable_smart.conf <<EOF
w /sys/devices/pci0000:00/0000:00:15.0/0000:03:00.0/host2/port-2:0/end_device-2:0/target2:0:0/2:0:0:0/scsi_disk/2:0:0:0/max_write_same_blocks - - - - 0
w /sys/devices/pci0000:00/0000:00:15.0/0000:03:00.0/host2/port-2:1/end_device-2:1/target2:0:1/2:0:1:0/scsi_disk/2:0:1:0/max_write_same_blocks - - - - 0
w /sys/devices/pci0000:00/0000:00:15.0/0000:03:00.0/host2/port-2:2/end_device-2:2/target2:0:2/2:0:2:0/scsi_disk/2:0:2:0/max_write_same_blocks - - - - 0
EOF

%end

Naturally, if you're going to use this as a template, you would make changes as appropriate to your own system (particularly, I'd imagine, the disk configuration).

A couple of notes:

  • You may notice that I don't do much in the way of system configuration here. That's because it makes more sense to use a configuration management tool to configure systems, so the base kickstart configuration file tries to target system-level stuff.
  • I use a multi-partition layout to "sandbox" the partitions that have a potential to grow out of control. I don't want /var or /tmp filling up to bring the entire system down. As a bonus, since this is a virtualized system, this allows me to grow the three partitions as needed relatively easily (since they're all located at the end of their respective disks).
  • This is a base kickstart configuration, so other derived configurations will naturally have additional packages and post-install instructions.

Packages that have been removed from CentOS 7 (notes sometimes pulled from this page):

 Removed packages 
 Package  Note
 attr  
 b43-openfwwf  
 bzip2  
 checkpolicy  
 cloog-ppl  
 coreutils-libs  
 cyrus-sasl  
 dash  Looks like CentOS gave up on the dash experiment.
 db4  → libdb
 db4-utils  → libdb-utils
 dracut-kernel → dracut
 efibootmgr 
 gamin  
 groff  → groff-base
 grub  → grub2, grub2-tools
 iptables-ipv6  
 kernel-firmware  → linux-firmware
 libnih  
 libudev  
 libusb  
 m4  
 MAKEDEV  
 man  → man-db
 mingetty  → util-linux
 module-init-tools  
 mysql-libs  → mariadb-libs
 net-tools  
 perl-Module-Pluggable  
 perl-version  
 ppl  
 procps  → procps-ng
 psmisc  
 system-config-firewall-base  → firewalld
 udev  
 upstart  
 util-linux-ng  → util-linux
 xz-lzma-compat  
 yum-presto  

Meanwhile, the number of added packages is fairly considerable:

 Added packages 
 Package  Note
 authconfig  
 bind-libs-lite  
 bind-license  
 biosdevname  
 btrfs-progs  Mmm... btrfs.
 centos-logos  ← redhat-logos
 chrony  
 cryptsetup-libs  
 dbus  
 dbus-python  
 dhcp-libs  
 dracut-config-rescue  
 dracut-network  
 ebtables  Required by firewalld.
 elfutils-libs  
 firewalld  ← system-config-firewall-base
 freetype  Required by grub2.
 gettext  
 gettext-libs  
 gobject-introspection  
 groff-base  ← groff
 grub2  ← grub
 grub2-tools  ← grub
 hardlink  
 hostname  
 irqbalance  
 json-c  
 kbd-legacy  
 kernel-devel  
 kernel-tools  
 kernel-tools-libs  
 kexec-tools  
 kmod  
 kmod-libs  
 kpartx  
 libassuan  
 libcroco  
 libdaemon  
 libdb  ← db4
 libdb-utils  ← db4-utils
 libestr  
 libmnl  
 libmount  
 libmpc  
 libnetfilter_conntrack  
 libnfnetlink  
 libpipeline  
 libpwquality  
 libselinux-python  
 libsysfs  
 libunistring  
 libverto  
 linux-firmware  ← kernel-firmware
 lzo  
 man-db  ← man
 mariadb-libs  ← mysql-libs
 microcode_ctl  
 newt-python  
 numactl-libs  
 openssl-libs  
 os-prober  
 perl-Carp  
 perl-constant  
 perl-Encode  
 perl-Exporter  
 perl-File-Path  
 perl-File-Temp  
 perl-Filter  
 perl-Getopt-Long  
 perl-HTTP-Tiny  
 perl-macros  
 perl-parent  
 perl-PathTools  
 perl-podlators  
 perl-Pod-Perldoc  
 perl-Pod-Usage  
 perl-Scalar-List-Utils  
 perl-Socket  
 perl-Storable  
 perl-Text-ParseWords  
 perl-threads  
 perl-threads-shared  
 perl-Time-HiRes  
 perl-Time-Local  
 procps-ng  ← procps
 pygobject3-base  
 pyliblzma  
 python-decorator  
 python-slip  
 python-slip-dbus  
 pyxattr  
 qrencode-libs  
 rpm-build-libs  
 snappy  
 systemd  CentOS 7 moves away from Sys V-style daemon management.
 systemd-libs  
 systemd-sysv  
 util-linux  ← util-linux-ng
 xfsprogs  

Disk usage is comparable to CentOS 6, even with the additional packages (many of which I expect are a result of refactoring). And several of those new packages will require further investigation, to see how well the new functionality works.

Jun 18 2015

Kickstarting a new image

I've decided to finally get around to set up kickstart configuration files for my system images, since I've started investigating migrating over to CentOS 7. Kickstart, if you're not familiar with it, is a method of automating Linux installation and configuration, and is largely centered around the Red Hat-based distributions. While I was setting all of this up, I decided to also investigate whether it was worth switching from CentOS to Ubuntu Server, seeing as Ubuntu usage has passed CentOS and RHEL usage according to W3Techs (I suppose I could have looked at Debian as well, but for whatever reason it doesn't particularly appeal to me - possibly because it's not as marketable a job skill, for all that I don't really do this for a career?).

That said, I decided not to, for a couple of reasons:

  • The difference in how well they're documented is huge. Red Hat has a tremendous amount of documentation on setting up a kickstart installation compared to Ubuntu's preseed documentation (which seems to boil down to: take this undocumented file and it should work). Somewhat ironically, Debian has considerably better documentation.
  • Red Hat's installation process generates a kickstart configuration file (/root/anaconda-ks.cfg) that you can immediately turn around and feed back into a kickstart installation to get the same result, whereas the Debian documentation notes that their equivalent (debconf-get-selections --installer; debconf-get-selections) doesn't actually quite work (and I would expect that Ubuntu would follow in the same footsteps).
  • And, of course, I'm still better and more comfortable with Red Hat-based distributions than Ubuntu distributions, which matters for what is effectively a production deployment.

P.S. Yes, Ubuntu can also support kickstart installations, but it's a hacky process. I don't care that much.