VirtualBox

source: vbox/trunk/src/VBox/Main/UnattendedTemplates/rhel5_ks.cfg

Last change on this file was 71011, checked in by vboxsync, 6 years ago

Main,Installer: Made unattended installation work for rhel4 and friends. Special tweak needed for centos version detection.

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1# Template for RHEL5 and derivatives.
2#platform=x86, AMD64, or Intel EM64T
3#version=DEVEL
4
5# Firewall configuration
6firewall --disabled
7
8# Install OS instead of upgrade
9install
10
11# Use CDROM installation media
12cdrom
13
14# Root password (rhel5 not --plaintext groks)
15rootpw @@VBOX_INSERT_ROOT_PASSWORD_SH@@
16
17# System authorization information (rhel5: no --passalgo=sha512)
18auth --useshadow
19
20# Use text mode install
21text
22
23# System keyboard
24keyboard us
25
26# System language
27lang @@VBOX_INSERT_LOCALE@@
28
29#rhel5 needs:
30@@VBOX_COND_HAS_NO_PRODUCT_KEY@@
31key --skip
32@@VBOX_COND_END@@
33@@VBOX_COND_HAS_PRODUCT_KEY@@
34key @@VBOX_INSERT_PRODUCT_KEY@@
35@@VBOX_COND_END@@
36
37
38# SELinux configuration
39selinux --enforcing
40
41# Installation logging level
42logging --level=info
43
44# System timezone
45timezone@@VBOX_COND_IS_RTC_USING_UTC@@ --utc@@VBOX_COND_END@@ @@VBOX_INSERT_TIME_ZONE_UX@@
46
47# Network information
48network --bootproto=dhcp --device=eth0 --onboot=on --hostname=@@VBOX_INSERT_HOSTNAME_FQDN_SH@@
49
50# System bootloader configuration
51bootloader --location=mbr --append="nomodeset crashkernel=auto rhgb quiet"
52zerombr
53
54# Partition clearing information
55clearpart --all --initlabel
56
57# Disk partitioning information (rhel5: no ext4, so use ext3)
58part / --fstype ext3 --size 6000 --grow --asprimary
59part swap --size 1024
60
61#Initial user
62user --name=@@VBOX_INSERT_USER_LOGIN_SH@@ --password=@@VBOX_INSERT_USER_PASSWORD_SH@@
63
64# Reboot after installation
65# Note! Not sure exctly when the --eject option was added. Need to find out an make it optional.
66reboot --eject
67
68# Packages. We currently ignore missing packages/groups here to keep things simpler.
69%packages --ignoremissing
70@base
71@core
72@@VBOX_COND_IS_NOT_MINIMAL_INSTALLATION@@
73@development
74@basic-desktop
75@desktop-debugging
76@desktop-platform
77@fonts
78@general-desktop
79@graphical-admin-tools
80@remote-desktop-clients
81@x11
82@@VBOX_COND_END@@
83
84# Prepare building the additions kernel module, try get what we can from the cdrom as it may be impossible
85# to install anything from the post script:
86kernel-headers
87kernel-devel
88glibc-devel
89glibc-headers
90gcc
91dkms
92make
93bzip2
94perl
95# %end - rhel5 does not like this.
96
97
98# Pre install script for mounting the cdrom, to make sure it cannot be ejcted.
99# See https://bugzilla.redhat.com/show_bug.cgi?id=239002
100%pre
101mkdir -p /tmp/vboxcdrom
102mount -t iso9660 /tmp/cdrom /tmp/vboxcdrom || mount -t iso9660 /dev/hdc /tmp/vboxcdrom || mount -t iso9660 /dev/scd0 /tmp/vboxcdrom || mount -t iso9660 /dev/sdb /tmp/vboxcdrom
103# %end - rhel5 does not like this.
104
105
106# Post install happens in a different script.
107# Note! We mount the CDROM explictily here since the location differs between fedora 26 to rhel5
108# and apparently there isn't any way to be certain that anaconda didn't unmount it already.
109# rhel5: There is not /bin/bash, so use /bin/sh
110# rhel5: There is no /dev/cdrom, so try use /dev/hdc and /dev/sdb.
111%post --nochroot --log=/mnt/sysimage/root/ks-post.log
112df -h 1>&2
113cp /tmp/vboxcdrom/vboxpostinstall.sh /mnt/sysimage/root/vboxpostinstall.sh
114chmod a+x /mnt/sysimage/root/vboxpostinstall.sh
115/bin/sh /mnt/sysimage/root/vboxpostinstall.sh --rhel
116umount /tmp/vboxcdrom
117rmdir /tmp/vboxcdrom
118# %end - rhel5 does not like this.
119
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use