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.

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