Fedora Remix maintained by the Rochester Institute of Technology (RIT) Linux Users Group, targeted at users new to Linux and RIT students, faculty, and staff
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

451 lines
13 KiB

7 years ago
7 years ago
  1. #version=DEVEL
  2. # X Window System configuration information
  3. xconfig --startxonboot
  4. # Keyboard layouts
  5. keyboard 'us'
  6. # Use network installation
  7. url --mirrorlist="https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch"
  8. # System language
  9. lang en_US.UTF-8
  10. # Firewall configuration
  11. firewall --enabled --service=mdns
  12. repo --name="fedora" --mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
  13. repo --name="updates" --mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch
  14. repo --name="rpmfusion-free" --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-$releasever&arch=$basearch
  15. repo --name="rpmfusion-free-updates" --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-updates-released-$releasever&arch=$basearch
  16. repo --name="google-chrome" --baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
  17. repo --name="tigeros" --baseurl=https://tigeros.ritlug.com/packages/$basearch/
  18. # Source repos
  19. repo --name="source" --baseurl=http://mirror.cc.vt.edu/pub/fedora/linux/releases/$releasever/Everything/source/tree/
  20. repo --name="updates-source" --baseurl=http://mirror.cc.vt.edu/pub/fedora/linux/updates/$releasever/SRPMS/
  21. repo --name="tigeros-source" --baseurl=https://tigeros.ritlug.com/packages/source/
  22. repo --name="rpmfusion-free-source" --baseurl=http://download1.rpmfusion.org/free/fedora/releases/$releasever/Everything/source/SRPMS/
  23. repo --name="rpmfusion-free-updates-source" --baseurl=http://download1.rpmfusion.org/free/fedora/updates/$releasever/SRPMS/
  24. repo --name="Copr repo for gscreenshot owned by thenaterhood" --baseurl=https://copr-be.cloud.fedoraproject.org/results/thenaterhood/gscreenshot/fedora-$releasever-$basearch/
  25. # Shutdown after installation
  26. shutdown
  27. # Network information
  28. network --bootproto=dhcp --device=link --activate
  29. # System timezone
  30. timezone US/Eastern
  31. # System authorization information
  32. auth --useshadow --passalgo=sha512
  33. # SELinux configuration
  34. selinux --enforcing
  35. # System services
  36. services --disabled="sshd" --enabled="NetworkManager,ModemManager"
  37. # System bootloader configuration
  38. bootloader --location=none
  39. # Clear the Master Boot Record
  40. zerombr
  41. # Partition clearing information
  42. clearpart --all
  43. # Disk partitioning information
  44. part / --fstype="ext4" --size=5120
  45. part / --size=6144
  46. %post
  47. # FIXME: it'd be better to get this installed from a package
  48. cat > /etc/rc.d/init.d/livesys << EOF
  49. #!/bin/bash
  50. #
  51. # live: Init script for live image
  52. #
  53. # chkconfig: 345 00 99
  54. # description: Init script for live image.
  55. ### BEGIN INIT INFO
  56. # X-Start-Before: display-manager chronyd
  57. ### END INIT INFO
  58. . /etc/init.d/functions
  59. if ! strstr "\`cat /proc/cmdline\`" rd.live.image || [ "\$1" != "start" ]; then
  60. exit 0
  61. fi
  62. if [ -e /.liveimg-configured ] ; then
  63. configdone=1
  64. fi
  65. exists() {
  66. which \$1 >/dev/null 2>&1 || return
  67. \$*
  68. }
  69. livedir="LiveOS"
  70. for arg in \`cat /proc/cmdline\` ; do
  71. if [ "\${arg##rd.live.dir=}" != "\${arg}" ]; then
  72. livedir=\${arg##rd.live.dir=}
  73. return
  74. fi
  75. if [ "\${arg##live_dir=}" != "\${arg}" ]; then
  76. livedir=\${arg##live_dir=}
  77. return
  78. fi
  79. done
  80. # enable swaps unless requested otherwise
  81. swaps=\`blkid -t TYPE=swap -o device\`
  82. if ! strstr "\`cat /proc/cmdline\`" noswap && [ -n "\$swaps" ] ; then
  83. for s in \$swaps ; do
  84. action "Enabling swap partition \$s" swapon \$s
  85. done
  86. fi
  87. if ! strstr "\`cat /proc/cmdline\`" noswap && [ -f /run/initramfs/live/\${livedir}/swap.img ] ; then
  88. action "Enabling swap file" swapon /run/initramfs/live/\${livedir}/swap.img
  89. fi
  90. mountPersistentHome() {
  91. # support label/uuid
  92. if [ "\${homedev##LABEL=}" != "\${homedev}" -o "\${homedev##UUID=}" != "\${homedev}" ]; then
  93. homedev=\`/sbin/blkid -o device -t "\$homedev"\`
  94. fi
  95. # if we're given a file rather than a blockdev, loopback it
  96. if [ "\${homedev##mtd}" != "\${homedev}" ]; then
  97. # mtd devs don't have a block device but get magic-mounted with -t jffs2
  98. mountopts="-t jffs2"
  99. elif [ ! -b "\$homedev" ]; then
  100. loopdev=\`losetup -f\`
  101. if [ "\${homedev##/run/initramfs/live}" != "\${homedev}" ]; then
  102. action "Remounting live store r/w" mount -o remount,rw /run/initramfs/live
  103. fi
  104. losetup \$loopdev \$homedev
  105. homedev=\$loopdev
  106. fi
  107. # if it's encrypted, we need to unlock it
  108. if [ "\$(/sbin/blkid -s TYPE -o value \$homedev 2>/dev/null)" = "crypto_LUKS" ]; then
  109. echo
  110. echo "Setting up encrypted /home device"
  111. plymouth ask-for-password --command="cryptsetup luksOpen \$homedev EncHome"
  112. homedev=/dev/mapper/EncHome
  113. fi
  114. # and finally do the mount
  115. mount \$mountopts \$homedev /home
  116. # if we have /home under what's passed for persistent home, then
  117. # we should make that the real /home. useful for mtd device on olpc
  118. if [ -d /home/home ]; then mount --bind /home/home /home ; fi
  119. [ -x /sbin/restorecon ] && /sbin/restorecon /home
  120. if [ -d /home/liveuser ]; then USERADDARGS="-M" ; fi
  121. }
  122. findPersistentHome() {
  123. for arg in \`cat /proc/cmdline\` ; do
  124. if [ "\${arg##persistenthome=}" != "\${arg}" ]; then
  125. homedev=\${arg##persistenthome=}
  126. return
  127. fi
  128. done
  129. }
  130. if strstr "\`cat /proc/cmdline\`" persistenthome= ; then
  131. findPersistentHome
  132. elif [ -e /run/initramfs/live/\${livedir}/home.img ]; then
  133. homedev=/run/initramfs/live/\${livedir}/home.img
  134. fi
  135. # if we have a persistent /home, then we want to go ahead and mount it
  136. if ! strstr "\`cat /proc/cmdline\`" nopersistenthome && [ -n "\$homedev" ] ; then
  137. action "Mounting persistent /home" mountPersistentHome
  138. fi
  139. if [ -n "\$configdone" ]; then
  140. exit 0
  141. fi
  142. # add fedora user with no passwd
  143. action "Adding live user" useradd \$USERADDARGS -c "Live System User" liveuser
  144. passwd -d liveuser > /dev/null
  145. usermod -aG wheel liveuser > /dev/null
  146. # Remove root password lock
  147. passwd -d root > /dev/null
  148. # turn off firstboot for livecd boots
  149. systemctl --no-reload disable firstboot-text.service 2> /dev/null || :
  150. systemctl --no-reload disable firstboot-graphical.service 2> /dev/null || :
  151. systemctl stop firstboot-text.service 2> /dev/null || :
  152. systemctl stop firstboot-graphical.service 2> /dev/null || :
  153. # don't use prelink on a running live image
  154. sed -i 's/PRELINKING=yes/PRELINKING=no/' /etc/sysconfig/prelink &>/dev/null || :
  155. # turn off mdmonitor by default
  156. systemctl --no-reload disable mdmonitor.service 2> /dev/null || :
  157. systemctl --no-reload disable mdmonitor-takeover.service 2> /dev/null || :
  158. systemctl stop mdmonitor.service 2> /dev/null || :
  159. systemctl stop mdmonitor-takeover.service 2> /dev/null || :
  160. # don't enable the gnome-settings-daemon packagekit plugin
  161. gsettings set org.gnome.software download-updates 'false' || :
  162. # don't start cron/at as they tend to spawn things which are
  163. # disk intensive that are painful on a live image
  164. systemctl --no-reload disable crond.service 2> /dev/null || :
  165. systemctl --no-reload disable atd.service 2> /dev/null || :
  166. systemctl stop crond.service 2> /dev/null || :
  167. systemctl stop atd.service 2> /dev/null || :
  168. # Don't sync the system clock when running live (RHBZ #1018162)
  169. sed -i 's/rtcsync//' /etc/chrony.conf
  170. # Mark things as configured
  171. touch /.liveimg-configured
  172. # add static hostname to work around xauth bug
  173. # https://bugzilla.redhat.com/show_bug.cgi?id=679486
  174. # the hostname must be something else than 'localhost'
  175. # https://bugzilla.redhat.com/show_bug.cgi?id=1370222
  176. echo "localhost-live" > /etc/hostname
  177. EOF
  178. # bah, hal starts way too late
  179. cat > /etc/rc.d/init.d/livesys-late << EOF
  180. #!/bin/bash
  181. #
  182. # live: Late init script for live image
  183. #
  184. # chkconfig: 345 99 01
  185. # description: Late init script for live image.
  186. . /etc/init.d/functions
  187. if ! strstr "\`cat /proc/cmdline\`" rd.live.image || [ "\$1" != "start" ] || [ -e /.liveimg-late-configured ] ; then
  188. exit 0
  189. fi
  190. exists() {
  191. which \$1 >/dev/null 2>&1 || return
  192. \$*
  193. }
  194. touch /.liveimg-late-configured
  195. # read some variables out of /proc/cmdline
  196. for o in \`cat /proc/cmdline\` ; do
  197. case \$o in
  198. ks=*)
  199. ks="--kickstart=\${o#ks=}"
  200. ;;
  201. xdriver=*)
  202. xdriver="\${o#xdriver=}"
  203. ;;
  204. esac
  205. done
  206. # if liveinst or textinst is given, start anaconda
  207. if strstr "\`cat /proc/cmdline\`" liveinst ; then
  208. plymouth --quit
  209. /usr/sbin/liveinst \$ks
  210. fi
  211. if strstr "\`cat /proc/cmdline\`" textinst ; then
  212. plymouth --quit
  213. /usr/sbin/liveinst --text \$ks
  214. fi
  215. # configure X, allowing user to override xdriver
  216. if [ -n "\$xdriver" ]; then
  217. cat > /etc/X11/xorg.conf.d/00-xdriver.conf <<FOE
  218. Section "Device"
  219. Identifier "Videocard0"
  220. Driver "\$xdriver"
  221. EndSection
  222. FOE
  223. fi
  224. EOF
  225. chmod 755 /etc/rc.d/init.d/livesys
  226. /sbin/restorecon /etc/rc.d/init.d/livesys
  227. /sbin/chkconfig --add livesys
  228. chmod 755 /etc/rc.d/init.d/livesys-late
  229. /sbin/restorecon /etc/rc.d/init.d/livesys-late
  230. /sbin/chkconfig --add livesys-late
  231. # enable tmpfs for /tmp
  232. systemctl enable tmp.mount
  233. # make it so that we don't do writing to the overlay for things which
  234. # are just tmpdirs/caches
  235. # note https://bugzilla.redhat.com/show_bug.cgi?id=1135475
  236. cat >> /etc/fstab << EOF
  237. vartmp /var/tmp tmpfs defaults 0 0
  238. EOF
  239. # work around for poor key import UI in PackageKit
  240. rm -f /var/lib/rpm/__db*
  241. releasever=$(rpm -q --qf '%{version}\n' --whatprovides system-release)
  242. basearch=$(uname -i)
  243. rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
  244. echo "Packages within this LiveCD"
  245. rpm -qa
  246. # Note that running rpm recreates the rpm db files which aren't needed or wanted
  247. rm -f /var/lib/rpm/__db*
  248. # go ahead and pre-make the man -k cache (#455968)
  249. /usr/bin/mandb
  250. # make sure there aren't core files lying around
  251. rm -f /core*
  252. # remove random seed, the newly installed instance should make it's own
  253. rm -f /var/lib/systemd/random-seed
  254. # convince readahead not to collect
  255. # FIXME: for systemd
  256. echo 'File created by kickstart. See systemd-update-done.service(8).' \
  257. | tee /etc/.updated >/var/.updated
  258. # Drop the rescue kernel and initramfs, we don't need them on the live media itself.
  259. # See bug 1317709
  260. rm -f /boot/*-rescue*
  261. # Disable network service here, as doing it in the services line
  262. # fails due to RHBZ #1369794
  263. /sbin/chkconfig network off
  264. # Remove machine-id on pre generated images
  265. rm -f /etc/machine-id
  266. touch /etc/machine-id
  267. %end
  268. %post --nochroot
  269. cp $INSTALL_ROOT/usr/share/licenses/*-release/* $LIVE_ROOT/
  270. # only works on x86, x86_64
  271. if [ "$(uname -i)" = "i386" -o "$(uname -i)" = "x86_64" ]; then
  272. if [ ! -d $LIVE_ROOT/LiveOS ]; then mkdir -p $LIVE_ROOT/LiveOS ; fi
  273. cp /usr/bin/livecd-iso-to-disk $LIVE_ROOT/LiveOS
  274. fi
  275. %end
  276. %post
  277. # cinnamon configuration
  278. # create /etc/sysconfig/desktop (needed for installation)
  279. cat > /etc/sysconfig/desktop <<EOF
  280. PREFERRED=/usr/bin/cinnamon-session
  281. DISPLAYMANAGER=/usr/sbin/lightdm
  282. EOF
  283. cat >> /etc/rc.d/init.d/livesys << EOF
  284. # set up lightdm autologin
  285. sed -i 's/^#autologin-user=.*/autologin-user=liveuser/' /etc/lightdm/lightdm.conf
  286. sed -i 's/^#autologin-user-timeout=.*/autologin-user-timeout=0/' /etc/lightdm/lightdm.conf
  287. #sed -i 's/^#show-language-selector=.*/show-language-selector=true/' /etc/lightdm/lightdm-gtk-greeter.conf
  288. # set Cinnamon as default session, otherwise login will fail
  289. sed -i 's/^#user-session=.*/user-session=cinnamon/' /etc/lightdm/lightdm.conf
  290. # Show harddisk install on the desktop
  291. sed -i -e 's/NoDisplay=true/NoDisplay=false/' /usr/share/applications/liveinst.desktop
  292. mkdir /home/liveuser/Desktop
  293. cp /usr/share/applications/liveinst.desktop /home/liveuser/Desktop
  294. # and mark it as executable
  295. chmod +x /home/liveuser/Desktop/liveinst.desktop
  296. # this goes at the end after all other changes.
  297. chown -R liveuser:liveuser /home/liveuser
  298. restorecon -R /home/liveuser
  299. EOF
  300. # TigerOS specific setup
  301. chmod +x /usr/local/bin/\*
  302. #gsettings set org.cinnamon.desktop.background picture-uri "file:///usr/share/backgrounds/tigeros/wallpaper2-1920x1080.jpg"
  303. rm -rf /home/liveuser/.config/autostart/tigeros-postinstall.desktop
  304. restorecon -R /usr/local/bin
  305. chown -R liveuser:liveuser /home/liveuser
  306. restorecon -R /home/liveuser
  307. %end
  308. %packages
  309. @anaconda-tools
  310. @base-x
  311. @cinnamon-desktop
  312. @core
  313. @dial-up
  314. @fonts
  315. @guest-desktop-agents
  316. @hardware-support
  317. @input-methods
  318. @libreoffice
  319. @multimedia
  320. @networkmanager-submodules
  321. @printing
  322. @standard
  323. aajohan-comfortaa-fonts
  324. anaconda
  325. anaconda-installclass-tigeros
  326. desktop-backgrounds-basic
  327. dracut-live
  328. f24-backgrounds-extras-gnome
  329. generic-release-notes
  330. gimp
  331. glibc-all-langpacks
  332. #remove chrome until we verify licensing
  333. #google-chrome-stable
  334. grub2-efi
  335. gscreenshot
  336. hexchat
  337. htop
  338. inkscape
  339. kernel
  340. kernel-modules
  341. kernel-modules-extra
  342. lynx
  343. memtest86+
  344. parole
  345. pidgin
  346. rhythmbox
  347. rpmfusion-free-release
  348. scrot
  349. syslinux
  350. tigeros-backgrounds
  351. tigeros-ff-profile
  352. tigeros-logos
  353. tigeros-release
  354. tigeros-repos
  355. tigeros-scripts
  356. transmission
  357. vim
  358. wget
  359. yumex-dnf
  360. zsh
  361. #exclude things (packagekit breaks things, fedora-* packages are replaced by ones we customized.)
  362. -PackageKit*
  363. -autofs
  364. -coolkey
  365. -fedora-bookmarks
  366. -fedora-icon-theme
  367. -fedora-logos
  368. -fedora-release
  369. -fedora-release-notes
  370. -gnome-screenshot
  371. -hplip
  372. -isdn4k-utils
  373. -mpage
  374. -numactl
  375. -policycoreutils-gui
  376. -sane-backends
  377. -sox
  378. -system-config-boot
  379. -system-config-language
  380. -system-config-network
  381. -system-config-rootpassword
  382. -system-config-services
  383. -xsane
  384. -xsane-gimp
  385. %end