[flashboot] Script for diskimage-creation

Rickard Dahlstrand rd at tilde.se
Tue Nov 7 18:08:09 EST 2006


Hi Jakob,

Jacob Winther wrote:
> Hi
>
> I've attached my version, it also includes my c/h/s value. Small
> feature request, a command line option to gzip it would be nice, as my
> vmware box can't write images to my flash.
I thought about this and this makes it harder and slower to use the
mountme-scripts, and since it's so easy to gzip when you're done and
need to send the image of the build machine, it might be easier to just
do it manually. However I will add it to the instructions at the end.
>
> One other thought, my flash it 500Mb, and the contents of it is only
> 10Mb, is there any way of making a smaller image that still looks like
> a full image once installed. I guess my thoughts was that if the mbr,
> disklabel and filesystem only write stuff to the beginning of the
> disk, can you just write the first 10Mb of the disk and still have it
> ready to be fully utilised, basically it would drop the time to write
> the image down drastically.
The thought has crossed my mind. However I know to little about these
things to take any shortcuts, I have no idea how vnconfig will like a
truncated image. An alternative is as you state above to use gzip as
this is quite effective in compressing the zeros in the end.

I'm coping the list if there is anyone else has thoughts on this subject.

Rickard
>
> Nice work though.
>
> Cheers
> Jacob
>
> On 11/7/06, Rickard Dahlstrand <rd at tilde.se> wrote:
>> Hi Jacob,
>>
>> Thanks for testing, I agree with all of your changes. Any chance that
>> you can send a patch or a complete script of these changes as they work
>> for you.
>>
>> Regards, Rickard.
>>
>> Jacob Winther wrote:
>> > Tested with physdiskwrite and worked fine for me with some minor
>> changes:
>> >
>> > let asize=$totalsize-$sectorstrack (I have 63 sectors/head)
>> >
>> > and less importantly
>> >
>> > MOUNTPOINT=/mnt (double slashes)
>> >
>> > Any reason why you need to specify totalsize and sectorscylinder
>> > instead of deriving them from c/h/s values?
>> >
>> > Cheers
>> > Jacob
>> >
>> >
>> >
>> > On 11/2/06, Rickard Dahlstrand <rd at tilde.se> wrote:
>> >> Hi,
>> >>
>> >> Attached is a script that creates a diskimage-file for use with
>> >> flashboot. This means that you no longer need to connect the
>> flashcard
>> >> to the system where you build flashboot. Instead you can gzip and
>> move
>> >> the imagefile to your PC and use tools like dd or
>> >> http://m0n0.ch/wall/physdiskwrite.php to write it to your flashcard.
>> >>
>> >> The script needs to be adapted to the geometry of the disk you are
>> >> using, right now this is done by editing the script but before we
>> commit
>> >> I will add something that lets the user specify this in the
>> >> command-line.
>> >>
>> >> This scripts needs some testing and auditing before we can commit
>> it, so
>> >> it would be great if everyone can help out.
>> >>
>> >> Also, a great feature would be if the script could write directly
>> to a
>> >> flash-device. Not critical, but that would make it one step less
>> for the
>> >> people that use connect their flash to the system where the build
>> >> flashboot. Anyone with a flashreader on their build-system could
>> >>
>> >> There is also two support-scripts that let you mount and unmount the
>> >> image after creation. These can be used for creating and editing
>> >> configuration after the image-creation process.
>> >>
>> >> Also, boot.conf needs to be copied to inital-conf before you
>> start. This
>> >> is the only file that is copied to the filesystem other than the
>> >> boot-loader and kernel.
>> >>
>> >> Thanks, Rickard.
>> >>
>> >>
>> >> stty com0 9600
>> >> set tty com0
>> >>
>> >>
>> >> _______________________________________________
>> >> flashboot mailing list
>> >> flashboot at mindrot.org
>> >> http://lists.mindrot.org/mailman/listinfo/flashboot
>> >>
>> >>
>> >>
>> >>
>>


More information about the flashboot mailing list