-
All of the following commands will be run on a Mac laptop.
-
Insert an 8Gb (or larger) USB key into a Mac laptop and use
Disk Utility
to erase it with the following settings:- Name:
CIAB
- Format:
MS-DOS (FAT)
- Scheme:
GUID Partition Map
Make sure to select the flash drive itself and not any existing disk image already present on the drive before erasing. Use the
Edit->Erase...
menu to start the erasing process. - Name:
-
The flash drive should now be mounted on the directory
/Volumes/CIAB
. -
Download the following CentOS ISO: CentOS-7-x86_64-Everything-1611.iso
-
Attach the ISO file as a disk device but don't mount:
hdiutil attach -nomount CentOS-7-x86_64-Everything-1611.iso
-
Note the output of the
hdiutil
command, as it will display the new disk device associated with the ISO file, e.g.:/dev/disk5 FDisk_partition_scheme
/dev/disk5s2 0xEF
In this case,
/dev/disk5
is the new disk device associated with the ISO file and will be used in themount_cd9660
command below. -
Make a temporary directory to mount the ISO disk device. This directory can be located anywhere and named anything. It merely serves as a mountpoint, and the files in the ISO file will appear within it once the ISO file has been mounted.
mkdir files
-
Mount the device displayed by
hdiutil
to the new directory:
mount_cd9660 /dev/disk5 files
-
Copy all of the files from the
./files
directory to the root of the USB drive:
cp -R ./files/* /Volumes/CIAB
This process will take some time as it is copying 8Gb of data to a slow flash drive.
-
Unmount the ISO file from the
files
directory:
umount /dev/disk5
-
Detach the ISO file to clean up the disk device:
hdiutil detach /dev/disk5
-
Clone this repository somewhere on the laptop:
git clone [email protected]:puppetlabs/education-builds.git
-
cd to the
classroom_in_a_box
directory:
cd education_builds/classroom_in_a_box
-
Copy the
ks
directory to the USB drive:
cp -R ./ks /Volumes/CIAB
-
Copy the grub.cfg to the USB drive:
cp EFI/BOOT/grub.cfg /Volumes/CIAB/EFI/BOOT/grub.cfg
-
Eject the flash drive, insert it into the NUC, and power on the NUC. If prompted, press
F10
to display the boot menu and select the flash drive as the boot device. From here, the installation should continue unattended, and after 60-90 minutes, the NUC should be configured as a "Classroom in a Box" machine. -
At the end of the installation process, the NUC will reboot and display a login screen that includes the root password. You may also log in with the default username
training
and the default passwordtraining
.