Page 1 of 1
(SOLVED) Slapt-get --reinstall question
Posted: 16. Dec 2011, 13:27
by linus72
I need to reinstall all packages as I accidently deleted parts of /usr (doah!)
but can't figure out how to get slapt-get to reinstall all packages from a to xap, etc
thanks for any help!
Re: Slapt-get --reinstall question
Posted: 16. Dec 2011, 14:31
by gapan
Code: Select all
for i in `ls /var/log/packages/|sed "s/\(.*\)-\(.*\)-\(.*\)-\(.*\)/\1/"`; do slapt-get -i --reinstall $i; done
edit: fixed -u to -i
Re: Slapt-get --reinstall question
Posted: 16. Dec 2011, 15:04
by linus72
Ok that looks good but it didnt work
it just keeps updating
I removed the -u but it still doesn't work...
Re: Slapt-get --reinstall question
Posted: 16. Dec 2011, 16:56
by gapan
It keeps updating what? Packages? Isn't that what you wanted?
Re: Slapt-get --reinstall question
Posted: 16. Dec 2011, 18:08
by linus72
no, it keeps updating the package lists infinitum, but no packages are downloaded or upgraded..
Re: Slapt-get --reinstall question
Posted: 16. Dec 2011, 18:25
by Shador
Re: Slapt-get --reinstall question
Posted: 16. Dec 2011, 18:29
by gapan
Ouch. Sorry, my bad, I mistyped there. Change "-u" to "-i".
Re: Slapt-get --reinstall question
Posted: 16. Dec 2011, 21:11
by linus72
Ok
thanks Gapan and Shador!
it all worked out and I have two very helpful scripts!
thanks!
Re: Slapt-get --reinstall question
Posted: 17. Dec 2011, 10:52
by laprjns
linus72 wrote:...it all worked out and I have two very helpful scripts!
I learned the hard way that after executing the reinstall-everything script you should do a lilo -v before reboot. I got a "Kernel setup stack overlaps lilo second stage" error and couldn't boot into Salix.
Re: Slapt-get --reinstall question
Posted: 17. Dec 2011, 22:30
by Shador
laprjns wrote:linus72 wrote:...it all worked out and I have two very helpful scripts!
I learned the hard way that after executing the reinstall-everything script you should do a lilo -v before reboot. I got a "Kernel setup stack overlaps lilo second stage" error and couldn't boot into Salix.
Never hit such a problem myself as I'm using grub2 on my systems. But yes this can happen as the kernel package is reinstalled also, i.e. the kernel image /boot/vmlinuz-* is recreated and the fs can put the new file on different blocks (actually it's free to do so even when files are not modified at all, but most common fs as of now don't unless you e.g. use defragmentation of course). The usage of blocklists is one major downside lilo has.
Anyway, I added a note mentioning this problem to the wiki.