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.

452 lines
13 KiB

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