Skip to content

Commit 60fd54a

Browse files
authored
Merge pull request #57 from carpentriesoffline/jsteyn-patch-1
update pxe installation
2 parents df600d6 + 3000ad2 commit 60fd54a

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

miniHPC_step_by_step.md

+42
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,48 @@ dd if=/dev/mmcblk0 of=node.img
255255

256256
- Setup PXE booting
257257

258+
To use eessi with PXE it is necessary to create a loop device for each node in the shared filesystem and then
259+
mount it on /var/lib/cvmfs.
260+
261+
Creating a loop device:
262+
```bash
263+
dd if=/dev/mmcblk0 of=node.img bs=4M count=5120
264+
sudo parted -s /dev/loop0
265+
sudo parted -s /dev/loop0 mklabel msdos
266+
sudo parted -s /dev/loop0 mkpart primary
267+
sudo mkfs.ext4 /dev/loop0
268+
```
269+
Create a script that can be run by systemd on bootup. In /usr/local/bin/cvfms-startup.sh enter:
270+
```
271+
#!/bin/bash
272+
273+
/usr/sbin/losetup /dev/loop0 /sharedfs/loopdevices/${HOSTNAME}
274+
/bin/mount /dev/loop0 /var/lib/cvmfs
275+
```
276+
277+
Create the following systemd service script in /etc/systemd/system/cvfms.service:
278+
```
279+
[Unit]
280+
Description=Setup Loop Device and Mount Shared Filesystem
281+
After=local-fs.target
282+
Requires=local-fs.target
283+
284+
[Service]
285+
Type=oneshot
286+
ExecStart=/usr/local/bin/cvmfs-setup.sh
287+
RemainAfterExit=yes
288+
289+
[Install]
290+
WantedBy=multi-user.target
291+
```
292+
293+
Enable and start the service:
294+
```
295+
sudo systemctl enable cvmfs.service
296+
sudo systemctl start cvmfs.service
297+
```
298+
299+
258300
Download the pxe-boot scripts:
259301

260302
```bash

0 commit comments

Comments
 (0)