Hi.
This question is not really related to programming...
After compiling the kernel, I will convert it to a .iso file.
It contains the boot folder and the boot.cfg file (I use GRUB). I'm going to upload the image to a flash drive(using balenaEther) and upload from it.
I had an idea that it would be nice to be able to manage files on the same flash drive using the file system driver.
I have this idea: write it down .iso as a hard disk image, for example, 4 GB in size, and then upload this hard disk image to a flash drive. I would like to be able to immediately write some files to the flash drive image and then use them in the OS.
What tools can you use to implement this?
P.S. when using balenaEther or other programs, the file system is "damaged" even after writing .iso on a flash drive I can't access it.
Write .iso to hard disk image
Re: Write .iso to hard disk image
You seem to try to write a CD files system to a flash drive.
And writing files to an existing file system: Simply mount it with the OS you are developing on (You probably just have to plug it in and Windows or Linux will mount the drive.) Then you can write files to it using the shell or script(s) or the file manager.
Greetings
Peter
And writing files to an existing file system: Simply mount it with the OS you are developing on (You probably just have to plug it in and Windows or Linux will mount the drive.) Then you can write files to it using the shell or script(s) or the file manager.
Greetings
Peter
Re: Write .iso to hard disk image
You should not use that program, it has serious privacy concerns (sad, but true).mrjbom wrote:Hi.
This question is not really related to programming...
After compiling the kernel, I will convert it to a .iso file.
It contains the boot folder and the boot.cfg file (I use GRUB). I'm going to upload the image to a flash drive(using balenaEther) and upload from it.
That's exactly what my mkbootimg tool does. It creates a hybrid CDROM ISO / flash drive image out of a directory. Then you can use dd or my other tool, USBImager to write it to a flash drive (both available as portable executable for Windows, Linux and MacOS).mrjbom wrote:I had an idea that it would be nice to be able to manage files on the same flash drive using the file system driver.
I have this idea: write it down .iso as a hard disk image, for example, 4 GB in size, and then upload this hard disk image to a flash drive. I would like to be able to immediately write some files to the flash drive image and then use them in the OS.
What tools can you use to implement this?
Note: my mkbootimg tool uses my boot loader, so either you switch to that, or (being MIT licensed) you could study the code to write your own image creator using any boot loader you'd like. The code is well written, easy to follow, and full of comments. It currently supports creating FAT, tar and FS/Z partitions from directory contents, and any file system with a partition image. Study the code if you'd like. The part where it creates a FAT16/32 partition and copies the loader files to it is here. Use esp_mkdir() and esp_addfile() to put any files you'd like there. Other partitions are created using a very simple fs interface, described in the README.
Yet another reason why not to use that spyware. Not because I wrote it, but you should really check out USBImager.mrjbom wrote:P.S. when using balenaEther or other programs, the file system is "damaged" even after writing .iso on a flash drive I can't access it.
Cheers,
bzt
Re: Write .iso to hard disk image
I expected that there are tools that can do this using GRUB.bzt wrote:You should not use that program, it has serious privacy concerns (sad, but true).mrjbom wrote:Hi.
This question is not really related to programming...
After compiling the kernel, I will convert it to a .iso file.
It contains the boot folder and the boot.cfg file (I use GRUB). I'm going to upload the image to a flash drive(using balenaEther) and upload from it.That's exactly what my mkbootimg tool does. It creates a hybrid CDROM ISO / flash drive image out of a directory. Then you can use dd or my other tool, USBImager to write it to a flash drive (both available as portable executable for Windows, Linux and MacOS).mrjbom wrote:I had an idea that it would be nice to be able to manage files on the same flash drive using the file system driver.
I have this idea: write it down .iso as a hard disk image, for example, 4 GB in size, and then upload this hard disk image to a flash drive. I would like to be able to immediately write some files to the flash drive image and then use them in the OS.
What tools can you use to implement this?
Note: my mkbootimg tool uses my boot loader, so either you switch to that, or (being MIT licensed) you could study the code to write your own image creator using any boot loader you'd like. The code is well written, easy to follow, and full of comments. It currently supports creating FAT, tar and FS/Z partitions from directory contents, and any file system with a partition image. Study the code if you'd like. The part where it creates a FAT16/32 partition and copies the loader files to it is here. Use esp_mkdir() and esp_addfile() to put any files you'd like there. Other partitions are created using a very simple fs interface, described in the README.
Yet another reason why not to use that spyware. Not because I wrote it, but you should really check out USBImager.mrjbom wrote:P.S. when using balenaEther or other programs, the file system is "damaged" even after writing .iso on a flash drive I can't access it.
Cheers,
bzt
It is a pity that I will have to give up GRUB in this case and write my own loader...
Thanks you.
-
- Member
- Posts: 5568
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Write .iso to hard disk image
It sounds like you're using grub-mkrescue, which is designed to create a read-only rescue disk.mrjbom wrote:I expected that there are tools that can do this using GRUB.
Have you tried taking your partitioned/formatted disk and using grub-install to install GRUB on it? That way the disk will remain writable.