Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

roll back to last good boot on linux?

Here you can discuss every aspect of Debian. Note: not for support requests!
Post Reply
Message
Author
tdave
Posts: 17
Joined: 2020-08-30 23:08

roll back to last good boot on linux?

#1 Post by tdave »

ok, I made a backup of my deb after removing the stuff I don't want but it dawned on me there should be a way I can build a a version of the windows feature that boots to the last good boot record. or something sort of like that. The reason I want this is twice I have booted to find out that something I uninstalled took my desktop with it.And apt was no help at all. Both times apt could not find xforce to reinstall. So i started looking for a way to repair from that problem and i thought what a shame it was I could not just reload from the last good boot like windows xp does. Then I wondered how many other people had thought of this. I actually don't want it in the boot area but would like to run it from a command. I may be totaly wrong but does debian keep a record of it's last boot. also where does apt keep a record of it's installed files. I think I would need a copy of those also. What are thoughts on this? Any ideals on the best way to start this project?

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: roll back to last good boot on linux?

#2 Post by stevepusser »

Look into Timeshift, already in the Debian repos, though you may have to boot into a Live Session in order to run a restore if your installed system is borked.
MX Linux packager and developer

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: roll back to last good boot on linux?

#3 Post by Head_on_a_Stick »

deadbang

reinob
Posts: 1189
Joined: 2014-06-30 11:42
Has thanked: 97 times
Been thanked: 47 times

Re: roll back to last good boot on linux?

#4 Post by reinob »

tdave wrote:something I uninstalled took my desktop with it
May I ask you how you do your package management?
Both apt and apt-get show you what they will do before they do it (if additional packages are to be added or removed, beyond those you have given in the command line).

Just curious..

tdave
Posts: 17
Joined: 2020-08-30 23:08

Re: roll back to last good boot on linux?

#5 Post by tdave »

i use apt to install and synaptic to uninstall. I also use synaptic to do stuff like fix broken packages. I do apt update. apt upgrade. apt-dist-upgrade then apt autoremove everytime I install or uninstall anything and both times I noticed autoremove removed a lot. I think it was installs i did. I am trying to learn and I use source a lot right now. theres a warning about make and check install but i still use them a lot any way and both times I had done installs that I had to download a lot of support files. which replaced a lot of files on my laptop. but this is a learning machine. I actually expect to mess it up a lot. Thank everyone for their responces.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: roll back to last good boot on linux?

#6 Post by Head_on_a_Stick »

tdave wrote:I noticed autoremove removed a lot
See http://forums.debian.net/viewtopic.php?t=104157

Your problem is PEBKAC in nature ;)
deadbang

cuckooflew
Posts: 677
Joined: 2018-05-10 19:34
Location: Some where out west
Been thanked: 1 time

Re: roll back to last good boot on linux?

#7 Post by cuckooflew »

https://www.startpage.com/do/dsearch?qu ... sion=1.3.0
Learn how to make a back up, stop comparing windows to linux, and stop trying to reinvent linux, They did think of this, and a long time before windows even existed. Make back ups,
that way you have something to restore your system when you break it.

On Debian where does apt keep a record of it's installed files
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!

tdave
Posts: 17
Joined: 2020-08-30 23:08

Re: roll back to last good boot on linux?

#8 Post by tdave »

They did think of this, and a long time before windows even existed.

sorry but windows was invented first. and I will never stop trying to turn linux into the os I want instead of the one you want it to be,

Theres a lot of good info in this post. will be doing a lot of reading about aptitude. sounds like the learning curve is as large as the linux os. I will download those programs and try them. They are on the right track but sounds like they do some type patition image. I noticed it said they had to have grub 2 installed. what I am working on would be a before and after install/change type of thing. I am sure linux has the ability just need to put it together. Thank you for your help, everyone.

tdave
Posts: 17
Joined: 2020-08-30 23:08

Re: roll back to last good boot on linux?

#9 Post by tdave »

bash, apt and apt-get all list installed apps and i can pipe them to a text file. writing linux scripts for begginers will get me started. Not really sure if anyone is interested in this but someone might be someday.

cuckooflew
Posts: 677
Joined: 2018-05-10 19:34
Location: Some where out west
Been thanked: 1 time

Re: roll back to last good boot on linux?

#10 Post by cuckooflew »

===== edited===
You posted while I was writing, and yes, now you are getting closer, everything you need to be able to have a reliable backup, and restore the system if and when needed is available , you just need to learn how to write the scripts ,use the tools, and configure you system to do the tasks you want.
====end edit===
by tdave »sorry but windows was invented first. and I will never stop trying to turn linux into the os I want instead of the one you want it to be,
Well, I did not word my statement quite like I should have,
Myself: They did think of this, and a long time before windows even existed. Make back ups,
I should have said, We did think of this, long before windows was invented, I was using Unix way before windows came along, Linux is also a Unix like OS, and we were making and using backups, and using them to restore a system when something went wrong,long before windows came along.
Bill Gates did not think of anything new, he got started using listings and data he found in garbage bins:
Gates said: "I'd skip out on athletics and go down to this computer center. We were moving ahead very rapidly: Basic, FORTRAN, LISP, PDP-10 machine language, digging out the operating system listings from the trash and studying those."
=====
by tdave>>So i started looking for a way to repair from that problem and i thought what a shame it was I could not just reload from the last good boot like windows xp does.
This is your own fault, you did not think to make a back up, before you started changing your system.
Then I wondered how many other people had thought of this.
Lot's of us, most experienced computer users, know to make backup, and use them to restore the system, like I said we were doing this even before windows existed, even home PC users like me, using Dos, I all ways made a backup of the current system, before using anything I downloaded from the internet. The servers I used for access were all Unix, windows did not yet exist.
tdave>Both times apt could not find xforce to reinstall.

What is "xforce", ? That is probably why apt can not find it, it is not in the Debian repositories, so unless you have the repository or site you downloaded it from, apt can not re-install it.
There are ways to setup your system so that it makes a good back up/copy of the system, or any part of it automatically, but as long as you keep trying to do this the way you did it on your MS windows , you are going to fail, you need to forget about everything you know how to do on windows, and learn how to to it using Linux tools, utilities, methods etc.
tdave> I can build a a version of the windows feature that boots to the last good boot record.
A version of some ms windows feature will not work on Linux.
tdave>>I will never stop trying to turn linux into the os I want instead of the one you want it to be,

I am not sure what you mean with that statement, What OS do you want ?
If you want a Unix like OS, Linux is ok, all though due to the fact that so many windows users put a lot of pressure on developers to try to make it more like windows, ( I mean big companies, $money, they all ways say the same, "If it was more like windows we would make donations and use it ), fortunately Linux still stays Unix like, but there are even better OS's, that are more like Unix then Linux is, EG: OpenBsd. The point is though, unless you are capable of building your own OS, then you need to be clear on What OS you want, and then use that OS, with Linux, we have many distros, (distributions), versions, perhaps Debian is not for you, and there are other Linux distros that are closer to what you want, What linux distro is most like Winodws XP
I don't know if you really want something like windows XP, you can replace that with any other OS or windows version, ...
One result: http://www.linuxandubuntu.com/home/top- ... windows-xp There are more results, I have never looked into this before, since I have no desire for a Linux distro with windows features, seems silly to me , I mean taking a good OS and start trying to wreck it with all sorts of so called "windows features", the windows features is what makes it such a failure, and generally they do not work. But if windows is what you like, that is fine, keep using it.
Any way, have a good day,.... and I do hope you learn how to like Linux, and understand why it can not be like ms windows, you know, "Unix is very user friendly, but it chooses who it is friendly with", the same could be said about linux. Ms windows is very user unfriendly. To me it was, and all ways will be unfriendly, when the first versions were released, I did give them a try, but it was and still just plain horrible, the worse thing about it is that one can not go in and fix anything, the closed source code is broken, and no way to repair it.
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!

cuckooflew
Posts: 677
Joined: 2018-05-10 19:34
Location: Some where out west
Been thanked: 1 time

Re: roll back to last good boot on linux?

#11 Post by cuckooflew »

A hint of sorts, something you should consider, your back up copy should be put on a storage device , something separate from the PC HD, eg: usb drive, or at least stick.
Why ? Because if you make a back up, or "roll back to last good boot", what ever you want to call it, if it is on your HD or the same partition that boots, and the system does not boot, How will it be able to restore anything, it has to be able to boot ? I suppose it could be a separate partition, that is bootable as well, but then you need to be using grub or another boot loader, and a multi-boot system. I don't use that my self, and my HD is 1 OS, my back up copy goes to another HD, that is bootable as well. The bios is set so that it will try the other HD, if the first does not boot, and if neither boots, it tries a usb device, if one is connected. The "back up" gets copied to both, the HD and a usb device,as soon as it is made. But any way , you do it any way you want.
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!

cuckooflew
Posts: 677
Joined: 2018-05-10 19:34
Location: Some where out west
Been thanked: 1 time

Re: roll back to last good boot on linux?

#12 Post by cuckooflew »

by tdave »Not really sure if anyone is interested in this but someone might be someday.
I don't know my self, but on several occasions I have suggested to beginners that they concentrate on learning how to make good backups first. Before just jumping into modifying the system, customizing , etc. So yes, it is something that is important to learn first.
Something else you might want to consider: Use Virtual Machines (VM) to do the experimenting, they are easy to take snapshots, and save that as a backup, you can "roll back" to the particular stage you choose, eg : most recent good boot.
You will see, if you browse some of the older posts on the forum, countless times when they come here asking what they can do, They did something, and don't really know what,"and now I don't have a DE, " or "Now it won't boot", and the response /solution is :
"use the back up you made " and they say "Oh no I didn't do that, I don't have one",
and Gnome says "Oh no something went wrong ", but the gnome will never tell you what went wrong, of course with a good back up, no matter , just use that.
I don't use this (below) my self , but some forum members do, http://forums.debian.net/viewtopic.php?f=10&t=141835
========================================
https://btrfs.wiki.kernel.org/index.php ... tal_Backup
=====================================
https://wiki.debian.org/Btrfs
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: roll back to last good boot on linux?

#13 Post by Deb-fan »

Bottomline breaking it comes with the territory for newish nixers, in fact i even view breakage as a good thing, if someone isnt messing their gnu/nix OS's up initially they probably aren't trying hard enough. Not going to try n reinvent the wheel, you've gotten good suggests and advice already, i personally really like rysnc for incremental backup/restore. Dang cool tool to learn about regardless. Fact is there's a dizzying array of recovery methods and tools for gnu/Nix ... Research, try them, settle on something you like. Also an unproven backup/restore plan IS NOT all that great a safety net. Actually get hands on to prove x-method works. No shortage of how-to's and tutes related to the topic.

Windows system restore in my experience was really crappy, always were much better tools and/or methods(often freeware or open source too) for the windows platform to do just about any-everything better than what MS shipped with. Many times MUCH better. Also clearly you need to research pkg management, apt is not just wiping out your desktop(s) ... YOU ARE. :) Need to learn, it's totally normal to experience wide spread borkage at first and to have very little understanding of why or what's going on. That's where google comes in. :)
Most powerful FREE tech-support tool on the planet * HERE. *

andre@home
Posts: 398
Joined: 2011-10-02 08:00

Re: roll back to last good boot on linux?

#14 Post by andre@home »

Try Foxclone. Look up its features.
After a testing period it has gone live a few months ago.
https://forums.linuxmint.com/viewtopic. ... 2#p1784922

So far I've tried to backup or clone several OS, e.g Bunsenlabs , a Debian based distro (on my desktop) and Windows 10.
Still need to test a backup and a clone of my Debian servers (a project that I started in 2011) with satisfaction, still in use following the official line of LTS.

You can also just clone 1 (or more) partition(s).

When it concerns supported partition types it is fast: Clone the Windows SSD to another similar SSD took less than 17 minutes.
I forgot to measure the time for Bunsenlabs which was on a classical HD.

Looking forward for the clone of a 2TB classical 4200rpm disk in my server. G4L (Ghost for Linux) needs ~6 hrs.

tdave
Posts: 17
Joined: 2020-08-30 23:08

Re: roll back to last good boot on linux?

#15 Post by tdave »

ok, I made a backup of my deb after removing the stuff I don't want
A hint of sorts, something you should consider, your back up copy should be put on a storage device
A good ideal.
Some of your debate seems to defeat itself.
, with Linux, we have many distros, (distributions), versions,

Now I wonder why that is. Is it maybe because someone or a lot of someones liked a version of linux but wanted it a little different then the person who first coded it?
if you beliefs held water, there would only be one version of linux. or maybe only unix? Also you need to take a look at the wheel. you will find the the only thing that is the same is it is round.
While I agree with a some of what you said I also don't think some of it was well thought out. Some things about windows are good things but once they figured out how to close it off they no longer needed to build it with the same care they did at the beginning. after all you had to except whatever they programmed. the last good boot feature saved me from total reloads a few times. but even at that I misspoke. it is the resume i am putting together. that was good ideal that windows just slapped together. done right it would be great idea. I left windows for two reasons 1. my laptop don't boot to efi and although windows 7 says it will do a legacy mbr. I could not get it to do it. 2. I was doing more command line then point and click and windows is not a good os for command line. given that choice linux is a better system. there are things I like about windows and things I like about linux. nothing in this world is perfect. I don't see why you seem so upset That I am trying to tweak the system a little. I notice that the people that had a good suggestion posted it and went on about there business the rest just ignore it. But an attack like you just made is always a defensive move. one that shows a lot of anger. Why would you be so defensive about me trying to learn how to adjust my install of linux and where does the anger come from? Oh well the point is moot since I am retired. and think about this the mousetrap was invented thousand of ears ago but the person builds a better mouse trap can still make millions from it.
My bad I spelt that wrong. [Xfce is a lightweight desktop environment for UNIX-like operating systems.]

Post Reply