Computing.Net > Forums > Unix > Regaining access to root/FreeBSD

Regaining access to root/FreeBSD

Reply to Message Icon

Original Message
Name: pt cruiser
Date: December 26, 2002 at 10:12:56 Pacific
Subject: Regaining access to root/FreeBSD
OS: FreeBSD
CPU/Ram: PII/16MB
Comment:

Hi,

I have the FreeBSD Mini 4.7 loaded. I used /stand/sysinstall to do some configuration. I went into csh and couldn't get out so I powered down hard and now I can't get to the root of the OS. The best I can do is get to a %

I had two user accounts setup. Everything was going fine until I powered down. Can someone provide some direction with basic command navigation? I can reinstall FreeBSD if I have to and I did find a link to help with user/groups accounts and settings.

thanks to all who reply.

pt


Report Offensive Message For Removal

Response Number 1
Name: David Perry
Date: December 26, 2002 at 11:04:22 Pacific
Subject: Regaining access to root/FreeBSD
Reply: (edit)

the command 'mount' will tell you what filesystems you have mounted.

It is possible that some filesystems did not come up to an automount state and need to be checked with fsck. compare the files systems in /etc/fstab or /etc/vfstab to what is mounted. Repair as req.

mount

cat /etc/fstab

fsck -Y /dev/rdsk/somevolume_not_mounted

mount -a



Report Offensive Follow Up For Removal

Response Number 2
Name: David Perry
Date: December 26, 2002 at 11:16:44 Pacific
Subject: Regaining access to root/FreeBSD
Reply: (edit)

BTW, FreeBSD and others allow for multiple virtual terminals. Selecting atl-f1, alt-f2, ... alt-f8 will switch between the terminals. Each allow thier own login. With a hung process on terminal one, you could login to terminal 2 , find the process ID of the hung process with

ps -ax | grep processname

then kill it with

kill -9 pid

This could save a future hard boot.


Report Offensive Follow Up For Removal

Response Number 3
Name: pt cruiser
Date: December 26, 2002 at 13:01:02 Pacific
Subject: Regaining access to root/FreeBSD
Reply: (edit)

Thanks again for the reply.

I ran the fsck command and it kept telling me things were still dirty. I ran mount and it looked like a few items had been skipped, possibly due to corruption. I'm going to reinstall and start over. If I venture into csh again, what commasnd do I use to get out?
Is there a link or text reference for these types of questions so I son't have to keep bothering you. I don't mind doing some reading while at work....I work desktop support for Win2000/98/85 on weekends and have more than enough time.

pt


Report Offensive Follow Up For Removal

Response Number 4
Name: David Perry
Date: December 26, 2002 at 17:05:58 Pacific
Subject: Regaining access to root/FreeBSD
Reply: (edit)

www.freebsd.org has a online handbook. This makes for a good read. It is nearly the same as the official FreeBSD book.

To exit from a shell type "exit".
To exit from an ftp session type "bye"
To exit from a telnet session type "quit"
If a process does quit nicely, try

control c
control \

kill -9 pid from another session.

(t)csh is nice for the tab completion and memory keyboard but lowsy for scripting. Most rc scripts and cron scripts are written to be compatible with the borne or ksh shells. I recommend ksh if you plan to script your environment. set -o vi will make you ksh environment have the same editing keys as the vi editor, so

esc k

will recall the previous command,

esc i

will insert text

esc shift a

will append text to the end of the line


Report Offensive Follow Up For Removal

Response Number 5
Name: pt cruiser
Date: December 26, 2002 at 19:06:13 Pacific
Subject: Regaining access to root/FreeBSD
Reply: (edit)

I have a strong feeling that I'm dealing with a faulty hard drive. I reinstalled, added a new non-root user with sysinstall and proceeded to power down directly from the login: screen. Upon bootup I received another several messages about a dirty file system-run fsck. I ran fsck a few times just to humor myself but the messages didn't entirely go away. I recalled from a previous format session that many "allocation units" were being recovered. Windows ran fine from the drive but FreeBSD isn't fairing as well. I have to believe that FreeBSD is being adversely affected by these bad allocation units/sectors. I'm going to swap drives ad try again over the weekend.

BTW, I did use "exit" when trying to get out of csh but it didn't work. That's when I powered down to reboot and learned the quick way about the "Dirty File System". I suppose this is a good time and place to learn about troubleshooting FreeBSD.

I really appreciate all the tips/tricks you've included in your responses. I'm still psyched about learning FreeBSD/Unix/Linux despite these minor, irritating setbacks.

I hope you have a happy and safe New Years! I'll let you know how I make out.

pt :)


Report Offensive Follow Up For Removal


Response Number 6
Name: David Perry
Date: December 27, 2002 at 04:36:48 Pacific
Subject: Regaining access to root/FreeBSD
Reply: (edit)

The allocation units error you are getting is certainly pointing to a bad hard drive. Did the format disk screen give you the option of checking for bad blocks / sectors ? If you do this, the format routine takes the opportunity to remap bad sectors, something that is not normally done with a quick format. IDE hard drives are cheap. Probably a good idea to replace it.

BTW, I put a 30 gig ide drive in a pentium 75 about 8 years ago. FreeBSD ( 2.05 ) was quite happy to deal with the whole drive ignoring what the bios reported. When I took it out of commission last year and put windows on it, windows would not recognize or use he 30 gig drive. Several periods of 18+ months of continuous uptime with that machine.


Report Offensive Follow Up For Removal






Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Regaining access to root/FreeBSD

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software