On Monday 07 August 2006 06:50, Richard Andrews wrote: > I'm looking for advice on building up a filesystem image file. > > I have a working server that I want to mimick in UML. What is the best way > to get the filesystem of the real server into a UML filesystem image? What > are the gotchas? eg. I can immediately suspect device configs and partition > tables would be problematic.
To work on: /etc/fstab /etc/inittab maybe Device configs: things like hwclock, consolefonts and X11 don't make sense in UML (however you can run Xnest instead of normal X by changing a symlink somewhere). In some distros (e.g. Debian) the initscripts recognize UML and skip calling those tools. Partition tables: you'd normally copy a single partition rather than a disk, so you don't get partition tables. The reason for this is that when you have a partition table on a file, mount -o loop does not parse the table, so you need a script (easily writable) to calculate the offset and pass it as offset=$n_sectors to mount or losetup. And this is not widely known. > My understanding is that the filesystem image is just the result of a > "mount -o loop" situation. Is this true or are there additional elements to > the filesystem image file? Yes, that's correct. > Eventually I'm also interested in going the other way too: tuning the UML > system config then putting those changes back onto the real servers. What > do should I keep in mind when creating the UML image that will help me > avoid problems going back to the real servers? Never tried that, however I could say "make a patch for your Uml-related changes to /etc/fstab and similar material". If /dev/hdaN / /dev/ubda is used elsewhere, you'll probably want to setup some symlinks in > Thanks > > -- > Rich -- Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!". Paolo Giarrusso, aka Blaisorblade http://www.user-mode-linux.org/~blaisorblade Chiacchiera con i tuoi amici in tempo reale! http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ User-mode-linux-user mailing list User-mode-linux-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user