LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   rc.local hanging my system on reboot (https://www.linuxquestions.org/questions/%2Absd-17/rc-local-hanging-my-system-on-reboot-263697/)

ub3rj3phf 12-07-2004 01:17 PM

rc.local hanging my system on reboot
 
I have freebsd-5.2.1-RELEASE. I had mysql-server installed from ftp ports tree and add mysqld_safe to rc.local. I then installed pico as a request from one of my users. The problem was when pico started, the screen wouldn't refresh. I tried Ctrl + L and still had no luck. I figured a simple reboot might solve the problem. Here is my dilemma. I uninstalled mysql-server and forgot to remove it from rc.local. Now my system hangs on boot searching for mysql.

Is there anyway to disable rc.local on boot? I just need to get in there and remove that line.

You would think the command would time out or something, but it doesn't. It just sits there trying to start an non-existing mysql server.

sigsegv 12-07-2004 01:35 PM

Boot single user, mount your disks (mount -t ufs -a) and edit away.

Also, rc.local isn't the correct place to start the mysqld from ports. Look in /usr/local/etc/rc.d. There should be an rc script in there for it. You'll likely need to add mysqld_enable="YES" to rc.conf as well.

ub3rj3phf 12-07-2004 06:14 PM

I booted single user. I was sent to a prompt
Code:

mountroot>
I ran your command. No luck. The error was
Code:

Root Mount failed: 22
If I type ? at prompt it displays:
Code:

List of GEOM managed disk devices:
ad1s1f ad1s1e ad1s1d ad1s1c ad1s1b ad1s1a ad1s1 ad1 acd0

I'm guessing these are the partitions or mount points? If so, which one is the main partition?

ub3rj3phf 12-07-2004 06:58 PM

When I type ufs:ad1s1 it outputs:
Code:

Mounting Root from ufs:ad1s1
ad1: Warning - READ_DMA UDMA ICRC ERROR (retrying request) LBA=191
ad1: Warning - READ_DMA UDMA ICRC ERROR (retrying request) LBA=191
ad1: Warning - READ_DMA status=51(READY,DSC,ERROR) error=84(ICRC,ABORTED) LBA=191

ad1: Warning - READ_DMA UDMA ICRC ERROR (retrying request) LBA=64
ad1: Warning - READ_DMA UDMA ICRC ERROR (retrying request) LBA=64
ad1: Warning - READ_DMA status=51(READY,DSC,ERROR) error=84(ICRC,ABORTED) LBA=64

ad1: Warning - READ_DMA UDMA ICRC ERROR (retrying request) LBA=63
ad1: Warning - READ_DMA UDMA ICRC ERROR (retrying request) LBA=63
Root mount failed: 5

I've also tried ufs:/dev/ad1s1 and every combination of the devices listed above. They all error the same.

Hope this gives some insight.

sigsegv 12-07-2004 07:37 PM

Wow ... That doesn't look good *at all* ... Those look like "Your disk is about to die" type messages.

When you let it boot normally it comes up like you would expect (except the mysql part)? At this point, I'd boot the install CD/DVD up and try to get ad1s1a (which I assume is your root filesystem) mounted up. If you can get it mounted, you can just edit the rc.local and remove the mysql start command.

If it gives you the same error from the CD ... You may have a deeper problem.

ub3rj3phf 12-08-2004 01:22 PM

I had read another post from a different forum claiming that if you use an 80 count IDE cable instead of a 40 count, the problem magically disappears. I found that not to be true. What I did find to work was, with the 40 count cable still in use, I unplugged the cdrom which was my slave device. I was then able to boot into single user mode
Then ran:
Code:

mount -t ufs -a

and then

rm -rf rc.local

rebooted normally and I'm up and running.

Thanks for all your help!


All times are GMT -5. The time now is 07:40 AM.