# \[NEWBIE\] Updating initramfs?

**URL:** <https://forums.rockylinux.org/t/newbie-updating-initramfs/5906>\
**Category:** Rocky Linux Help & Support\
**Created:** [April 27, 2022, 2:41am UTC](https://forums.rockylinux.org/t/newbie-updating-initramfs/5906 "2022-04-27T02:41:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Toquita](https://avatars.discourse-cdn.com/v4/letter/t/c89c15/32.png) [@Toquita](https://forums.rockylinux.org/u/Toquita)\
**Post date:** [April 27, 2022, 2:41am UTC](https://forums.rockylinux.org/t/newbie-updating-initramfs/5906/1 "2022-04-27T02:41:05Z")

</div>

Hi there!

I’m a 3D Artist who was previously mainly on Windows, but decided to permanently move to Linux because of Rocky Linux. The main programs I work with are Maya 2023, Substance Painter, and Blender.  
I’m not a Linux newbie per say (neither an expert), I’ve been an Arch Linux user since 2013, and lately mainly an Ubuntu user (due to Maya’s 2022 compatibility with Ubuntu), but unfortunately I could not get Maya 2023 to start in any other distro other than Rocky. It’s too much of a hassle everywhere, and instead of spending time trying to make things work I decided to try one of the officially supported distros for Maya, which is Rocky.

After some testing, I absolutely love Rocky! It rocks! (pun intended 😉 ).

Now, I encrypt everything, all my drives. Here’s my drive layout:

- 128 GB SSD for EFI, /boot, /root, etc;
- 2 TB HDD for storage, which I also use as /home;
- 256 GB SSD for “working directory”. Some of the files I work with are pretty big (like 1-5 GiB easy) and I have Autosave enabled (specially for Maya), so if I have my “Maya temp” folder on my root drive the OS will freeze whenever the programs autosave. Having a separate SSD for working files removes this problem and also allows me to open/save files quicker.

I want to make these non-root drives mount automatically. The method which worked for me before switching to Rocky was this one: [cryptsetup - Why my encrypted LVM volume (LUKS device) won't mount at boot time? - Unix & Linux Stack Exchange](https://unix.stackexchange.com/questions/107810/why-my-encrypted-lvm-volume-luks-device-wont-mount-at-boot-time)

I got everything working, execept for the “update-initramfs” part, which I have no idea how to do in Rocky. This is my first time using anything other than openSUSE/Arch/Debian-family distros (the last one being the one I used the most recently), and some tutorials about this subject differ from others, so I’m kind of afraid to screw everything up.

How can I update my initramfs and make those drives automatically mount, using the tutorial I linked above as my previous method? I tried rebooting without updating the initramfs but I was dropped to a recovery thing.

Thanks!

---

<div class="post-metadata">

**Author:** ![label](https://avatars.discourse-cdn.com/v4/letter/l/c5a1d2/32.png) [@label](https://forums.rockylinux.org/u/label)\
**Post date:** [April 27, 2022, 3:13am UTC](https://forums.rockylinux.org/t/newbie-updating-initramfs/5906/2 "2022-04-27T03:13:09Z")

</div>

Glad to hear you’re having good success with Maya on Rocky. If you want to generate a new initramfs, make sure you’re running on the latest kernel installed on your system and then try this (using one of my systems as an example):

```auto
[root@xmpp01 ~]# cd /boot
# Make a backup
[root@xmpp01 boot]# cp initramfs-$(uname -r).img initramfs-$(uname -r).img.backup
# Regenerate
[root@xmpp01 boot]# dracut -f initramfs-$(uname -r).img $(uname -r)
[root@xmpp01 boot]# ls | grep "$(uname -r)"
config-4.18.0-348.20.1.el8_5.x86_64
initramfs-4.18.0-348.20.1.el8_5.x86_64.img
initramfs-4.18.0-348.20.1.el8_5.x86_64.img.backup
initramfs-4.18.0-348.20.1.el8_5.x86_64kdump.img
symvers-4.18.0-348.20.1.el8_5.x86_64.gz
System.map-4.18.0-348.20.1.el8_5.x86_64
vmlinuz-4.18.0-348.20.1.el8_5.x86_64

```

At that point you can reboot.

---

<div class="post-metadata">

**Author:** ![Toquita](https://avatars.discourse-cdn.com/v4/letter/t/c89c15/32.png) [@Toquita](https://forums.rockylinux.org/u/Toquita)\
**Post date:** [April 27, 2022, 4:24am UTC](https://forums.rockylinux.org/t/newbie-updating-initramfs/5906/3 "2022-04-27T04:24:39Z")

</div>

Thank you, Nazunalika, but I’m not able to boot yet for some reason.

(sda is where the 2TB HDD was mounted. I don’t mind this)

> NAME UUID MOUNTPOINT  
> sda  
> └─sda1 4e072191-d976-496a-809c-5e3655b4a871  
> └─2TB 02xhUr-ugp0-i1uW-vzf4-yLvY-rjqS-d0TkJM  
> └─home-home\_LV 800eaefa-b3a3-4aa8-b813-e4a61afc0f72 /mnt/home

My /etc/crypttab (first entry was already there)

> luks-6c78f38d-f1a0-4510-9b3a-72f2fc439aac UUID=6c78f38d-f1a0-4510-9b3a-72f2fc439aac none discard  
> 2TB UUID=02xhUr-ugp0-i1uW-vzf4-yLvY-rjqS-d0TkJM _MY\_PASSWORD_ luks

/etc/fstab

> UUID=800eaefa-b3a3-4aa8-b813-e4a61afc0f72 /mnt/home ext4 defaults 0 2

/mnt/home exists and is where “home\_LV” is currently mounted.

Then I did

> cd /boot  
> dracut -f initramfs-$(uname -r).img $(uname -r)

But still not able to boot.

Am I missing something here?

EDIT: If it’s of any help, I saw some messages about “dependency failed for cryptography setup”.

EDIT2: I see that /etc/default/grub has some options I never really used. Maye this line is important and I need to add something to it?

> GRUB\_CMDLINE\_LINUX=“crashkernel=auto resume=/dev/mapper/rl-swap rd.luks.uuid=luks-6c78f38d-f1a0-4510-9b3a-72f2fc439aac rd.lvm.lv=rl/root rd.lvm.lv=rl/swap rd.driver.blacklist=nouveau”

---

<div class="post-metadata">

**Author:** ![Toquita](https://avatars.discourse-cdn.com/v4/letter/t/c89c15/32.png) [@Toquita](https://forums.rockylinux.org/u/Toquita)\
**Post date:** [April 27, 2022, 10:07pm UTC](https://forums.rockylinux.org/t/newbie-updating-initramfs/5906/4 "2022-04-27T22:07:34Z")

</div>

OK, found the problem. It’s either one of these two options, not sure which one (probably the latter) but it worked after doing both procedures:

- Instead of having the password on /etc/crypttab I left it as “none” and the system automounted it anyways (didn’t use to be this way, cryptsetup wasn’t that smart in the past);
- Apparently I can’t make Rocky mount that HDD by using it as LUKS-LVM, it needs to be pure LUKS for it to work.

Now it works fine, all encrypted volumes mounted at boot with a single password:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/2X/f/f049db53a887e66486efcac8eaf911595ac2322a.png)

Now, to enjoy this amazing OS!

---

<div class="post-metadata">

**Author:** ![brian](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/brian/32/5777_2.png) [@brian](https://forums.rockylinux.org/u/brian)\
**Post date:** [August 25, 2023, 3:50am UTC](https://forums.rockylinux.org/t/newbie-updating-initramfs/5906/5 "2023-08-25T03:50:57Z")

</div>


