/sbin/init nonexistent, can't load kernel, sysVinit not doing anything; nevertheless, it booted.
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
I gather from the other thread that after 15 posts you now have a kernel loading.
No, you should not compile your own kernel unless you have to. Wait until you have more experience with stuff.
/sbin/init is a program, and you should install it along with sysvinit, or reinstall it if necessary. In Slackware it is a program, not a symlink. It may be otherwise if you're using systemd, in which case you can reinstall that.
Lastly, if you know what your init program is, you can add a kernel boot parameter
I reinstalled sysvinit with instructions from the LFS book. I added the init=/sbin/init parameter to /etc/grub.d/40_custom. The /sbin/init complaint went away when I rebooted into killX. But sysVinit did not show up during the boot. GRUB is still complaining that I need to load a kernel first. I still can't type anything because there is no driver present from an active kernel.
I can't fetch my dmesg log because /var/log/dmesg does not exist. But I remember when I booted into it, it was giving exec format errors and hence, sysVinit didn't show up at boot.
Nothing for lspci or lsusb because pciutils and usbutils don't exist.
I reinstalled sysvinit with instructions from the LFS book. I added the init=/sbin/init parameter to /etc/grub.d/40_custom. The /sbin/init complaint went away when I rebooted into killX. But sysVinit did not show up during the boot.
It's generally bad to add integral pieces of one distro to another unless you're sure of what you're doing. Sysvinit is pretty integral. And what you are saying makes little sense.
Quote:
Originally Posted by NewbProgrammer
GRUB is still complaining that I need to load a kernel first. I still can't type anything because there is no driver present from an active kernel.
I can't fetch my dmesg log because /var/log/dmesg does not exist. But I remember when I booted into it, it was giving exec format errors and hence, sysVinit didn't show up at boot.
Nothing for lspci or lsusb because pciutils and usbutils don't exist.
The linux boot process is roughly this:
1. Bios goes in at the start of the disk and finds a boot loader (grub, lilo or somesuch).
2. The boot loader loads a kernel, possibly an initrd, and selects a root partition. It can also configure video and do other nacky stuff. If you don't load a kernel, you're stuck in the boot loader and never get to a message about init.
3. The kernel loads, boots the system and loads drivers. You will see a lot of messages saying what hardware it found inside your box. Then it loads /sbin/init.
4. Depending on whether you have Sysvinit or systemd loaded, different things happen. Sysvinit uses bash scripts loaded somewhere under /etc/rc.d one after another. Systemd has a more binary setup and loads things (mainly networks, services, video, localization, servers) in parallel, so it's faster. You might see "Starting <blah> .." type messages.
Go through those stages and tell me exactly what's happening. It seems to me that killx uses systemd and the message about init is 'log spam' but let's see. The output of
maybe you need to edit your /etc/fstab? From what I gather from the documentation, Killx is a distro where you have to edit your config files manually.
Reboot with my boot process just posted, and tell me how far you get. I can't get a handle on where you're stuck because your information seems contradictory.
Those init scripts look an awful lot like Slackware's. They could be in the right place. You didn't tell me you installed LFS init-scripts, and iirc LFS puts them in /etc/rc.d/init.d. If they're the same as slackware's, you could manually run rc.S, then rc.M and most things would be going. You can check how it's supposed to work by looking at /etc/inittab. Don't edit it.
And yes, I did edit the /etc/fstab. If you want to know what it looks like, go somewhere in the link in my original post.
okay I found it. I think your problem with lilo is that your filesystem is formated btrfs. I came across several threads where using btrfs versus ext4 was causing problems with lilo.
as far as the booting problem, base on your video looks like your missing some modules in your initrd.
My filesystem is btrfs and I'd prefer it to stay that way because when ext4 is used with a bootloader, it will pull in ext2, which only goes on the MBR.
In summary, LILO with ext4 uses ext2. ext2 does not work with being embedded into the / partition--it demands being in the MBR.
Any way I can keep LILO with ext4 away from the MBR?
Last edited by NewbProgrammer; 07-11-2017 at 12:33 PM.
I found out that the shell I'm in is a rescue shell. Someone told me this:
> That's a rescue shell. It's a very basic module-less kernel with an
> extremely simple display driver and a copy of busybox for fixing your
> system after you've screwed it up. You can't type because it doesn't
> have the keyboard driver loaded. IIRC, only a PS/2 keyboard is actually
> useful in this situation. I usually avoid it altogether by keeping an
> Arch live disk in my SD card slot at all times.
At this stage, it seems to me that the easiest way forward would be an install of a lazy type distro, one that sets you up and finds your dependencies. Format root ext4, wipe killx and install any of debian, ubuntu, red hat, or their forks (e.g. mint, arch, etc.). It will certainly be faster. Then if you hit trouble, post with full information. Despite twice requesting it, I still have absolutely clear picture of where the system is going wrong, because you never answer the posts without changing the subject.
Out of curiosity, made several attempts to install killx. Looks like it is partially based on slackware. Couldn't get it to boot if installed to usb drive or on a btrfs. I tried making a new initrd.gz using the mkinitrd_generate_command.sh script and/or booting the vmlinuz-huge kernel provided with distro, but not luck on usb or btrfs. The vmlinuz in /boot is linked to the vmlinuz-generic kernel. The only success I had was booting it on my sda with the partition formatted ext4. I was able to get lilo to install to the mbr of the usb when I was chrooted into distro, but wasn't able to get it to install to the killx partition on the usb, mapping errors. I didn't spend a whole lot of time trying to figure out why it wouldn't boot on usb or btfs.
Last edited by colorpurple21859; 07-12-2017 at 10:44 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.