LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 12-31-2013, 11:04 AM   #1
moisespedro
Member
 
Registered: Nov 2013
Distribution: Slackware64-14.1
Posts: 561

Rep: Reputation: 58
How do you avoid system crashes/misbehavior?


I mean, like, preventing crashes/misbehavior before updates. Something like backup tools/scripts. I would say something like Windows's system restore. I am asking this because I am trying to use Slackware as my main desktop for the first time ever and, since I don't know much, I am afraid of breaking my system or having it acting weird (like this) after so many hours spent configuring it the way I want.
 
Old 12-31-2013, 01:00 PM   #2
mlslk31
Member
 
Registered: Mar 2013
Location: Florida, USA
Distribution: Slackware, FreeBSD
Posts: 97

Rep: Reputation: 28
For the "saved configuration" part of Windows System Restore, know that your system configuration files are saved mostly in /etc, sometimes in /usr/etc and /usr/local/etc as well depending on how you update. Per-user settings are stored in the home directories, usually in folders that start with a dot, such as .kde or .openoffice.org. These are shown by the `ls -a` command.

To backup, you can use tar, maybe use getfacl to back up ACLs separately (if you use ACLs). If you're using XFS as your filesystem, xfsdump works much better than tar.

If you have to absolutely wind everything back to a certain point, though, you might consider using a filesystem that supports snapshots, such as btrfs or NILFS2. Keep in mind that btrfs is a moving target and NILFS2 lacks fsck: A healthy backup regimen is helpful when using both filesystems. Both filesystems have learning curves associated with them, but at the end of the day, any filesystem you use will have a learning curve.

I use a 50/50 approach to updates. If everything is on fire after 4 of 12 updates, and each one is getting harder and requires more and more reading, I'm going to resort to backup. If everything is on fire after 9 of 12 updates, I'll probably update my way through it, apply updates 13-16 that always seem to be required, and do another backup once everything is *perfect*. Keep in mind that I update a bit using source code.
 
Old 12-31-2013, 02:32 PM   #3
moisespedro
Member
 
Registered: Nov 2013
Distribution: Slackware64-14.1
Posts: 561

Original Poster
Rep: Reputation: 58
Btrfs got me interested, can it be considered stable? Is it hard to use?
 
Old 12-31-2013, 03:07 PM   #4
mlslk31
Member
 
Registered: Mar 2013
Location: Florida, USA
Distribution: Slackware, FreeBSD
Posts: 97

Rep: Reputation: 28
Reports vary. On one hand, the btrfs developers classify the filesystem layout as stable, but the code always improves, and it's best to keep up using the latest kernel. On the other hand, at least SuSE was considering it for a default file system. In playing with it, I'm almost certain that you'd be better off using it in a redundant RAID configuration, so that btrfs can compare both sides of the mirror for data/checksum errors. [At last check, the fsck tool was not 100% foolproof.] IOW, it helps to have two or more hard drives in your PC, and let btrfs use a partition off of each one for a filesystem.

btrfs not much harder overall than some other filesystems, but it requires more reading up front--mostly for the "btrfs" command--and the handling of subvolumes means making more mistakes up front as well.

The Web site is here...

https://btrfs.wiki.kernel.org/index.php/Main_Page

...and you can start deciding whether it's just what you're seeking or simply too much work.

Note that, theoretically, you can do snapshots with LVM for any filesystem, and the RAID stuff I've described can be done using mdadm or LVM; so this stuff isn't exclusive to btrfs. However, LVM snapshots seem like a crude hack compared to btrfs snapshots...or at least my attempt was an exercise in frustration whose conclusion was "I did that much work and reading for that?!?"
 
Old 12-31-2013, 03:30 PM   #5
mlslk31
Member
 
Registered: Mar 2013
Location: Florida, USA
Distribution: Slackware, FreeBSD
Posts: 97

Rep: Reputation: 28
I forgot to add this...

No matter which way you go, just consider "Backups! Backups! Backups!" to be your mantra. A full install of Slackware should back up to a 16 MB USB stick, and those are anywhere from $7 to $14 in my local stores. If you have extra hard drives, you can reserve space for those "in-between" backups on much faster storage.

On Windows, System Restore can be used in any number of ways. I've even seen it used because it's faster than a virus scanner for undoing virus damage: The only problem is that it doesn't necessarily do so, maybe get rid of it, maybe hide it, maybe include a virus in the restore point. There are times when System Restore rollbacks can imperfect and introduce glitches, and it's not always fun to deal with Windows Registry issues. I hope that even on Windows, you practice "Backups! Backups! Backups!" for those situations that System Restore doesn't quite fix.
 
Old 12-31-2013, 04:01 PM   #6
moisespedro
Member
 
Registered: Nov 2013
Distribution: Slackware64-14.1
Posts: 561

Original Poster
Rep: Reputation: 58
Well, what I was looking foward was a simple way to revert changes (if they mess up something).
 
Old 12-31-2013, 04:50 PM   #7
nd7rmn8
Member
 
Registered: Jan 2013
Distribution: Arch
Posts: 50

Rep: Reputation: 11
This is probably overkill, but I used to have multiple boot options like this.

1. ubuntu with clonezilla installed for creating and unpacking backups
2. linux distro of the day...
3. same linux distro for testing and breaking...
4. another linux distro?
4. various linux livecd's... (forgot how I did this, but was able to with grub2, twas useful)

I would keep all data worth saving (music, documents) in a seperate partition. If it was worth backing up, it went on a flash drive.

Before I did much work with my linux distro of the day, I would back up that partition, and image it to the testing partition. I would try out what I wanted to do there, if it worked, great, if not, reboot, re-image and try again. I want to say it took only about 10-15 minutes to backup and image as such. This was a while ago, back when grub2 first came out, my memory isn't all that great.

Nowadays, I just take notes on how to do the install quickly and what programs i need to install afterwards. That text file goes on a flash drive, and when I really break stuff, I get more practice reinstalling.

In my personal opinion, the best way to learn how to work on something and fix it, is to break it, and then repair it. Backup all important docs and such, keep a few livecd's handy in case of emergencies, and go play.
 
Old 12-31-2013, 06:15 PM   #8
mlslk31
Member
 
Registered: Mar 2013
Location: Florida, USA
Distribution: Slackware, FreeBSD
Posts: 97

Rep: Reputation: 28
Goes back to my first reply. If by "they," you mean someone else, reference a backup of home directories. If by they, you mean "you," you can reference either a backup of /etc or a full backup. If you're just upgrading binary packages, you have to re-upgrade back to the older packages. Sometimes, you can get away with, say, upgrading prerequisite libraries in order to upgrade a program, then the program is a dud and has to be backleveled. Sometimes you have to re-upgrade back.

You can look for fancy backup tools, and perhaps somebody knows of one here. However, if it comes down to a data partition and I can make a disaster mistake at any time and need to go back, I deploy a NILFS2 partition and keep regular backups of it (for lack of fsck). It keeps checkpoints on a per-synchronous-write basis, which you can change to snapshots at any time with the chcp command. Old checkpoints are deleted over time. Any snapshot can be mounted read-only so I can get that last bit of correct data off of it. The main tools to learn are lscp, chcp, and rmcp, and they're fairly similar. NILFS2 got the EXPERIMENTAL tag removed from it recently in the kernel config, but your mileage may vary nonetheless.
 
Old 12-31-2013, 10:57 PM   #9
speck
Member
 
Registered: Nov 2001
Location: California
Distribution: Slackware 14.1
Posts: 271

Rep: Reputation: 54
Always keep an up to date backup of at least /etc and /home, but preferably everything if you have the space. After that, only download/build/install software in the package format that Slackware understands (like from Slackbuilds.org). If you do this then the chances are close to zero that a software installation/removal will trigger a need to reinstall Slackware. I can only remember one official package update that was built improperly, but it just installed some files into /tmp instead of the correct directory (I was a couple versions behind the current Slackware and Pat still released a fix within 24 hours).

When you make changes to configuration a file, just make a backup copy before editing the file.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] urxvt and vi (elvis) misbehavior STDOUBT Slackware 4 01-26-2013 06:51 PM
Boot up misbehavior after an update during fsck feeblebrain Linux - General 1 06-25-2011 09:17 PM
Xine Misbehavior in KDE4/13.0 Woodsman Slackware 12 09-13-2009 11:07 AM
How to avoid fsck if I turn off my embedded system suddenly??? webquinty Linux - Newbie 1 02-03-2009 10:00 AM
2 similar systems/ networking misbehavior MagusWizardo Linux - Networking 0 02-01-2005 04:57 PM


All times are GMT -5. The time now is 04:57 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration