Skip to content

Commit

Permalink
Editing iso_creation.md (#2539)
Browse files Browse the repository at this point in the history
* create directory "isos" and use git mv to move `iso_creation.md` to the "isos" folder
* rm the author created "ISOs" directory
* replace passive voice with active throughout
* add in fenced code block context descriptions
* some other minor corrections
  • Loading branch information
sspencerwire authored Dec 10, 2024
1 parent ef63fe0 commit 6787787
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 15 deletions.
3 changes: 2 additions & 1 deletion docs/guides/.pages
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
nav:
- ... | index*.md
- ... | installation*.md
Expand All @@ -21,8 +20,10 @@ nav:
- File Sharing Services: file_sharing
- Hardware: hardware
- Interoperability: interoperability
- ISOs: isos
- Kernel: kernel
- Mirror Management: mirror_management
- Network: network
- Package Management: package_management
- ...

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Creating a Custom Rocky Linux ISO
author: Howard Van Der Wal
contributors:
contributors: Steven Spencer
tested with: 9.5
tags:
- create
Expand All @@ -11,7 +11,7 @@ tags:

## Introduction

Creating a custom ISO may be required for a litany of reasons. Perhaps you want to make a change to the boot process, add specific packages or update a configuration file.
You might need to Create a custom ISO for a many reasons. Perhaps you want to make a change to the boot process, add specific packages, or update a configuration file.

This guide will instruct you from start to finish on how to build your own Rocky Linux ISO.

Expand All @@ -20,23 +20,27 @@ This guide will instruct you from start to finish on how to build your own Rocky
* A 64 bit machine running Rocky Linux 9 to build the new ISO image.
* A Rocky Linux 9 DVD ISO image.
* A `kickstart` file to apply to the ISO.
* Read the Lorax [Quickstart](https://weldr.io/lorax/lorax.html#quickstart) and [mkksiso](https://weldr.io/lorax/mkksiso.html) documentation to become famililar with how the `Anaconda` `boot.iso` is created.
* Read the Lorax [Quickstart](https://weldr.io/lorax/lorax.html#quickstart) and [mkksiso](https://weldr.io/lorax/mkksiso.html) documentation to become familiar with how to create the `Anaconda` `boot.iso`.

## Package installation and setup

* Install the `lorax` package:
```

```bash
sudo dnf install -y lorax
```

## Building the ISO with a kickstart file

* Run the `mkksiso` command to add a `kickstart` file and then build a new ISO:
```

```bash
mkksiso --ks <PATH_TO_KICKSTART_FILE> <PATH_TO_ISO_TO_MODIFY> <OUTPUT_PATH_FOR_BUILT_ISO>
```

* Below is an example `kickstart` file `example-ks.cfg`, which sets up a Rocky Linux 9.5 `Server With GUI` environment:
```

```bash
lang en_GB
keyboard --xlayouts='us'
timezone Asia/Tokyo --utc
Expand All @@ -57,27 +61,36 @@ firewall --enabled

## Adding a repository with its packages to an ISO image

* Make sure the repository you want to add has the `repodata` directory inside of it. If not, this can be created using the `createrepo_c` command and this can be installed with `sudo dnf install -y createrepo_c`
* Make sure the repository you want to add has the `repodata` directory inside of it. If not, you can create this using the `createrepo_c` command and install it with `sudo dnf install -y createrepo_c`
* Add the repository to your `kickstart` file, using the following syntax:
```

```bash

repo --name=extra-repo --baseurl=file:///run/install/repo/<YOUR_REPOSITORY>/
```

* Add your repository using the `--add` flag with the `mkksiso` tool:
```

```bash
mkksiso --add <LINK_TO_YOUR_REPOSITORY> --ks <PATH_TO_KICKSTART_FILE> <PATH_TO_ISO_TO_MODIFY> <OUTPUT_PATH_FOR_BUILT_ISO>
```

* The process is detailed further using the `baseos` repository in the example below:
* You can see additional details of this process using the `baseos` repository in the example below
* The `base os` repository will be locally downloaded along with all of its packages:
```

```bash
dnf reposync -p ~ --download-metadata --repo=baseos
```

* Then add the repository to the `kickstart` file:
```

```bash
repo --name=extra-repo --baseurl=file:///run/install/repo/baseos/
```

* The `kickstart` file would look like the following:
```

```bash
lang en_GB
keyboard --xlayouts='us'
timezone Asia/Tokyo --utc
Expand All @@ -96,8 +109,10 @@ firewall --enabled
repo --name=extra-repo --baseurl=file:///run/install/repo/baseos/
%end
```

* Then point the `mkksiso` command directly to the repository directory and build the ISO:
```

```bash
mkksiso --add ~/baseos --ks example-ks.cfg ~/Rocky-9.5-x86_64-dvd.iso ~/Rocky-9.5-x86_64-dvd-new.iso
```

Expand Down

0 comments on commit 6787787

Please sign in to comment.