LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 07-10-2017, 11:55 AM   #1
NewbProgrammer
Member
 
Registered: Jun 2017
Location: Check my IP address.
Distribution: Gentoo, Puppy, Mint Rosa, Arch, SliTaz, Crunchbang, LinuxBBQ, OpenSUSE, NanoLinux, LFS CentOS.
Posts: 54

Rep: Reputation: 13
/sbin/init nonexistent, can't load kernel, sysVinit not doing anything; nevertheless, it booted.


This thread is an extension to http://www.linuxquestions.org/questi...er-4175609485/

Should I remove the existing huge kernel from /boot and compile my own? If so, how do I do this safely?

How do I create /sbin/init? I remember doing this a while ago, but I forgot how.

Any legitimate help is appreciated.
 
Old 07-10-2017, 02:14 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
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

init=</path/to/program>
 
Old 07-10-2017, 04:20 PM   #3
NewbProgrammer
Member
 
Registered: Jun 2017
Location: Check my IP address.
Distribution: Gentoo, Puppy, Mint Rosa, Arch, SliTaz, Crunchbang, LinuxBBQ, OpenSUSE, NanoLinux, LFS CentOS.
Posts: 54

Original Poster
Rep: Reputation: 13
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.
 
Old 07-11-2017, 04:05 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Quote:
Originally Posted by NewbProgrammer View Post
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 View Post
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
Code:
which systemctl
will tell you.
 
Old 07-11-2017, 05:49 AM   #5
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,348

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
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.
 
Old 07-11-2017, 10:00 AM   #6
NewbProgrammer
Member
 
Registered: Jun 2017
Location: Check my IP address.
Distribution: Gentoo, Puppy, Mint Rosa, Arch, SliTaz, Crunchbang, LinuxBBQ, OpenSUSE, NanoLinux, LFS CentOS.
Posts: 54

Original Poster
Rep: Reputation: 13
No I don't have systemd, and I don't want systemd.

which systemctl
which: no systemctl in (/usr/local/bin:/usr/bin:/sbin:/usr/sbin:/bin:/usr/games:/usr/lib/qt3/bin)

I see the bash scripts in /etc/rc.d. What do I put in them?
ls /etc/rc.d
rc.0 rc.inet1.conf rc.loop rc.S
rc.4 rc.inet1.orig rc.M rc.saslauthd
rc.6 rc.inet2 rc.messagebus rc.saslauthd.new
rc.alsa rc.ip_forward rc.M.new rc.saslauthd.orig
rc.alsa-oss rc.ip_forward.new rc.modules rc.serial
rc.bluetooth rc.ip_forward.orig rc.modules-3.10.9 rc.sshd
rc.emacs rc.K rc.M.orig rc.syslog
rc.font rc.keymap rc.networkmanager rc.sysvinit
rc.gpm rc.local rc.networkmanager.orig rc.udev
rc.inet1 rc.local.new rc.ntpd rc.zzz_INFO

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.

Anything I need to do about the kernel? The only option before my eyes is to compile my own.
 
Old 07-11-2017, 11:00 AM   #7
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
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.
 
Old 07-11-2017, 12:02 PM   #8
NewbProgrammer
Member
 
Registered: Jun 2017
Location: Check my IP address.
Distribution: Gentoo, Puppy, Mint Rosa, Arch, SliTaz, Crunchbang, LinuxBBQ, OpenSUSE, NanoLinux, LFS CentOS.
Posts: 54

Original Poster
Rep: Reputation: 13
No I didn't install LFS-bootscripts. It came with killX alone.

A video of my computer booting since you don't believe me: https://drive.google.com/open?id=0B_...GhZbUtTRTlvQjA

Again, anything I need to do about the kernel? SysVinit?

I have absolutely no idea what's wrong.
I checked /etc/inittab, I don't see anything about rc.S or rc.M. How do I manually run them?

EDIT: After a more thorough check of /etc/inittab, I found something about /rc.M, I don't know what to do with it:

# Script to run when going multi user.
rc:2345:wait:/etc/rc.d/rc.M

Last edited by NewbProgrammer; 07-11-2017 at 12:11 PM.
 
Old 07-11-2017, 12:23 PM   #9
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,348

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
Quote:
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.
 
Old 07-11-2017, 12:30 PM   #10
NewbProgrammer
Member
 
Registered: Jun 2017
Location: Check my IP address.
Distribution: Gentoo, Puppy, Mint Rosa, Arch, SliTaz, Crunchbang, LinuxBBQ, OpenSUSE, NanoLinux, LFS CentOS.
Posts: 54

Original Poster
Rep: Reputation: 13
...

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.
 
Old 07-11-2017, 01:04 PM   #11
NewbProgrammer
Member
 
Registered: Jun 2017
Location: Check my IP address.
Distribution: Gentoo, Puppy, Mint Rosa, Arch, SliTaz, Crunchbang, LinuxBBQ, OpenSUSE, NanoLinux, LFS CentOS.
Posts: 54

Original Poster
Rep: Reputation: 13
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.

I don't have a PS/2 socket on my computer.

So, whatevs. I give up.

Thank you for your time.
 
Old 07-11-2017, 03:40 PM   #12
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,348

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
Quote:
My filesystem is btrfs
This may also be the problem if the initrd only includes modules for ext4?
 
Old 07-12-2017, 03:28 AM   #13
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
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.
 
Old 07-12-2017, 09:29 AM   #14
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,348

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
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.
 
1 members found this post helpful.
Old 07-12-2017, 11:19 AM   #15
NewbProgrammer
Member
 
Registered: Jun 2017
Location: Check my IP address.
Distribution: Gentoo, Puppy, Mint Rosa, Arch, SliTaz, Crunchbang, LinuxBBQ, OpenSUSE, NanoLinux, LFS CentOS.
Posts: 54

Original Poster
Rep: Reputation: 13
Ok. So does it mean in order for killx to work, I have to put it on the MBR with ext4?

I will try one last time. If it fails, I'm installing Gentoo.

Last edited by NewbProgrammer; 07-12-2017 at 11:38 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
exec of init (/sbin/init) failed!!! Permission dened kernel-panic - not syncing! charlztin88 Linux - Newbie 1 03-15-2011 03:17 PM
/sbin/init: Kernel panic - not syncing: Attempted to kill init! jalejo08 Linux - Kernel 7 07-02-2009 01:16 PM
exec of init (/sbin/init) failed!!! kernel panic KiraII Linux - Kernel 1 07-13-2007 09:07 PM
/sbin/init is not called by the kernel raklo Linux - Hardware 2 09-19-2006 05:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration