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 recently bought a new hard drive. My old hard drive was only 10gbs so the only OS on it was linux (fedora core 5). Upon receiving the new hard drive, I had to disconnect my old one (for the IDE cable) and installed windows (to use photoshop, my scanner, etc) on a partition, leaving unformatted space for a dual-boot.
Now, after having sufficiently missed linux, I dual-booted the new hard drive with a clean installation of linux. Seeing how much work it took to get everything set up (wlan, server, etc) it would be nice not to have to do it again.
Is there any way I can just copy my old configuration onto the new installation of linux? if not, how hard would it be to transfer the old installation on the new installation's partition?
The first thing I would try is to buy a dual IDE cable so that you can just plug the old drive in as slave.
Then just reinstall grub from the old linux into the root partition (not MBR) of the old linux. Then chainload it with the new grub. Then you shouldn't have to move the install at all...
The other option I think would be to use something like Norton Ghost to make an exact image of the old install and then copy it to the new drive. Haven't done this in a long while, so I'm not sure how it will work...
It shouldn't be too hard to transfer your system to the new partition, I've done it before, although this will be a little different as you need a different grub setup than what is on that system. It's been a while since I did this, but I'm pretty sure I got everything below. Also, THIS WILL DELETE EVERYTHING ON YOUR NEW LINUX SYSTEM, ONLY KEEPING DATA FROM YOUR OLD LINUX SYSTEM. It won't affect your windows installation, as long as you don't touch the windows partition. It also shouldn't affect your old linux installation, although after you ensure the transfer worked, you probably would want to reformat the drive and use it for storage, or something.
Anyways... the easiest way to do this is probably to boot into your favorite livecd (if unsure use knoppix), make sure to leave your new drive plugged into the system in the same way (if it's primary master or whatever, leave it that way!), plug in the old drive in another IDE position, then mount both these drives.
Let's say the old drive is mounted at "/mnt/old" and the new (dual-booted, new hard drive) partition is mounted as "/mnt/new" (replace with your actual drives, such as /dev/hda1 and /dev/hdb5, or whatever it is in knoppix).
Mount the drives first:
Then keep a copy of the /boot/grub directory from your new dual-boot system on your old drive for safety:
cp -r /mnt/new/boot/grub /mnt/old/backupgrub
Then erase everything on the unwanted partition (the one shared on your new dual-boot drive):
rm -rf /mnt/new/*
Now copy over the entire old system over to the new partition:
cp -r /mnt/old/* /mnt/new/
Now make sure we're using the /boot/grub from your dual-boot system to your "new linux" partition:
Now we just need to edit the grub config (/mnt/new/boot/grub/menu.lst). Make sure that boot menu options are pointing to actual kernel images on the system, you may want to look at your old system's grub config (located at /mnt/old/boot/grub/menu.lst) for some hints on what kernel images to use, and what options they might require to boot. Make sure when supplying image locations you assume that "/mnt/new" is actually just "/". So, if you have a kernel image at "/mnt/new/boot/linux-2.6.17", then in grub it should look like "/boot/linux-2.6.17".
Finally, you need to install grub into the MBR of your new drive, using the config in /mnt/new/boot/grub. You can do this by (let's say /dev/hda is your new dual-boot drive):
grub-install --root-directory=/mnt/new/ /dev/hda
Now just unplug that old linux drive, and make sure your system is set to boot from the dual boot drive. You shouldn't actually have to unplug it, but it'll make sure everything's working on your new partition.
I dont really know how to reinstall grub and don't know how to chainload it.
Once you've hooked up the second drive with the new cable, boot into your working linux. Then do the following
mount /dev/hdb1 /mnt/temp
Basically, you make a directory to mount your old drive (I'm using /dev/hdb1 assuming that your old linux takes up the whole drive, adjust it as needed), mount it, then chroot into it (which essentially makes you root on your old machine), then install grub to that partition instead of the MBR. Then just type exit to get back to your new linux.
Now go to /boot/grub/menu.lst of the new linux and add the following to the end of the file
title Old Fedora
Save the file and close. Then when you reboot you should have a new menu item that says "Old Fedora". When selected, it should boot to another grub menu (the old one you had on your other drive). This grub will boot the old Fedora install.
In case you're interested in where I got all this information, I got it from here. Grub is a very powerful bootloader. If you follow Saikee's signature, he actually has over 100 OS's booting by chainloading bootloaders...