Help - system boot failure

Hi.
I use command
Code:
dhclient re0
for connecting to Internet.
I wanted to speed up whole process by adding this line of code to /etc/rc.conf because I thought it would done it automatically on booting.
Now I have infinite loop, because the steps of "dhclient re0" are repeating and boot can't continue.
 
@ fender0107401: tnx I'll try that.
@SirDice: no I just added command
Code:
dhclient re0
to /etc/rc.conf
 
/etc/rc.conf is not a simple shell script! You really need to put
Code:
ifconfig_re0="DHCP"
in there, as suggested.
 
psycho said:
@SirDice: no I just added command
Code:
dhclient re0
to /etc/rc.conf

Don't ever do that again ;)

/etc/rc.conf should contain various variables to set options, it should not contain commands.
 
well now I know.

Ok I tryed Single User Mode and I have succesfully booted into the system but edit/pico commands don't work and when I was shutting down system, it tried to write some Log file, and then error occured with msg that this is Read-only mode
 
psycho said:
well now I know.

Ok I tryed Single User Mode and I have succesfully booted into the system but edit/pico commands don't work and when I was shutting down system, it tried to write some Log file, and then error occured with msg that this is Read-only mode

In single user mode, only the root filesystem is mounted. And it's mounted read-only. To fix that:

Code:
fsck -y
mount -u /
mount -a -t ufs
After that edit/pico/vi should work and you will be able to edit /etc/rc.conf.
 
psycho said:
o tnx , solved problem.
Can you SirDice be so kind to explain what this piece of code does?

I suspect he can, but you really should see the manpages for whatever commands here you don't understand.
 
I think he rather means the fsck and mount commands.

fsck does a file system consistency check and answers yes to all questions asked.

Then you unmount the root partition (since it was mounted read-only by default).

Then you mount all partitions of the ufs type (to ensure only system partitions are mounted).

fsck(8)
mount(8)
 
Oh yeah...

Code:
# fsck -p
# mount -u /
# mount -a -t ufs
# swapon -a

This checks the file systems, remounts / read/write and mounts all the other UFS file systems referenced in /etc/fstab.
 
Beastie said:
Then you unmount the root partition (since it was mounted read-only by default).
Actually, you remount the root filesystem with "mount -u /" (You cannot unmount a filesystem that's in use ;) ) with the settings in /etc/fstab (which usually means read/write).
 
Back
Top