bugGNU GRUB - Bugs: bug #26598, UDF file system support does not...

 
 

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

bug #26598: UDF file system support does not work well

Submitted by:  Giuseppe Caizzone <peppepz>
Submitted on:  Sun 17 May 2009 08:15:39 AM UTC  
 
Category: FilesystemSeverity: Major
Priority: 5 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: NoneOriginator Name: 
Open/Closed: ClosedRelease: svn trunk (about 2009-05-10)
Release: NoneReproducibility: Every Time
Planned Release: None

Thu 11 Jun 2009 07:33:43 PM UTC, comment #2:

Sorry your patch did help. I commited it with some changes. E.g. using GRUB_UDF_BLKSZ. For now it's hard-coded to 2048 but being uniforn helps the one who will be implementing variable sector size. (and don't forget U32)

Vladimir Serbinenko <phcoder>
Project Administrator
Thu 11 Jun 2009 06:27:41 PM UTC, comment #1:

I have recreated this bug but your patch didn't help. I will investigate the issue deeper

Vladimir Serbinenko <phcoder>
Project Administrator
Sun 17 May 2009 08:15:39 AM UTC, original submission:

Hello,
I tried to use grub2 (from svn trunk) to boot from a UDF-formatted partition on a usb key, and it didn't work. grub displayed "invalid part ref".

The partition was 2 GB large, formatted by mkudffs 1.0.0b2 with the default 2048 bytes block size, and it only contained the files copied there by grub-install, plus grub.cfg and device.map.

Since I did not know anything about the UDF file system I added some grub_printf()s here and there, and it looked like grub was trying to read directory entries from the body of an ELF file.
I think the problem was that grub_udf_read_block() makes a mixed comparison between a byte count and a block count:

| if (fileblock < U32 (ad->length))

but ad->length is in bytes not blocks (see the attached patch for context).

I made the quick patch I am attaching and now grub appears to work for me. I do not know if the patch is effectively correct, but since it happened to work for me, I thought it wouldn't harm to post it here.

Giuseppe Caizzone <peppepz>

 

Attached Files
file #18153:  udf-fix.diff added by peppepz (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by phcoder (Posted a comment)
  • -unavailable- added by peppepz (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
    Thu 11 Jun 2009 07:34:02 PM UTCphcoderStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Thu 11 Jun 2009 06:27:41 PM UTCphcoderStatusNone=>Confirmed
    Sun 17 May 2009 08:15:39 AM UTCpeppepzAttached File-=>Added udf-fix.diff, #18153

    Back to the top


    Powered by Savane 3.1-cleanup1