Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Init Does not Start after Kernel loads
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
StevieC
n00b
n00b


Joined: 22 Nov 2011
Posts: 9

PostPosted: Tue Nov 22, 2011 11:28 pm    Post subject: Init Does not Start after Kernel loads Reply with quote

I'm having a rather odd problem when I reboot my gentoo machine after proceeding without incident through the handbook. After the kernel loads completely and mounts the root filesystem, init doesn't start! (I have confirmed that /sbin/init is where it should be - this is shortly after having installed the latest stage3 tar ball)

The Grub config line looks like this:
root (hd0,3)
kernel /boot/linux-3.1.1-gentoo root=/dev/sda4 init=/sbin/init

For obvious reasons I can't do a director copy/paste from the console, however, the last messages are
VFS: Mounted root (Ext4 filesystem) readonly on device 8:4.
Freeing unused kernel memory: 416k freed
Write protecting the kernel text: 5000k
Write protecting the kernel read-only data: 1660k
init-early.sh used the greatest stack depth: 6236 bytes left

And then it hangs there and doesn't do anything. The kernel appears to be running properly as I get kernel messages indicating the success of USB devices being registered if I plug in or unplug USB devices. However, despite multiple different attempts at the boot line in grub, I have not been able to boot.

Any ideas?
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1658

PostPosted: Wed Nov 23, 2011 1:04 am    Post subject: Reply with quote

Welcome to Gentoo.
Try taking the init part out of your grub.conf

Code:
root (hd0,3)
kernel /boot/linux-3.1.1-gentoo root=/dev/sda4

_________________
Donate to Gentoo
Back to top
View user's profile Send private message
StevieC
n00b
n00b


Joined: 22 Nov 2011
Posts: 9

PostPosted: Wed Nov 23, 2011 1:06 am    Post subject: Reply with quote

Thanks, initially I had line without the init part, the problem started when there was no init= parameter. I've also tried without the root= parameter too.

Is there a chance that there is an ext4 issue at work here?
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1931

PostPosted: Wed Nov 23, 2011 1:32 am    Post subject: Re: Init Does not Start after Kernel loads Reply with quote

StevieC wrote:

init-early.sh used the greatest stack depth: 6236 bytes left


I think I remember it being fixed by enabling CONFIG_DEVTMPFS in the kernel. It's located in:
Code:
Device Drivers  --->
    Generic Driver Options  --->
        [*] Maintain a devtmpfs filesystem to mount at /dev
        [*]   Automount devtmpfs at /dev, after the kernel mounted the rootfs

_________________
“And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010
Back to top
View user's profile Send private message
StevieC
n00b
n00b


Joined: 22 Nov 2011
Posts: 9

PostPosted: Wed Nov 23, 2011 1:44 am    Post subject: Reply with quote

just gave that a try; The only difference is that the last line now reads:

mount used greatest stack depth: 6076 bytes left

In addition to the init-early.sh bit that use to be the last line.
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1658

PostPosted: Wed Nov 23, 2011 1:49 am    Post subject: Reply with quote

Doubt you need the init part. is that still out?
and boot in?
Are you sure you installed on (hd0,3)?
can you post your /etc/fstab?
and fdisk -l
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
StevieC
n00b
n00b


Joined: 22 Nov 2011
Posts: 9

PostPosted: Wed Nov 23, 2011 1:57 am    Post subject: Reply with quote

Yes, the splash image is coming from hd(0,3)/boot/grub/ and the splash image is coming up correctly in the Grub screen. hd(0,1) and hd(0,0) are both windows partions, hd(0,2) is the swap partion, with the remainder being the ext4 filesystem on hd(0,4). There isn't a separate /boot partion in between. / and /boot are both hd(0,3).

The init part is out of the grub.conf as of the last attempt with the new kernel options.

I don't have access to copy and paste directly, but the stab has /dev/sda4 at mount point /, with type ext4, options set to native, and dump/pass set to 0 1.
The other line s /dev/sda3 with mount point set to none, type set to swap, options set to sw and dump/pass set to 0 0.

fdisk has hda3 set to type 82 for swap, and /dev/sda4 set to 83 for linux. sda1 is set to NTFS with type 7, as is sda2.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Wed Nov 23, 2011 2:49 am    Post subject: Reply with quote

Please do not paraphrase configuration files. It looks like you spent more text paraphrasing than if you had simply retyped the relevant lines.

Is the system set up to acquire a network address and run sshd? If yes, does sshd start? If yes, then login remotely and use that both to obtain configuration files and to explore potential problems with the system.

Do you use an initramfs? Can you confirm via /proc/config.gz that the running kernel has DEVTMPFS enabled?
Back to top
View user's profile Send private message
StevieC
n00b
n00b


Joined: 22 Nov 2011
Posts: 9

PostPosted: Wed Nov 23, 2011 2:51 am    Post subject: Reply with quote

init never kicks off after the kernel mounts the root filesystem, so I get no console to confirm anything. All I get is the Kernel seemingly running, able to register new devices, but I have no shell and no ability to look at anything but the kernel messages. Its as if init simply does not kick off even though its in the proper place.
Back to top
View user's profile Send private message
StevieC
n00b
n00b


Joined: 22 Nov 2011
Posts: 9

PostPosted: Wed Nov 23, 2011 2:51 am    Post subject: Reply with quote

Also, to answer your other question, I'm not using an initrd
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Wed Nov 23, 2011 3:48 am    Post subject: Reply with quote

StevieC wrote:
init never kicks off after the kernel mounts the root filesystem, so I get no console to confirm anything.
If init does not start, then how can init-early.sh have run and exited?
Back to top
View user's profile Send private message
StevieC
n00b
n00b


Joined: 22 Nov 2011
Posts: 9

PostPosted: Wed Nov 23, 2011 3:51 am    Post subject: Reply with quote

This is the issue where I'm getting stuck. Is it possible that init is exiting without any indication at all?
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1931

PostPosted: Wed Nov 23, 2011 4:20 am    Post subject: Reply with quote

Can you try changing the init to "init=/bin/bash" and see if you can get a semi-functional shell? (I think in grub you can press 'e' to edit the boot options)
_________________
“And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Wed Nov 23, 2011 4:33 am    Post subject: Reply with quote

StevieC wrote:
Is it possible that init is exiting without any indication at all?
No. If PID 1 in the root pid namespace exits, then the kernel will panic. Therefore, init must still be running.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Wed Nov 23, 2011 5:39 am    Post subject: Reply with quote

boot cd, mount the gentoo partitions, enter the chroot, nominally:
Code:
mount /dev/sda3 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot
cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
emerge pciutils wgetpaste
wgetpaste /usr/src/linux/.config
ls -l / | wgetpaste
ls -l /dev | wgetpaste
ls -l /etc/init* | wgetpaste
wgetpaste /proc/cpuinfo
rc -update show | wgetpaste
emerge --info | wgetpaste
and post the url's returned
_________________
Defund the FCC.
Back to top
View user's profile Send private message
StevieC
n00b
n00b


Joined: 22 Nov 2011
Posts: 9

PostPosted: Wed Nov 23, 2011 3:42 pm    Post subject: Reply with quote

On the advice of a friend who had similar problems with ext4 on a number of the RHEL servers he administers, I tried re-building onto an ext3 partion (Before reading this) with the exact same configs as before (They were very close to the defaults that come in the stage 3 tar ball) and the system booted without any problem at all.

The only thing I did end up changing was that I missed mounting procfs in /etc/fstab. However, I think init should still be able to kick off and spawn consoles even with it not there?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Wed Nov 23, 2011 11:32 pm    Post subject: Reply with quote

StevieC wrote:
The only thing I did end up changing was that I missed mounting procfs in /etc/fstab. However, I think init should still be able to kick off and spawn consoles even with it not there?
I never mount proc via /etc/fstab. The system initscripts handle that automatically.

You say that you rebuilt onto an "ext3 partition". Does that mean you no longer have the non-functional system for us to diagnose?
Back to top
View user's profile Send private message
StevieC
n00b
n00b


Joined: 22 Nov 2011
Posts: 9

PostPosted: Thu Nov 24, 2011 12:16 am    Post subject: Reply with quote

I don't have an ext4 partion laying around anymore - I coped the kernel config (out of /proc/config.gz) and other configs like make.config into tempfs and then re-created an ext3 filesystem and put them back and proceeded with stage3.

Now that I have a KDE desktop up and running, I'll be blowing away my windows partion and trying again with ext4 to see if I can get it running. Stay tuned.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Thu Nov 24, 2011 1:11 am    Post subject: Reply with quote

for ext4 try compiling kernel with menuconfig edited to:
Quote:
File systems --->
< > Second extended fs support
< > Ext3 journalling file system support
<*> The Extended 4 (ext4) filesystem
[*] Use ext4 for ext2/ext3 file systems (NEW)
[*] Ext4 extended attributes (NEW)
[ ] Ext4 POSIX Access Control Lists (NEW)
[ ] Ext4 Security Labels (NEW)
[ ] EXT4 debugging support (NEW)

_________________
Defund the FCC.
Back to top
View user's profile Send private message
xbskid
n00b
n00b


Joined: 15 Jun 2006
Posts: 12

PostPosted: Sun Dec 11, 2011 2:22 am    Post subject: Reply with quote

I'm having this exact same issue on my Sun Fire V210. It happened the first time I configured 3.0.6, and somehow it works now, but now I'm having this issue again with 3.1.4. I've 'make oldconfig', so the configuration should be essentially identical as far as hardware support and setup, but it just doesn't start init. Doesn't panic either.

What do I need to post? dmesg, kernel config?
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1658

PostPosted: Sun Dec 11, 2011 3:57 am    Post subject: Reply with quote

xbskid wrote:
I'm having this exact same issue on my Sun Fire V210. It happened the first time I configured 3.0.6, and somehow it works now, but now I'm having this issue again with 3.1.4. I've 'make oldconfig', so the configuration should be essentially identical as far as hardware support and setup, but it just doesn't start init. Doesn't panic either.

What do I need to post? dmesg, kernel config?


If you can't past init I am not sure you will be able to get dmesg.
What do you have in /boot/grub/grub.conf?
Do you have the filesystem you are using enabled in the kernel?
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
xbskid
n00b
n00b


Joined: 15 Jun 2006
Posts: 12

PostPosted: Sun Dec 11, 2011 9:03 pm    Post subject: Reply with quote

turtles wrote:
If you can't past init I am not sure you will be able to get dmesg.
What do you have in /boot/grub/grub.conf?
Do you have the filesystem you are using enabled in the kernel?

My box has ALOM, so I can SSH into the serial console and simply copy the output, and since it's a Sun box, I'm using SILO. I'm using ext2 for /boot and ext4 for /.

dmesg (From both 3.0.6 and 3.1.4)[/url], silo.conf, and kernel config are below.

dmesg (3.1.4 kernel -- the bad one)
dmesg (3.0.6 kernel -- the working one)
silo.conf -- Nevermind the third entry; the one I'm booting 3.1.4 with is 'test'.
.config

I -must- be missing something in the kernel config, otherwise I wouldn't have a magical 3.0.6 kernel that works.

Edit: Oooh, I knew I made a copy of my working config somewhere; I'll investigate and report back.
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1658

PostPosted: Tue Dec 13, 2011 7:17 pm    Post subject: Reply with quote

xbskid wrote:
I'm using ext2 for /boot

Code:
CONFIG_EXT2_FS is not set

You did not set ext2
I would set ext3 as well it does not take up much space and you might get a thumb drive from or external drive that uses that.
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Wed Dec 14, 2011 2:21 am    Post subject: Reply with quote

turtles wrote:
xbskid wrote:
I'm using ext2 for /boot

Code:
CONFIG_EXT2_FS is not set

You did not set ext2
I would set ext3 as well it does not take up much space and you might get a thumb drive from or external drive that uses that.
He has CONFIG_EXT4_USE_FOR_EXT23=y. Besides, the problem is that the system does not start properly, not that he is unable to perform a kernel upgrade. The kernel only needs to mount /boot in order to install new kernels or reconfigure the bootloader.
Back to top
View user's profile Send private message
xbskid
n00b
n00b


Joined: 15 Jun 2006
Posts: 12

PostPosted: Fri Dec 16, 2011 2:34 pm    Post subject: Reply with quote

It seems my issue was that I had the wrong serial device set in my kernel config. Originally I had CONFIG_SERIAL_8250 (Plus _CONSOLE) built in, but by disabling those and setting CONFIG_SERIAL_SUNSU and _CONSOLE to y, my Sun Fire now starts INIT.

I would have expected the wrong serial driver to simply stop outputting to the console and continue to start processes like the NICs and SSH rather than prevent INIT from starting altogether.


Edit: I was mistaken; apparently my expectations that INIT -did- actually start and the machine booted were true.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum