Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I want to install a new distro, & am looking for assurance/advice on safeguarding my home files. I know I read a post about this some time ago, but I can't find it now.
Presently running Mdk 10, want to give redhat a try. I want to install RH over MDDK.
I have 3 linux partitions;
Can I safely just install RH? Will it get rid of Mdk?
If this is covered in another post that you know of would appreciate a point in the right direction.
If I understand correctly, I assume that you want to replace Mandrake with Red Hat. The other alternative would be to install Red Hat and keep Mandrake if you have enough hard disk space to do that.
So here is how to reuse your old home partition. When running the Red Hat install program, at some point you will be given three choices of what to use to partition your hard disk. The three choices are automatic partitioning, disk druid or fdisk. The disk druid choice would probably be easiest to use. Once inside disk druid you will be given a graphical picture of how your hard disk is partitioned. For each partition you can select a mount point and whether to reformat that partition or not. If you want to save the data on your hda8 partition then obviously you would not want to reformat that partition. You would also most likely want to select /home as the mount point for that partition. For hda6 you would probably want to select the reformat option for that partition and choose to have it mounted as "/". The swap partion could be reformated and mounted as a swap partition. The reformating and changes to your hard disk will not actually occur until you go on to the next step during installation.
In the next step I will assume that you only created a root user so far and have not yet created an ordinary user account for yourself with a login name such as John. I will also assume that under Mandrake you had probably logged in as John and had a home directory for John in /home/John. If so then once Red Hat is up and running you should still see a directory called /home/John. The question is now what to do with that directory? There are several choices. Do you want to just reuse that directory or do you want to create a new directory for youself which you would use when you log in as an ordinary user named John?
If you go to the /home/John directory (or whatever it is called) and then type "ls -a " you will most likely see some hidden file and directories that start with a period. In Linux hidden files start with a period. The "-a" in "ls -a" tells the ls command to also show the hidden files and directories. The question I have is if all those hidden files would be appropriate for Red Hat Linux or not. They would most likely not create any problems even if they do end up being reused although I am not totally certain about that. Some of those hidden files and directories control how various things are configured when ever you first log in as that user. If they exist in my /home/rick directory then some of them are used to configure things whenever I log in as rick. In my /home/rick directory there is a hidden directory called ".thunderbird" that controls how tbe Thunderbird e-mail program is confiured for me and also contains all of my old e-mail. Some of the other hidden files might configure things in ways that might or might not be ideal for Red Hat Linux although they probably would not be a problem.
So anyway, one option would be to use the useradd command to use the useradd commad to create a new ordinary user ID for yourself and either reuse that directory or not. Extra command line parameters would can be used to either reuse that directory or not. Red Hat probably also has a GUI tool that could also do that. If you do not reuse the directory then you could just copy the files to the newdirectory using the cp command. If you copy the files to the new directroy you probably would not want to copy most of the hidden files.
If your new user name happens to have a different user ID number and group ID number than what it had in Mandrake then you might not be the owner of your old files. You would then need to use the chown command to change the ownership of everything to whatever your current user name and group name are. You would need to lookup how to use the chown command.
Red Hat 9 was the last version of Red Hat. Red Hat has discontinued that and is no longer offering security patches for it. Fedora Core 3 is more or less the descendant of that product. Red Hat also still has their non-free verions of their products. When they discontinued Red Hat 9 I switched to Slackware although Slackware is probably a slightly more difficult distro for a beginner. Several members of the Linux Users Group in my town do use Fedora Core 3 and like it. For some reason Fedora Core 2 ran slowly on my computer and I never bothered to figure out why, I just used Slackware 10 instead. In the Linux+ certification class I took last fall at a local Community College we used Red Hat Linux.
I have Slackware 10, Red Hat 9, Vector Linux 9.0 and Windows 2000 all installed on this computer but mostly use Slackware. In my instructions above I assume that you want to replace Mandrake with Red Hat instead of keeping them both. If for some reason your hda8 partition did not get mounted as /home then it could be done manually by editing the /etc/fstab file. I hope I got all the details in the above instructions are correct.
One other thought I have had on the subject it that whenever a new user is added a new partition is created for that user in the /home directory. If my username is rick a /home/rick directory is created (assuming that I am using the appropriate options with the useradd command). Whenever the new user is created along with their new home directory a copy of whatever is in the /etc/skel directory is copied to that new user's home direcotory. If I were to reuse my old /home/rick directory those hidden files from /etc/skel would not get copied to my old /home/rick directory. That probably would not really be a problem but is something to think about.
I have several versions of Linux on my computer and there is one partition that is mounted under /home/rick that I share among all three versions of Linux. It is mounted as /home/rick/stuff. In each version of Linux I made sure that I am using the same user ID number so that I would have ownership and the correct permissions no matter which version of Linux I happend to be using at the time. The hidden files are only in my /home/rick directory so the question of what is in my hidden files in /home/rick is was not an issue if something like /dev/hda10 was mounted as /home/rick/stuff.
Whenever I installed an extra copy of Linux, I did not bother mounting the shared /home/rick/stuff directory until later on. When I got around to making that change I just manually edited my /etc/fstab directory to mount the partiton wherever I wanted. Of course, I also had to create a /home/rick/stuff directory before the fstab file could mount the /dev/hdb10 partition there when ever I boot up.
I also copied my old .thunderbird directory to /home/rick before installing the Thunderbird e-mail program. That way as soon as I installed Thunderbird it would be using my old settings already be properly configured and still have all of my old e-mail in it. Notice that there is a period before the .thunderbird. I copied the .thunderbird directory recursively using the "-r" option with the cp command to get everything in every subdirectory. Only the configuration settings for Thunderbird were in the hidden directory not the actual program itself. Perhaps there were some other hidden files that would also have also been worth copying to my new /home/rick directory.
Hi Rick-Thanks for the quick reply. Sorry to be late responding, my Christmas week was multi-tasked. Fun but busy. I just now discovered that the post notification was junked by my junk mail controls. I quickly scanned your post & already see lots of helpful info--will dig into it, but wanted to say thanks & will get back after I've absorbed & tested your ideas.
I'm in Jakarta & there aren't many linux distros available here. Some PC dealers are selling linux loaded pc's for a good discount & Redhat is their distro. I had read articles about fedora core that made it look out of my experience reange for the time being. Slackware sounded interesting, but out of my depth for now too. I'm looking to change cuz mandrake is running well, & I want to try something new. I managed to get an older copy of knoppix & it ran lots faster than mandrake. Since it is a debian derivative maybe I'd give debian a try if I can find it.
Well, with the tsunami disaster I have been involved with the relief effort, but now have a moment to respond. I followed your advice, & the install went smoothly. I installed to a new username, then afterwards added a suer with the same name as my old user. Loged into old_user had some strange effects, but the files were available to copy to new_user. Still gotta digest details of your post, but thanks for the help! btw, RH wasn't what I expected--seems real slow on my mach. will give it a chance for awhile.
replace username with your username
burn that .tar.gz to a CD
install your other distro
add the user, with the same name, and make sure it creates the home directory
the, as root, cd to /home
delete that user's home directory,
and then (while still in /home)
Hi skuzzman, pretty straightforward approach. Actually, I already did the act, & just installed to a different username, added a new user with the same-old-name, then copied the files. But when I logged in to the old user, it behaved strangely. According to rick485 home contains alot of hidden files--I assume created by Mandrake--wold they interfere with the lod home/user becoming a new one on the new distro? It is a moot question, so maybe not worth delving into, but next time I will simply burn my files to cd. I don't know why I took such a roundabout--difficult route. Tx, to all!