Bug 710480 - mkfs.vfat doesn't correctly detect device partitions
Summary: mkfs.vfat doesn't correctly detect device partitions
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dosfstools
Version: rawhide
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-03 14:05 UTC by Jaroslav Škarvada
Modified: 2011-06-14 11:59 UTC (History)
3 users (show)

Fixed In Version: dosfstools-3.0.11-5.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of: 709266
Environment:
Last Closed: 2011-06-03 15:12:58 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jaroslav Škarvada 2011-06-03 14:05:03 UTC
+++ This bug was initially created as a clone of Bug #709266 +++

Description of problem:

   We install RHEL 6.0 x86_64 in UEFI mode on our Sandy Bridge platform with Cougar Point chipset. And we configure the HDDs as IRST (Intel Rapid Storage Technology) RAID0 . However it will encounter "format failed: 1" while formatting device /dev/md127p1 .

   We have tried with IRST (Intel Rapid Storage Technology) RAID0, RAID1, and RAID10 configurations. All of them encounter the same failure.

   BTW, it is OK if we install RHEL 6.0 in Legacy BIOS mode on the same IRST RAID .

Version-Release number of selected component (if applicable):

   RHEL 6.0 x86_64 .

How reproducible:


Steps to Reproduce:
1. Configure BIOS to UEFI mode on the Sandy Bridge platform
2. Configure BIOS to use onboard RAID function.
3. Press Ctrl+I during BIOS POST to configure IRST (Intel Rapid Storage Technology) RAID .
4. Install RHEL 6.0 x86_64 in UEFI mode.
  
Actual results:


Expected results:


Additional info:

--- Additional comment from lavator on 2011-05-31 10:52:03 CEST ---

Created attachment 501941 [details]
BIOS: IRST RAID

As shown in "BIOS_IRST_RAID.jpg" , our Sandy Bridge platform is configure as IRST  ( Intel Rapid Storage Technology) RAID0 in this testing case.

--- Additional comment from lavator on 2011-05-31 10:56:22 CEST ---

Created attachment 501945 [details]
HDD partition table of the RHEL 6.0 x86_64 UEFI installation

  The HDD partitions of the RHEL 6.0 x86_64 UEFI installation are shown in "partition.jpg" . The EFI partition is located in /dev/md127p1 .

--- Additional comment from lavator on 2011-05-31 10:59:20 CEST ---

Created attachment 501946 [details]
snapshot of format failure :1

 As shown in "failure.jpg", an error was encountered while formatting device /dev/md127p1 .

--- Additional comment from lavator on 2011-05-31 11:05:03 CEST ---

Created attachment 501948 [details]
the log file

Please check "raid.tgz" for the log files during installation. In particular, the "anaconda-tb-UQD_I0LjBU2H.xml" inside is generated by pressing the button "File Bug" .

--- Additional comment from lavator on 2011-05-31 11:11:28 CEST ---

Created attachment 501950 [details]
trouble shooting to format EFI partition

  As shown in "trouble_shooting.jpg" , we try to manually format the EFI partition /dev/md127p1. mkfs.vfat cannot recognize the device node /dev/md127p1 , and mkfs.ext4 ( and also mkfs.ext3, mkfs.ext2 ) can format /dev/md127p1 correctly. It seems to be the possible root cause.

   Please kindly help to clarify this issue.

--- Additional comment from jskarvad on 2011-05-31 22:05:28 CEST ---

Created attachment 502092 [details]
Test code

This is such a "security feature". But it is not perfect in detection. Does it work with the -I switch? I think anaconda should be changed to use this switch by default.

Please provide the major and minor numbers for the failing device, or compile and run the attached source code and provide its output (preffered, it uses the same syscalls as dosfstools detection):
$ gcc -o test test.c
# ./test /dev/md127p1

--- Additional comment from lavator on 2011-06-01 07:32:23 CEST ---

Hi Jaroslav ,

   "mkfs.vfat -I" works with IRST RAID0 volume /dev/md127p1 . Please check the response below.

# ./test /dev/md127p1
rdev: 10300

# mkfs.vfat -I /dev/md127p1
# mkdir /tmp/x
# mount /dev/md127p1 /tmp/x
# touch /tmp/x/file
# mkdir /tmp/x/dir

--- Additional comment from jskarvad on 2011-06-02 12:30:16 CEST ---

Created attachment 502487 [details]
Proposed fix

Thanks for info. The attached patch should fix it. But I am still suggesting the anaconda team to use the '-I' switch.

There is also available scratch build for testing:
http://jskarvad.fedorapeople.org/dosfstools/dosfstools-3.0.9-4.el6.x86_64.rpm

Please test it and report results.

--- Additional comment from lavator on 2011-06-03 09:29:52 CEST ---

Created attachment 502742 [details]
test results of new dosfstools-3.0.9-4.el6.x86_64.rpm

Hi,
  As shown in "mkdosfs.jpg", dosfstools-3.0.9-4.el6.x86_64.rpm works well.
  ( where /tmp/mkdosfs comes from dosfstools-3.0.9-4.el6.x86_64.rpm , and /usr/sbin/mkdosfs is the original one ).

--- Additional comment from jskarvad on 2011-06-03 09:35:34 CEST ---

Thanks for info. I will forward the patch upstream.

Comment 1 Jaroslav Škarvada 2011-06-03 14:37:53 UTC
Reported upstream.


Note You need to log in before you can comment on or make changes to this bug.