-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Target and System filesystem must be same type #2065
Comments
Can you give me the exact command you're using which gives this error? I am not sure I fully understand the problem. When a partitioned device such as /dev/hda2 is specified, the MBR is never checked, as that block is not accessible from the specified device. If on the other hand a partitioned device is specified via /dev/hda, then the partition table is the first block on the device, but a filesystem will be accessible only if the first block is not an MBR, indicating a "flat" filesystem.
Yes, in order to determine the filesystem that is on a specified partition, such as /dev/hda1, the first block ("super block" on MINIX, reserved sectors on FAT) is read. If that block contains the MINIX magic number, it is assumed the filesystem is MINIX, otherwise FAT. FAT doesn't have a superblock and usually has reserved sectors instead, depending on type of FAT.
Yes, if its not MINIX, it is assumed FAT. When
The first block may not be overwritten on FAT filesystems because there is no superblock - these are likely reserved sectors and thus not written via
So I'm not really following you here, exactly what is the bug/problem? |
|
Ok let me try that right now, thanks. |
Yes, but maybe it should be after a minix install so that you have the minix 512 bytes already. @ghaerr you must be in some other timezone today? :) |
Running QEMU, I used the following line in qemu.sh to boot from FAT floppy and then mount /dev/hda1 from the hd32mbr-fat.img:
I then ran the above
Yes, I am traveling currently in southern Spain and enjoying it :) |
Maybe it should be what? It seems perhaps this is an issue where the HD was previously MINIX, then you ran |
It is a specific issue where it was previously minix and the 512 bytes of minix are always there. |
I see. So the first block in the partition (not MBR) still has the MINIX magic signature, while after you have used Yes, this is a bug - not sure what to do yet. IIRC only FAT32 uses reserved sectors by default (at least with our Thank you! |
Continuing from: #2062 (comment)
Problem on fat where I get the error:
Target and System filesystem must be same type
It is here:
elks/elkscmd/sys_utils/makeboot.c
Line 418 in f752204
So filesystem type is checked by reading 512 bytes from disk. It is only checking for Minix. This is not transparent in my opinion. I was thinking it is checking partition IDs for example. Why are these 512 bytes not overwritten (with fdisk or mkfat)? Sometimes by chance they get overwritten and problem is hidden. I did fdisk with 'w', mkfat, sync and still I could not overwrite this 512b block ... it should not be a guessing job which step is supposed to overwrite it. In my case it is either fdisk or mkfat not overwriting these 512 bytes or my new partition is somehow a bit after the old one leaving this 512 bytes untouched (where it was Minix indeed).
The text was updated successfully, but these errors were encountered: