# Managing root partition on desktop

**URL:** <https://forums.rockylinux.org/t/managing-root-partition-on-desktop/9572>\
**Category:** Rocky Linux Help & Support\
**Created:** [April 16, 2023, 11:13am UTC](https://forums.rockylinux.org/t/managing-root-partition-on-desktop/9572 "2023-04-16T11:13:21Z")\
**Posts on this page:** 10\
**Page:** 2

<div class="post-metadata">

**Author:** ![pajamian](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/pajamian/32/715_2.png) [@pajamian](https://forums.rockylinux.org/u/pajamian)\
**Post date:** [April 30, 2023, 9:03am UTC](https://forums.rockylinux.org/t/managing-root-partition-on-desktop/9572/21 "2023-04-30T09:03:14Z")

</div>

I wish I could take credit for the idea, just passing on a tip I’ve learned from others over the years.

---

<div class="post-metadata">

**Author:** ![oscav](https://avatars.discourse-cdn.com/v4/letter/o/eb8c5e/32.png) [@oscav](https://forums.rockylinux.org/u/oscav)\
**Post date:** [May 1, 2023, 9:46pm UTC](https://forums.rockylinux.org/t/managing-root-partition-on-desktop/9572/22 "2023-05-01T21:46:12Z")

</div>

Today I was able to convert the /home to an ext4 50 Gb filesystem.  
But I could not create logical volumes in that mode, even after a “mount -o remount,rw /” so I had to create the lvm devices in normal mode and do the move mounting the new lv on /mnt.  
Let’s see if I can turn /var into a fs. I think there’s no need to do the same to /etc. the size looks to be static.  
I repeat, I have no real need to do this, I’m just playing around. 🙂 So far I’m having fun.

---

<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:** [May 1, 2023, 10:20pm UTC](https://forums.rockylinux.org/t/managing-root-partition-on-desktop/9572/23 "2023-05-01T22:20:24Z")

</div>

> [@oscav](#):
>
> Let’s see if I can turn /var into a fs

Red Hat warns about that in their docs. Some `/var/*` is used early in boot, so mounting `/var` should occur in initramfs stage.  
Most subdirs of /var ought to be safe to mount “later” in boot.

---

<div class="post-metadata">

**Author:** ![efdevse](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/efdevse/32/2616_2.png) [@efdevse](https://forums.rockylinux.org/u/efdevse)\
**Post date:** [May 2, 2023, 12:35am UTC](https://forums.rockylinux.org/t/managing-root-partition-on-desktop/9572/24 "2023-05-02T00:35:20Z")

</div>

Sorry to cut in, but…

> [@jlehtone](#):
>
> Red Hat warns about that in their docs. Some `/var/*` is used early in boot, so mounting `/var` should occur in initramfs stage.  
> Most subdirs of /var ought to be safe to mount “later” in boot.

Do you know where in the docs I can find that? I’m _really_ interested to read up on that, since I have `/var` on a separate partition (in a LVM) + I have my `swapfile` in there as well. I’ve always used that setup on my systems, and haven’t run into anything, yet _(knock-on-wood)_.

```bash
$ type diskList && diskList
diskList is aliased to `mount | grep ^/dev | cut -d ' ' -f 1-5'
/dev/mapper/rl8-root on / type xfs
/dev/mapper/rl8-home on /home type xfs
/dev/mapper/rl8-srv on /srv type xfs
/dev/mapper/rl8-var on /var type xfs
/dev/sda2 on /boot type ext2

$ swapon -s
Filename Type Size Used Priority
/var/vm/swapfile0 file 4194300 788992 -2

```

That’s what I usually go with. _(In this case there’s also a 2MB biospartition for GPT that doesn’t show there.)_

* * *

Trying to find the equalent of “[9.15.5. Recommended Partitioning Scheme](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/installation_guide/s2-diskpartrecommend-x86#doc-wrapper)” for RHEL8 or 9. _That one’s for RHEL6._

And that one has `/var` on a separate partition (Table 9.3, 9.5) - with a few warnings, and just make sure it’s big enough.

If you could find that doc you mentioned, I’d appreciate that. 👍 'Cause if it’s recommended not to, I might have to rethink my setup.

---

<div class="post-metadata">

**Author:** ![oscav](https://avatars.discourse-cdn.com/v4/letter/o/eb8c5e/32.png) [@oscav](https://forums.rockylinux.org/u/oscav)\
**Post date:** [May 2, 2023, 7:46am UTC](https://forums.rockylinux.org/t/managing-root-partition-on-desktop/9572/25 "2023-05-02T07:46:10Z")

</div>

Thanks for that info.  
Some digging told me that I had to add “**[rd.lvm.lv](http://rd.lvm.lv)=[VAR\_VG\_NAME]/[VAR\_LV\_NAME]**” to GRUB\_CMDLINE\_LINUX  
Regenerate grub config with **grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg**  
Copy the current initramfs image to a safe place  
Recreate initramfs image with **dracut -v -f /boot/initramfs-$(uname -r).img $(uname -r)**

---

<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:** [May 2, 2023, 10:01am UTC](https://forums.rockylinux.org/t/managing-root-partition-on-desktop/9572/26 "2023-05-02T10:01:52Z")

</div>

> **[Appendix B. Partitioning reference Red Hat Enterprise Linux 9 | Red...](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/performing_a_standard_rhel_9_installation/partitioning-reference_installing-rhel#advice-on-partitions_partitioning-reference)**
>
> Access Red Hat’s knowledge, guidance, and support through your subscription.

---

<div class="post-metadata">

**Author:** ![efdevse](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/efdevse/32/2616_2.png) [@efdevse](https://forums.rockylinux.org/u/efdevse)\
**Post date:** [May 2, 2023, 11:02am UTC](https://forums.rockylinux.org/t/managing-root-partition-on-desktop/9572/27 "2023-05-02T11:02:24Z")

</div>

Thanks! 👍

&nbsp;

> [@RedHat :: B.5. Advice on partitions](#):
>
> - The `/var` directory holds content for a number of applications, including the Apache web server, and is used by the DNF package manager to temporarily store downloaded package updates. Make sure that the partition or volume containing `/var` has at least 5 GiB.
> 
> // …
> 
> - If `/usr` or `/var` is partitioned separately from the rest of the root volume, the boot process becomes much more complex because these directories contain boot-critical components. In some situations, such as when these directories are placed on an iSCSI drive or an FCoE location, the system may either be unable to boot, or it may hang with a `Device is busy` error when powering off or rebooting.

Ok, so I think I’m ok then. It’s way over 5GB, + my `/srv` partition (for Apache, etc) is 5GB as well, and it’s a local/standard drive (ie. non-iSCSI or FCoE). 🤞

---

<div class="post-metadata">

**Author:** ![oscav](https://avatars.discourse-cdn.com/v4/letter/o/eb8c5e/32.png) [@oscav](https://forums.rockylinux.org/u/oscav)\
**Post date:** [May 2, 2023, 10:40pm UTC](https://forums.rockylinux.org/t/managing-root-partition-on-desktop/9572/28 "2023-05-02T22:40:26Z")

</div>

Maybe it is this you’re looking for

[https://access.redhat.com/documentation/en-us/red\_hat\_enterprise\_linux/9/html/performing\_a\_standard\_rhel\_9\_installation/partitioning-reference\_installing-rhel#doc-wrapper](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/performing_a_standard_rhel_9_installation/partitioning-reference_installing-rhel#doc-wrapper)

---

<div class="post-metadata">

**Author:** ![efdevse](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/efdevse/32/2616_2.png) [@efdevse](https://forums.rockylinux.org/u/efdevse)\
**Post date:** [May 2, 2023, 10:55pm UTC](https://forums.rockylinux.org/t/managing-root-partition-on-desktop/9572/29 "2023-05-02T22:55:30Z")

</div>

Thanks! Yes, that’s the same link I got from @jlehtone a few posts up,  
…and where I quoted the text from.

---

<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:15am UTC](https://forums.rockylinux.org/t/managing-root-partition-on-desktop/9572/30 "2023-08-25T03:15:57Z")

</div>



[Previous page](https://forums.rockylinux.org/t/managing-root-partition-on-desktop/9572.md?page=1)
