You are not logged in.

#1 2020-07-31 14:10:40

x41lakazam
Member
Registered: 2020-04-24
Posts: 8

Tried to put /usr on a separate partition, /sbin/init is missing at bo

Hi, I need extra space on my computer, I can't move my / to a new partition, so I decided to move my /usr to another partition, bigger.

I created a new partition, added it as /usr in fstab:

UUID="6fe8d0dd-cd0d-4091-8f1d-417da05e89aa" 	/usr		ext4 		rw 		0 0

I followed the mkinitcpio wiki instructions and added "fsck" and "usr" as hooks in mkinitcpio.conf:

HOOKS=(base udev autodetect modconf block filesystems keyboard shutdown usr fsck)

But still, at boot, I got this "sbin/init" is missing, due to the fact that sbin is a link to /usr/sbin.

How can I fix this?

Last edited by x41lakazam (2020-08-01 19:08:23)

Offline

#2 2020-07-31 14:12:51

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 7,781

Re: Tried to put /usr on a separate partition, /sbin/init is missing at bo

That fstab line doesn't mount anything to /usr

Offline

#3 2020-08-01 19:09:12

x41lakazam
Member
Registered: 2020-04-24
Posts: 8

Re: Tried to put /usr on a separate partition, /sbin/init is missing at bo

Sorry, I posted wrong line, fixed it.

I managed to make it work, but my original /usr directory is still here, if I delete it, I have this boot error.

Offline

#4 2020-08-01 20:02:24

peace885
Member
Registered: 2018-09-13
Posts: 2

Re: Tried to put /usr on a separate partition, /sbin/init is missing at bo

Move anywhere you like and just create a symlink.

Offline

#5 2020-08-01 20:03:47

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 29,025
Website

Re: Tried to put /usr on a separate partition, /sbin/init is missing at bo

peace885 wrote:

Move anywhere you like and just create a symlink.

This is terrible advice.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2020-08-01 20:13:19

seth
Member
Registered: 2012-09-03
Posts: 15,751

Re: Tried to put /usr on a separate partition, /sbin/init is missing at bo

If a (filled?) /usr on the root partition is required, how exactly did you make what work??

Does the /usr partition contain an executable "bin/init" (did you maybe botch ownership/permissions when copying /usr?)
Please post your complete fstab and the output of "lsblk -f"

Offline

#7 2020-08-01 21:33:01

frostschutz
Member
Registered: 2013-11-15
Posts: 958

Re: Tried to put /usr on a separate partition, /sbin/init is missing at bo

x41lakazam wrote:

I created a new partition, added it as /usr in fstab:

UUID="6fe8d0dd-cd0d-4091-8f1d-417da05e89aa" 	/usr		ext4 		rw 		0 0

Try without " ", you're not supposed to use quotes in fstab. Usually works anyway, yet there are cases where it doesn't.

The usr hook uses these two commands to determine /usr partition and mount options:

findmnt -snero source --tab-file="/new_root/etc/fstab" -T /usr
findmnt -snero options --tab-file="/new_root/etc/fstab" -T /usr

(/new_root/ being your regular / in the initramfs)

See if these commands work when feeding your fstab to it. If there's no output, it didn't find a device that matches the UUID. Try without -e (-snro instead of -snero) if that prints UUID there might be a typo in it.

In general, splitting / and /usr is not worth the trouble, unless you have a special usecase that mandates /usr be kept separate. Otherwise it's usually better to migrate the relevant parts of / (symlinks and /etc in particular) along with it.

If the usr hook is working there should be a message like `:: mounting '/dev/sdxy1' on /usr`.

If this message appears and yet it still doesn't work, the migration of files itself might be at fault.

Offline

#8 2020-08-02 10:21:18

ondoho
Member
Registered: 2013-04-30
Posts: 638
Website

Re: Tried to put /usr on a separate partition, /sbin/init is missing at bo

seth wrote:

Does the /usr partition contain an executable "bin/init"

This once happened to me - I had uninstalled systemd-sysvcompat. Systemd itself does not provide /bin/init.


However studied and stilted your rant, it can never hide the base and primitve emotion that inspired it.

Offline

Board footer

Powered by FluxBB