bugGNU GRUB - Bugs: bug #29956, grub-probe --target=fs failure on...

 
 

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

bug #29956: grub-probe --target=fs failure on BSD partitions

Submitted by:  Grégoire Sutre <gsutre>
Submitted on:  Tue 25 May 2010 12:06:44 AM UTC  
 
Category: Disk & PartitionSeverity: Major
Priority: 5 - NormalItem Group: Software Error
Status: FixedPrivacy: Public
Assigned to: Grégoire Sutre <gsutre>Originator Name: 
Open/Closed: ClosedRelease: 
Release: Bazaar - trunkReproducibility: Every Time
Planned Release: None

Wed 14 Jul 2010 10:55:47 AM UTC, comment #2:

Fixed in trunk by commit 2541.

Grégoire Sutre <gsutre>
Project MemberIn charge of this item.
Tue 25 May 2010 01:10:28 AM UTC, comment #1:

Attached is an image that demonstrates the problem.

(MBR) Partition table:
0: NetBSD (sysid 169)
start 32, size 1000 (0 MB, Cyls 0-0/32/8)
PBR is not bootable: All bytes are identical (0x00)
1: Primary DOS with 16 bit FAT <32M (sysid 4)
start 1040, size 1000 (0 MB, Cyls 0/32/17-0/63/24)

(NetBSD disk label) 5 partitions:
# size offset fstype
a: 1000 32 4.2BSD
c: 1000 32 unused
d: 2048 0 unused
e: 1000 1040 MSDOS

niagara# grub2-probe --target=fs --device-map=/dev/null -d /dev/rvnd0e
grub2-probe: error: unknown filesystem.

The problem likely comes from the fact that e: is not contained in the NetBSD MBR partition (or, at least, the sectors that are read to determine its fs type).

If the MBR partition table is changed as follows:

0: NetBSD (sysid 169)
start 32, size 1200 (1 MB, Cyls 0-0/47/28)
PBR is not bootable: All bytes are identical (0x00)
1: <UNUSED>

Then the problem disappears.

(file #20612)

Grégoire Sutre <gsutre>
Project MemberIn charge of this item.
Tue 25 May 2010 12:06:44 AM UTC, original submission:

When the partition is listed in the DOS MBR, grub-probe --target=fs on a BSD partition is successful. But if that partition is not listed in the MBR, then the same command fails.

Tests have been performed on NetBSD/i386 with a USB key.

The NetBSD disk label is:

9 partitions:
# size offset fstype [fsize bsize cpg/sgs]
c: 338688 3624768 unused 0 0 # (Cyl. 3596 - 3931)
d: 3964928 0 unused 0 0 # (Cyl. 0 - 3933*)
g: 499905 63 MSDOS # (Cyl. 0*- 495)
h: 3124800 499968 Linux Ext2 0 0 # (Cyl. 496 - 3595)
i: 338688 3624768 4.2BSD 0 0 0 # (Cyl. 3596 - 3931)

The DOS disk label is:

Partition table:
0: Primary DOS with 32 bit FAT (sysid 11)
start 63, size 499905 (244 MB, Cyls 0-123)
1: Linux native (sysid 131)
start 499968, size 3124800 (1526 MB, Cyls 124-898)
PBR is not bootable: All bytes are identical (0x00)
2: NetBSD (sysid 169)
start 3624768, size 338688 (165 MB, Cyls 899-982)
3: <UNUSED>

Here, everything works fine:

$ grub2-probe -v --target=drive --device-map=/dev/null -d /dev/rsd0g
grub2-probe: info: /dev/rsd0g starts from 63.
grub2-probe: info: opening the device /dev/rsd0d.
grub2-probe: info: the size of /dev/rsd0d is 3964928.
grub2-probe: info: Partition 0 starts from 63.
(/dev/rsd0d,1)
$ grub2-probe -v --target=fs --device-map=/dev/null -d /dev/rsd0g
grub2-probe: info: /dev/rsd0g starts from 63.
grub2-probe: info: opening the device /dev/rsd0d.
grub2-probe: info: the size of /dev/rsd0d is 3964928.
grub2-probe: info: Partition 0 starts from 63.
grub2-probe: info: opening /dev/rsd0d,1.
grub2-probe: info: the size of /dev/rsd0d is 3964928.
fat

I now remove the DOS partition #0 from the MBR partition table, but without changing the NetBSD disklabel, I then get:

Partition table:
0: <UNUSED>
1: Linux native (sysid 131)
start 499968, size 3124800 (1526 MB, Cyls 124-898)
PBR is not bootable: All bytes are identical (0x00)
2: NetBSD (sysid 169)
start 3624768, size 338688 (165 MB, Cyls 899-982)
3: <UNUSED>

$ grub2-probe -v --target=drive --device-map=/dev/null -d /dev/rsd0g
grub2-probe: info: /dev/rsd0g starts from 63.
grub2-probe: info: opening the device /dev/rsd0d.
grub2-probe: info: the size of /dev/rsd0d is 3964928.
grub2-probe: info: Partition 1 starts from 499968.
grub2-probe: info: Partition 2 starts from 3624768.
grub2-probe: info: Partition 6 starts from 4291342591.
(/dev/rsd0d,3,7)
$ grub2-probe -v --target=fs --device-map=/dev/null -d /dev/rsd0g
grub2-probe: info: /dev/rsd0g starts from 63.
grub2-probe: info: opening the device /dev/rsd0d.
grub2-probe: info: the size of /dev/rsd0d is 3964928.
grub2-probe: info: Partition 1 starts from 499968.
grub2-probe: info: Partition 2 starts from 3624768.
grub2-probe: info: Partition 6 starts from 4291342591.
grub2-probe: info: opening /dev/rsd0d,3,7.
grub2-probe: info: the size of /dev/rsd0d is 3964928.
grub2-probe: error: unknown filesystem.

So grub-probe --target=fs fails when the partition is accessed as (/dev/rsd0d,msdos3,bsd7) instead of (/dev/rsd0d,msdos1).

Grégoire Sutre <gsutre>
Project MemberIn charge of this item.

 

Attached Files
file #20612:  bsdlabel-fs-bug.img.gz added by gsutre (5KiB - application/x-gzip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by gsutre (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 14 Jul 2010 10:55:47 AM UTCgsutreStatusNone=>Fixed
      Assigned toNone=>gsutre
      Open/ClosedOpen=>Closed
    Tue 25 May 2010 01:10:28 AM UTCgsutreAttached File-=>Added bsdlabel-fs-bug.img.gz, #20612

    Back to the top


    Powered by Savane 3.1-cleanup1