Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How would I convert a persistent filesystem (live-rw) from a Debian Live USB to a standalone, bootable installation that can be run on a VM?

What I've tried

  1. Chrooting and installing a bootloader (grub) - Can't chroot since the filesystem (live-rw) is a very limited installation, no bash etc.
  2. Installing Debian from this USB in hope that it will preserve the persistent files (like Ubuntu does) - installs a clean system.

Full story

I have been given files copied from a Live Debian (Squeeze) USB that has been used with the persistent option. I need to convert the persistent filesystem to a standalone installation and put it on a vmware vSphere VM, as it contains configured servers/services I would rather not configure from scratch.

Since the persistent file (live-rw) is just an ext2 filesystem i thought I would only need to install a bootloader and provide kernel/initrd image. The problem is this image has no /proc /sys and /dev nodes and only a few binaries in /bin (can't even chroot into it without bash)

$ file live-rw 
live-rw: Linux rev 1.0 ext2 filesystem data (mounted or unclean), UUID=fa55a4d2-1fc4-5344-9e94-dc12cb60612d (large files)

Contents of /:

$ ls /
bin  etc  home  lib  live  lost+found  media  opt  root  sbin  tmp  usr  va

Contents of /bin:

$ ls /bin/
bunzip2  bzcat  bzcmp  bzdiff  bzegrep  bzexe  bzfgrep  bzgrep  bzip2  bzip2recover  bzless  bzmore

I had an 'A ha!' moment when I realized that I would just need to install Debian from this USB drive and that would keep my persistent data. This is how Ubuntu works I believe. I've created an empty image, partitioned and formatted it, copied the USB file and installed MBR & extlinux. However after booting and running an installation from this USB it has only installed a clean system...

What should I do in this situation? How to convert this image fully featured Debian installation?

I know it can be done, it's Linux after all...

share|improve this question
I don't know of a one-stop solution, but dpkg-repack might help? –  tripleee Jul 1 '13 at 4:18
@tripleee thanks, I now know a handy tool! It won't cut it I'm afraid, since not everything has been installed through a package manager/deb files. –  szalski Jul 1 '13 at 12:07

1 Answer 1

This should not be different, than copying a Installation from one partition to another. You only have to copy the files.

If you google for that problem there are quite a few guides. Also remember, that you don't have to clone the partition - a 'simple' copy works,too.

share|improve this answer
Could you expand on your answer a bit? What do you mean by copying the files? Copy files from the live-rw partition over to an existing, healthy installation or to a clean disk/partition? If it's the latter, I have tried that and it won't work because the live-rw partition is a stripped down version of a full system (limited binaries, etc.). –  szalski Jul 7 '13 at 19:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.