LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 12-07-2004, 01:17 PM   #1
ub3rj3phf
Member
 
Registered: Dec 2003
Location: Lewiston, Idaho
Distribution: Mandrake 10.0 Official, Freebsd 5.2.1 mini
Posts: 40

Rep: Reputation: 15
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.
 
Old 12-07-2004, 01:35 PM   #2
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 47
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.
 
Old 12-07-2004, 06:14 PM   #3
ub3rj3phf
Member
 
Registered: Dec 2003
Location: Lewiston, Idaho
Distribution: Mandrake 10.0 Official, Freebsd 5.2.1 mini
Posts: 40

Original Poster
Rep: Reputation: 15
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?
 
Old 12-07-2004, 06:58 PM   #4
ub3rj3phf
Member
 
Registered: Dec 2003
Location: Lewiston, Idaho
Distribution: Mandrake 10.0 Official, Freebsd 5.2.1 mini
Posts: 40

Original Poster
Rep: Reputation: 15
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.
 
Old 12-07-2004, 07:37 PM   #5
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 47
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.
 
Old 12-08-2004, 01:22 PM   #6
ub3rj3phf
Member
 
Registered: Dec 2003
Location: Lewiston, Idaho
Distribution: Mandrake 10.0 Official, Freebsd 5.2.1 mini
Posts: 40

Original Poster
Rep: Reputation: 15
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!
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Reboot hanging after removal of cdrom matt_hannay Linux - Hardware 2 11-17-2005 07:35 AM
Can't reboot via ssh, but can from local terminal xymian Linux - Networking 2 09-05-2005 10:04 AM
reboot hanging d4rksh4de Linux - Hardware 10 06-29-2005 12:51 AM
system hanging trey31357 Slackware 3 06-24-2005 09:15 AM
changed local net address nfs is hanging at boot spooge Linux - Networking 2 08-20-2003 01:37 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 10:29 AM.

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