Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
system totally hosed:It all started when I tried to get mol
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
DrZoidberg
Tux's lil' helper
Tux's lil' helper


Joined: 03 May 2003
Posts: 119
Location: New Port Richey, Florida

PostPosted: Sun Aug 01, 2004 6:42 am    Post subject: system totally hosed:It all started when I tried to get mol Reply with quote

I tried to emerge fileutils and portage deleted ls, rm, mkdir, cp, and so on but it did not install a new version.

I am stuck behind a proxy server and can only emerge web-rsync. Is this bad for my system? I can't emerge sync.

I had emerged system a few days ago (right after a webrsync) and I noticed that it upgraded glibc and gcc. My last webrsync was about 8 weeks ago. Things seemed ok until I tried to recompile my kernel (2.4.24) and modules when trying to make MacOnLinux work. (mol compiled w/o errors, but the mol modules wouldn't load.) Things started to get really strange at this point.
Before fileutils got deleted, modules and bzImage would build w/o errors but no module would load. I kept getting something like "can't find the kernel version for which the module was compiled." (I did remember to do a make modules_install.)

So I decided to update some stuff, thinking the new glibc/gcc broke things. emerge -p world showed a bunch of little things like modutils and fileutils were a little old. So I emerged world and it stopped at fileutils, after deleting the old version and not installing a new one.

I can get rm,ls,etc from the boot CD. But what about the strange module problem? Is portage hopelessly screwed up?
Back to top
View user's profile Send private message
DiskBreaker
Apprentice
Apprentice


Joined: 07 Oct 2003
Posts: 224

PostPosted: Sun Aug 01, 2004 7:59 am    Post subject: Re: system totally hosed:It all started when I tried to get Reply with quote

I'm really curious at how this could ever happen since portage will only delete files of a previous version of an ebuild if the new version has already been installed successfully. Did you emerge -C your fileutils by hand? Also are you sure that you aren't using coreutils, which replaces the old fileutils, textutils and sh-utils packages?

In order to rescue your system you probably don't even need to boot from a live cd. While emerging system during the install the sash shell should have been installed. Sash is a tiny shell with all important file commands like cp, rm, mv, mount, gzip etc. built-in. It should be in /bin/sash and should give you the necessary environment to restore stuff on your system.
Code:
man sash

Once emerge is working again reemerge fileutils.

Regarding you MOL problem: Make sure the source tree of the currently running kernel is linked to /usr/src/linux and reemerge mol.
Back to top
View user's profile Send private message
ruben
Guru
Guru


Joined: 04 Jul 2003
Posts: 462

PostPosted: Sun Aug 01, 2004 8:02 am    Post subject: Reply with quote

From what i remember, i think you can't compile the 2.4 kernels with the now stable gcc. You said you recompiled your kernel after the glibc and gcc update ? Did that work ? Or did you only try to recompile the modules ?
I wanted to recompile my 2.4.22 kernel after the glibc/gcc-update and that just failed, so i decided to upgrade to 2.6.
Back to top
View user's profile Send private message
10drill
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2004
Posts: 104
Location: 0{here}1

PostPosted: Sun Aug 01, 2004 8:08 am    Post subject: Reply with quote

Quote:
Sash is a tiny shell with all important file commands like cp, rm, mv, mount, gzip etc. built-in.

I lost cd, rm, ls, etc. a while ago when I tried emerge depclean for fun. I got things fixed, but I didn't know about sash. It would have REALLY made things easier.
Back to top
View user's profile Send private message
fb
l33t
l33t


Joined: 08 Dec 2003
Posts: 636
Location: New Zealand

PostPosted: Sun Aug 01, 2004 9:52 pm    Post subject: Reply with quote

As someone else has pointed out, the new gcc has problem
compiling 2.4 kernels. To be more precise modules won't
load. I think that's the problem you have with MOL. It compile
a kernel module and surprise it cannot be loaded.

But the new gcc cause quite a lot of breakage with numerous
ebuild on ppc, curiously a lot of the same ebuilds in ~ppc do
work. For example I reported a bug compiling xine-lib, it seems
to be altivec related, but the xine-lib in ~ppc has a new -altivec
flag and compile. xine-lib is a dependency for KDE so it is
rather major.
There is the MOL problem. I emerged xfig, one the dependency
of xfig wouldnot compile, go to ~ppc and their it works.
There are probably more stuff like that out there but I have been
unable to uncover it. Because of the xine-lib problem I cannot do
an emerge -e world as it doesn't go any further than xine-lib
before stopping so I don't know if there is any other package
broken on my system after that.
Back to top
View user's profile Send private message
DiskBreaker
Apprentice
Apprentice


Joined: 07 Oct 2003
Posts: 224

PostPosted: Sun Aug 01, 2004 10:13 pm    Post subject: Reply with quote

fb wrote:
Because of the xine-lib problem I cannot do
an emerge -e world as it doesn't go any further than xine-lib
before stopping so I don't know if there is any other package
broken on my system after that.

In those cases, after emerge stops do a
Code:
emerge --resume --skipfirst

This will skip over the last package you were unsuccessfully trying to emerge (xine-lib) and continue with the rest. The only KDE package that needs xine-lib is kde-multimedia, so you should be able to emerge everything else.
Back to top
View user's profile Send private message
fb
l33t
l33t


Joined: 08 Dec 2003
Posts: 636
Location: New Zealand

PostPosted: Sun Aug 01, 2004 11:02 pm    Post subject: Reply with quote

Quote:
In those cases, after emerge stops do a
Code:
emerge --resume --skipfirst

This will skip over the last package you were unsuccessfully trying to emerge (xine-lib) and continue with the rest. The only KDE package that needs xine-lib is kde-multimedia, so you should be able to emerge everything else.


Thanks for the tip. I know that it is only for kde-multimedia.
I will see if there are any other broken package along the way.

By the way, is there's a way of telling protage to use
xine-lib-1_rc5-r2 rather than 1_rc4-r1. Editing the ebuild doesn't
cut it as portage is reloaded in an emerge -e world and the ebuild
file is restored.
Back to top
View user's profile Send private message
snowlander
n00b
n00b


Joined: 27 Mar 2004
Posts: 32
Location: Pohnpei, Micronesia

PostPosted: Mon Aug 02, 2004 12:16 am    Post subject: Reply with quote

(I'm also DrZoidberg.)
Thanks for all the help folks, I got kernel 2.6.7 and a lot of things are working better. I build agpgart, alsa stuff, and dri (r128) as part of the kernel and most of what I want to work works. Strangely, I still cannot load modules. I am building irda and usb as modules but they don't load giving the error:
Code:

bash-2.05b# modprobe usbcore.ko
modprobe: QM_MODULES: Function not implemented
insmod: QM_MODULES: Function not implemented
insmod: insmod /lib/modules/2.6.7-gentoo-r11/kernel/drivers/usb/core/usbcore.ko failed
insmod: QM_MODULES: Function not implemented

insmod: QM_MODULES: Function not implemented

insmod: insmod usbcore.ko failed


I just emerged modutils so they're up to date.
Back to top
View user's profile Send private message
snowlander
n00b
n00b


Joined: 27 Mar 2004
Posts: 32
Location: Pohnpei, Micronesia

PostPosted: Mon Aug 02, 2004 1:16 am    Post subject: Reply with quote

Nevermind the last question-- I just emerged module-init-utils and modules are now working.

But I am a bit worried about portage. Suppose someone adds an ebuild for a newer version of modutils 6 months from now. What if I were to reemerge modutils by accident, like when emerging world, then my modules would all stop working and it might be pretty hard to remember why.

It looks like the same issue caused me to delete all my fileutils: rm, ls, etc. were all moved to coreutils so when I emerged the (obsolete?) fileutils, it deleted rm, ls,etc. and stopped emerging, leaving me with only the ability to cd. Thanks for the tip about sash, btw.

But isn't the whole point of having package management to avoid this sort of problem? Unless I misunderstand, portage will happily overwrite/delete files from one package with those of another. Especially if things (or worse, parts of things) start changing names, like modutils-->module-init-tools and fileutils-->coreutils.

Isn't there some way to make portage refuse to (un)emerge when packages overlap? Or at least stop and ask you what to do? In my case, it would have been a lot less mysterious to have been told during emerge world

"you are attempting to install modutils, which will overwrite files installed by module-init-tools-- are you sure you want to emerge modutils? y/n"

Right now, I can emerge module-init-tools and then modutils w/o any warning.
Back to top
View user's profile Send private message
revertex
l33t
l33t


Joined: 23 Apr 2003
Posts: 806

PostPosted: Tue Sep 07, 2004 10:40 pm    Post subject: Reply with quote

yes, portage need some sorta of blocker or warning about unmerge/overwrite critical packages.
i recently unmerged gzip (i know it' s stupid, but i guess gzip-x86 does the same) and there is nothing complaining about gzip be a critical package needed to emerge some packages.
luckily i do regular backups, but why is so easy to screw-up gentoo?
how long time should be needed to portage be a rock solid package manager like apt?
i'm not complaining about the fantastic work all gentoo devs are doing, just realizing that " almost perfect" is a step closer " perfect" .
Back to top
View user's profile Send private message
_savage
Guru
Guru


Joined: 06 Jun 2004
Posts: 308
Location: Redmond, WA

PostPosted: Wed Sep 08, 2004 6:21 am    Post subject: Reply with quote

I am not sure if the question is really related. But is there a way I can back up the current world file plus /etc? So in case the system is screwed I could just wipe it clean and re-emerge everything I had before without pondering what I forgot...

Jens
_________________
Jens Troeger
http://savage.light-speed.de/
Back to top
View user's profile Send private message
revertex
l33t
l33t


Joined: 23 Apr 2003
Posts: 806

PostPosted: Wed Sep 08, 2004 6:49 am    Post subject: Reply with quote

------OFF TOPIC--------
i've found this some time ago in these forums.
Code:
 #!/sbin/runscript
 # Backs up /etc/*
 
 start() {
     local BACKUPDIR="/var/backup"
 
     local DATE=`date +%d%b%Y-%H:%M`
     local files=`ls -r ${BACKUPDIR}/etc*.tar.gz`
     ebegin "Backing up /etc/* to ${BACKUPDIR}/etc-${DATE}.tar.gz"
     if [ ! -d ${BACKUPDIR} ]
     then
         mkdir -p ${BACKUPDIR}
     fi
 
     backup=3
     for arg in ${files}
     do
         if [ "${backup}" -le 0 ]
         then
             rm -f ${arg}
         else
             backup=$((${backup} -1))
         fi
     done
 
     tar -Pzcspf ${BACKUPDIR}/etc-${DATE}.tar.gz /etc
     eend $?
 }

save this file in /etc/init.d/bkp-etc add it to default startup runlevel (rc-update add bkp-etc default).
this way every time you start your box it backup your /etc folder
i guess you can edit to include other files, or make it a cronjob.
i suggest you to backup your kernel ".config" file, unless you are using something awful like genkernel

here you will find another cool backup script, i changed a few things in this one to send me the results by mail and backup my partitions separately in another disk w/ automount.

https://forums.gentoo.org/viewtopic.php?t=110713&highlight=dar+backup

------OFF TOPIC--------
Back to top
View user's profile Send private message
DiskBreaker
Apprentice
Apprentice


Joined: 07 Oct 2003
Posts: 224

PostPosted: Wed Sep 08, 2004 6:55 am    Post subject: Reply with quote

snowlander wrote:
Isn't there some way to make portage refuse to (un)emerge when packages overlap? Or at least stop and ask you what to do? In my case, it would have been a lot less mysterious to have been told during emerge world

"you are attempting to install modutils, which will overwrite files installed by module-init-tools-- are you sure you want to emerge modutils? y/n"

Right now, I can emerge module-init-tools and then modutils w/o any warning.

Yes, this is already implemented in portage through virtuals. For packages which supply the same kind of functionality portage records which one(s) you chose inside the file
Code:
/var/cache/edb/virtuals

For some virtuals you can have several packages simultaneously, e.g. for virtual/editor I have both app-editors/vim and app-editors/nano. For other virtuals it only makes sense to have one exclusive package as is the case with modutils.
In my virtuals file I have:
Code:
virtual/modutils    sys-apps/module-init-tools

This means that my system only uses the module-init-tools package to provide module management commands. If I try to emerge modutils instead I will not be allowed to since module-init-tools blocks modutils:
Code:
#emerge -pv modutils

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[blocks B     ] sys-apps/module-init-tools ("virtual/modutils" from pkg sys-apps/modutils-2.4.27)
[ebuild  N    ] sys-apps/modutils-2.4.27  -debug  229 kB

Total size of downloads: 229 kB

This occurs because of the following definition in the modutils ebuild:
Code:
DEPEND="!virtual/modutils"

! means block packages from being installed at the same time. This means that no two packages providing the virtual/modutils functionality can be installed at the same time. (For more info on DEPEND atoms see "man 5 ebuild")
As you can see this works nicely in portage and I have never had a problem like the one you have experienced.

In the case of coreutils vs. file/sh/textutils, no virtuals have been implemented and I am not sure why not. What also annoys me a lot is that while we have a virtuals/textbrowser category there is no virtuals/guibrowser. I use firefox and every now and then emerge wants to emerge mozilla (e.g. when emerging plugin packages) which is quite annoying. Of course I have masked mozilla in /etc/portage/package.mask but that really should be fixed. I guess I should go file a bug now :)
Back to top
View user's profile Send private message
DiskBreaker
Apprentice
Apprentice


Joined: 07 Oct 2003
Posts: 224

PostPosted: Wed Sep 08, 2004 7:30 am    Post subject: Reply with quote

revertex wrote:
i recently unmerged gzip (i know it' s stupid, but i guess gzip-x86 does the same) and there is nothing complaining about gzip be a critical package needed to emerge some packages.
luckily i do regular backups, but why is so easy to screw-up gentoo?

I really can't figure out how you came up with this idea... I am sure you know what gzip is used for and you sure must have noticed that there are quite a lot of .gz files in your /usr/portage/distfiles. Just as you can do other dangerous things like prune or depclean --deep with portage you can also completely unmerge any package, including gcc, glibc, python etc. With great power comes great responsibility... But I am not aware of any such protection for apt-get or rpm - am I missing something?

Actually your idea should not be too hard to implement since we already have a list of absolutely crucial packages in /usr/portage/profiles/default-ARCH/packages.build. Emerge could just check against this list whenever you are about to remove a package and warn you if it finds a match.

Oh and BTW, in the case of gzip a quick copy of the binary from the LiveCD should be enough to get you going again in almost no time.
Back to top
View user's profile Send private message
revertex
l33t
l33t


Joined: 23 Apr 2003
Posts: 806

PostPosted: Sat Sep 11, 2004 5:31 am    Post subject: Reply with quote

DiskBreaker, thank's for the tip, my backups are all dar files, dar static does a nice job (totally foolproof IMHO)

i unmerged gzip because portage show 2 versions of gzip, gzip and gzip-x86, that claims to be 25% faster.
(i know it deservers the "moron of the year" prize :oops: )

i've learned the hard way that gzip-x86 overwrite gzip, and it's not a separate package.

is there another way to protect these packages listed in /usr/portage/profiles/default-ARCH/packages.build, and maybe add some others?

i know /etc/portage/, but i don't know something like /etc/portage/dont-unmerge-these-packages.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC 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