The sickest thing that's been done with UML yet.
Remember when I talked about making UML and its root filesystem be one file you can just run? Well, I made one as a proof of concept...
http://www.landley.net/code/firmware/notes.html
You have been warned...
Rob
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
slick
Signature · 2 lines
Jason When pigs fly, they fly first class.
Quoted 10 lines · Rob Landley
Remember when I talked about making UML and its root filesystem be one file you can just run? Well, I made one as a proof of concept...
http://www.landley.net/code/firmware/notes.html
You have been warned...
Rob
Quoted 10 lines
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 4 lines · Rob Landley
Remember when I talked about making UML and its root filesystem be one file you can just run? Well, I made one as a proof of concept...
Hehe, nice. I've been considering doing this with an initramfs. It sounds like you're doing something different (I couldn't find a one-or-two line here's-how-it-works on your page :-).
Jeff
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 9 lines · On Wednesday 13 April 2005 11:27 am, [email protected] wrote:
Quoted 4 lines · Rob Landley
Remember when I talked about making UML and its root filesystem be one file you can just run? Well, I made one as a proof of concept...
Hehe, nice. I've been considering doing this with an initramfs. It sounds like you're doing something different (I couldn't find a one-or-two line here's-how-it-works on your page :-).
I _really_ need to update that page. I've been busy getting the build script and source tarball cleaned up for release (possibly even tonight, but don't hold your breath)...
How it works:
It's a squashfs root partition (over 11 of the 13.7 megs), where the initramfs script does "mount -t hostfs -o / / /sub", examines sub/proc/self/exe to find the running executable, reads bytes 12-15 of that (where I wrote the length of the original UML exe; note that the 16 byte elf header ends with 6 bytes of padding, I grabbed the last four), and then does an "losetup -o $OFFSET /dev/loop0 sub/proc/self/exe", mounts that, pivot_root, and exec /bin/sh or /sbin/init or whatever you want...
The reality is slightly more complicated due to details like /proc/self/exe being a symlink to an absolute path while hostfs is mounted in a subdirectory. And I had to patch busybox losetup to have a readonly option because if losetup tries to open a running executable file read-write it dies with a "text file busy" error. But they weren't too hard to fix. (Just time consuming.)
The main advantage of doing this rather than a huge initramfs is that we don't eat so much memory. The squashfs naturally uses the host file as backing store.
P.S. Hang the UML kernel! When it comes up, try "mount --move /mnt/proc /proc". Apparently, when rootfs moves and afterwards you try to relocate a mount point that's bound under it, something gets very, very confused.
Here's the UML options I used:
Quoted 13 lines
make ARCH=um allnoconfig &&
cat >> .config << EOF &&CONFIG_MODE_TT=yCONFIG_LD_SCRIPT_STATIC=yCONFIG_BINFMT_ELF=yCONFIG_HOSTFS=yCONFIG_SYSCTL=yCONFIG_STDERR_CONSOLE=yCONFIG_UNIX98_PTYS=yCONFIG_BLK_DEV_LOOP=yCONFIG_INITRAMFS_SOURCE="initramfs/initramfs.txt"CONFIG_LBD=yCONFIG_EXT2_FS=y
Quoted 8 lines
CONFIG_PROC_FS=yCONFIG_SQUASHFS=yCONFIG_ZLIB_INFLATE=y
EOF
yes "" | make ARCH=um oldconfig &&
make ARCH=um &&
mv linux .. &&
cd ..
Yes, tt. It's portable.
Hopefully this weekend I can get this up and running on my server upstairs, and thus get my website moved onto my spiffy 3 megabit (symmetrical!) cable modem. Then it should be a much much faster download. Right now it's on a friend's DSL connection...
Of course to do that, I have to learn about UML network bridging... :)
Quoted 1 line
Jeff
Rob
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel