PDA

View Full Version : [ubuntu] 14.04,2 LiveCD Will Repair But Not Replace Existing Ubuntu 14.94 Install



oldefoxx
July 9th, 2015, 09:15 AM
I had Ubuntu 14.04 32-bit install on my /dev/sda1 partition, which worked fine. But there is a movement
underway to get off 32-bit towards 64-bit. And in recognition of this move, I decided to install 14.04.2
64-bit to that partition, but keep my account on /dev/sda1 intact

You may already know rhat all user accounts and user files are kept in one folder named /home. In
/home, you find a usernamefolder for each account. you get here, which you "see" as home from the
File Manager as "Home Fiolder", you find under that folder your subfolders of Desktop, Documents,
Downloads, Music, Pictures, Videos, and any that the user may have added. All this is what you want
to have saved.

And you have to respect that under Linux, leaving the /home folder and its contents alone leaves all
user accounts intact.

If I were repairing my existing Ubuntu install by just reinstalling from a LiveCD, I could just reach the
point where I decide how I want the install to go, and pick the last choice, where I do something else.
Ater that, I pick the partition I want to install to, Then I click on change, under which I change Do not use
this partition to match how the partition is already formatted (if ext4, pick ext4 again), make it the primary
partition (/), but do not choose to reformat it. Reformatting wipes out everything on there now. By not
being reformatted, the /home folder and contents will be left intact.

Then continue the install process and ignore warnings about the lack of reformatting. You
might also want to choose which drive becomes the boot drive and gets its mbr (Master Boot Record)
uppdated with a Grub2 replacement for whatever boot manager is there now.

When asked, I then proceed to give my name, the Network name, my same userid, password, and so
on. Everything that needs to go there will then be a part of the install, and it will not wipe out

The installer adds the userid picked to /home if it is not already there, and may add some hidden (starts
with a period) folders and files in the /home tree as part of the efforts to configure the OS to work as
needed on this machine. But there is apparently an increased effort to use existing config files if found
there.

In fact, with the Ubuntu 14.04.2 LiveCD, there is an effort to recover anything that had been
incorporated inro the previous install. A good thing if you are putting the same OS back, but bad if the
new OS is different,

In going from a 32-bit install to a 64-bit reinstall, I saw some of the badness:

First, the LiveCD took forever to copy files and the progress bar was full over the whole time. The
slideshow did not start, and It all looked frozen and seemed to take forever. I just had to wait it out.

Second, the WiFi capability did not get picked up during the install, and was still missing later. I only
had rhe Ethernet option for connecting to the internet.

Third, after trying to restore packages that had been installed to a 32-bit OS, the Installer reported that
some packages did not install properly and would have to be manually reinstalled. It did not say how
many packages were involved, which packages these were, or why they failed. You knew you had work
ahead, but little idea of where to start.

After some thought on the matter, I realized I had little choice but to wipe out all trace of both the 32bit
and 64bit installs on sda1 and do it again. To do this, I booted to a different partition, mounted sda1
from there, and did the following from a terminal:

(1) used "sudo -s" to become super-user.
(2) Used "cd /media/[username]/sda1, where in my case [username] was "oldefoxx".
(3) Did "dir" to see what I had to deal with.
(4) Used "rm -R " followed by a specific folder name, I wiped it all out, leaving only home behind.
Some take quite awhile to remove. Depending on the order you follow, you will have a string
going down your terminal string like this:
bin boot cdrom dev etc home lib lib64 media mnt opt proc root run sbin
srv sys tmp usr var initrd.img initrd.img.old vlinuz vlinuz.old
# rm -R b* ## get rid of bin and boot with one command
# rm -R c* ## get rid of cdrom
# rm -R d* ## get rid of dev
# rm -R e* ## get rid of etc
# rm -R i* ## get rid of the initrd* files
# rm -R l* ## get rid of lib and lib64
# rm -R m* ## get of media and mnt
# rm -R o* ## get rid of opt
# rm -R p* ## get rid of proc
# rm -R r* ## get rid of root and run
# rm -R s* ## get rid of sbin srv sys
# rm -R t* ## get rid of tmp
# rm -R u* ## get rid of usr
# rm -R v* ## get rid of var and vmlinuz* files

The leading # just indicate that as super-user, your normal $ has been replaced to signify your new
status. It also happens to serve as a way to turn a line into a comment, so leave the # off if you do a
copy-and-paste to the terminal window. But it is probably easier to use an up-arrow to bring back the
last command, then left-arrow to move over that line and replace the one character before the "*".

We don't use rm -R h*, so home and our user accounts are left. We especially don't do rm -R / or
rm -R /b* or make any use of "/" as rhis would direct our remove operations against the partition we are
booting from, not from sda1 or whatever partition we originally mounted and did a
cd /media/[username]/ and dir to find, then a final cd to get into.

Then we go wipe the hidden config files by doing this:
# nautilus

When the file manager comes up, we can use it to look for Hidden Folders and Files under our Home
Folder. Remember, these all start with a period so are all hidden from normal view. We go to the
Check mark at the upper right and turn on the option to see hidden folders and files, then we delete the
ones that likely have configuration control.

That done, we can close the file manager, get back to our terminal window, insert our LiveCD, and type
restart now, and away we go, into a new install but with our /home intact on sda1 (or other designated
partition) that we intend to do the install to. This is how I dealt with the problem. There are two other
potential ways, one is to simply use cp -rfp /home to some place for safekeeping and do a fresh install
by indicating you do want to reformat, then copying it back after the install.

And the other way is to handle the whole thing from a LiveCD, which is trickier, because LiveCD sets
itself up as a temporary user (ubuntu), allows you to open a terminal window and become super-user by
simply typing sudo -s (no password required), but I'm not sure how you go about mounting a partition at
that point. I'm sure it can be done, but unsure of how.

Sorry about the title typo, but when small and light, a 9 and 0 look much alike, so I missed the 14.94 in
place of the 14,04 that I intended Can't change it from here.

TheFu
July 9th, 2015, 12:32 PM
Was there a question? Didn't see one.

You could use rm -r [a-g]* [i-z]* - but I'd just umount /home and format the disk - much quicker.

Don't know what a capital -R does. Don't think that is an option for the rm program. Well - guess it is - just never seen it used.

The fact that anything happens to be on /home has ZERO to do with logins and passwords. File storage connections to users and groups is purely the uid/gid numbers - nothing more. If those match from the passwd file (or from an LDAP directory configured), then the file/directory ownership is set. Nothing more is needed.

oldfred
July 9th, 2015, 04:30 PM
I cannot recommand anyone use rm comamnds.
And the -r modifier is recursion or everything at lower levels.

Much easier just to backup /home, perhaps some settings in /etc, list of installed apps. Those backups should be what you are doing anyway.
Then just do a clean install.

With new large hard drives, you can install multiple versions of Ubuntu easily. And have separate /home or /mnt/data partition(s) for all your data. Then / (root) partition is just system.

oldefoxx
July 13th, 2015, 07:22 PM
rm is what you have. In the GUI, you just Move to Trash. At the command level, it's rm or nothing. The difference is, that some GUIs let you go through the trash in case you change your mind later. rm is final, no going back. Now you could manually do somerthing like Trash. Say you set up a folder named junk. Then you just do mv [item] junk. You change your mind, it should still be there. and to clean house later, you do a rm -r junk. Then you do another mkdir junk and start over. Of
course you can mix and match manual and GUI actions together, but at some point you just need to let the trash and junk go.

The -r and -R are interchangeable with some commands like rm, and for others, it has to be an -R. I just use -R when uncertain as to what a specific command demands. You can always try --help with the command, although some will take -h as well, or you can ask the man pages and get a pretty thorough briefing on
hpw a specific command can be used. Like man rm, man cp, or man mv. But those are extra steps, and you have to then go through a few screens of data, or
decide to quit (press q key, or maybe Ctrl+C, Ctrl+D, or Ctrl+X). Otherwise, the space bar jumps you to the next screen of data, while the Enter key moves it down one line at a time.

I'm not trying to show off any knowlege with comments like this. It's just that lots of people have not cracked a book on bash commands, so it is all new to them. Wasn't that many years back when you felt you had a real choice among the several command shells that were out there, and in the Unix world you may still find that to be true. But with modern distros of Linux, the focus has pretty much locked in on bash. Which is good, because it is a very capable command interpreter and by having just the one, just about every post or article on what to do at the terminal command like applies ready-made. Life is simpler.

oldefoxx
July 17th, 2015, 03:42 PM
You could use rm -r [a-g]* [i-z]* - but I'd just umount /home and format the disk - much quicker.

If /home is on its own partition or drive, then umount may seem adequate. But an install or reinstall will create a /home folder and a /home/userid subfolder somewhere,( on the / (root) partition or drive if not specifically specified otherwise), and now you have two /home and two /home/userid settings to resolve, the new ones and the old ones. I don't see that as a net gain there. What you have to do is somehow merge them together, but should you copy the new ones over the old ones first, or just copy the old ones over the new ones?
If you leave /home/userid as it was, the new install attempts to sort all this out for you because to it, /home/userid is just the one instance.

I do like your method of cutting down on all the rm -r commands though. Got me into using google to search for anything that had "bash square brackets" in it. Lots of helpful links found, and one of them suggested using a terminal and typing in "man 7 glob" for further info.

I've never seen a man command used that way. With a number between it and the thing you were trying to get information on. I take it that the "7" means version 7 of glob, which in turn suggest that different versions have slightly different characteristics. Something to remember.

Anyway, man 7 glob showed some details of using character and range pattern matching approaches, and I found a simplification of what you did, which is replace "[a-g]* [i-z]*" with just "[!h]*". You specified every beginning lowecase letter except "h", and mine specifies every lower case, UPPER case, or leading digit character EXCEPT "h". In this case, with just a few folders involved, we get the same results.

I haven't actually tried it yet, as far as the "rm" command is concerned, but I tried it with "ls", or list instead of remove. What is interesting about "ls /[h]*" or "dir /[h]*" is that you might want to see if /home exists, and it does not show you /home but rather the contents of home, which would be userid. You want to see /home, you add a switch "-d" which is shorthand for directory, the other name for folder. Then "ls -d /[h]*" shows you /home.

The question is, does "rm" behave the same way? Is it like "ls", in that it skips into the matching folder, or does it begin removing with the matching folder? Experience suggests the latter, but let's see if we can find out for sure. We have no folders as the root level that start with "j", so I am going to add a "/junk" folder, then I am going to create a subfolder named "trash" in it.

dir -d /
/
dir /
bin dev initrd.img lib64 mnt root srv usr vmlinuz.old
boot etc initrd.img.old lost+found opt run sys var
cdrom home lib media proc sbin tmp vmlinuz
sudo mkdir /junk
[sudo] password:
dir /
bin dev initrd.img lib media proc sbin tmp vmlinuz
boot etc initrd.img.old lib64 mnt root srv usr vmlinuz.old
cdrom home junk lost+found opt run sys var
sudo mkdir /junk/trash
dir /junk
trash


Now we see what happens when we do "sudo rm -r /[j]*". Does it wipe out /junk? Or does it just wipe out /junk/trash?


sudo rm -r /[j]*
dir /
bin dev initrd.img lib64 mnt root srv usr vmlinuz.old
boot etc initrd.img.old lost+found opt run sys var
cdrom home lib media proc sbin tmp vmlinuz

It wiped out the parent folder and everything in it. If you want to leave the parent folder behind, you could do it this way:


sudo rm -r /[j]*/*
dir /
bin dev initrd.img lib media proc sbin tmp vmlinuz
boot etc initrd.img.old lib64 mnt root srv usr vmlinuz.old
cdrom home junk lost+found opt run sys var
sudo mkdir /junk/trash

The added slash (/) means not the folder itself, but what is in the folder, and the final asterick (*) means anything and everything in that folder.

An interesting problem is presented by the use of hidden folders and files bring identified with a period (.) as the first character. This conflicts in some instances with the single period (.) and double period (..) being used to identify the current directory and the parent directory respectively when it comes to ls, rm, cp, and mv instructions. How to get around this? Not too hard with the use of glob pattern matching. A folder or file name, hidden, has to have some other visible character, usually a letter or digit.

Now the only minimum I know of for an unhidden name is one letter or digit. You can deal with all these cases with "*[a-zA-Z0-9]*". It has a letter or digit anywhere in the name, the square brackets will return a 1, signifying True. It is a folder or file name, hidden or not.

If you just want hidden folders and files, you would use something like ".[a-zA-Z0-9]*". We don't have to be this specific with the former, as the "*" by itself does what we want, and does not trip over the single period (.) or double period (..) references that we use when relating to the current or parent directories indirectly rather than by name.

It's possible someone could stick in some other character as the leading character in a file name, such as a hyphen (-). You can put that is the square brackets as well, like so: "*[a-zA-Z0-9-]*" or ".[a-zA-Z0-9-]*". Note how the hyphen serves to identify a whole range when used between low-to-high letters or low-to-high digits, but it itself becomes part of what we seek when stuck at the very end of the group before the closing square bracket (]). If you just wanted folder or file names that had hyphens in them, you could search on "*[-]*".

This aspect of bash is shared with other tools that search for text within files, such as grep and awk. It lends a lot of power to the user that learns to take advantage of it, so much so that versions of these utilities have been ported over to Windows. But to be most effective, you have to turn to the prospect of learning how to do a bit of script programming, which is just putting what you want done into a text file and mark it as executable, then running it under bash. For Windows users, this is batch file programming on steroids. Batch files have the extension of .bat, while shell script files often have the extenstion of .sh.

A shell script file also has this as the first line in it: "#!/bin/sh". This marks it as a shell script file and identifies the shell, and location it is at, that is used to interpret it. There are different shells available. but most of the Linux world has moved to just using bash. However, Linux distros may differ on where the bash interpreter is, so people have posted that they've had to change this line accordingly, depending on where the original script came from.

There are hundreds of .sh files all over a typical Linux install. You can use a simple command like "sudo find / -name *.sh | more" and see page after page of them. Most are visible without the "sudo" command, but others give back "permission denied" because the user does not have sufficient rights to see them otherwise. You want to see or learn from any of these files, you can use "cat " with the /path/filename to have its contents displayed, or tag a " | more" on the end so that however big it is, you will see the contents one page at a time.

I don't have any of this down pat myself. I'm just pulling back to mind some of what I've had a limited exposure to in the past. I'm trying to save others a few steps here and there as they go along. There is a lot there if you have the time and interest in learning some of it. The computer is the ideal platform for learning things, because there is no bluffing or faking when it comes to getting something done with it. Either you are up to it. or you aren't.

When I got my first exposure to the innards of a computer and its brand of logic and reason, I had a lot to overcome before I began to get a handle on it. It has been by far the greatest challenge of my life. Some might have this same view when it comes to making lots of money, but that was never my bent or interest. Looking back, I might have done more to build a nest egg for old age, but I am not unhappy with where my interests were or where they took me. Some turned their interests into money, but I was never forefront in the computer evolution, I was just a clinger-on, trying to catch up, then keep up.

Several important things I learned though:

(1) If you program, you can extend yourself to reach as far as you can, then capture it so that repeating this is child's play. Then reach further the next time, and just keep going.

(2) Accept that others have and are doing the same and make use of what they provide along the way. You profit from your own efforts and what they provide as well.

(3) The internet is increasingly the place to be and the thing to do with computers. Socializing via dedicated websites and email, exchange of pictures and videos does a lot to bind family and friends over vast distances, and you can always find prople to share ideas and interests with, whatever those are and whereever they are.

(4) What's lacking is a way to have the computer stand in for you, that when you are busy in one area, or just taking time off to rest, sleep, or do whatever, that it covers for you somehow. I would like to have the PC take over and go visit some web sires to find things that I would feel worthy of more time and attention. I write extensive filters for emails so that most of it goes into specified folders, and that helps. When Interested, I can visit a folder and see the latest stored there. Until then, it just collects.

Watching or listening to the News is so much worse than it should be. Take Fox News for instance. They try to keep you up to date, and they promote discussions where invited experts each tell your their side of the story, but you can tell very shortly that Fox favors the right or Conservative viewpoint. That is fine by me. I agree with them on that. And the "experts" that try to argue the other way usually make a terrible mess of it. They ignore facts, so don't have reason on their side. But something newsworthy comes along, and Fox commentators saturate you with an endless stream of speculation as they wait for more details to come out. Yes, you may have come late and need to get caught up, but once you know as much as they seem to know, it settles into a waste of time to keep it on that channel. And they are going to be on the same topic for days, unless something more newsworthy comes up. And I really don't like the way some journalists probe about, trying to dredge up some detail or obscure fact as a way of shedding new light on the subject. The questions they come up with are way off base, and it is suddenly more about them than it is the people they are interviewing. That's when I change channels for sure. Nancy Grace is on a different network, but she is really terrible about making herself the center of every news story she get involved with. I can't take much of her either.

You may not care for Fox News, but I find it less offensive and biased than some other news outlets, particularly those that are so left wing or socialists in their positions that they don't make any effort at all to present a balanced front. You hear just the good of their side and the bad of every other side. The most biased of the national news networks is, unquestionably, MSNBC News. They only thing they put out that I will watch at all is Caught on Camera, which is not political in nature.

You can find all sorts of news on the internet, so it's not like days of old where you made a trip every once in awhile to the Public Library and scanned through all manner of magazines and even newspapers to pick up on some of the big name stories. TV news channels only deal with the tip of the iceberg, the very tip. And once past you, you can't pull it back up again to look for more details. Radio News is as bad, but without the video, and many of the radio stations are very bent, be it left or right, and only present their viewpoint. But the problem is, whose's got the right tool for gathering news from all sources available and making it so that you can easily browse through and read what's going on in the areas of greatest interest to you? I haven't heard or read of any such tool.

What you want and need, is software that turns the PC into a true Personal Assistant, one that acts smartly to filter out the chaff and bring to light even bits of relevant data that help you get a better, faster, more informed handle on any given subject. Maybe it could specialize by categories as you show preferences, and use sort of a universal listing process, where people with similar interests can rate the importance or relevance of each story so that everybody benefits by the ratings others assign to it. Sort of like a whitelist/blacklist rating system, but based on +/- scores. You subscribe to a rating system by the category that it covers, and your robotic PA pulls the related articles and feeds it to you in the order that they have been rated, but again, by category so that you see what you want to see in the order of your immediate and current interest. That should work.

All off-topic, of course, but to me, forums are like lint filters. Everybody needs to go through a wash cycle for them to be of much help, and once in the wash cycle, you mix it up with others in a similar spot. You throw a little extra into the mix, and it either end up in another's pocket or it goes into the lint filter. The thing about ideas, is that they can go into an endless array of pockets as well as the lint filter, and in doing so, they spell advantage for some while others may dispose or discard them as of no interest or too far off topic. I try to walk a middle ground on this, but I don't always succeed in getting through.

Some point out that the Cafe might be a better place to spew out such ideas, or take them off this forum altogether, but the Cafe here isn't the focus of much attention from what I can tell. And there are those that hang out there that have their own ideas of what the Cafe should be like. I don't mean to start a range war and turf fight, I just want to get the word out and present some new ideas that some, call them newbees, might appreciate.

oldefoxx
July 26th, 2015, 03:51 AM
I thought it would be hard to find Ubuntu HDD (hard Disk Drive) installs (or multiple installs) if you booted up using a LiveCD, presimably to do a reinstall or upgrade to what you already have on your PC. Actually, it isn't hard at all. You just elect to Try Ubuntu first, and from there it is a breeze.

What come up is your Dash Desktop. On the left side is a stack of icons with the Dash icon at the top, and a Trash icon at the bottom. In between are icons for various apps, plus an icon for each HDD drive in your system. Now these drives are not currently mounted, so not visible as such from the terminal command line.

But you can fix that while in the GUI (Graphical User Inteface) by clicking on each HDD icon with the left mouse button, The drive is then mounted, and you have a window come up with icons for the folders and files at the base of that drive. You can close the windows, but the drive stays mounted.

The topmost icon on what looks, to me, like a totem pole is Dash. Dash lets you call up any app by name. The next icon down, where the neck would be, isusually Files, but from the LiveCD, it is the application for installing Ubuntu. Then the Files icon. which is how you get to folders and files for your account. We need Dash, but are not concerned with our own files right now. In Dash, we enter the letters "te", the first letters of "terminal" and we see Terminal in the short list of possible candidates.

We left-click on Terminal, and a new window opens up. We are at the command level now, where we are taling directly with the bash shell interpreter. Since we have the HDDs already mounted, we want to know where they are. What I decided to do was search for my own account name, which is "oldefoxx". And everything is positioned off of the root of your file syste, which is always designated with a single or leading slash (/).

So I can do this: I first become superuser, which speeds things up by saving some typing later. Some commands or points of access can only be done with root (superuser) powers anyway:


sudo -s
find / -name oldefoxx
/media/ubuntu/sda3/media/oldefoxx
/media/ubuntu/sda3/home/oldefoxx
/media/ubuntu/sda3/home/oldefoxx/.wine/drive_c/users/oldefoxx
/media/ubuntu/sda3/home/oldefoxx/oldefoxx
/media/ubuntu/sda3/var/lib/lightdm-data/oldefoxx
/media/ubuntu/sda3/var/lib/sudo/oldefoxx
/media/ubuntu/sda3/var/lib/AccountsService/users/oldefoxx
/media/ubuntu/sda2/media/oldefoxx

This began a long search. But it showed a benefit immediately. On the LiveCD, the username is ubuntu.. And like with a normal Ubuntu install, a mounted hard drive is mounted under /media/username/, where the drive name is sda1, sda2, sda3, sdb1, sdb2, and so on. So instead of waiting out a long search, I just used Ctrl+C to kill the find command.

So now I knew for sure where the HDDs were being mounted at. Same place as normal, but the LiveCD uses "ubuntu" instead of a user-supplied username. Let's say I want to replace, repair, or upgrade the Linux install I currently have on drive sda1. I just need to delete everything on sda1 that isn't in the /home folder. If I want to know what is in the home folder I can do this:

dir /media/ubuntu/sda1/home
friend oldefoxx
dir /media/ubuntu/sda1/home/
friend oldefoxx]

Notice how the final slash is not really necessary in Linux. It makes it somewhat difficult to see if there is actually a folder named "home" present. To find the directory itself, you can do one of these:


dir -d /media/ubuntu/sda1/home
/media/ubuntu/sda1/home
ls -d /media/ubuntu/sda1/home
/media/ubuntu/sda1/home
dir -d /media/ubuntu/sda1/home |grep "home"
/media/ubuntu/sda1/home
ls -d /media/ubuntu/sda1/home |grep "home"
/media/ubuntu/sda1/home
dir /media/ubuntu/sda1/ |grep "home"
cdrom home lib media proc sbin tmp vmlinuz
ls /media/ubuntu/sda1 |grep "home"
home

The "find" command won't do, because the find command is recursive, so it reports too much and just keeps going. This effort also showed subtle differences between using the "dir" and "ls" commands.

By playing with the dir and ls commands and using --help, I came up with some interesting variations:

ls -odx /media/ubuntu/sda1/*
/media/ubuntu/sda1/bin /media/ubuntu/sda1/boot /media/ubuntu/sda1/cdrom /media/ubuntu/sda1/dev
/media/ubuntu/sda1/etc /media/ubuntu/sda1/home /media/ubuntu/sda1/initrd.img /media/ubuntu/sda1/initrd.img.old
/media/ubuntu/sda1/lib /media/ubuntu/sda1/lib64 /media/ubuntu/sda1/lost+found /media/ubuntu/sda1/media
/media/ubuntu/sda1/mnt /media/ubuntu/sda1/opt /media/ubuntu/sda1/proc /media/ubuntu/sda1/root
/media/ubuntu/sda1/run /media/ubuntu/sda1/sbin /media/ubuntu/sda1/srv /media/ubuntu/sda1/sys
/media/ubuntu/sda1/tmp /media/ubuntu/sda1/usr /media/ubuntu/sda1/var /media/ubuntu/sda1/vmlinuz
/media/ubuntu/sda1/vmlinuz.old
cd /media/ubuntu/sda1
ls -odx *
bin boot cdrom dev etc home initrd.img initrd.img.old lib lib64 lost+found media mnt opt proc root run sbin srv sys tmp
usr var vmlinuz vmlinuz.old
ls -od *
drwxr-xr-x 2 root 4096 Jul 9 00:45 bin
drwxr-xr-x 3 root 4096 Jul 25 22:41 boot
drwxrwxr-x 2 root 4096 Jul 8 04:04 cdrom
drwxr-xr-x 4 root 4096 Feb 18 19:38 dev
drwxr-xr-x 135 root 12288 Jul 25 22:43 etc
drwxr-xr-x 4 root 4096 Jul 23 01:45 home
lrwxrwxrwx 1 root 33 Jul 25 22:39 initrd.img -> boot/initrd.img-3.16.0-44-generic
lrwxrwxrwx 1 root 33 Jul 8 09:35 initrd.img.old -> boot/initrd.img-3.16.0-43-generic
drwxr-xr-x 23 root 4096 Jul 8 04:11 lib
drwxr-xr-x 2 root 4096 Jul 8 04:27 lib64
drwx------ 2 root 4096 Jul 8 03:56 lost+found
drwxr-xr-x 3 root 4096 Jul 8 04:23 media
drwxr-xr-x 2 root 4096 Apr 10 2014 mnt
drwxr-xr-x 5 root 4096 Jul 8 23:51 opt
drwxr-xr-x 2 root 4096 Apr 10 2014 proc
drwx------ 2 root 4096 Feb 18 19:40 root
drwxr-xr-x 12 root 4096 Feb 18 19:39 run
drwxr-xr-x 2 root 12288 Jul 10 04:00 sbin
drwxr-xr-x 2 root 4096 Feb 18 19:33 srv
drwxr-xr-x 2 root 4096 Mar 13 2014 sys
drwxrwxrwt 4 root 4096 Jul 25 22:43 tmp
drwxr-xr-x 10 root 4096 Feb 18 19:33 usr
drwxr-xr-x 13 root 4096 Feb 18 19:41 var
lrwxrwxrwx 1 root 30 Jul 25 22:39 vmlinuz -> boot/vmlinuz-3.16.0-44-generic
lrwxrwxrwx 1 root 30 Jul 8 09:35 vmlinuz.old -> boot/vmlinuz-3.16.0-43-generic
ls -d1 *
bin
boot
cdrom
dev
etc
home
initrd.img
initrd.img.old
lib
lib64
lost+found
media
mnt
opt
proc
root
run
sbin
srv
sys
tmp
usr
var
vmlinuz
vmlinuz.old

And it turns out there is only one .config file for each account. I tried several searches, and here are the results:

dir -rd1 /media/ubuntu/sda1/home/*/.config
/media/ubuntu/sda1/home/oldefoxx/.config
/media/ubuntu/sda1/home/friend/.config
dir -r1 /media/ubuntu/sda1/home/*/.config
/media/ubuntu/sda1/home/oldefoxx/.config:
VirtualBox
user-dirs.locale
user-dirs.dirs
upstart
update-notifier
unity
Trolltech.conf
software-center
slimjet
pulse
nautilus
menus
libaccounts-glib
ibus
gtk-3.0
gtk-2.0
google-chrome
gnome-session
gedit
evolution
eog
enchant
dconf
compiz-1
chromium

/media/ubuntu/sda1/home/friend/.config:
user-dirs.locale
user-dirs.dirs
upstart
update-notifier
software-center
pulse
nautilus
libreoffice
libaccounts-glib
ibus
gtk-3.0
gnome-session
evolution
dconf

Whether you have to delete .config or not depends on what software you have installed and if you are putting the same thing back or not. You could take the safe course and rename (use mv to move) the .config file to something like .config.old, in case you want to try bringing any of them back to life later. Or you can create a new folder named .config.old and just copy the contents of .config into it using cp -r .config/* .config.old/. Which raises the question of how to merge the contents of two folders into just one, and keep the newest version of any given file? So I went on an online search for a method to do this, and found this answer:

You can do it with a command line :

find orig/ -type f -exec cp -u -a \{\} dest/ \;

where orig is the directory containing the stuff you want to flatten and copy, and dest your destination directory. So what this will do is:

find each file in orig/ and its sub-directories
for each file, call copy (cp) to dest with the following options: u mean update, ie only copy if the file in newer, a archive, ie keep attributes, among them the dates of creation / modification

So you can begin your old operating system stripping on a HDD, say sda1, like this, assuming the drive is already mounted as explained above:

sudo -s
cd /media/ubuntu/sda1
rm -r [!h]*
cd home/[userid]
mv ..config .config.old
Or this instead:
mkdir .config.old
cp -rfp .config/* .config.old/

That's it. Instead of [userid], you would use your account name. If more that one account, you would use cd .. to get back to the home folder level then use cd [2ndname] to enter the second account, again using the account name in place of [2ndname]. Or you can join the two commands into one and just use cd ../[2ndname].

Once all accounts are done, you can close the terminal and proceed with the install. But you have to do one thing in the install that you may not have done before: Let me gat back to this, as it is important, and I want to verify the choices offered so that you understand it better when you get to it. I will be back. Oh, by the way: I've been doing this entire post from a LiveCD, of Ubuntu 14.04.2, so it goes to prove how do-able this is. Now I will post this, start the install process myself until I get to that stage of actually doing it, then come back and take up this matter again. Actually, I got into the install process and found my Try of Ubuntu was still going, so was able to make a screenshot of the install window where the choice had to be made. The current LiveCD has slightly different choices than found on older distros.

The first choice of Erase disk and install Ubuntu is the default, but not if you want to keep anything at all that is already on the drive, which in this case we do, so skip that.

The second choice to Encrypt the new Ubuntu Installation for Security is a fairly recent addition. What you used to have were choices like installing Ubuntu alongside other existing operating systems. I guess that is all lumped together under the final choice now.

The third choice is to format the drive as LVM, which is a new drive structure, involving two small partitions, one a FAT partition and an ext2 partition, followed by a large LVM partition. This is new stuff, apparently a new standard that is suppose to replace difficult to manage structures like NTFS, which was used by Windows. I found that LVM made my laptop bootable for Ubuntu, but I didn't want it, so reformatted it as ext4, ehich Grub2 failed to boot from properly. The problem was finally resolved when I downloaded Boot-Repair-Disk.iso, which removed Grub2 and put something in its place. Then my laptop booted fine. I noted in a recent software update that Grub2 was being updated. Maybe that problem is taken care of now. Otherwise, I have Boot-Repair-Disk on a CD that I can use again if needed. Good thing to remember and pass on, as there are a lot of laptops that have been reported as having problems like this.

The 4th and final choice is the one we want. Something Else. That "something else" could be resizing and changing your partitions, picking what structure to use for each, picking which partition(s) you want to boot to (and which other partitions to make use of, if any), and where to install the Boot Master Record (MBR), which is usually sda. the first internal HDD. By leaving other partitions unused, you allow those that have operating systems on them to be mapped as choices into the final stage of installation, which is where Grub2 to is first installed, then updated to find what operating systems are in place.

Now the LiveCD installer does something else: It makes the current install the primary install, meaning the first (default) choice in the list presented to boot from. You want some other partition or operating system to be the first choice, you have to boot into that one and change the MBR from there to make it happen.

Another thing about the boot process is that Grub2 insistes on using the HDD's UUID assigned hexidecimal string to identify each partition as a validation part of the boot process. If the UUID gets changed, which will happen if it gets reformatted, Grub2 will not recognize the new UUID, unless you run update-grub again. You can manually set a HDD's UUID with a command line utility called tune2fs, but it has to be exact, and it is 16 hexidecimal digits long, so may not be worth the effort.

You have Ubuntu installed finally, and by leaving /home intact, with its accounts, leaving the partition strructure the same and not doing a reformat, designating the same partitions for the same roles as they had under the previous install, you find that your user accounts and files all got restored. The only differences will be that you have all your software updates to run through again, have to reinstall the programs and apps you had previously added on your own, and may have to merge the new .config and the held over .config.old folders together. The trick is, which of these is suppose to dominate? Now if you assume that the newest files are the right ones, you use the technique mentioned above. But if you assume that what you had before is right, you can go into each user's account and run this command after all the apps have been restored: cp -rfpa .config.old/* .config/.

That's about it. I tested the commands on some dummy folders and files. so I know they work. I also learned something new today. I had thought that using apt-get update and apt-get upgrade were the equivalent of using the software updater. Apparently not so. I have adopted using this combined command in a terminal to let apt-get do its thing:
sudo apt-get -qq update; sudo apt-get -y upgrade
But then I run Software Updater right behind it, and the latter pulled down a new image file for Ubuntu. In Dash, just type in soft or upd and get the Software Updater to come up. If using Clasic Gnome, you find it under Applications/System Tools/Administrative/Software Updater.