Formating FAT32, but linux created FAT32 is not like win created FAT32?? Difference?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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).
Last edited by boki15; 07-19-2010 at 09:41 AM.
Reason: spelling mistake
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
Bugs
mkdosfs can not create bootable filesystems. This isn't as easy as you might think at first glance for various reasons and has been discussed a lot already. mkdosfs simply will not support it
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.
In the light of the above, don't forget to mark the partition as "bootable" ( by using fdisknotmkfs... [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
255 Köpfe, 63 Sektoren/Spur, 992 Zylinder
Einheiten = Zylinder von 16065 × 512 = 8225280 Bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0004c935
Gerät boot. Anfang Ende Blöcke Id System
/dev/sdf1 1 992 7968208+ b W95 FAT32
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" {
insmod fat
set root=(hd0)
chainloader (hd0,1)/bootmgr.pbr +1
boot
}
menuentry "01. Grub via PBR (second stage bootloader)" {
insmod fat
set root=(hd0)
chainloader (hd0,1)/grldr.pbr +1
}
menuentry "02. Grub4Dos" {
linux16 /boot/grub4dos/grub.exe
}
menuentry "03. Syslinux via chainloading" {
insmod fat
set root="(hd0,1)"
chainloader +1
}
menuentry "03. Syslinux via PBR file" {
insmod fat
set root="(hd0)"
chainloader (hd0,1)/syslinux.pbr +1
}
menuentry "04. NTLDR (NT5) via PBR file" {
insmod fat
set root="(hd0)"
chainloader (hd0,1)/ntldr.pbr +1
}
syslinux menus
Code:
label back
menu label grub2
TEXT HELP
This entry will bring you to the Grub2 menu.
ENDTEXT
kernel /boot/syslinux/chain.c32
append hd0 0
label nt6
menu label 01. NT6 chainload
TEXT HELP
NT6 - bootmgr
ENDTEXT
com32 /boot/syslinux/chain.c32
append ntldr=/bootmgr
If I format in Linux, these entries just don't work. I tried restoring pbr's and mbr's, but it's always the same. Win formated partiotion - OK, linux - NOT WORKING
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.