You are not logged in.

#1 2018-09-18 19:12:50

nadavhoresh
Member
Registered: 2016-11-04
Posts: 13

Moving /usr to a none-root partition

I tried to move /usr to a new partition and make a soft-link from the root partition to the new location.  the partition of the new usr location is placed in /etc/fstab.  It failed because on boot, the /sbin/init could not be found (Few years ago, this exercise was possible since /sbin was *not* linked to /usr/bin).

Is there is a way around, preferably staying with systemd?

   Nadav.

Offline

#2 2018-09-18 20:10:07

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Moving /usr to a none-root partition

This works perfectly fine as long as you use an initramfs. This does not work fine, if you're trying to boot your OS using the contents of an unmounted partition.

Also, why are you softlinking instead of mounting directly to /usr ? Why are symlinks involved at all? This will break pacman, you're not allowed to replace package manager-owned directories with files.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#3 2018-09-18 20:14:18

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: Moving /usr to a none-root partition

Even if it is possible, *why* would you do this?  /usr should be a vast majority of the space on your root partition, unless of course you do not have a separate /home.  If you don't have separate /home, definitely do that first.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2018-09-18 23:13:56

nadavhoresh
Member
Registered: 2016-11-04
Posts: 13

Re: Moving /usr to a none-root partition

I also tried to  mount /usr directly, adding the usr and shutdown hooks, with no success. I all goes down to the issue I have that I have a nvme and a hard drive, and while I can use an efi partition on the nvme to boot, I can not use the second nvme partition as a root (only a hard drive partition can be used as a root), since (I think that) after the ram disk is loaded, the nvme disk becomes unrecognizable, although the nvme kernel module is compiled into the kernel.  I thought I could bypass the problem, by using  a hard drive partition as a root, but using an nvme partition for the /usr. Apparently the nvme is not recognized before the init process run (but avalable after boot completes).
Unless I'd find out a way to use a root partition on the nvme drive, I thought thar the (good?) old independent /sbin directory could be a solution.

Offline

#5 2018-09-18 23:58:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: Moving /usr to a none-root partition

/sbin is just a symlink to /usr/bin, if /usr cannot be mounted, there is nothing viable in /sbin.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2018-09-19 07:24:16

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,424

Re: Moving /usr to a none-root partition

You are definitely trying to solve the wrong problem. Find out why your nvme disk is not recognized anymore after selecting a kernel to boot, or look at discrepancies between bootloader configurations, there's absolutely no reason that a nvme partition would not be usable as root (case in point, I and many others do use one for just that). What exactly are you booting and how? Are you not using the initramfs generated by mkinitcpio for some reason?

Online

#7 2018-09-19 19:58:23

nadavhoresh
Member
Registered: 2016-11-04
Posts: 13

Re: Moving /usr to a none-root partition

You are right, it problem goes bask to my other post "Boot problem: nvme disk not recognized", in which I found that the nvme is recognised before the boot (since I can boot of an efi boot partition on the nvme), and after the boot completes (because I can see the nvme drive, after I boot from the hard drive), but not when the kernel (I use initramfs) tries to run the init process. It might be as well a kernel issue, but I am not sure what is the right forum.

Offline

Board footer

Powered by FluxBB