disktools

Programming, for all ages and all languages.
Post Reply
OrOS
Member
Member
Posts: 143
Joined: Sat Sep 08, 2007 11:26 pm
Location: Canada

disktools

Post by OrOS »

Hi All! As part of project pedigree I've been working on an image manipulation program called disktools, designed for easy use with scripts. Its highly portable, requiring only a small subset of standard C and file IO.

Ex output:

Code: Select all

macintosh-2:~/dt tyler$ build/disktools -i floppy_fat.img -f FAT12 -a tree
G       boot                 DIR  
G       .Trashes             DIR  
G       ._.Trashes          
G       KERNEL              
G       .DS_Store           
G       INITRD  TAR         
G       WhoKnow              DIR  
D       ?NTITL~1             DIR  
G       TEST                 DIR  
G       UHOH                 DIR

Code: Select all

macintosh-2:~/dt tyler$ build/disktools -i floppy_fat.img -f FAT12 -a dump
OEM Name:                 mkdosfs 
Bytes Per Sector:         512
Sectors Per Cluster:      1
Reserved Sector Count:    1
Table Count:              2
Root Entry Count:         224
Total Sectors:            2880
Media Type:               240
Table Size:               9
Sectors Per Track:        18
Head Side Count:          2
Hidden Sector Count:      0
Total Sectors:            0
FAT Type:                 12
BIOS Drive Num:           0
Reserved Field:           0
Boot Signature:           41
Volume ID:                1211221136
Volume Label:             LOL        FAT12   
FAT Label:                FAT12   
Bootable:                 Yes
At the moment, it supports FAT12/16/32 and SFS (making it the first non-windows SFS tool :s) and I plan on releasing the source to the public domain when completed. I am actively trying to add new formats, but there are (as most OS Devs will know :x) a great many out there. My current task is ext2 which is coming along nicely.

What I'm asking for is disk images containing at least 2 directory entries, a few random files, any special type supported by the filesystem. Mainly, I'm looking for, in order of priority:
  • ext2/3 small HD images with and without partitions.
  • anything you can think of :)
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Re: disktools

Post by earlz »

this looks really neat.. will it support things like managing the disk(moving and creating files within the disk) and copying files from the host to the disk?

Also, I'd love to see FFS support..
OrOS
Member
Member
Posts: 143
Joined: Sat Sep 08, 2007 11:26 pm
Location: Canada

Re: disktools

Post by OrOS »

this looks really neat.. will it support things like managing the disk(moving and creating files within the disk) and copying files from the host to the disk?
That was the entire point of it :) Its being made so pedigree has a cross-platform way of working with disk images without requiring a loopback device (which needs root) or hdiutils (which is just a pain in the F* @$$ to script)
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Re: disktools

Post by earlz »

That would be very handy for say building nightly floppy images or such on a host you don't have root access to..
Post Reply