Virtual FAT disk images error, can somebody help me , thank you !
when I use the command :
1: mkdir /my_directory
2: qemu linux.img -fda fat:floppy:/my_directory
when I write to the floppy(just "mkdir test.dir" in the floppy), the error occur:
"FLOPPY ERROR: fdctrl_transfer_handler: writing sector 1"
and nothing is written to the /my_directory.
I don't know why?
can you help me, thank you very much!
Quoted 10 lines · Zhi Hui Li
when I use the command :
1: mkdir /my_directory
2: qemu linux.img -fda fat:floppy:/my_directory
when I write to the
floppy(just "mkdir test.dir" in the floppy), the error occur:
Quoted 11 lines
"FLOPPY ERROR:
fdctrl_transfer_handler: writing sector 1"and nothing is written to the /my_directory.
I don't know why?
can you help me, thank you very much!
Zhi Hui,
You could try:
qemu linux.img -fda fat:floppy:rw:/my_directory
By default, it's only allow read-only access.
Mark
Quoted 23 lines · Mark Wu
Quoted 11 lines · Zhi Hui Li
when I use the command :
1: mkdir /my_directory
2: qemu linux.img -fda fat:floppy:/my_directory
when I write to the
floppy(just "mkdir test.dir" in the floppy), the error occur:Quoted 11 lines
"FLOPPY ERROR:
fdctrl_transfer_handler: writing sector 1"and nothing is written to the /my_directory.
I don't know why?
can you help me, thank you very much!
Quoted 5 lines
Zhi Hui,
You could try:
qemu linux.img -fda fat:floppy:rw:/my_directoryBy default, it's only allow read-only access.
That explains it. Thanks Mark!
Stefan
Quoted 6 lines · Zhi Hui Li
when I use the command :
1: mkdir /my_directory
2: qemu linux.img -fda fat:floppy:/my_directory
Quoted 8 lines
when I write to the
floppy(just "mkdir test.dir" in the floppy), the error occur:"FLOPPY ERROR:
fdctrl_transfer_handler: writing sector 1"and nothing is written to the /my_directory.
I don't know why?
Although the error comes from hw/fdc.c code it's probably originates in block/vvfat.c:vvfat_write(), because fdc.c is calling bdrv_write() and reports an error if that function fails.
I suggest adding printfs or using gdb. The only two returns that have no fprintf(stderr, ...) are:
/* Check if we're operating in read-only mode */
if (s->qcow == NULL) {
return -EACCES;
}and
if (sector_num < s->first_sectors_number)
return -1;
Perhaps one of these is failing?
Stefan