0

my root partition is full, and, by a mistake during installation, my /usr was not splited on different partition.

Now, when I move this, configure fstab like following:

UUID=partitionuuid-partitionuuid-partitionuuid-partitionuuid /usr ext4 defaults 0 0

Next, I moved original /usr to a copy like /usr_old

When I reboot my system, it give following message:

ERROR: Root device mounted successfullym but /sbin/init does not exists.

If I move back /usr_old to /usr, it works like before, using root partition folder, without mounting new configured partition over it.

Looking about the error, I found that it should be mounted in ramfs, or something like that, together with root / partition. But, it still confused for me, and I didn't found a concise way to put it to work.

There is some way to split this folder after archlinux installation? Someone experienced that sometime?

Thanks, And Past

Andre Pastore
  • 163
  • 1
  • 12
  • Frankly, I'd rather avoid a split /usr partition on any UNIX. It's (smaller) pain to deploy, and a (larger) pain to maintain. – Laszlo Valko Sep 20 '15 at 17:17
  • Are you sure you don't mean `/home`? – Halfgaar Sep 20 '15 at 17:25
  • My /usr partition is around ocupping 5GB on a 10GB partition. I am certain about the folder I shuld move. :) – Andre Pastore Sep 20 '15 at 17:27
  • Laszlo, this is a real problem even during installation, or just while trying to split it after installation? – Andre Pastore Sep 20 '15 at 17:28
  • I found a clean way to setup things up and it is working fine. I documented process as an answer for this post. Thanks for the help. Laszlo, if there some known issue about this, may you help us to understand it? – Andre Pastore Sep 20 '15 at 20:15
  • @LaszloValko It's a pain to set up on certain Linux distributions (like Arch) but it works pretty much automatically on RHEL/CentOS/Fedora. These were specifically designed to allow /usr to reside on a separate partition. – Michael Hampton Sep 20 '15 at 21:46
  • Yes, not everything it is usually automatic on arch. Really. But, things are good documented, but sometimes not so easy to find. Using https://wiki.archlinux.org/index.php/Mkinitcpio#.2Fusr_as_a_separate_partition config, it removes the pain around this configuration. Really, thanks by your support on this issue! – Andre Pastore Sep 20 '15 at 21:54
  • 1
    The only problem comes from the fact that using a separate /usr means you have to use initrd/initramfs to mount both / and /usr. If you haven't used initrd/initramfs so far, then you'll have to know which package to install, which config file to edit, what to write there, which command to run with what options, and all this info is distro-specific. And from all practical perspective, all you win is that you can skip a partitioning session. Creating a separate /usr right at installation time is something that I especially don't understand. – Laszlo Valko Sep 20 '15 at 23:54

1 Answers1

2

Looking for a solution for a separated partition for /usr, I found important things about it on system inialization.

  1. root / partition is mount on ramdisk partition type
  2. It is managed by mkinitcpio, responsible to build an initial ramdisk environment during system startup
  3. If /usr is built on a separated partition, you should configure some additional non defaults hooks on mkinitcpio config, located on /etc/mkinitcpio.conf file
  4. With this maintenance, you can manage /usr folder independently, even if using nsf.

For detailed information about mkinitcpio tool and /usr enabling setup, following doc contains full information.

About tool https://wiki.archlinux.org/index.php/Mkinitcpio

ABout /usr setup https://wiki.archlinux.org/index.php/Mkinitcpio#.2Fusr_as_a_separate_partition

Andre Pastore
  • 163
  • 1
  • 12