View previous topic :: View next topic |
Author |
Message |
tel Tux's lil' helper
Joined: 15 Aug 2006 Posts: 112
|
Posted: Sun Feb 20, 2011 6:04 pm Post subject: MySQL prevents boot (*SOLVED*) |
|
|
Not sure how to figure this one out: I have MySQL set to start at boot time using its usual init script. Unfortunately, when it comes to the line that starts MySQL, the boot sequence hangs completely. No way out.
The only way I can get into my system is to reboot from a Rescue CD, remove MySQL using "rc-update delete mysql default" and then reboot.
Strangely, when I boot into linux and run "/etc/init.d/mysql start" from the command line, it works perfectly.
Any thoughts on how to fix this?
Thanks.
Last edited by tel on Wed Feb 23, 2011 4:34 am; edited 1 time in total |
|
Back to top |
|
|
lxg Veteran
Joined: 12 Nov 2005 Posts: 1019 Location: Aachen, Germany
|
Posted: Sun Feb 20, 2011 10:01 pm Post subject: |
|
|
Maybe there's another service that your MySQL depends on, but is not started yet. Can you post the output of the following commands:
Code: | rc-status boot
rc-status |
In order to find out what makes your MySQL hang, I'd recommend to modify /etc/init.d/mysql in order to produce as much output as possible.
As for the Rescue CD: You shouldn't need that. Gentoo has a nice feature called “interactive boot”. When you hit the i key during init phase (in fact, keep hitting it as soon as you see the kernel booting), it will ask you for each service if it should be started or not. _________________ lxg.de – codebits and tech talk |
|
Back to top |
|
|
tel Tux's lil' helper
Joined: 15 Aug 2006 Posts: 112
|
Posted: Sun Feb 20, 2011 11:47 pm Post subject: |
|
|
Here's rc-status boot:
Runlevel: boot
hwclock [ started ]
termencoding [ started ]
modules [ started ]
device-mapper [ started ]
lvm [ started ]
fsck [ started ]
root [ started ]
mtab [ started ]
localmount [ started ]
hostname [ started ]
sysctl [ started ]
bootmisc [ started ]
alsasound [ started ]
swap [ started ]
keymaps [ started ]
udev-postmount [ started ]
urandom [ started ]
procfs [ started ]
Here's rc-status:
Runlevel: default
syslog-ng [ started ]
iptables [ started ]
fail2ban [ started ]
sshd [ started ]
vixie-cron [ started ]
netmount [ started ]
ntpd [ started ]
atd [ started ]
numlock [ started ]
postfix [ started ]
acpid [ started ]
cupsd [ started ]
netif.eth0 [ started ]
local [ started ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed
dbus [ started ]
Dynamic Runlevel: manual
By the way, thanks for the "interactive" hint! |
|
Back to top |
|
|
lxg Veteran
Joined: 12 Nov 2005 Posts: 1019 Location: Aachen, Germany
|
Posted: Mon Feb 21, 2011 8:23 am Post subject: |
|
|
Looks all quite ok, except netif.eth0 … which I suppose is your local variant of net.eth0.
My strategy would be to omit as many services as possible from the “boot” and “default” runlevels – except the really important ones. Then see if MySQL will boot. You don't need to actually disable them via rc-update, simply skip them while booting (again, interactive boot is your friend). _________________ lxg.de – codebits and tech talk |
|
Back to top |
|
|
tel Tux's lil' helper
Joined: 15 Aug 2006 Posts: 112
|
Posted: Wed Feb 23, 2011 4:33 am Post subject: |
|
|
Thanks for the direction. As you point out, my local variant of net.eth0 is netif.eth0.
The mysql script depends on net.lo, so I changed this line to depend on netif.eth0, and now it works perfectly.
Thanks! |
|
Back to top |
|
|
lxg Veteran
Joined: 12 Nov 2005 Posts: 1019 Location: Aachen, Germany
|
Posted: Wed Feb 23, 2011 7:11 am Post subject: |
|
|
Is there a reason why you called it netif.eth0? The standard is net.eth0, and I really recommend to use that.
Your problems will start at the next MySQL update, when the init script will be either overwritten with a new version, or you must maintain a local version.
I would strongly recommend never to modify /etc/init.d files, even though they reside within /etc. _________________ lxg.de – codebits and tech talk |
|
Back to top |
|
|
tel Tux's lil' helper
Joined: 15 Aug 2006 Posts: 112
|
Posted: Wed Feb 23, 2011 4:24 pm Post subject: |
|
|
I'm actually using Funtoo, which makes its net connections slightly differently. I guess I could always make a symlink net.eth0 -> netif.eth0
Think that would work? |
|
Back to top |
|
|
lxg Veteran
Joined: 12 Nov 2005 Posts: 1019 Location: Aachen, Germany
|
Posted: Wed Feb 23, 2011 6:48 pm Post subject: |
|
|
Um, I don't know Funtoo, but … net.eth0 should be a symlink to net.lo itself, so I guess it should be ok to add another symlink. I do however not understand why it needs to be netif.eth0. If this is standard, you should post a bug at Funtoo, as you definitely had an erratic behaviour due to this. _________________ lxg.de – codebits and tech talk |
|
Back to top |
|
|
|