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.

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