Server won't boot with compiled kernel: switchroot: mount failed: No such file or dir
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Server won't boot with compiled kernel: switchroot: mount failed: No such file or dir
I've tried it about 20 times.
Its CentOS 5.9, and gives this message:
Code:
Setting up new root fs
setuproot: moving /dev failed: No such file or directory
no fstab.sys, mounting internal defaults
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
Switching to new root and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys
switchroot: mount failed: No such file or directory
Kernel panic - not syncing: Attempted to kill init!
On an almost identical server with CentOS 6, it works A OK.
Thanks, I think I found the problem(s) now but don't know how to fix it.
Problem 1, mount doesn't exist:
Code:
root@backup3 [/opt/test]# ll /opt/test/bin/mount
/bin/ls: /opt/test/bin/mount: No such file or directory
root@backup3 [/opt/test]# find ./ -name mount
root@backup3 [/opt/test]#
Problem 2, init refers to sda, but when the new kernel boots, I believe its changing everything to sdb:
You can edit init file and recreate initrd using following steps , But here the concern is mount command
cd /opt/test
find .|cpio --create --format 'newc'>/tmp/myinit
gzip /tmp/myinit
cp /tmp/myinit /boot/
I would recommend you to recreate initrd file using following command
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.