Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Barfed all over one of my boxes [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Fri Sep 05, 2014 3:38 am    Post subject: Barfed all over one of my boxes [SOLVED] Reply with quote

I was trying to install crossdev and I got i486 code all over. I was able to boot in, but could not re-emerge anything because gcc was trashed (along with glibc libstdc++ and others I'm sure), I tried to copy files from another machine but the trashed machine won't recognize the USB stick. The DVD-ROM won't open and I can't get scp to work. I haven't ever had scp work, but that's another story.
I made packages on another machine (this one) that has the same (k10) family, but although I placed them on the apache server and set PORTAGE_BINHOST, when I tried to emerge -K the packages, I kept getting "ERROR 403". In desperation, I booted into sysrecuecd on a USB stick (the BIOS booted from it OK, linux won't read them). I download the latest stage3 and tried to figure out how to untar only the binaries. Finally, exasperated, I instlled the whole stage. OK, I'm sure you know this fixed the binaries but all the system setup files were overwritten. Most of them were simple to fix using the installation handbook and luckily the stage uses /etc/portage/make.conf instead of /etc/make.conf, so that wasn't overwritten. I copied the old /etc/make.conf over /etc/portage/make.conf and made /etc/make.conf a symlink. My various portage masks and useflags can now be copied from another machine, now that samba is up and running.

But what I need help desperately for is to restore my users. Their home directories are there and seem untouched but I can't reset the passwords. passwd keeps saying the users don't exist. I'm afraid If I add a user with the same name, the home directories will be trashed.

Right now I'm rebuilding "system" with
Code:
emerge -auvND --with-bdeps=y system
After that's done, I'll rebuild world. I ran regenworld and it picked up 150 packages where I only have 92 before, but I thought it better than "emerge -e system".

If I ever get this rolling again, I'm going to start regular tar backups of the whole install and save them on the big 2T drive I save videos on.


Last edited by Tony0945 on Sun Sep 07, 2014 1:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Sat Sep 06, 2014 12:46 am    Post subject: Reply with quote

Copy /etc/passwd from your most recent backup or, if you do not have a backup, compare /etc/passwd on a similar machine to see if it is close enough to be usable. Next time, be more careful about what you unpack. You could have repaired the crossdev damage without causing further problems if you had been more careful.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Sun Sep 07, 2014 1:04 pm    Post subject: Reply with quote

Thank you, Hu, I have now backed up all the users and critical files in /etc. I need to back up the binaries too for the next time something happens to gcc. Packages might be the answer, but when I restored gcc from a package made on another fam10 computer, I found out (via a einfo message when emerging) that the package only restores the binary, not the text files that are critical to operation.

So sometimes a re-install may be necessary. Losing the /etc/group and associated files was a major blow that I mostly resolved with grpck, pwck vipw and vigr. This did leave a lot of unknown uid's in the system and I had to re-emerge at, cron and other programs to fix this. I did an emerge -ea sytem nd it took 381 minutes to do about 200 packages. emerge -pe world revealed about eight hundred packages to emerge, so doing that will take a day. Luckily, I always keep at least one old kernel on /boot in case boot rescue is needed.

Fixing the system, while tedious, has been an opportunity to remove cruft. For example, while searching for invalid uid's, I found a lot of files left behind by gnome and gdm after I had switched to Mate.

Building for the old 32 bit system on a modern computer was necessary and i finally did it by following a wiki tip that i can't seem to find again, and this document https://www.gentoo.org/proj/en/base/amd64/howtos/chroot.xml An attempt to build the kernel natively on a k-6III+ 384Meg system took over eight hours and ended in an "out of memory" error when building the initramfs. It took eight minutes on a Phenom II six core in the 32 bit chroot with 8G memory. The resulting kernel which I had to transfer by CD ran like a top on the target system.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Sun Sep 07, 2014 2:36 pm    Post subject: Reply with quote

Just wanted to add that "find / -nouser" and "find / -nogroup" were invaluable in cleanup after trashing the /etc/group file.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum