ERROR: Root device mounted successfully, but /sbin/init does not exist
As @Leiaz very correctly pointed out in the comments, /sbin
in Arch (and by extension, Manjaro) is now a symlink to /usr/bin
. This means that unless /usr
is mounted, /usr/sbin/init
will not exist. You therefore need to make sure that /usr
is mounted by the initial ramdisk. That's what the Arch wiki quote in your OP means:
If you keep /usr as a separate partition, you must adhere to the following requirements:
Enable mkinitcpio-generate-shutdown-ramfs.service or add the shutdown hook.
Add the fsck hook, mark /usr with a passno of 0 in /etc/fstab. While recommended for everyone, it is mandatory if you want your /usr partition to be fsck'ed at boot-up. Without this hook, /usr will never be fsck'd.
Add the usr hook. This will mount the /usr partition after root is mounted. Prior to 0.9.0, mounting of /usr would be automatic if it was found in the real root's /etc/fstab.
So, you need to generate a new init file with the right hooks1. These are added by changing the HOOKS=""
line in /etc/mkinitcpio.conf
. So
Boot into Mint and mount the Manjaro
/
directory:mkdir manjaro_root && sudo mount /dev/sda11 manjaro_root
Now, Manjaro's root will be mounted at
~/manjaro_root
.Edit the
mkinitcpio.conf
file using your favorite editor (I'm usingnano
as an example, no more):sudo nano ~/manjaro_root/etc/mkinitcpio.conf
Find the
HOOKS
line and make sure it contains the relevant hooksHOOKS="shutdown usr fsck"
Important" : do not remove any of the hooks already present. Just add the above to those there. For example, the final result might look like
HOOKS="base udev autodetect sata filesystems shutdown usr fsck"
Mark
/usr
with a passno of 0 in/etc/fstab
. To do this, openmanjaro_root/etc/fstab
and find the/usr
line. For this example, I will assume it is/dev/sda12
but use whichever one it is on your system. The "pass" number is the last field of an/etc/fstab
entry. So, you need to make sure the line looks like/dev/sda12 /usr ext4 rw,errors=remount-ro 0 0 ^ This is the important one -----|
Create the new init image. To do this, you will have to mount Manjaro's
/usr
directory as well.sudo mount /dev/sda12 ~/manjaro_root/usr
I don't have much experience with Arch so this might not bee needed (you might be able to run
mkinitcpio
without achroot
) but to be on the safe side, set up achroot
environment:sudo mount --bind /dev ~/manjaro_root/dev && sudo mount --bind /dev/pts ~/manjaro_root/dev/pts && sudo mount --bind /proc ~/manjaro_root/proc && sudo mount --bind /sys ~/manjaro_root/sys && sudo chroot ~/manjaro_root
You will now be in a chroot environment that thinks that
~/manjaro_root/
is actually/
. You can now go ahead and generate your new init imagemkinitcpio -p linux
Exit the
chroot
exit
Update your
grub.cfg
(again, this might not actually be needed):sudo update-grub
Now reboot and try booting into Manjaro again.
1 "Hooks" are small scripts that tell mkinitcpio
what should be added to the init image it generates.
From Mint, you can change root to your Manjaro installation, in order to regenerate initramfs.
Mount your Manjaro root under the directory of your choice ( ~/foo
). Mount your /usr
partition at ~/foo/usr
, also mount boot if it is separate.
Mount proc sys dev :
# mount -t proc proc ~/foo/proc/
# mount --rbind /sys ~/foo/sys/
# mount --rbind /dev ~/foo/dev/
And change root : chroot ~/foo /bin/bash
As explained in the wiki : "Hooks are small scripts which describe what will be added to the image". Edit /etc/mkinitcpio.conf
, add the usr
fsck
and shutdown
hooks to the HOOK
entry, as indicated in the wiki and comments.
Regenerate initramfs : mkinitcpio -p linux
(it will be written in /boot
)
Exit the chroot, unmount proc, sys, dev and Manjaro partitions and try rebooting.