Skip to content

Commit

Permalink
WIP: rework partitioning
Browse files Browse the repository at this point in the history
Try to match the design in coreos/fedora-coreos-tracker#18

 - no lvm
 - separate /var
  • Loading branch information
cgwalters committed Sep 13, 2018
1 parent d7497a2 commit 77b8b43
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
11 changes: 10 additions & 1 deletion fedora-coreos-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,19 @@ postprocess:
echo '%sudo ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/coreos-sudo-group
# We're not using resolved yet
rm -f /usr/lib/systemd/system/systemd-resolved.service
# Growpart /var by default
cat > /usr/lib/systemd/system/coreos-growpart-var.service <<EOF
[Unit]
ConditionPathExists=/boot/coreos-growpart
[Service]
ExecStart=/usr/bin/growpart /dev/disk/by-partlabel/var
RemainAfterExit=yes
EOF
cat >/usr/lib/systemd/system-preset/42-coreos.preset << EOF
# Presets here that eventually should live in the generic fedora presets
# This one is from https://github.com/dustymabe/ignition-dracut
enable coreos-firstboot-complete.service
enable coreos-growpart-var.service
EOF
# Let's have a non-boring motd, just like CL (although theirs is more subdued
# nowadays compared to early versions with ASCII art). One thing we do here
Expand All @@ -79,7 +88,7 @@ packages:
- bridge-utils nfs-utils biosdevname iptables-services
- NetworkManager dnsmasq hostname
# Storage
- container-storage-setup cloud-utils-growpart
- cloud-utils-growpart
- lvm2 iscsi-initiator-utils sg3_utils
- device-mapper-multipath
- xfsprogs e2fsprogs mdadm
Expand Down
16 changes: 7 additions & 9 deletions image.ks
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ firewall --disabled
network --bootproto=dhcp --onboot=on

zerombr
clearpart --initlabel --all
clearpart --initlabel --all --disklabel gpt
# Add the following to kernel boot args:
# - ip=dhcp # how to get network
# - rd.neednet=1 # tell dracut we need network
# - $coreos_firstboot # This is actually a GRUB variable
bootloader --timeout=1 --append="no_timer_check console=ttyS0,115200n8 console=tty0 net.ifnames=0 biosdevname=0 ip=dhcp rd.neednet=1 rw $coreos_firstboot"

# https://github.com/coreos/fedora-coreos-tracker/issues/18
part /boot --size=300 --fstype="xfs" --label=boot
part pv.01 --grow
volgroup coreos pv.01
logvol / --size=3000 --fstype="xfs" --name=root --vgname=coreos --label=root
part / --size=3000 --fstype="xfs" --label=root
part /var --size=3000 --fstype="xfs" --label=var --grow

reboot

Expand All @@ -36,11 +36,9 @@ reboot
# https://github.com/dustymabe/ignition-dracut/pull/12
touch /boot/coreos-firstboot
# Configure docker-storage-setup to resize the partition table on boot
# https://github.com/projectatomic/docker-storage-setup/pull/25
echo 'GROWPART=true' >> /etc/sysconfig/docker-storage-setup
# https://pagure.io/atomic-wg/issue/343
echo 'ROOT_SIZE=+100%FREE' >> /etc/sysconfig/docker-storage-setup
# See https://github.com/projectatomic/container-storage-setup/pull/25
# Basically, we only want to growpart on *virtual* disk images.
touch /boot/coreos-growpart
# Remove any persistent NIC rules generated by udev
rm -vf /etc/udev/rules.d/*persistent-net*.rules
Expand Down

0 comments on commit 77b8b43

Please sign in to comment.