As a result of many reinstallations, I've begun developing a method that quickly allows me to restore my new installation to the setup of my old one. As such, I decided to share my knowledge:
-> MAKE A LIST
- To create an easily restoreable list of all installed software on your system (from the repos), open Konsole and enter the following command:
- That will create an entry in your "/home/[username]/" directory entitled "installed-software.txt" ([username] is your username).
-> BACKUP
- Backup all your important files to an external storage device (hard drive / flash disk); you may wish to backup your "/etc/X11/xorg.conf" and "/etc/apt/sources.list" configs. If you have the Medibuntu/Wine repo(s), you'll need to additionally backup your "/etc/apt/sources.list.d" directory. For an excellent guide on backing up using the "dd" command, see Qqmike's dd Command.
- I generally format my external hard drive as XFS because it allows me to quickly transfer/move large files. You can format your hard drive using any number of formatting utilities; I prefer using the GParted LiveCD.
- It's a very good idea to backup periodically, because you'll be out of luck if you don't have a copy and you frag your system beyond repair. Also, keep a list of any software you installed outside of the repositories (such as those downloaded/installed from 3rd party websites).
-> FRY YOUR SYSTEM ( )
- Configure your BIOS to boot from CD first. Then, insert the Kubuntu installation CD (I used the Alternate CD for this example, but it doesn't matter which you use), and reboot. When the CD loads, choose the "Install a Command-Line System" option, fill out all the requested information, and choose the "Manual" option to partition your hard drive.
- I would suggest creating 3 basic partitions: SWAP, "/" , and "/home". For SWAP, create a partition roughly 1.5 - 2 times the amount of RAM you have installed (SWAP is similar to "Virtual Memory" in Windows). Then, create your "/" (or "/root") partition. You shouldn't need more than 8 GB for your "/root" partition; if you ever use more than 10 GB, my hat's off to you You can make it any format you wish (check the list of File Systems (FS) to see which you prefer; just look for the “Linux” entries in the far-right column). Finally, create a "/home" partition; choose whichever FS type you would like to use, and create it as large as you want (this is the partition you'll be storing your personal data in). If you already have a separate “/home” partition, keep it the way it is (don't format it), and select it again as your “/home” partition. This way you can keep your application settings/customizations and personal data intact. Then, use the same username you had before so the installer will associate your previous “/home/[username]/” directory with your new “/home/[username]/” directory.
- I create an additional 200MB “/boot” partition for the GRUB bootloader, and format as ext3; I do this because my FS of choice is XFS, which currently is incompatible with GRUB. I also create an extended partition where I create logical “/root” partitions; this way, I can install as many operating systems I want, and use the same “/home” directory (BIOS currently only allows 4 primary partitions on your hard drive, including 1 extended partition; an extended partition is a primary partition within which you can create as many "logical" partitions you want).
-> RESTORE YOUR STUFF
Once Kubuntu is installed, remove the installation CD from your computer and reboot. Login, restore your repositories, and update your system with the command
- You're now ready to restore all your previously installed software. To do so, you'll need the dselect package manager:
- Restore the “installed-software.txt” file you created, and reinstall your software with the following commands:
- Choose option "3. [ I ]nststall Install and upgrade wanted packages." That should install everything you had before!
- You'll have to manually install anything you installed outside the repos, sorry :P
- Most of your application settings will already be in your “/home/[username]/” directory, for those that aren't (such as your “xorg.conf”), simply replace the existing ones with those you backed up. Once everything has reinstalled, start KDM with
Everything should now be as it was before
Edit: Using the many suggestions of those who contributed to this thread, I've re-written it in attempt to make it simpler, easier, quicker, and more effective. Thank you all who helped
-> MAKE A LIST
- To create an easily restoreable list of all installed software on your system (from the repos), open Konsole and enter the following command:
Code:
dpkg --get-selections | grep [^de]install$ > installed-software.txt
- That will create an entry in your "/home/[username]/" directory entitled "installed-software.txt" ([username] is your username).
-> BACKUP
- Backup all your important files to an external storage device (hard drive / flash disk); you may wish to backup your "/etc/X11/xorg.conf" and "/etc/apt/sources.list" configs. If you have the Medibuntu/Wine repo(s), you'll need to additionally backup your "/etc/apt/sources.list.d" directory. For an excellent guide on backing up using the "dd" command, see Qqmike's dd Command.
- I generally format my external hard drive as XFS because it allows me to quickly transfer/move large files. You can format your hard drive using any number of formatting utilities; I prefer using the GParted LiveCD.
- It's a very good idea to backup periodically, because you'll be out of luck if you don't have a copy and you frag your system beyond repair. Also, keep a list of any software you installed outside of the repositories (such as those downloaded/installed from 3rd party websites).
-> FRY YOUR SYSTEM ( )
- Configure your BIOS to boot from CD first. Then, insert the Kubuntu installation CD (I used the Alternate CD for this example, but it doesn't matter which you use), and reboot. When the CD loads, choose the "Install a Command-Line System" option, fill out all the requested information, and choose the "Manual" option to partition your hard drive.
- I would suggest creating 3 basic partitions: SWAP, "/" , and "/home". For SWAP, create a partition roughly 1.5 - 2 times the amount of RAM you have installed (SWAP is similar to "Virtual Memory" in Windows). Then, create your "/" (or "/root") partition. You shouldn't need more than 8 GB for your "/root" partition; if you ever use more than 10 GB, my hat's off to you You can make it any format you wish (check the list of File Systems (FS) to see which you prefer; just look for the “Linux” entries in the far-right column). Finally, create a "/home" partition; choose whichever FS type you would like to use, and create it as large as you want (this is the partition you'll be storing your personal data in). If you already have a separate “/home” partition, keep it the way it is (don't format it), and select it again as your “/home” partition. This way you can keep your application settings/customizations and personal data intact. Then, use the same username you had before so the installer will associate your previous “/home/[username]/” directory with your new “/home/[username]/” directory.
- I create an additional 200MB “/boot” partition for the GRUB bootloader, and format as ext3; I do this because my FS of choice is XFS, which currently is incompatible with GRUB. I also create an extended partition where I create logical “/root” partitions; this way, I can install as many operating systems I want, and use the same “/home” directory (BIOS currently only allows 4 primary partitions on your hard drive, including 1 extended partition; an extended partition is a primary partition within which you can create as many "logical" partitions you want).
-> RESTORE YOUR STUFF
Once Kubuntu is installed, remove the installation CD from your computer and reboot. Login, restore your repositories, and update your system with the command
Code:
sudo aptitude update; sudo aptitude safe-upgrade
Code:
sudo aptitude install dselect
- Restore the “installed-software.txt” file you created, and reinstall your software with the following commands:
Code:
sudo dpkg --set-selections < installed-software.txt
Code:
sudo dselect
- You'll have to manually install anything you installed outside the repos, sorry :P
- Most of your application settings will already be in your “/home/[username]/” directory, for those that aren't (such as your “xorg.conf”), simply replace the existing ones with those you backed up. Once everything has reinstalled, start KDM with
Code:
sudo /etc/init.d/kdm start
Edit: Using the many suggestions of those who contributed to this thread, I've re-written it in attempt to make it simpler, easier, quicker, and more effective. Thank you all who helped
Comment