No networking and no MATE

I have accidentally removed some packages from a debian system and now I have lost networking and MATE. Can I reinstall the removed packages from the install cd?

On Sat, Jan 02, 2016 at 07:00:57PM +1100, David Zuccaro wrote:
I have accidentally removed some packages from a debian system and now I have lost networking and MATE. Can I reinstall the removed packages from the install cd?
yes. you can either install packages individually with dpkg (which will be tedious and annoying) or you need to configure apt to look for packages on the cdrom. according to the debian web page, the easiest way to do that is: https://wiki.debian.org/SourcesList#CD-ROM CD-ROM If you'd rather use your CD-ROM for installing packages or updating your system automatically with APT, you can put it in your /etc/apt/sources.list. To do so, you can use the apt-cdrom program like this: # apt-cdrom add with the Debian CD-ROM in the drive. You can use -d for the directory of the CD-ROM mount point or add a non-CD mount point (i.e. a USB keydrive). dunno if the CD has to be mounted first or not. craig -- craig sanders <cas@taz.net.au>

On 02/01/16 19:29, Craig Sanders via luv-main wrote:
yes. you can either install packages individually with dpkg (which will be tedious and annoying) or you need to configure apt to look for packages on the cdrom. according to the debian web page, the easiest way to do that is: https://wiki.debian.org/SourcesList#CD-ROM CD-ROM If you'd rather use your CD-ROM for installing packages or updating your system automatically with APT, you can put it in your /etc/apt/sources.list. To do so, you can use the apt-cdrom program like this: # apt-cdrom add with the Debian CD-ROM in the drive. You can use -d for the directory of the CD-ROM mount point or add a non-CD mount point (i.e. a USB keydrive). dunno if the CD has to be mounted first or not. craig Thanks Craig,
No the question is which packages will give me networking back? apt says network-manager has no installation candidate.

On Sat, Jan 02, 2016 at 07:35:46PM +1100, David Zuccaro wrote:
No the question is which packages will give me networking back?
apt says network-manager has no installation candidate.
You need to find out which packages you removed. Try: grep remove /var/log/dpkg.log Or if you know the packages were removed on a certain date (e.g. 2015-12-30), you can get a list of just the package names by printing only the 4th field of the log file. awk '/^2015-12-30 ..:..:.. remove / {print $4}' /var/log/dpkg.log | sed -e 's/:all//' (the sed command strips ':all' from package names. apt-get copes with architecture specification like :amd64 or :i386 but barfs on :all) That list can be used directly with apt-get with: apt-get -d -u install $(awk '/^2015-12-30 ..:..:.. remove / {print $4}' /var/log/dpkg.log | sed -e 's/:all//') Run again without the '-d' (download-only) option when you are sure it's only going to install the stuff you want. Optionally add '| grep -Ev "pkg1|pkg2|pkg3..."' after the sed but before the close-parenthesis if you want to exclude particular packages from being re-installed. NOTE: if dpkg.log has been rotated since you removed the packages, try dpkg.log.1 or dpkg.log.2.gz etc. craig -- craig sanders <cas@taz.net.au>

On Sat, Jan 02, 2016 at 07:57:13PM +1100, Craig Sanders wrote:
Optionally add '| grep -Ev "pkg1|pkg2|pkg3..."' after the sed but before the close-parenthesis if you want to exclude particular packages from being re-installed.
personally, i'd exclude at least '^lib' so that lib packages are marked as auto-installed by apt rather than manually installed...when they are obsoleted by future upgrades they can then be removed automatically with 'apt-get --purge autoremove' craig -- craig sanders <cas@taz.net.au>

On 02/01/16 19:57, Craig Sanders via luv-main wrote:
On Sat, Jan 02, 2016 at 07:35:46PM +1100, David Zuccaro wrote:
No the question is which packages will give me networking back?
apt says network-manager has no installation candidate. You need to find out which packages you removed.
Try:
grep remove /var/log/dpkg.log
Or if you know the packages were removed on a certain date (e.g. 2015-12-30), you can get a list of just the package names by printing only the 4th field of the log file.
awk '/^2015-12-30 ..:..:.. remove / {print $4}' /var/log/dpkg.log | sed -e 's/:all//'
(the sed command strips ':all' from package names. apt-get copes with architecture specification like :amd64 or :i386 but barfs on :all)
That list can be used directly with apt-get with:
apt-get -d -u install $(awk '/^2015-12-30 ..:..:.. remove / {print $4}' /var/log/dpkg.log | sed -e 's/:all//')
Run again without the '-d' (download-only) option when you are sure it's only going to install the stuff you want.
Optionally add '| grep -Ev "pkg1|pkg2|pkg3..."' after the sed but before the close-parenthesis if you want to exclude particular packages from being re-installed.
NOTE: if dpkg.log has been rotated since you removed the packages, try dpkg.log.1 or dpkg.log.2.gz etc.
craig
Thanks Craig, None of the packages seem to be on the CD: https://www.dropbox.com/home/Camera%20Uploads?preview=2016-01-02+20.25.13.jp... I think I might have to back up and do a fresh install... Regards, David

On Sat, Jan 02, 2016 at 08:32:05PM +1100, David Zuccaro wrote:
None of the packages seem to be on the CD:
basic stuff like networking should be on the first install CD/DVD. extra stuff like MATE might be on later CDs, or you can install from the net once you've got networking running again. what kind of internet connection do you have? adsl? in that case, if your linux box manages the adsl connection, you'll need the pppoe package installed...or if your adsl modem handles the connection, just a dhcp client. for cable, again probably just a DHCP client, configured to use the NIC connected to your cable modem. depending on your network chipset, you may also need non-free firmware packages installed, e.g. most realtek NICs need the firmware-realtek package.
https://www.dropbox.com/home/Camera%20Uploads?preview=2016-01-02+20.25.13.jp...
what's the dropbox url for? i'm not going to sign up for an account with them just to view a jpeg. and why a jpeg? what's wrong with using text?
I think I might have to back up and do a fresh install...
leave that for a last resort. craig -- craig sanders <cas@taz.net.au>

Craig Sanders via luv-main <luv-main@luv.asn.au> writes:
On Sat, Jan 02, 2016 at 08:32:05PM +1100, David Zuccaro wrote:
None of the packages seem to be on the CD:
basic stuff like networking should be on the first install CD/DVD.
Is it possible there might be debs still in /var/cache/apt/archives too; from when the packages were first installed. Unfortunately I don't know what packages are missing, the drop box link doesn't work for me. -- Brian May <brian@linuxpenguins.xyz> https://linuxpenguins.xyz/brian/

On 02/01/16 20:50, Craig Sanders via luv-main wrote:
On Sat, Jan 02, 2016 at 08:32:05PM +1100, David Zuccaro wrote:
None of the packages seem to be on the CD: basic stuff like networking should be on the first install CD/DVD.
extra stuff like MATE might be on later CDs, or you can install from the net once you've got networking running again. makes sense what kind of internet connection do you have? optus cable adsl? in that case, if your linux box manages the adsl connection, you'll need the pppoe package installed...or if your adsl modem handles the connection, just a dhcp client.
for cable, again probably just a DHCP client, configured to use the NIC connected to your cable modem. I don't have an eth0 interface. depending on your network chipset, you may also need non-free firmware packages installed, e.g. most realtek NICs need the firmware-realtek package apt was unable to locate firmware-realtek or pppoe
Is there a test package I could install off the cd to make sure that part is working?
https://www.dropbox.com/home/Camera%20Uploads?preview=2016-01-02+20.25.13.jp... what's the dropbox url for? I took a photo of the output from apt.It said that network manager is not available. i'm not going to sign up for an account with them Do you need to? just to view a jpeg. and why a jpeg? what's wrong with using text? I can't cut and paste from the console of my desktop to my laptop where I am typing this message. I think I might have to back up and do a fresh install... leave that for a last resort.
craig
Regards, David

On Sat, Jan 02, 2016 at 09:12:04PM +1100, David Zuccaro wrote:
I don't have an eth0 interface.
do you have an /etc/network/interfaces file? if not, and you have a dhcp server (e.g. on your modem), try making one like this: auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp and then run 'ifup -a' if that doesn't work, you probably need the appropriate firmware for your NIC.
depending on your network chipset, you may also need non-free firmware packages installed, e.g. most realtek NICs need the firmware-realtek package
apt was unable to locate firmware-realtek or pppoe
pppoe should be on the install CD/DVD firmware-realtek won't be because it's non-free and there's no non-free stuff on the debian installer (which can make netinst a PITA if you don't know how to make a custom netinst with appropriate firmware). If you're posting here, you obviously have another machine with working net access - you'll have to download it manually from a debian mirror and transfer it via a USB stick or something, then install with dpkg. Are you sure you have a realtek nic? (run 'lspci | grep -i net'). If so, I can email a copy of it to you - the latest version (from sid) firmware-realtek_20151207-1_all.deb is 300KB.
Is there a test package I could install off the cd to make sure that part is working?
what happens when you run 'apt-get update' after configuring your sources.list to use the CD? it should read in the Packages files from the CD. if you still have network urls uncommented, it'll also try to download Packages lists from the net which will take ages for them to time out (so comment them out temporarily until you get networking back up)
i'm not going to sign up for an account with them Do you need to?
i presume so, your URL redirects to a login page. craig -- craig sanders <cas@taz.net.au>

On 02/01/16 21:29, Craig Sanders via luv-main wrote:
do you have an /etc/network/interfaces file?
if not, and you have a dhcp server (e.g. on your modem), try making one like this:
auto eth0 iface eth0 inet dhcp
Some how these 2 lines were erased from the interfaces file??? Not sure why.
and then run 'ifup -a' ok I got network access back and then I installed the necessary packages and now seem to be back where I started.
The reason I removed these packages is because I ran autoremove obsolete and didn't check what was going to be removed... Thanks once again Craig and Brian I owe you a beer!

On Sat, Jan 02, 2016 at 09:59:27PM +1100, David Zuccaro wrote:
Thanks once again Craig and Brian I owe you a beer!
i can't drink beer (i only just got a kidney, transplanted on Dec 7 - and don't want to put it at risk by re-acquiring an alcohol habit) but if you want to repay the favour, please add a blank line before your replies to quoted text. and another blank line before the next slab of quoting. and break up long paragraphs into multiple short paragraphs (where it makes sense to do so). it's really hard to read your replies because it's hard to tell where the quote ends and your reply starts. blank space is free and makes things much more readable. craig -- craig sanders <cas@taz.net.au>

On 02/01/16 22:39, Craig Sanders via luv-main wrote:
On Sat, Jan 02, 2016 at 09:59:27PM +1100, David Zuccaro wrote:
Thanks once again Craig and Brian I owe you a beer! i can't drink beer (i only just got a kidney, transplanted on Dec 7 - and don't want to put it at risk by re-acquiring an alcohol habit) but if you want to repay the favour, please add a blank line before your replies to quoted text. and another blank line before the next slab of quoting. and break up long paragraphs into multiple short paragraphs (where it makes sense to do so).
it's really hard to read your replies because it's hard to tell where the quote ends and your reply starts.
blank space is free and makes things much more readable.
craig
Sorry about the bad formatting; I usually do better with that. I'm using thunderbird and still trying to get my head around how it quotes. What you see is not what you get. Evolution had a plain text option which I find more straightforward to format. I might move back to that. Regards, David

On 02/01/16 22:51, David Zuccaro via luv-main wrote:
Sorry about the bad formatting; I usually do better with that. I'm using thunderbird and still trying to get my head around how it quotes. What you see is not what you get. Evolution had a plain text option which I find more straightforward to format. I might move back to that.
You can also set Thunderbird to use plain text. Cheers, Andrew
participants (4)
-
Andrew Pam
-
Brian May
-
Craig Sanders
-
David Zuccaro