Reset Debian to factory settings via command line, is it possible?
Hello,
I accidentally ran an apt-get autoremove because of my brothers on my PC (Debian 7) and they typed random stuff on it, anyway:
Most of my packages are gone, I no longer have a graphical interface (which I used a lot, not for work but more for the web, Skype, etc.).
I've managed to recover my most important files (Teamspeak server, Minecraft, and website).
I forgot to mention that I can't connect to Wi-Fi, even after editing /etc/network/interfaces or using iwconfig.
Anyway, I wanted to know if it was possible to reset my PC to zero via command line.. thank you in advance for your response.
I accidentally ran an apt-get autoremove because of my brothers on my PC (Debian 7) and they typed random stuff on it, anyway:
Most of my packages are gone, I no longer have a graphical interface (which I used a lot, not for work but more for the web, Skype, etc.).
I've managed to recover my most important files (Teamspeak server, Minecraft, and website).
I forgot to mention that I can't connect to Wi-Fi, even after editing /etc/network/interfaces or using iwconfig.
Anyway, I wanted to know if it was possible to reset my PC to zero via command line.. thank you in advance for your response.
1 réponse
No, the notion of "factory settings" does not make sense. In the Windows world, restoring factory settings means reinstalling Windows using a recovery partition.
I doubt there is such a partition under Linux because, in fact... well, it doesn't serve much purpose in practice. Let me explain.
- Under Linux, user documents (
- In the case of less mainstream distributions, like Debian, the assumption is that the person managing the machine knows how to either repair it or reinstall Debian while keeping /home. In this second approach, it involves
1) reinstalling Debian over the old Debian using the existing partitioning (through manual partitioning) without deleting the content of /home
2) declaring the users that were previously on the system (
In your case, if it's just two or three packages that are broken, the simplest solution, in my opinion, would be to repair. The third command below, for example, allows you to install KDE:
If, despite everything, the graphical mode does not start, please report back the result of:
And for Wi-Fi, don't try to configure it via the command line; that's no longer the "right" way to do it. It's better to use network-manager (nm); it's much simpler.
Good luck
I doubt there is such a partition under Linux because, in fact... well, it doesn't serve much purpose in practice. Let me explain.
- Under Linux, user documents (
/home) and the system (
/) are usually separated into two different partitions. Some mainstream distributions, like Ubuntu, take this into account and allow for reinstalling Ubuntu while keeping an existing
/home.
- In the case of less mainstream distributions, like Debian, the assumption is that the person managing the machine knows how to either repair it or reinstall Debian while keeping /home. In this second approach, it involves
1) reinstalling Debian over the old Debian using the existing partitioning (through manual partitioning) without deleting the content of /home
2) declaring the users that were previously on the system (
adduser toto) and reassigning their /home with the
chowncommand (example:
chown -R toto:toto /home/toto)
In your case, if it's just two or three packages that are broken, the simplest solution, in my opinion, would be to repair. The third command below, for example, allows you to install KDE:
aptitude update
aptitude safe-upgrade
aptitude install plasma-desktop plasma-nm xserver-xorg kdm
If, despite everything, the graphical mode does not start, please report back the result of:
lspci | grep -i vga
grep EE /var/log/Xorg.0.log
And for Wi-Fi, don't try to configure it via the command line; that's no longer the "right" way to do it. It's better to use network-manager (nm); it's much simpler.
Good luck