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.

448 lines
12 KiB

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