This repository has been archived by the owner on Dec 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathREADME_scripts
71 lines (62 loc) · 3.13 KB
/
README_scripts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
The scripts in this directory should be executed in the order listed.
CarveEBS.sh: Configure attached EBS into target partitioning-state.
Honors the flags:
-b|--bootlabel:
FS-label applied to '/boot' filesystem
-d|--disk:
dev-path to disk to be partitioned
-r|--rootlabel:
FS-label to apply to '/' filesystem (no LVM in use)
-v|--vgname:
LVM2 Volume-Group name for root volumes
Note: the "-r" and "-v" options are mutually exclusive
MkChrootTree.sh: Setup/mount chroot'ed volumes/partitions
ARGUMENT 1: dev-path to target disk
MkTabs.sh: Setup chroot's /etc/{fs,m}tab files (some RPMs in the
Install2Chroot complain if these files are missing
<no arguments>
NOTE1: This script will fail with a sed error if the
AMI build host's /tmp is not its own mount
(preferably a tmpfs mountpoint)
NOTE2: This script will inherit the mount-options in
place on the builder-host's /tmp filesystem.
This can lead to unexpected behaviors in the
resultant AMI if options like "noexec" or
"nosuid" have been used.
ChrootBuild.sh: Install initial, minimal RPM-set into chroot
<no arguments>
==========
Insert local customizations, here. If deploying to a
disconnected network (e.g., an isolated VPC) or network
using private/customized yum repos, run any repo-setup
scripts, here.
==========
AWScliSetup.sh: Install AWS utilities (scripting tools and
optimized drivers for HVM instances)
<no arguments>
GrowRoot.sh: Ensure that the growroot dracut modules are installed
and that the requisite LVM2-supporting hacks are
pushed in. Recompiles kernel for the dracut module.
ChrootCfg.sh: Perform supplementary configuration of components
within ${CHROOT}
MkCfgFiles.sh: Create storage config files within chroot
<no arguments>
MkTabs.sh: Something in the Chroot install seems to blow away
the fstab's swapVol entry. So, run this a second time.
CleanChroot.sh: Do some file cleanup...
<no arguments>
HVMprep.sh: Put GRUB into target EBS's MBR
ARGUMENT 1: dev-path to target disk
PreRelabel.sh: Do SELinux auto-relabel prior to taking the snapshot.
Obviates need for boot-time relabel operation.
UmountChroot.sh: Dismount and deactivate the chroot EBS
<no arguments>
Note: If wanting to start over fresh with an EBS that's previously been used
to generate an AMI, it is desirable to completely blow away filesystem
and other structures from the installation-target disk. To do so:
1) Make LVM forget about any LVM objects related to the creation
of the chroot environment (e.g. `vgremove VolGroup00`)
2) Blow away the disk's current partition-table by executing:
`dd if=/dev/zero of=/dev/xvdf bs=1024 count=10`
3) Force kernel to re-read the disk's nulled-out partition-table:
`blockdev --rereadpt /dev/xvdf`