Linux – Building a disk image without root privileges

disk-imagelinux

I am attempting to setup nightly builds of a Linux OS on my webserver. Well, the problem is I need to generate a floppy disk image without being root.

Really, I don't need to fully generate it. I just need to update the image. As I have a FFS image with boot manager and such, and just need to add my kernel file to the image. I have seen no useful image tools out there though with dealing with FFS.

Does anyone know of some tools to use for updating such a floppy image. I wouldn't mind programming a little glue program, but I really don't want to code up full FFS support by myself at the moment.

Best Answer

I can offer two (non-ideal) options:

  • Create a 'placeholder' file inside your disk image and splice the kernel into the image (ick)
  • If you don't need to use FFS, you could try FAT. mtools is very handy for this sort of thing.

Example:

michael:~> mdir -i test.img ::
 Volume in drive : is Testing (abbr=TESTING    )
 Volume Serial Number is 0000-0000
Directory for ::/

No files
                          1 457 664 bytes free

michael:~> mcopy -i test.img kernel.com ::
michael:~> mdir -i test.img ::
 Volume in drive : is Testing (abbr=TESTING    )
 Volume Serial Number is 0000-0000
Directory for ::/

kernel   com     47632 2009-06-17  16:50 
        1 file               47 632 bytes
                          1 409 536 bytes free
Related Topic