LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Reinstall Linuxmint Rebecca 17.1 without losing personal data, when there is no bckup (https://www.linuxquestions.org/questions/linux-newbie-8/reinstall-linuxmint-rebecca-17-1-without-losing-personal-data-when-there-is-no-bckup-4175535691/)

Heliodorusx 03-03-2015 07:07 PM

Reinstall Linuxmint Rebecca 17.1 without losing personal data, when there is no bckup
 
Hi,
I'm very new at this. This is probably to long. This is the first time I've posted a question in a forum like this. Don't know yet how to state this kind of problem concisely.
-The problem: my Linuxmint Rebecca 17.1 won't boot up. I believe I deleted an essential file from the OS and need to reinstall Rebecca. But, here's the big thing I feel desperate about. I need to do this (reinstall) without destroying (overwriting, erasing or such) all my data, and thus losing all my research and writing project files, audios and so on, my life.
-From my newbie view, very incomplete view,, here's what I think I was doing just before the catastrophe.
-I got a dialog box telling me I had twenty packages that were broken.
-I tried several things involving the update manager, which I can't remember now, to resolve the broken package thing.
-I kept getting a dialog box asking me, in effect, if I wanted to remove these broken packages, which I thought I should probably do.
However, one of these broken packages/files was labeled as an 'essential file.' And, the dialog box asked, in effect: "Are you sure you want to remove this essential file?"
Well no, of course, I didn't want to remove an essential file, so I spent an hour or so trying to get that 'essential file' off that broken package list. I couldn't find a way to do it.
Finally, super frustrated, I went ahead and removed all the broken packages, and along with those, the 'essential' file. (this was the mistake, a huge mistake on my part).
-And ta da. No more Rebecca. I exhausted every approach I know to reboot, but it wasn't going to happen. Quess the 'essential' file I removed was 'essential.' :-).
-I put Rebecca on a USB. Finally got the BIOS to boot up the Rebecca USB. So, I can run Rebecca from the USB. It looks like I could install her again on my desktop from this point. But, I don't dare, without knowing how to do so without further shooting myself in the foot.
Any direction? I would be so grateful if there was. Thanks

Miati 03-03-2015 07:27 PM

I don't know what you messed up, but it is very likely your files are safe

You say you can live boot. Go into your live boot, go into your hard drive (Below the bookmarks on the file manager. I think they should be under devices - it should be the one with the largest size) and copy all the files you need onto a backup source.



This is why it is often good to have a separate / and /home partitions, when you mess up horribly (it happens to everyone at the start) it's easier to fix with less risk of data loss. Still good to have a backup though.

Once you have this resolved, I would suggest a backup plan that is automated.

__

As a alternate you can boot normally and use the cli to backup (you say you are new but I'll lay out a cli approach - if you are unsure, go with the gui mode instead)

Boot normally until it gets to various errors.
  • Hit <ctrl><alt>F2
  • Login
  • Plug in a hard drive / flash drive
  • mount the device
  • copy files you need to the device
  • umount, reboot into live mode and reinstall.

Heliodorusx 03-03-2015 09:06 PM

After utilizing your suggestions
 
Thank you Miati. It all looks really good. I'm on it right now, this evening. I'll let you know how it goes. I think after utilizing your suggestions I will be able to flag this solved.

Miati 03-03-2015 09:20 PM

Also, you may wish to copy the contents of ~/.* files. (~ == your home directory, * means any or all, ~/.* means any files starting with . in your home directory)
These are your user config files. For example, firefox config is located in ~/.mozilla

This may save you some time from reconfiguring everything.
You will need to reinstall any extra programs, but they should already be setup if the config is copied over correctly.

Since it's the same OS version, there shouldn't be any issues.

Heliodorusx 03-05-2015 08:31 PM

Getting Permission on Linuxmint Rebecca - copying config files
 
Miati,
I ran into an obstacle yesterday with my attempt to copy backup files to an external hard drive. The system wouldn’t let me copy my files anywhere. It tells me I don't have permission(s). For sometime, to no avail, I looked for a way to get permission(s) (or administrator rights, or superuser status, the ability to work from 'root'? I'm not sure I understand what all those terms mean or if they're equivalent. I know they're important and I'd like know how to acquire them.

On the upside, after your first post (in response to mine) I was able to get a cd/dvd version of Rebecca running, and found the location of my linux related files, noted they were there, and intact, on the internal hard drive. I was relieved. Though, I couldn't copy them to my external hard drive. So, I have to overcome that obstacle.

Thank you for your suggestion on my config files. I'd started fretting about the 'reinstall and configure (again) job ahead of me.' I think I understand the concept of copying the contents of ~/.* files, my user config files. I'm not sure I could do it right now without more instruction. Though, I would very much wish to do that. It would save me a ton of time. Before I can jump into that I think I need to get past this permissions problem.

I did check some linuxmint forums on this permissions problem. I found some stuff. Tried to make it work, but could not find the same path to the solution here on my linux configuration, indicated in the linuxmint forum post I read. What do you think? I have a feeling this problem may be one that is already solved. But, I haven't been able to find it yet. If you're aware of such, can you or anyone else who knows where this problem's been <SOLVED> point me to it?

A final question. I want to set up a self-imposed, but formal curriculum for learning Linux. Can you suggest a direction or material?

I wrote a short few paragraphs on me personally, and my present state of affairs,thinking that it might offer a sense of me that would help in assisting me. But, in the end I decided against it and redacted it. Maybe I'll figure out how to do something like that appropriately in the future.

Miati 03-05-2015 08:56 PM

I am presuming you live booted and that's where you ran into permission issues.

In the file manager (for linux mint, this is nemo) you can right click and choose open as root.
This should give you permissions to roam. Be careful, you have the right to delete files here.

Remember to copy a file somewhere you must have permissions to read from the source and permission to write to the destination.

Make sure both are there.
If you can open the files you discovered you have read permissions.
When you mount the external hard drive you must be able to write to it.
If you have the nemo file manager as root (as instructed above) you should be able to change these permissions.
You could also open as root one directory from your source files and one in the destination - overriding all permissions.
I don't have a lot of experience with that since I generally just use cli.

In cli:

Code:

su # switch user to root
mount /dev/sdx /mnt # mount hard drive. You can identify which hdd is yours using lsblk (look for a matching size)
# If you automount it (it'll do that in the gui, look for /media/username/somethingoranother)
mkdir /mnt/backup # create backup directory in the HDD
cp files /home/yourusername/.* otherfiles /mnt/backup # copy various files to /mnt/backup


Heliodorusx 03-06-2015 12:41 AM

Miati,
I first wrote what's below the asterisks. Later this evening I'm writing this above the asterisks. I wanted to let you know that I decided to try the following idea you gave me above: "You could also open as root one directory from your source files and one in the destination - overriding all permissions." I tried it, and it worked without a hitch, very smooth. I was pleased. Files are still copying over to the external hard drive. After that I'm going to see if I can get through backing up all the config files, before re-installing Linuxmint.
I'm going to see what I can learn (figure out the meaning of) the cli code you posted at the end of your last post. I welcome any germane input/help anytime, about any post. I want to learn as much about as many facets of Linux as I can.

*******
That's right, after live booting, permissions problem.

I think that cli is so cool. That's really what I want to get good at. I'd like to try and solve this permissions problem with cli right of the bat. It would be a matter of me backing up here for a few hours or days to get my feet wet and learn some of this code, esp. the code you wrote out for me in you last post. [Which, BTW, I so appreciate, since it's the direction I want to go], --learning the language/code. [I just think, it offers the user a lot more speed and flexibility. I'm willing to work hard to acquire cli capability]. [I know it will take a lot of commitment and time]. Even though it's a little over my head, I think I'm going to make myself take the time to work through what learning curve I have to in order to fix this permissions problem using cli. Then if it gets to ugly for me, I'll resign myself to using the GUI, for the time being.

In case it goes that way, in the spirit of preparing myself, I'd be obliged if you would help me clarify any of the following:
What does 'roam' mean?
By source, you mean a file, say, on my internal hard drive with all my personal data?
And by destination, you mean a file I need to create on my external hard drive into which I will copy backup the source content? --I'm not certain which of the two or if both needed permission. I'll check that out.

Heliodorusx 03-06-2015 03:48 PM

Success at backup
 
Miati,

Using the (open as/at? root) both source and destination, I was able to copy/backed up to destination 106 gig of the total 120 gig of files on internal hard drive connected to my Linux mint Rebecca set up. Copied/backed up everything that was in the home file (all my personal data files, I assume). A little worried about the 12 gig that would not copy over.

I think the next thing I need/want to do, before reinstalling Rebecca, is:
1. to discover if possible whether or not the 13 gig Rebecca would not let me copy over is something to worry about.
2. backup the config files you told me I could save if I wished for my previous system configurations, so I won't have to reconfigure everything again.
3. I want to get to learning cli ASAP I wanted to use this fiasco to practice it as I said earlier, til it turned out that the opening the source and destination files was so easy. Is this forum an appropriate place to get some help with that? Or, have I messed up some way?

If this forum isn't the right place or if I'm asking to much (or writing to much), is there some other way to get some coaching on learning cli? I've appreciated you help Miati. Thank you. I'm going to tag this <SOLVED> I guess. Let me know if can help me with the config files. Maybe I should start a new thread on this.

Miati 03-06-2015 07:15 PM

Quote:

I want to get to learning cli ASAP I wanted to use this fiasco to practice it as I said earlier, til it turned out that the opening the source and destination files was so easy. Is this forum an appropriate place to get some help with that? Or, have I messed up some way?
You're fine. The best time to learn the command line isn't when you have critical files on the line / loss of your primary computer though.
But that is IMO (I provided instructions on doing cli as well)

Here's some useful links to this:
This is a good intro to the command line (download the pdf) -> http://en.flossmanuals.net/command-line/index/
This contains a abundant amount of information compiled by another user -> http://www.linuxquestions.org/questi...llected-35954/
and was (still is) a favorite of mine when I was new to linux -> http://www.commandlinefu.com/command.../sort-by-votes

Quote:

1. to discover if possible whether or not the 13 gig Rebecca would not let me copy over is something to worry about.
You filled up 106 gigs and it marked it as full even though it says 120g? You must have a lot of personal data - remember, backing up programs is useless since you can just re-download them unless they're some kind of speciality file. Most backup programs in linux just make lists of programs to reinstall later.
Don't worry though about the 13g. You likely have it formatted as ext4 which is a journalling filesystem and will require roughly 10 of the space to limit fragmentation and prevent filesystem corruption.

Quote:

backup the config files you told me I could save if I wished for my previous system configurations, so I won't have to reconfigure everything again.
So there is two main sources of config files. One is located in /etc/ and contains system config. If you have never edited any of them, there is no need to back them up.
The other is user config files. As I said before, these are located in your home directory prefixed with .
This means hidden directory. You can view hidden files/directories in the gui by pushing <Ctrl>h in the nemo file manager
So if you wanted to backup firefox, you would copy over .mozilla located in ~/.mozilla. If your username is Heliodorusx, ~/ equals /home/Heliodorusx/

Copy them all though. No need to be picky right now.

Quote:

is there some other way to get some coaching on learning cli?
The links I gave you will take quite awhile to read through. That being said, reading doesn't really let you learn the system in practical terms (theory vs. practice)
So once you have your reinstalled system, take time and practice backing up, copying files, writing bash syntax's etc in the cli.
Then - if you have issues create new threads related to those issues (after searching online on a search engine first!)

Quote:

If this forum isn't the right place or if I'm asking to much (or writing to much)
Asking how to learn bash / linux / terminal is one of the most (if not the most) commonly asked question. People with much greater expertise and time have written many, many guides on various methods of learning it.
The nice thing is as linux is a community source (rather then tech support / client you'll see in proprietary OS) pretty much every question you could possibly have.. has already been answered and likely has a guide written for it. That will remain true for a long time as you get better and more used to it.

Heliodorusx 03-08-2015 06:00 PM

Miati,

I just now, this afternoon, saw your last post on this thread. I apologize for the delay. I was out of pocket Friday and Saturday.

Everything, my system, has been restored.

I understood enough about your 'heads up' on saving my config. Files I think I was able to copy most of them back. And it worked. So far anyway. I'll see what happens as I reinstall other programs. But, my Thunderbird email client and LibreWriter worked just like nothing had changed, because, due to being able to put the config. files back, they hadn't.

I haven't been able to work with the cli code you kindly offered yet, --starting with cli for moving files. I hope to get to some of it today. Nevertheless I did learn something about permissions and 'opening things as Root,'

Thanks a million for the links. Finding good resources for learning can take some time. You saved me a bunch of time, thanks.

I solved the huge gigabyte fupa. I deleted a bunch of stuff that was redundant backup to create the needed space. I am noticing that Rebecca is sticking often, and so something needs to be changed. Though right now I don't know what it is.

I need to confirm which config. Got copied back into the system. I think if I missed any config. Files it would have been the user files. I'll check. I'll make sure they are all copied over and get picky later.

Thank you for the direction: I'm going to take some time practicing backing up, copying files, writing bash syntax etc in cli. Using the code you gave me.

After my own best efforts at searching for the answers online first, where is it appropriate to create new threads related to them? I anticipate a lot of them being about cli.

Thanks for taking the time to help me. I am much obliged. I've learned a lot. As to your last comment, then, all I need to do is get good at searching for the answers I need within the Linux community. Yes? Peace, from an old baby boomer. I'm an old hippie I guess. I have sixteen grand children and still wear tie die once in awhile. But, my hair's all gone. No more shoulder length hair. Some humor in the midst of serious work. Thanks Miati.


All times are GMT -5. The time now is 06:31 PM.