2

I'm attempting to mount a partition from a NAS and the block size is 65536 bytes, this is above my distribution's precompiled kernel memory paging size of 4KiB, so I cannot mount it normally.

Which kernel compilation parameters would I need to change to get a memory paging size large enough? Would it be possible under the x86-64 architecture?

EDIT: There doesn't seem to be an option for it in make xconfig unless I'm just missing it.

From page_types.h under arch\x86\include\asm

/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT  12
#define PAGE_SIZE   (_AC(1,UL) << PAGE_SHIFT)
#define PAGE_MASK   (~(PAGE_SIZE-1))`

It doesn't look to be configurable. I could change this number directly to 16 and it would probably make pretty explosions and destroy Tokyo. I shall probably try it later this evening.

1
  • 1
    as per this answer it seems this can be fixed with fuse-ext2
    – phuclv
    Sep 11, 2017 at 16:45

2 Answers 2

1

From page_types.h under arch\x86\include\asm

/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT  12
#define PAGE_SIZE   (_AC(1,UL) << PAGE_SHIFT)
#define PAGE_MASK   (~(PAGE_SIZE-1))

changing the 12 into a 16 results in

arch/x86/kernel/head64.c: In function ‘x86_64_start_kernel’:
arch/x86/kernel/head64.c:71: error: negative width in bit-field ‘<anonymous>’
make[2]: *** [arch/x86/kernel/head64.o] Error 1

Because this is just sanity checking code for modules offsets it seems that changing the memory paging size has a lot of unintended side effects which will make this far from simple. I guess I'm stuck with finding another arch to run on. :(

Here is a list of the archs that support 64KiB or greater page sizes: ia64, mips, pa-risc, powerpc, sh, sparc64. So it looks like my best bet it to find an old-PPC Mac.

5
  • Why don't just grab a MIPS or PPC (or any of the above supported architectures) emulator (like qemu)? You can then mount the partition in the VM
    – phuclv
    Sep 10, 2017 at 11:37
  • 1
    @LưuVĩnhPhúc At the time I wrote this I was working for Geek Squad in their data recovery department, and we had strict rules on software that we could and could not use. But that would be the most reasonable thing to do, yes. Sep 10, 2017 at 15:02
  • x86 and ARM also support huge pages. en.wikipedia.org/wiki/…
    – phuclv
    Nov 25, 2020 at 8:21
  • While this is true, and I was aware of it 9 years ago, activating support for huge pages does NOT allow the kernel to load larger than native block sized partitions. Thanks for checking back in though! Nov 25, 2020 at 19:41
  • 1
    Also thanks for your answer on the related linked question below. It's nice to know that there is an answer to this now (FUSE) without relying on a strange processor type. Nov 25, 2020 at 19:42
0

You need to change your kernel page size. Not recommending it, but possible I suppose.

It has nothing to do with your architecture though. (i.e. if its possible, it can be done with your architecture, and if it can't its not because of your architecture)

6
  • superuser.com/questions/242055/… ;) I also definitely have an ext4 partition with 64k block size. May 31, 2011 at 20:25
  • Didn't see that :) but it seems that the upvoted answer agrees with me. I guess that means that you need to change the kernel page size to get it to work.
    – soandos
    May 31, 2011 at 20:27
  • Yes, and my specific question was is it possible with the x86_64 arch and if so, which parameters do I need to change. :D May 31, 2011 at 20:32
  • So yes, it is, you need to change the kernel page size in the kernel. It not some option lying around, but probably (speculation) will require a recompilation of the kernel (or have someone do it for you). Why does it matter btw?
    – soandos
    May 31, 2011 at 20:36
  • Yes, it will require recompiling the kernel, this is not that big of a deal to me, I just need to know which parameter I need to change in the kernel's configuration wizard. All of this I mentioned in the original question btw. ;) It matters because my NAS died and I need the information off of it. May 31, 2011 at 20:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .