On Fri, 11 Feb 2005, Fermín Galán Márquez wrote: > mount root_fs /mnt/uml -o loop > vi /mnt/uml/etc/hosts (or whatever) > ... > umount /mnt/uml > > I wonder if something similar could be done with COW-ed filesystems (created > by a UML booting or with the uml_mkcow utility).
I've been doing "uml_moo -d uml_root.cow.img" to copy the COW changes back to the original image. Then I remove the COW file and reinitialize it, either letting the UML kernel do it or doing it explicitly so I can set the permissions. Then I mount the root and edit config files. > Is possible to get the differences between two conventional filesystems > (supposing both have the same size and block structure) as a COW file? > Something like that: > > fs_diff root_fs_1 root_fs_2 > cow_fs If I absolutely had to do this, I might make a dump (od) of each one and diff the dumps (groan). More useful would be to mount both filesystems and do a recursive diff: "diff -r /tmp/mountpt1 /tmp/mountpt2 > /tmp/diff.out". It's smart: it's silent for files that are equal, and for binary files it just says "binary files /tmp/mtpt1/gorf /tmp/mtpt2/gorf differ". (You can make it do this for text files also, with the -q switch.) The only problem would be devices, sockets and named pipes, which it will try to read; also it follows symlinks. Some fancy footwork with find can help you with both issues. James F. Carter Voice 310 825 2897 FAX 310 206 6673 UCLA-Mathnet; 6115 MSA; 405 Hilgard Ave.; Los Angeles, CA, USA 90095-1555 Email: [EMAIL PROTECTED] http://www.math.ucla.edu/~jimc (q.v. for PGP key)