Cloning Linux partitions to external hdd - linux

I want to copy Linux Ubuntu 14.04 installed on my hard disk to external hard disk. The purpose is to have exact OS bootable from external hdd on another PC.
Here are listed Disk Drives , Ubuntu is installed on 1,0TB Hard Disk.
Partition 1 is NTFS created and used by Windows, this is Partition 2 , and this is Partition 3: h??p://imgur.com/PY0tujU.
External hard disk is here: h??p://imgur.com/51mVrO2
How can I make exact same bootable Linux on my external hard disk? (using disk dump)

To achieve this, you should have a clone software and then things will be easier. For example, when you use AOMEI Backupper to clone OS, it will automatically pack up your system partition and system reserved partition (both make a complete OS package), copying everything here bit by bit.

Related

Install Linux on flash disk like internal disk

guys I have an issue with Linux
I wanna install Linux on flash disk like internal disk
actually I wanna install it with presentation space
I did it but it limited with 4 gig space.
I wanna use all space of flash disk and do my works on it like an internal partition
like a really OS
In the normal installation process, you will be asked to select the partition on which you would like to install Linux.
The option for bootable USB will be visible with a warning sign. In some flavours, it may be hidden however, you can still install it. Simply click on the USB drive partition and Linux can be installed on it.
Make sure you have at least 16GB USB Flash drive to run your Linux smoothly.

recover windows drive data after linux installation changes drive to ext4

I had windows installed in system and have 4 drives in which C:/ is windows and other drives have my data.
then I install linux in my C:/ drive
but at installation time it shows only two drives,
one had equal size which had C:/ drive so I installed linux in that drive.
Other had equal size of rest of drives which i did not touch but linux change its file system to ext4.
After installing linux I did not get my other drives.
in gParted it show that other drive have partition /dev/sda4 but not mounted and have 150GB used out of 183 GB. that's mean data of my other drive are in that partition.
Please help me to recover my data.
thanks in advance.
Quoting from Debian official site :
On a GNU/Linux system there's no necessary correspondence between directories and physical
devices, as there is in Windows where each drive has its own directory tree beginning with
a letter (such as C:)
So , given that the other drive is present, judging by the output of gparted as you said, you simply have to mount the partition(s) on a folder of your desire.
Check the Chapter 13 of debian tutorial on how you ll be able to accomplish this.
P.S You do not need Windows for this proccess.

Generate ISO from installed system

As part of my infrastructure I have many Virtual Machines running different Linux distros, under Proxmox using OpenVz. My problem is that I need to export into a personalized installable ISOs some of the VMs I have, (installable snapshots of the current state of the VMs), some of them are running Ubuntu, some of them CentOS, so my question is:
1- Is there a way I can do this aware of the OS the VM is running?,
2- Exporting VMs to ISOs the way I just explained is the way to go or is there any other approach?
I'm open to any advice from those how has experience with this subject even if I have to setup different Virt. Technology to host the VMs.
Your question is pretty vague on your requirements. I'll try to give you some ideas:
What do you mean by "Current state"? If you really want all the running processes, then you should something like VirtualBox and take a snapshot. You can easily boot that up on another computer and continue running where you left off, and it's independent of the OS.
If you really mean just the filesystem, then just copying the filesystem and burning it on a CD is unlikely to give you good results. For instance, there are many areas that are expected to be writable (/var, /tmp. even /etc for /etc/resolv.conf)
One simple idea is to just 'tar' up the filesystem, and untar it on another OpenVz distro. (I'm sure someone has made a bootable OpenVz distro..)
If you want a real bootable ISO, there are a LOT of different options. For example, you could have the kernel mount the ISO as root. Or you could boot to a RAMDisk as root, and unpack the filesystem you need. Or you could mount the ISO as root with an AUFS overlay filesystem. Or you could mount some directories as a SquashFS filesystem onto a RAM root.
But if you really want simplicity in "moving VMs around", look into Docker. It has a simple way to push a filesystem up to a public or private server, then download it on the other side, but save bandwidth on common elements like the OS and Apache installs. (If you do it right.)

embedded linux root filesystem on disk

I would like to know how to create a root file system for an embedded Linux system that is stored on a hard drive. Would this be the same procedure if it was on a flash card?
No, your boot loader would need to know how to initialize the hard drive. With flash cards the boot loader initializes as an MTD and can understand the file system.
You might be able to make progress with an IDE HD and IDE support in the boot loader.
On a regular computer (e.g., PC) the BIOS takes care of initializing all peripherals, like a primary HD.
Typically Linux embedded system is not operate directly in disk based filesystem, but use a mechanism to load the OS from a persistent storage (hard drive, flash card or memory, etc.) to volatile memory space (RAM). In general, these OS's file (commonly called as firmware) are kernel image file and a initrd (Initial RAM Disk) file, the initrd file contains root filesystem's files and any system's related files, upon boot the initrd will be uncompressed and deployed into a RAM based filesystem such as tmpfs, once completed, the system will use the tmpfs filesystem just like any disk based filesystem (ext3, btrfs), for example to run init program or script to do system initialization. Embedded system is tend to minimize I/O on persistent storage for some advantages: reliability, speed and cost.
You can learn how to accomplish this by learning any general Linux distribution on how to create and modify a initrd file.

Converting FILES to NTFS

I did something wrong with my dual-OS PC (XP Pro and Ubuntu) and it now only works when booting from an Ubuntu Live CD (8.04 LTS).
I am backing up my data to an external HDD for reinstalling everying. I am not worried about the Linux part of my data because the external HDD is formatted in ext3, the file system Ubuntu operates on.
But what about the Windows part of my data? Does Linux (the live CD) properly copy NTFS files into an ext3 HDD? And then does Linux (this time, the newly installed Linux system on PC) properly copy them back to the NTFS partition?
I know I am asking a very simple question. I am sorry if I appear to ask someone to do my homework but I cannot experiment myself now.
Thanks you all in advance!
Edit:
Is it perhaps better to format the external HDD in fat32?
As amemus said, fat32 would be better for the external HDD. Even though it's Microsoft, fat32 is still, by far, the most supported HDD format.
That said, what you said SHOULD work, given you use a new-ish distro of linux with new packages.
Ubuntu 8.04 is very old these days, but I believe it had good support for NTFS read (using the old ntfs driver). It will correctly copy your Windows files to the ext3 external hard drive, plus or minus some attributes/permissions which have no equivalent in ext3.
Newer Ubuntu releases have full NTFS read/write support via the ntfs-3g driver which I have found to work very well.
Sidenote: I have found NTFS is a reasonably good filesystem for external hard drives - it works well for Windows and recent Linux computers, and it's technically superior to FAT32. The only issue is if you have to interact with Apple OSX, which still doesn't understand NTFS. (You can make OSX understand NTFS with a liberal application of FUSE and ntfs-3g, but it's not nice.)
Note: This is probably the wrong Stack Exchange - StackOverflow is for programming questions. Maybe the Ubuntu stackexchange would have been better?
Ubuntu shouldn't have a problem reading from NTFS.
Writing to NTFS used to be very difficult, but its gotten a lot better (a simple google search turns up lots of results)
As long as you aren't working with large (~4GB) files, FAT32 will be easier to work with across lots of different platforms.

Resources