Wednesday, May 8, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 3051  / 2 Years ago, fri, july 29, 2022, 8:17:18

I am trying to make my entire ubuntu(12.04) OS with all the softwares installed to an ISO file so that It can be installed through Virtual box in another system .
Could someone help me in this ?


More From » iso

 Answers
2

You can use dd to do this - but you'll need another hard drive available to do so, and it'll need to be big enough to contain a file the size of your entire system drive.



It might be better instead to back up and restore your data, installed package list, and files.



sudo dpkg --get-selections > /home/me/mypackages.list



That dumps the list of all packages installed on your system to /home/me/mypackages.list. Now, do a clean Ubuntu install on a new VM on your Virtualbox. Get /home/me/mypackages.list copied into that system.



On the new system,



sudo apt-get install dselect
sudo dpkg --set-selections < /home/me/mypackages.list
sudo dselect


Now press i in dselect's interactive menu, and the new system will install all of the software from repos which was on the original machine.



Once that's done, you can selectively copy over the configurations and data from the original machine as well. If you've got apache, overwrite /etc/apache2 with the contents of /etc/apache2 from the old machine. Etc, etc, etc. DO NOT just blindly copy the entire contents of /etc from the old machine into the new machine - you'll give yourself problems if you do. You can just copy the contents of /home from the old machine into /home on the new machine, but you'll need to recreate the users and fix the permissions appropriately as you do. (You could, in theory, copy over /etc/passwd and /etc/shadow - or portions of them - directly, and in fact I do this kind of thing... but don't do that unless you know exactly what you're doing. You've been warned.)


[#34124] Sunday, July 31, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
confiorc

Total Points: 42
Total Questions: 121
Total Answers: 123

Location: India
Member since Wed, Aug 26, 2020
4 Years ago
;