Modify

Opened 7 years ago

Closed 6 years ago

Last modified 4 years ago

#8672 closed enhancement (fixed)

Kernel GPT (GUID Partition Table) Support

Reported by: Donkey Kong Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: kernel Version: Trunk
Keywords: gpt guid partition kernel Cc:

Description

I'd like to request that CONFIG_EFI_PARTITION=y become a default Linux kernel build option for OpenWRT.

GUID Partition Tables are becoming more and more common in removable USB disks, especially amongst Mac users. However, OpenWRT's Linux kernel is not built with support for this partition scheme. It is not possible to use GPT disks, even as removable storage, without kernel support.

That means anyone who would like to use GPT disks must perform a a build of OpenWRT and a manual edit of the kernel make files. I've built the kernel with this option and found performance excellent. I do not believe this would constitute feature bloat.

Thank you for your consideration.

Attachments (0)

Change History (24)

comment:1 Changed 7 years ago by b

up

comment:2 Changed 7 years ago by anonymous

I found this ticket at last, trying to figure out what was keeping my disk from mounting. As a person out of luck with a GPT disk, I second this!

comment:3 Changed 7 years ago by anonymous

Thirded. JUst going through the loops of attaching a disk to a wrt160nl. Everything else seems to work just fine.

Great work BTW.

comment:4 Changed 7 years ago by adam2104

I'd like to see support for this also.

comment:5 Changed 7 years ago by wr0ngway

+1

comment:6 Changed 7 years ago by irae@…

+!

comment:7 Changed 7 years ago by vicould

Same request for me, it would be nice to have such a feature!

comment:8 Changed 7 years ago by e2

I agree +1

comment:9 Changed 7 years ago by kizel

agree +1

comment:10 Changed 7 years ago by blaet

+1

comment:11 follow-up: Changed 7 years ago by anonymous

Another option that can be considered is the use of kmod-dm and somebody porting multipath-tools. This provides kpartx, which is a userspace tool that reads various partition table formats (notably GPT) and creates device-mapper mappings to them. In my example below I've created a 1GB file as /dev/shm/foo and formatted it to have a GPT partition table with gdisk (note that this is my desktop system, I don't have a kpartx port handy unfortunately - any volunteers? :). The partition sizes match what I created in gdisk (though I didn't test it any further than that since it's a widely-used tool in a pretty critical role):

[ dbharris@willow: /dev/shm/ ]$ fdisk -l foo

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

Disk foo: 1073 MB, 1073741824 bytes
139 heads, 8 sectors/track, 1885 cylinders, total 2097152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System

foo1 1 2097151 1048575+ ee GPT

[ dbharris@willow: /dev/shm/ ]$ gdisk -l foo
GPT fdisk (gdisk) version 0.6.14

Partition table scan:

MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.
Disk foo: 2097152 sectors, 1024.0 MiB
Logical sector size: 512 bytes
Disk identifier (GUID): 6531A21E-CB54-4FD7-9466-DCE84AA0270B
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 2097118
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number Start (sector) End (sector) Size Code Name

1 2048 206847 100.0 MiB 0700 Linux/Windows data
2 206848 1026047 400.0 MiB 0700 Linux/Windows data
3 1026048 2097118 523.0 MiB 0700 Linux/Windows data

[ dbharris@willow: /dev/shm/ ]$ sudo kpartx -v -a foo
add map loop0p1 (254:4): 0 204800 linear /dev/loop0 2048
add map loop0p2 (254:5): 0 819200 linear /dev/loop0 206848
add map loop0p3 (254:6): 0 1071071 linear /dev/loop0 1026048
[ dbharris@willow: /dev/shm/ ]$ sudo blockdev --getsize64 /dev/mapper/loop0p1
104857600
[ dbharris@willow: /dev/shm/ ]$ sudo blockdev --getsize64 /dev/mapper/loop0p2
419430400
[ dbharris@willow: /dev/shm/ ]$ sudo blockdev --getsize64 /dev/mapper/loop0p3
548388352
[ dbharris@willow: /dev/shm/ ]$ sudo kpartx -v -d foo
del devmap : loop0p3
del devmap : loop0p2
del devmap : loop0p1
loop deleted : /dev/loop0
[ dbharris@willow: /dev/shm/ ]$

comment:12 in reply to: ↑ 11 Changed 7 years ago by anonymous

Sorry for the formatting I didn't realize it would be munged so badly. I'll try again but if it doesn't work properly this time I'll leave off to keep the amount of spam minimal:

[ dbharris@willow: /dev/shm/ ]$ fdisk -l foo

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

Disk foo: 1073 MB, 1073741824 bytes

139 heads, 8 sectors/track, 1885 cylinders, total 2097152 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

Device Boot Start End Blocks Id System

foo1 1 2097151 1048575+ ee GPT

[ dbharris@willow: /dev/shm/ ]$ gdisk -l foo

GPT fdisk (gdisk) version 0.6.14

Partition table scan:

MBR: protective

BSD: not present

APM: not present

GPT: present

Found valid GPT with protective MBR; using GPT.

Disk foo: 2097152 sectors, 1024.0 MiB

Logical sector size: 512 bytes

Disk identifier (GUID): 6531A21E-CB54-4FD7-9466-DCE84AA0270B

Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 2097118

Partitions will be aligned on 2048-sector boundaries

Total free space is 2014 sectors (1007.0 KiB)

Number Start (sector) End (sector) Size Code Name

1 2048 206847 100.0 MiB 0700 Linux/Windows data

2 206848 1026047 400.0 MiB 0700 Linux/Windows data

3 1026048 2097118 523.0 MiB 0700 Linux/Windows data

[ dbharris@willow: /dev/shm/ ]$ sudo kpartx -v -a foo

add map loop0p1 (254:4): 0 204800 linear /dev/loop0 2048

add map loop0p2 (254:5): 0 819200 linear /dev/loop0 206848

add map loop0p3 (254:6): 0 1071071 linear /dev/loop0 1026048

[ dbharris@willow: /dev/shm/ ]$ sudo blockdev --getsize64 /dev/mapper/loop0p1

104857600

[ dbharris@willow: /dev/shm/ ]$ sudo blockdev --getsize64 /dev/mapper/loop0p2

419430400

[ dbharris@willow: /dev/shm/ ]$ sudo blockdev --getsize64 /dev/mapper/loop0p3

548388352

[ dbharris@willow: /dev/shm/ ]$ sudo kpartx -v -d foo

del devmap : loop0p3

del devmap : loop0p2

del devmap : loop0p1

loop deleted : /dev/loop0

[ dbharris@willow: /dev/shm/ ]$

comment:13 Changed 7 years ago by hechacker1@…

+1 from me. I'd like to see native support for hfsplus, but since this build doesn't support GUID disks, or have any userspace utilities like Parted or kpartx, it can't be mounted.

Using hfsplus is a good choice if you want to have a Time Machine disk (with hfs journaling disabled). That way Time Machine gets its native file system (and thus features through Netatalk). Plus you can unmount the disk and use it natively on OS-X for a restore.

Please consider it! hfsplus is a pretty good file system, and is supported on OS-X and Linux (with disabled journal).

comment:14 Changed 7 years ago by m

+1 * a million

would somebody frackin do this already?

comment:15 Changed 6 years ago by Brett

+1

comment:16 Changed 6 years ago by anonymous

+1

comment:17 Changed 6 years ago by michael so

why it is not enabled by default? GPT can support much larger hard disk than MBR and i cant see any drawback
most linux support it by default already

comment:18 Changed 6 years ago by t

all my harddisks are GPT, int. or ext.
+1!

comment:19 Changed 6 years ago by darko

+1

comment:20 Changed 6 years ago by jow

  • Milestone changed from Backfire 10.03.2 to Attitude Adjustment (trunk)

Deferring to trunk

comment:21 Changed 6 years ago by anonymous

+1

comment:22 Changed 6 years ago by jow

  • Resolution set to fixed
  • Status changed from new to closed

Enabled in r30835

comment:23 Changed 6 years ago by Oskari Rauta <oskari.rauta@…>

Thank you!

comment:24 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.