bugGNU GRUB - Bugs: bug #46700, AF advanced format drives 4096...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #46700: AF advanced format drives 4096 sector size are NOT supported

Submitted by:  Yuri <ayuri>
Submitted on:  Wed 16 Dec 2015 10:13:32 PM UTC  
 
Category:  Filesystem Severity:  Major
Priority:  5 - Normal Item Group:  None
Status:  Need Info Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Release: 
Release:  2.02~beta1 Reproducibility:  None
Planned Release:  None

( Jump to the original submission)

Sat 06 Feb 2016 06:55:03 AM UTC, comment #22: 

Well, there is apparently some bug (or at least incorrect assumption) on GRUB side. Pity, it is the first known case of BIOS supporting 4Kn disks.

If you can ever get hold of such system again, feel free to reopen.

Andrei Borzenkov <arvidjaar>
Project Member
Mon 01 Feb 2016 01:06:28 PM UTC, comment #21: 

Sorry, I no longer have time for this and machine in question is already in production. Let's close this as "works as expected".

Thanks for help.

Yuri <ayuri>
Mon 11 Jan 2016 05:59:29 PM UTC, comment #20: 

Could you please test attached patch on top of previous one; any changes?

(file #35993)

Andrei Borzenkov <arvidjaar>
Project Member
Mon 11 Jan 2016 09:39:09 AM UTC, comment #19: 

I can't scroll up, so providing only this.

Thanks.


Yuri <ayuri>
Tue 29 Dec 2015 05:13:28 PM UTC, comment #18: 

Did you try filetree.diff ? What is the result you get with it?

Vladimir Serbinenko <phcoder>
Project Administrator
Fri 25 Dec 2015 05:29:03 PM UTC, comment #17: 

So it appears that BIOS returns correct information in "Get drive parameters" but then fails in "Extended read". Could you please replace previous patch with next one and try once more; it should log actual read calls.

(file #35856)

Andrei Borzenkov <arvidjaar>
Project Member
Wed 23 Dec 2015 01:50:05 PM UTC, comment #16: 

here you go.


Yuri <ayuri>
Mon 21 Dec 2015 06:35:50 PM UTC, comment #15: 

See attached patch. It is on top of GIT master, so would be better to use it.

git clone git://git.savannah.gnu.org/grub.git
cd grub
git am /tmp/biosdisk.patch
./autogen.sh
./configure
make
pkgdatadir=$PWD ./grub-mkrescue -d grub-core -o grub.iso

Or use other commands you normally used to create grub image. All modules and other images are under grub-core directory.

Boot from this image and do
set debug=biosdisk
ls (hd0)

where hd0 is your 4Kn disk. Attach picture of result.

(file #35827)

Andrei Borzenkov <arvidjaar>
Project Member
Mon 21 Dec 2015 10:26:56 AM UTC, comment #14: 

Yes, let's do that if that's necessary. Tell me what's needed.

Yuri <ayuri>
Sun 20 Dec 2015 09:47:03 AM UTC, comment #13: 

Well, we still may support this but we need more details about what BIOS reports. Are you willing to run test version that displays more debugging information?

Andrei Borzenkov <arvidjaar>
Project Member
Sun 20 Dec 2015 09:19:03 AM UTC, comment #12: 

Okay guys, so next time someone comes around with a question about 4KN drives and BIOS and GRUB, tell him the following:

Booting from 4Kn drives is and will NEVER be supported by BIOS (AKA legacy BIOS AKA LEGACY). The ONLY solution for 4Kn AF drives is to boot via UEFI.

It's indeed the BIOS' fault and GRUB has nothing to do with it.
More than that, I propose printing a warning message immediately someone is trying to boot from such a drive under non-UEFI environment or maybe even if someone is `ls (hd0)` such a drive.

And, btw, sadly, I didn't consult supermicro KB initially as they have hell lot of questions about 4Kn and legacy BIOS.

Thanks.

Yuri <ayuri>
Fri 18 Dec 2015 09:23:12 AM UTC, comment #11: 

> I have a theory


Yes, this is probably the only explanation. But then total_sectors needs adjustment.

I wonder if there is any BIOS that natively supports 4k logical sector. EDD always talks about "physical" size.

Andrei Borzenkov <arvidjaar>
Project Member
Fri 18 Dec 2015 06:44:18 AM UTC, comment #10: 

> I no longer have time to troubleshoot this, sorry.


As you wish. I cannot reproduce it using available environment so assuming this is GRUB bug, it depends on someone having access to the affected system to debug and fix.

But it can just as well be BIOS bug.

Andrei Borzenkov <arvidjaar>
Project Member
Fri 18 Dec 2015 03:10:51 AM UTC, comment #9: 

Try attached patch. I have a theory

(file #35787)

Vladimir Serbinenko <phcoder>
Project Administrator
Thu 17 Dec 2015 09:54:42 PM UTC, comment #8: 

This is the version of grub I've used from my gentoo machine:  2.02_beta2-r7.

I no longer have time to troubleshoot this, sorry.

Yuri <ayuri>
Thu 17 Dec 2015 06:53:32 PM UTC, comment #7: 

What version do you use? You selected beta1 - please test current GIT master.

Andrei Borzenkov <arvidjaar>
Project Member
Thu 17 Dec 2015 06:51:10 PM UTC, comment #6: 

here's the grub image I'm using (pxelinux -> lnxboot.img -> grub.img)

(file #35785)

Yuri <ayuri>
Thu 17 Dec 2015 06:46:49 PM UTC, comment #5: 

Now I'm wondering what module should be loaded in order to make grub understand VFAT.

Also, I was able to boot via EFI centos 6' grub.efi (v0.97), which found the partition and found the files and booted the system properly.

Now in regards to grub2, here's the screenshot. The sizes there are totally wrong. I also don't get why they differ between ls -l invokations.


Yuri <ayuri>
Thu 17 Dec 2015 05:53:38 PM UTC, comment #4: 

Please show "ls -l" output in GRUB to verify sector size.

Andrei Borzenkov <arvidjaar>
Project Member
Thu 17 Dec 2015 04:09:44 PM UTC, comment #3: 

Purely cosmetic? Are you kidding me? The FS is full of files.
The machine can't boot.

# fdisk  -l /dev/sda

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.

Note: sector size is 4096 (not 512)

Disk /dev/sda: 1800.4 GB, 1800360124416 bytes
255 heads, 63 sectors/track, 27360 cylinders
Units = cylinders of 16065 * 4096 = 65802240 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       27361  1758164180   ee  GPT

# gdisk -l /dev/sda
GPT fdisk (gdisk) version 0.8.10

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 439541046 sectors, 1.6 TiB
Logical sector size: 4096 bytes
Disk identifier (GUID): 1FFC3352-7D1B-4C8A-B2DC-044530D005EB
Partition table holds up to 128 entries
First usable sector is 6, last usable sector is 439541040
Partitions will be aligned on 256-sector boundaries
Total free space is 1530 sectors (6.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            1536           76799   294.0 MiB   EF00  primary
   2           76800       439541040   1.6 TiB     FD00  Linux RAID
#

I have now trashed ext2 FS and made it a VFAT to go with UEFI bootloader. Still, grub is clueless about partition size and FS.

GPT was created with parted and gdisk, I don't remember the steps.

At this point it would be easier to just ship your the drive I guess.

(file #35780, file #35781, file #35782, file #35783)

Yuri <ayuri>
Thu 17 Dec 2015 08:49:52 AM UTC, comment #2: 

Do you see any problems that are not purely cosmetic? Ls that you pasted suggest that it mostly worked fine: fs is detected.

Vladimir Serbinenko <phcoder>
Project Administrator
Thu 17 Dec 2015 05:37:43 AM UTC, comment #1: 

Please attach

- first and last 32K of disk
- output of "fdisk -l /dev/sdX" for this disk
- 1K at offsets 6 and 48 MiB

And describe how exactly you created this partition table (which program/version, which steps).

Andrei Borzenkov <arvidjaar>
Project Member
Wed 16 Dec 2015 10:13:32 PM UTC, original submission:  

So basically they're not supported under latest grub.

I'm talking about real 4096 drives, where physical and logical sector sizes are 4096.

See attached screenshot. Partition start and total sizes are plain wrong unless you divide them by 8.

4096 / 512 = 8

Real FS begins at 6MiB and is 294 MiB in size.

So, let's get this fixed promptly. Such drives are now starting to flood the market.

Yuri <ayuri>

 

Attached Files
file #35993:  check_cf.patch added by arvidjaar (485B - text/x-patch)
file #35986:  gr3.jpg added by ayuri (84KiB - image/jpeg)
file #35987:  gr4.jpg added by ayuri (70KiB - image/jpeg)
file #35856:  biosdisk2.patch added by arvidjaar (3KiB - text/x-patch)
file #35847:  gr1.jpg added by ayuri (90KiB - image/jpeg)
file #35848:  gr2.jpg added by ayuri (88KiB - image/jpeg)
file #35827:  biosdisk.patch added by arvidjaar (1KiB - text/x-patch - Debug patch for biosdisk)
file #35787:  filetree.diff added by phcoder (526B - text/plain)
file #35785:  grub.img added by ayuri (168KiB - application/octet-stream)
file #35784:  gf2.jpg added by ayuri (71KiB - image/jpeg)
file #35780:  first32.blk added by ayuri (32KiB - application/octet-stream)
file #35781:  6mib.blk added by ayuri (1KiB - application/octet-stream)
file #35782:  last32.blk added by ayuri (32KiB - application/octet-stream)
file #35783:  48mib.blk added by ayuri (1KiB - application/octet-stream)
file #35775:  fg1.jpg added by ayuri (41KiB - image/jpeg)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by phcoder (Posted a comment)
  • -email is unavailable- added by arvidjaar (Posted a comment)
  • -email is unavailable- added by ayuri (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 17 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-02-06 arvidjaar Open/ClosedOpen => Closed
    2016-02-06 arvidjaar StatusNone => Need Info
    2016-01-11 arvidjaar Attached File- => Added check_cf.patch, #35993
    2016-01-11 ayuri Attached File- => Added gr3.jpg, #35986
        Attached File- => Added gr4.jpg, #35987
    2015-12-25 arvidjaar Attached File- => Added biosdisk2.patch, #35856
    2015-12-23 ayuri Attached File- => Added gr1.jpg, #35847
        Attached File- => Added gr2.jpg, #35848
    2015-12-21 arvidjaar Attached File- => Added biosdisk.patch, #35827
    2015-12-18 phcoder Attached File- => Added filetree.diff, #35787
    2015-12-17 ayuri Attached File- => Added grub.img, #35785
    2015-12-17 ayuri Attached File- => Added gf2.jpg, #35784
    2015-12-17 ayuri Attached File- => Added first32.blk, #35780
        Attached File- => Added 6mib.blk, #35781
        Attached File- => Added last32.blk, #35782
        Attached File- => Added 48mib.blk, #35783
    2015-12-16 ayuri Attached File- => Added fg1.jpg, #35775

    Back to the top


    Powered by Savane 3.5