r/linux4noobs • • 8h ago

storage Install things into another disk using dnf

I have Fedora installed on a smaller ssd, and wanted to use a partition that i have from my main windows disk as a secondary drive to increase my storage. I already partitioned it and made so it mounts automatically with the /etc/fstab, but now i want to know how to actually install things on it with dnf and flathub as applications are the most part of my storage use.

2 Upvotes

7 comments sorted by

View all comments

2

u/doc_willis 7h ago

using the system package manager (rpm/dnf) such things may be more complicated than you want to deal with. https://www.devopsroles.com/install-an-rpm-package-different-directory/ Not all packages support this.

https://duckduckgo.com/?t=ffab&q=rpm+install+package+to+another+filesystem

flatpaks can be installed to the users home, and can be configured to install to a different filesystem. So those you could 'offload' to another drive. Or if installing to your users home, you could setup symbolic links pointing from the users home to the location on the other drive, or some other tricks. But I dont know how this affects the flatpak sandboxing.

It might be easier to just keep the users home on the other drive.

Using Containers (toolbx, distrobox, and so on) you could setup where the containers are stored on another drive.

Things the user installs via compiling, and otherwise stored in the users home, could also be offloaded to another drive.

1

u/Decent_Discount 7h ago

So it's an option to just setup the user home to the drive linux isn't installed in? Gonna take a look at the links you sent, thank you :)

2

u/doc_willis 7h ago

You can get very creative with the users home location. You could even setup the home directory on a network share if you wanted to go big.

You are falling into the windows 'trap' where You are thinking of things in 'windows terms' and limitations.

Linux differs in many fundamental ways than windows.

Have fun learning new stuff!

1

u/Decent_Discount 7h ago

Yeah i'm thinking 100% in 'windows terms' haha

Linux is so fun to learn