# Update kernel in an airgapped environment (offline)

**URL:** <https://forums.rockylinux.org/t/update-kernel-in-an-airgapped-environment-offline/11567>\
**Category:** Rocky Linux Help & Support\
**Created:** [October 12, 2023, 6:15am UTC](https://forums.rockylinux.org/t/update-kernel-in-an-airgapped-environment-offline/11567 "2023-10-12T06:15:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![asfbar](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@asfbar](https://forums.rockylinux.org/u/asfbar)\
**Post date:** [October 12, 2023, 6:15am UTC](https://forums.rockylinux.org/t/update-kernel-in-an-airgapped-environment-offline/11567/1 "2023-10-12T06:15:57Z")

</div>

Hello penguines,

I have 2 questions regarding updare for an airgapped environment.

1. how can i update only the rocky kernel (8.5) ?
2. how can i update an internal rocky repository (also air gapped) while i already created an internal repository let’s say… about a year ago?

Thank you.  
Assaf.

---

<div class="post-metadata">

**Author:** ![iwalker](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/iwalker/32/2599_2.png) [@iwalker](https://forums.rockylinux.org/u/iwalker)\
**Post date:** [October 12, 2023, 6:26am UTC](https://forums.rockylinux.org/t/update-kernel-in-an-airgapped-environment-offline/11567/2 "2023-10-12T06:26:30Z")

</div>

Hi,

1. Run `dnf update kernel` to update just the kernel.
2. A repository needs to have internet access so that it can be mirrored. This is why people run things like Red Hat Satellite or Foreman/Katello so that the server that has the local repository (satellite/foreman/katello) is updated via the internet, and all remaining servers get their updates from the local repository.

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [October 12, 2023, 8:10am UTC](https://forums.rockylinux.org/t/update-kernel-in-an-airgapped-environment-offline/11567/3 "2023-10-12T08:10:56Z")

</div>

> [@iwalker](#):
>
> A repository needs to have internet access so that it can be mirrored.

I do “mirror” repos with plain `rsync`. Since I sync (most of) directory tree, I do get both packages and repo metadata.  
Are there “smarter” tools to mirror repo? Yes.  
Is it more convenient to mirror via network? Definitely.

However, one _can_ download repo to removable media, plug the media into isolated machine and sync (`rsync -a --delete`) from media to the “internal repo” in the machine. That replaces the internal repo with more recent content.

---

<div class="post-metadata">

**Author:** ![asfbar](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@asfbar](https://forums.rockylinux.org/u/asfbar)\
**Post date:** [October 12, 2023, 10:05am UTC](https://forums.rockylinux.org/t/update-kernel-in-an-airgapped-environment-offline/11567/4 "2023-10-12T10:05:03Z")

</div>

As i mentioned, i don’t have a connection to the internet in that system so how `dnf update` will help me here?

---

<div class="post-metadata">

**Author:** ![iwalker](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/iwalker/32/2599_2.png) [@iwalker](https://forums.rockylinux.org/u/iwalker)\
**Post date:** [October 12, 2023, 10:19am UTC](https://forums.rockylinux.org/t/update-kernel-in-an-airgapped-environment-offline/11567/5 "2023-10-12T10:19:26Z")

</div>

Well we don’t know that. Secondly in your post you said you had a local repository which would mean that you could do updates from it. Until you update that repository then dnf won’t work. In which case, download the kernel from a Rocky mirror and then copy that to the server and install it using:

```auto
dnf install ./kernel-version.rpm

```

where version is replaced with the rest of the filename of the rpm you downloaded. To be honest though you would be better to sort out your local mirror first and ensure the systems are connected to it so that dnf works.

And if you cannot download rpm’s and install them because you don’t have internet access at all, then you have no way to fix either items. Your only alternative then is to download everything using rsync for a mirror to a pendrive or whatever as @jlehtone suggested. In reality that is fine for a one-time update, but really you should be ensuring your local repository is able to have internet access and connect all the other servers to it.

---

<div class="post-metadata">

**Author:** ![asfbar](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@asfbar](https://forums.rockylinux.org/u/asfbar)\
**Post date:** [October 12, 2023, 10:26am UTC](https://forums.rockylinux.org/t/update-kernel-in-an-airgapped-environment-offline/11567/6 "2023-10-12T10:26:12Z")

</div>

thank you.

so if i understand you right, the best way will be first to update my local repository (download everything from the internet and the use rsync…)  
then, update the kernel.

one more qestion,  
can i download a repository for a spesific kernel version?

---

<div class="post-metadata">

**Author:** ![iwalker](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/iwalker/32/2599_2.png) [@iwalker](https://forums.rockylinux.org/u/iwalker)\
**Post date:** [October 12, 2023, 10:37am UTC](https://forums.rockylinux.org/t/update-kernel-in-an-airgapped-environment-offline/11567/7 "2023-10-12T10:37:17Z")

</div>

> [@asfbar](#):
>
> can i download a repository for a spesific kernel version?

If you filter what packages you download with rsync based on filename then yes, otherwise it doesn’t make sense to do that. Just sync everything.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/1X/91b7219eec10e30013422e4df76c1d898711a5d5.svg) [@system](https://forums.rockylinux.org/u/system)\
**Post date:** [December 11, 2023, 10:38am UTC](https://forums.rockylinux.org/t/update-kernel-in-an-airgapped-environment-offline/11567/8 "2023-12-11T10:38:16Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
