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.

447 lines
12 KiB

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