Score:2

Make an image of my complete linux installation including all my personal files?

ru flag

Is it possible to convert my Kubuntu to one single ISO? This should also include all the files that I've saved in here (folders on desktop, pictures, etc.).

Moreover, how to restore the image to the same computer in another hard drive, or to another computer?

guiverc avatar
cn flag
one single IS? did you mean ISO?
in flag
Transplanting an OS across hardware is suboptimal. You will spend more time fixing driver and device setting problems than using the system.
Score:0
za flag

dd should handle the task provided we're talking about only a Linux environment. If you start messing around with duel boot and more specifically the windows OS at all it won't boot correctly after the transfer.

You'd need to boot to a live version of Linux, mount a device for storing the file to, and issue a command similar to this:

# dd if=/dev/<device> of=/path/to/save/file.iso

You'll need to look over the options for dd and decide which options you require. There isn't really a cookie cutter answer to this.

Once you have the image made, you can load the replacement drive and then just use the dd command with the parameters swapped

# dd if=/path/to/save/file.iso of=/dev/<device>

As one of the commentators said you can end up with driver issues in some cases, but in this case it sounds like you're just trying to change out a hard drive, so drivers shouldn't be an issue as everything you need should already be in your current kernel.

This process CAN be done directly by installing both drives in the machine, then booting to a live USB version of linux and then simply writing from the old device to the new. Remember neither device should be mounted.

# dd if=/dev/<device> of=/dev/<device>

Again look up the options and use those that you need.

Some things to note:

  1. This process takes a lot of time. Depending on your drives this can take hours.
  2. The second drive must be as large or larger than the first, or at least large enough to fit all partitions of the first drive onto.
  3. If you're looking for more space in the end, once the transfer is done, you'll still need to enlarge the partition and file system.
  4. As stated already, this isn't going to work with windows.
  5. Finally, obviously, this is an attempt to save time, there is no guarantee it's going to work, so BACK YOUR DATA UP before you start.

Finally. If this is a situation where you're not upgrading drives for any reason other than to add more space, your computer has room to add a second drive, and you're install was done using LVM, I'd recommend looking at simply putting your drive in the computer and adding another physical volume to your already existing LVM setup. This will save you time and virtually guarantee success as with a little reading LVM's are actually very nice to work with.

Good luck.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.