[SOLVED] /sbin/init does not exist after "rm -rf /usr" 09 October 2018, 14:10:35 hi, well maybe this is the rigth place for this topic, for reasons of space i decided move /usr to another partition.the procedure that I followed was: -make partitition & filesystem-mount new part on /run/mount cp /usr/* run/mount <<<<<-----maybe here i'm loosing something so rsync -axqP /usr/* run/mount <<<<-------- i dont remeber the exact options, here also do not preserve hardlinks with option H-edit fstab-umount-rebootonce login:sudo mount --bind / /mntsudo rm -rf /mnt/usr <<<< i needed this for recover space, dont understand how is working "--bind" but then the /usr is still there////some error here about cant delete, i was trying to delete old filessudo umount /mntat next reboot, stop and says "/sbin/init does not exist"rooti tried to edit kernel before boot adding the line init=/usr/bin/run-initinside bin ls -lh init*lrwxrwxrwx 1 root root 11 ago 16 08:29 init -> openrc-init Last Edit: 09 October 2018, 19:49:30 by tefenet
Re: /sbin/init does not exist after "rm -rf /usr" Reply #1 – 09 October 2018, 16:23:52 Uh yeah you don't want to do this. Arch distros have the various /bin and /sbin directories all symlinked to /usr/bin.I guess you could play with symlinks until it works, but really I would just say "don't do this." You're opening yourself up to have a ton of problems for very questionable benefit. Last Edit: 09 October 2018, 16:25:48 by Dudemanguy
Re: /sbin/init does not exist after "rm -rf /usr" Reply #2 – 09 October 2018, 16:51:28 I think it is best to try this through chroot so the system will not loose its /usr in the transition between copying and mounting.1 make partition sdxx2 mkdir /mnt/usr3 mount /dev/sdxx /mnt/usr4 cp -R /usr/* /mnt/usr5 delete /usr/*6 edit fstab uuid or /dev/sdxx /usr ext4 ...... (always use uuid not /dev/sdxx long term because repartitionig disks will create havoc)7 mount -a and check that your /usr/ is there8 exit chroot and rebootYou can skip 5 if you are unsure everything was copied but once you boot with the new partition mounted you will not see the old /usr - so you can't delete its contents. By commenting out the /usr in fstab, umount /dev/sdxx and mount -a you can see it again and maybe then empty it).
Re: /sbin/init does not exist after "rm -rf /usr" Reply #3 – 09 October 2018, 17:38:41 the process is done. Maybe I deleted something I should not have but I do not know how to get it back. Trying with links without knowing, is not a safe option.
Re: /sbin/init does not exist after "rm -rf /usr" Reply #4 – 09 October 2018, 17:52:34 The best way at this point might be just to do a reinstall and then try what fungalnet suggested if you really want a separate /usr partition
Re: /sbin/init does not exist after "rm -rf /usr" Reply #5 – 09 October 2018, 18:49:19 Does pacman still work on your system, if not try chroot. With pacman -Qs or pacman -Qg you can get your active package list to use on a new install. /home is a good thing to isolate and have on another partition. Also copy all .conf files you remember to have changed and do a reinstall.You can also try a hack if you have the pkg list, make a new installation just as big as this one is. Then copy /usr to your messed up /usr and see if it fixes the problem.I also keep /var/cache is a separate partition and share it with other installations so I don't have to download the same pkg twice.But /usr I haven't tried for a long time, not in arch-based anyway. It is full of links and differential rights to files that sometimes even with rsync might get messed up if you don't use the right options.
Re: /sbin/init does not exist after "rm -rf /usr" Reply #6 – 09 October 2018, 19:48:58 thanks both for your help... i'm gonna say what i did to solve it:[root#] mount /dev/sdb8 new_root/usr <<<----without this cant execute chroot----->>>[root#] chroot new_root/[artixlinux /] nano etc/mkinitcpio.conf <<<---- here add 'shutdown' and 'usr' to hooks----->>>[artixlinux /] nano etc/fstab <<<-----here make sure the line where is /usr end with 0 0 ---->>>>[artixlinux /] mount -t proc proc /proc[artixlinux /] mount -t sysfs sys /sys[artixlinux /] mount -o bind /dev /dev <<<---- if this doesnt work try mount -t dev /dev --->>>>[artixlinux /] mkinitcpio -p linuxthats all folks,reboot & enjoy
Re: [SOLVED] /sbin/init does not exist after "rm -rf /usr" Reply #7 – 09 October 2018, 20:18:11 I have always used 0 2I only use 0 0 for /swapbut I have forgotten why I have been doing this
Re: [SOLVED] /sbin/init does not exist after "rm -rf /usr" Reply #8 – 12 October 2018, 00:22:39 Quote from: fungalnet – on 09 October 2018, 20:18:11I have always used 0 2I only use 0 0 for /swapbut I have forgotten why I have been doing this man fstab The fifth field (fs_freq). This field is used by dump( to determine which filesystems need to be dumped. Defaults to zero (don't dump) if not present. The sixth field (fs_passno). This field is used by fsck( to determine the order in which filesystem checks are done at boot time. The root filesystem should be specified with a fs_passno of 1. Other filesystems should have a fs_passno of 2. Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to utilize parallelism available in the hardware. Defaults to zero (don't fsck) if not present. 1 Likes
Re: [SOLVED] /sbin/init does not exist after "rm -rf /usr" Reply #9 – 28 October 2018, 22:22:14 Quote from: tefenet – on 09 October 2018, 14:10:35hi, well maybe this is the rigth place for this topic, for reasons of space i decided move /usr to another partition.the procedure that I followed was: -make partitition & filesystem-mount new part on /run/mount cp /usr/* run/mount <<<<<-----maybe here i'm loosing something so rsync -axqP /usr/* run/mount <<<<-------- i dont remeber the exact options, here also do not preserve hardlinks with option H-edit fstab-umount-rebootonce login:sudo mount --bind / /mntsudo rm -rf /mnt/usr <<<< i needed this for recover space, dont understand how is working "--bind" but then the /usr is still there////some error here about cant delete, i was trying to delete old filessudo umount /mntat next reboot, stop and says "/sbin/init does not exist"rooti tried to edit kernel before boot adding the line init=/usr/bin/run-initinside bin ls -lh init*lrwxrwxrwx 1 root root 11 ago 16 08:29 init -> openrc-initIt is not the symlinks that are particularly the problem, (symlinkls don't care about partitions) but when you boot up, the /usr partition is absent for core unitilities. Maybe you can boot with busybox.FWIW: This move of binaries to /usr/bin sucks....
Re: [SOLVED] /sbin/init does not exist after "rm -rf /usr" Reply #10 – 28 October 2018, 22:24:10 Quote from: tefenet – on 09 October 2018, 14:10:35hi, well maybe this is the rigth place for this topic, for reasons of space i decided move /usr to another partition.the procedure that I followed was: -make partitition & filesystem-mount new part on /run/mount cp /usr/* run/mount <<<<<-----maybe here i'm loosing something so rsync -axqP /usr/* run/mount <<<<-------- i dont remeber the exact options, here also do not preserve hardlinks with option H-edit fstab-umount-rebootonce login:sudo mount --bind / /mntsudo rm -rf /mnt/usr <<<< i needed this for recover space, dont understand how is working "--bind" but then the /usr is still there////some error here about cant delete, i was trying to delete old filessudo umount /mntat next reboot, stop and says "/sbin/init does not exist"rooti tried to edit kernel before boot adding the line init=/usr/bin/run-initinside bin ls -lh init*lrwxrwxrwx 1 root root 11 ago 16 08:29 init -> openrc-initwhy make this so hard? Why not just make the partition and cp the /usr directory to it, or tar up the /usr directory and untar it.