Solved

freeBSD single user mode disaster mergemaster build makewerld

Posted on 2007-03-31
12
935 Views
Last Modified: 2013-12-16
i was trying to do cvsup for the first time.. i closed out this question:

http://www.experts-exchange.com/Software/System_Utilities/Diagnostics/Q_22470294.html

because we made significant progress, and it is long long long now.

i made a new question:

http://www.experts-exchange.com/Software/System_Utilities/Diagnostics/Q_22470294.html

but now i am having  a serious disaster.  i can no longer log onto the system.  when
i did mergemaster -p it was like being in the vi editor for the first time (for me that was about
22 years ago in milwaukee on evax)  i had no idea what was happening there were
all these questions i don't remember i must have deleted /etc/passwd or something.

i don't know what to do now  {:(
0
Comment
Question by:kayvey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 3
12 Comments
 
LVL 29

Expert Comment

by:TeRReF
ID: 18831357
There should be a backup of your old /etc dir here:

/var/tmp/etc

Boot in single user mode, do a
mount -a

and copy the backup passwd file to /etc


This should enable you to login again. There is a but...

There might have been changes made during the buildworld process, obviously, those are missing in the backup file. Make sure all your programs are running as expected...
0
 

Author Comment

by:kayvey
ID: 18840799
i found a passwd file in /var/tmp/etc and moved it to what i thought should be the correct place,
but i still couldn't log in
0
 
LVL 62

Accepted Solution

by:
gheist earned 250 total points
ID: 18875052
not passwd, but master.passwd holds password records.
When they are out of sync nothing works and vipw fixes.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:kayvey
ID: 18878677
how do i use vipw ? oh you want me to google i guess. i am at the kinkos paying
$0.40 a minute to look at web
0
 

Author Comment

by:kayvey
ID: 18878682
Your search - vipw did not return any results.
0
 

Author Comment

by:kayvey
ID: 18878705
i moved three files..




i can't log on, but i can run in single user mode.  does that qualify as a "running system"  should i start
over from step 1 and do it all in single user mode?  maybe i better not try until hearing from  somebody.

here is what is happening on freebsd-stable mailing list:
(if this is too long winded, please scroll down)

> If you have a running system, read Appendix A.5 "Using CVSup" [1] of the
> handbook, which details how to update your sources and ports to the current version.

> If you don't have a running system, rebuild world + kernel and hope that restores enough functionality so you can update the sources and go  again. This is all described in section 22.4 "Rebuilding world" [2] > of the handbook, but I will summarise it for you.

> // change to root
> $ su -
> // remove /usr/obj to speed up the build
> # cd /usr/obj && chflags -R noschg * && rm -rf *
> // Build a new world
> # cd /usr/src
> # make -j4 buildworld
> // build a new kernel (do not put any job options for this build)
> # make buildkernel
> // install the new kernel
> # make installkernel
> // reboot to single user mode (boot -s from the loader prompt)
> # shutdown -r now

> // After reboot
> // check + mount all filesystems
> # fsck -p
> # mount -u /
> # mount -a -t ufs
> # swapon -a
> // prepare /etc for the world install
> # mergemaster -p
> // install the new world
> # cd /usr/src ; make installworld
> // run mergemaster again
> # mergemaster
> // reboot to an updated system
> # shutdown -r now

> All these instructions are in the handbook.

> Cheers

> Tom

> [1] http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvsup.html
> [2]
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html


_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"

0
 

Author Comment

by:kayvey
ID: 18878713
i fergot the three files.  i was trying to follow this guy's instructions did these three files:

> > > 
> > > Passwords are not stored in /etc/passwd, there is /etc/pwd.db, /etc/master.passwd
> > > and /etc/spwd.db, too. All are required for the system to be fully functional. The latter
> > > two contain the passwords in  encrypted form. You might want to try to restore these files in
> > > particular.
> >
> > okay.. /etc/passwd was in /var/tmp/etc/passwd, so the others will be similarly so? i can handle this.
0
 
LVL 29

Assisted Solution

by:TeRReF
TeRReF earned 250 total points
ID: 18888271
In single user mode:

mount -a
/usr/sbin/vipw

then use this inside vipw:

:wq

That should do it...
0
 

Author Comment

by:kayvey
ID: 18907200
sorry for wanting it down to the detail, but i feel i followed directions simply typing "mergemaster -p"
and it blew up in my face
0
 

Author Comment

by:kayvey
ID: 18915745
okay now i have a browser and a broken set of terminals.  i guess i am going to have to go back
over my old questions on how to make my prompt werk.  i will make a new question if i have problems
i guess.  also.. i have no idea if i have properly built werld that mergemaster -p thing caused this
mess.
0
 
LVL 29

Expert Comment

by:TeRReF
ID: 18916059
Try
uname -a

If it's giving you version 6.2, things should have been upgraded properly
0
 

Author Comment

by:kayvey
ID: 18929852
the thing about that is that uname -a was werking before we did the single user mode thing
so now i am confused.. i am making a new question because of further badness
0

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question