Command Line Flags 2/2 (VHD) | GPT Disk Image | UEFI Dev (in C)
Adding a flag for fixed vhd footers, which is a struct of 512 bytes appended to the end of the image. Also showing different mount options and small examples.
It's not too bad, assuming you know how bit shifting works and can program and aren't tired. Which doesn't always happen...
Links:
https://en.wikipedia.org/wiki/VHD_(file_format)
https://web.archive.org/web/20120202144328/http://download.microsoft.com/download/f/f/e/ffef50a5-07dd-4cf8-aaa3-442c0673a029/Virtual%20Hard%20Disk%20Format%20Spec_10_18_06.doc (vhd spec download link)
https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-and-gpt-faq
https://www.osforensics.com/tools/mount-disk-images.html (if you want a 3rd party tool for mounting/unmounting on windows)
UEFI Programming playlist:
https://www.youtube.com/playlist?list=PLT7NbkyNWaqZYHNLtOZ1MNxOt8myP5K0p
Next video:
- Starting EFI Applications! Probably reading docs, simple text input/output, and shutting down/resetting.
Git Repo:
https://github.com/queso-fuego/UEFI-GPT-image-creator
Repo state at the start of this video (using the same start of the last video for part 1):
git clone -n https://github.com/queso-fuego/UEFI-GPT-image-creator
cd UEFI-GPT-image-creator
git checkout ff1a4bea046fb6c6e53cc9610ecbcf107eeed38b
Repo state at the end of this video (this is the most up to date commit to the repo as of June 2023):
git checkout 89414003520ba1b44e621dd3ac3e385e467e1405
Join the Community Discord: https://discord.gg/yKm4T89QFn
Contact:
https://queso_fuego.srht.site/contact.html
- Let me know if there's anything specific you'd like to see!
Questions about my setup/software/etc.?
Check the FAQ: https://queso_fuego.srht.site/about.html
Outline:
0:00 Intro / add VHD flag
3:08 Start vhd footer function, get vhd spec
6:20 Look at VHD spec / fill out struct
33:37 Add .vhd suffix to name, add vhd footer to end of image
47:14 Fail at debugging vhd
51:33 A little better, but not really
55:19 Now it's better; Also powershell mount script
59:33 Linux mount scripts, also broken
1:02:49 Fixed mount command
1:05:52 Addendum; show changes since adding flags
1:20:44 Various mount options for windows (again)
1:31:56 Linux mount scripts work still
1:33:25 Show multiple files in datafls.inf
1:34:40 Coming up / Outro
Music credits:
"Acid Trumpet" Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 4.0 License
http://creativecommons.org/licenses/by/4.0/
Colorful Flowers by Tokyo Music Walker | https://soundcloud.com/user-356546060
Music promoted by https://www.chosic.com/free-music/all/
Creative Commons CC BY 3.0
https://creativecommons.org/licenses/by/3.0/
#vhd #diskimage #cprogramming