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
- Chrooting and installing a bootloader (grub) - Can't chroot since the filesystem (
live-rw) is a very limited installation, no
- Installing Debian from this USB in hope that it will preserve the persistent files (like Ubuntu does) - installs a clean system.
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
/dev nodes and only a few binaries in /bin (can't even
chroot into it without
$ 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...