[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: kind souls around? (\rm -rf '/' - yikes!) - not yet



mfabache@yahoo.com writes:

> have one small problem left (getting an illegal seek (linux error 29))
>
> Is there a quick/easy way to reload the deb packages (base/woody) using
> apt-get or deselect, eh?
>

What do you mean, reload? Download all the debs again or reinstall?

To reinstall, I've come across several variants, which I all didn't test
myself though, since I never had to do a complete reinstall. Examples:

COLUMNS=200 dpkg -l   | awk '/^ii/ {print $2}'             | xargs apt-get -y --reinstall install
dpkg --get-selections | awk '$2 == "install" { print $1 }' | xargs apt-get -y --reinstall install

Those differ basically in the way the installed packages are gathered, in
the first case with dpgl -l, in the second via get-selections. The second
is acutally safer, I guess.

To check them, just leave the xargs part away which does the actual install,
just to see whether the proper packages are selected.

Also, look at the apt-get options. 'y' means 'yes to all questions', which
is meant to silence apt-get about questions it might have. Decide yourself
whether you want that or not.

You could also break that up in doing all the downloads first, and then the
install:

dpkg --get-selections | awk '$2 == "install" { print $1 }' > packlist   # gather packs
cat packlist | xargs apt-get -dy --reinstall install                    # download
cat packlist | xargs apt-get -y  --reinstall install                    # install

Add an 'u' option to show upgraded packages.

As said, no guarantee from my side that this won't break something, since I
never had to do this myself. All the above recipes make sense, but you'll
never know. Maybe somebody else has additional remarks to make.

As a sidenote, you could also try to track down why that 'illegal seek'
actually happens.

Good luck, Bruno.



Reply to: