Formating FAT32, but linux created FAT32 is not like win created FAT32?? Difference?
Hello,
I have one Problem and can't even understand it. When I format my SD Card in win with fat32 (I do it with bootice), everything works but when I format with linux (I tried mkfs.vfat, mkfs.msdos, gparted, fdisk) nothing works. I created a shell script which creates multiboot usb with one NT6 system some Live ISO's and I added posibillity to chainload with grub2 in mbr all other popular bootloaders like syslinux, grub4dos, nt5 (ntldr),... Problem: If I format my SD card in win and run then my script, everything works great. But as soon as I format it in linux nothing works. I can't boot win7 (pc restarts), for syslinux I get "boot error" and for grub "no grldr". I really don't understand what the difference is or how to format. I tried some other commands (with offset, -o) but nothing works, I getting already mad it's like somebody is telling me that 1+1 is not 2! Actually everything works, but I just can't belive that I really need commercial OS like Win to format my SD card if there are so many great linux distros. If nobody knows how to format right, just explain the difference beetween windows created FAT32 (0x0b) and gparted, fdsik,... created FAT32 (0x0b)? BTW: I tried it from ubuntu lucid, maverick installed and also iso's, same results |
You might find this other thread of interest: http://www.linuxquestions.org/questi...tition-386916/
Hopefully that addresses the issue; if not, let us know. |
thanks, I'll take a look now :)
|
@GrapefruiTgirl
as long as I understood the link, there was an LBA problem. The solution was to format it with 0x0C instead of 0x0B. As long as I understand LBA, with 8gb SD Card there is no sense to format with 0x0C (win formats it also with 0x0B and everything works). And I don't have problem that win/linux/macos/dos/... (I tried them all) can't read the partition (no matter if formated in win, linux, macos). My problem is more that in both OS I create FAT32 (0x0B) without errors and everything works fine. The only difference is the behavior during boot process, which is incorrect if I format it from linux, in my case ubuntu lucid. I thought also that it could be BIOS thing, but it can't be bios problem because I tested it on different mainboards and notebooks). |
Hmm.. OK, I don't have a further suggestion at this time - hopefully someone else can shed some insight.
Best of luck - hopefully it's something simple! |
Anyway, thanks for a help.
Here are some things that I tried, maybe it helps someone to help me :) format with linux: 1. Format fat32 Code:
sudo mkfs.vfat -n ${VOLUME} ${DEVICE}1 Code:
sudo mkfs.msdos -n ${VOLUME} ${DEVICE}1 gparted/fdisk 2. install syslinux Code:
sudo ./syslinux/linux/syslinux ${DEVICE}1 Code:
sudo grub-install --no-floppy --root-directory=/media/${VOLUME} ${DEVICE} format with Win: 1. Format fat32 2. Start Linux/Linux LiveCD 3. install syslinux Code:
sudo ./syslinux/linux/syslinux ${DEVICE}1 Code:
sudo grub-install --no-floppy --root-directory=/media/${VOLUME} ${DEVICE} checking all if formated with win: Backup mbr, destroy mbr, restore mbr - all OK Backup pbr, destroy pbr, restore pbr - all OK Backup mbr & pbr, create new ms-dos fs ie w. gparted, create new partition (smaller) in windows, restore mbr & pbr - all OK Backup mbr & pbr, create new ms-dos fs ie w. gparted, create new partition (smaller) in linux, restore mbr & pbr - NOT WORKING checking all if formated with linux: Backup mbr, destroy mbr, restore mbr - no difference only grub2 works - NOT WORKING Backup pbr, destroy pbr, restore pbr - no difference only grub2 works - NOT WORKING Backup mbr & pbr, create new ms-dos fs ie w. gparted, create new partition (smaller) in windows, restore mbr & pbr - all OK Backup mbr & pbr, create new ms-dos fs ie w. gparted, create new partition (smaller) in linux, restore mbr & pbr - NOT WORKING |
Maybe of interest, from "man mkfs.vfat":
Quote:
|
No, you misunderstand:
It not "format with 0x0C instead of 0x0B", it is partition as ... When you partition a disk, there is a byte to the partition table that describes the filesystem type. This is the Id of the partition that you see listed with fdsik -l FAT16 is type 5 FAT16 LBA is type e FAT32 is type b FAT32 LBA is type c Linux is type 83 Etc. Linux does not care if the filesystem (as generated by format (mkfs...)) is different from the partition table descriptor byte (as written by fdisk). Windows does care. So, check your partition table on the removable device. You probably need to change it to type b, by using fdisk and then reformat the partition to FAT32. |
LOL -- thanks *harmless, apparently the answer right under our noses, in the man pages :/ though I still am optimistic for *something* good..
|
In the light of the above, don't forget to mark the partition as "bootable" ( by using fdisk not mkfs... [this is not mkfs's job, it is the job of fdisk to mark partitions as "bootable"] )
|
Partition is marked as bootable and it has never changed from 0x0b. Actually grub2 should work on all, syslinux not, the only one compatible to all bootloaders I use is fat32, it's slow but it has advantage that all OS can read/write it, including macos which I also boot.
I tried msdos just to see if there is a difference in booting, grub2 can boot from msdos, syslinux too. mkfs.vfat: Code:
Platte /dev/sdf: 8166 MByte, 8166309888 Byte |
Maybe it will help if you look at menus:
Grub2 is in MBR and Syslinux 3.86 in PBR and if it's formated from win, then these entries work: Grub2 Menu: Code:
menuentry "00. BOOTMGR (NT6) via PBR file" { Code:
label back If you want to try, here are my pbr's. |
Thank you. Two things to think about:
1] There is no boot marker: Code:
Platte /dev/sdf: 8166 MByte, 8166309888 Byte Code:
dd if=/dev/sdf of=WIN-MBR-backup bs=512 count=1 Code:
dd if=/dev/sdf of=Linux-MBR-backup bs=512 count=1 Are they the same, if not, what are the differences? Aside: Quote:
|
Thanks for help,
I did it already yesterday,but I didn't save logs about it (deleted non working). I'll try it now again to post the result. Yesterday the result was: Extracted mbr and pbr from Windows formated sd. Reformat in windows, restore mbr/pbr from win or linux. Everything works. Formated in linux and restored mbr/pbr which was backed up from win formated partition. Same result, not working (exactly: mbr loads always,no matter if in win or linux formated. pbr boots only if formated in win. This is the problem. I even tried to install syslinux from win to pbr of partition which was created with mkfs.vfat/mkfs.msdos/gparted/fdisk, same result, not working. As you can see in gparted, it's marked as boot. Even if not it should work with makeactive (for grub) and parttool (hd0,1) boot+ (for grub2). I formated now with with win sudo fdisk -l /dev/sdb Code:
Platte /dev/sdb: 8166 MByte, 8166309888 Byte |
PBR - Partition Boot Record (Second Stage Bootloader)
|
All times are GMT -5. The time now is 08:56 PM. |