NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Constructing a GPT disk image
I would like to construct a GPT disk image file, which I will later dd onto a real disk. I am not sure how to do this, and so would appreciate any guidance. Here is what I have found; please correct me if any of the following is incorrect.
- It seems that gpt will nicely label a file as if it were a disk and will add partitions as normal.
- I am not sure how to access those partitions, as dkctl complains if given a file as the first argument.
- vnconfig seems to want a file that corresponds to a single partition, not a partitioned disk.
This suggests one potential strategy:
- create a file for each partition
- mount it with vnconfig and populate the filesystem
- create a file for the disk image
- label the disk image with gpt
- dd each partition into the disk image with an appropriate seek= option to place it at the location of the partition
Is this a correct procedure? Is it the best option? What would be needed to recognize wedges in a GPT disk image so this could be simplified (i.e., create the GPT file image and mount the wedges directly)?
Any guidance is greatly appreciated.
Thanks a lot.
Cheers,
Brook
Home |
Main Index |
Thread Index |
Old Index