I've got a QNAP QHora-322 / iEi Puzzle-M902 box which I'd like to set up
as a router. It's a standard (but somewhat muscular) kind of router box:
Arm processor, 4 GB eMMC flash, runs OpenWRT, but it also has an M.2
socket for nvme ssd. I can put a big, roomy 4TB drive in that M.2 slot.
That's appealing to me. It means I can use the box to do light service
duties, like TimeMachine backups, and serving my music collection. This
makes me want to punt the whole squashfs / overlay / whiteout stuff that
is engineered for small-flash routers, along with busybox, and run a
large install with plenty of packages to make admin easier.
But I don't know how to do that. One, I'm pretty new to u-boot; I'm
currently reading the docs. I have no problem connecting to a
serial-port console with a serial-to-USB adapter via screen or
miniterm. Two, I'm also not sure if there are OpenWRT firmware installs
that don't use the squashfs / overlay setup, suitable for throwing onto
a large partition. In fact, my prior experience with partition / filesys
setups on x86 linux distros is very different, and I'm not sure if it's
workable in the OpenWRT world. On >2TB drives, I will typically do
the following:
- EFI partition
- "Microsoft reserved" -- render unto Bill the 16MB that is Bill's.
- Root -- This is /, but just the parts that don't mutate much.
- Swap
- SysRW -- /var, with subdirectories rebound as follows
/var/rebinds/root-tmp -> /tmp
/var/rebinds/root-root -> /root
This is system data that mutates a lot. - HomePart -- this is "user" data -- /home.
OK, I left out two more partitions that I use when circumstances force
me to boot into Windows. But the above is the total linux picture. It
has the advantage that if some write operation corrupts a filesystem,
the damage is contained, improving my odds that I can get the system
to stagger back to its feet so I can try to repair it. I'm paranoid
that way.
This is all tuned for using large drives, running a large linux distro
like Debian, Ubuntu, Fedora or Arch, and booting off grub2.
Is there a straightforward way to install an OpenWRT setup onto a
large drive, and boot it off of the flash's u-boot, with the setup
I've sketched out above (or something roughly like that, but tuned for
OpenWRT), that takes advantage of not having to torque things around
to handle small storage?
I've poked around on the OpenWRT site looking for documentation that
would help me do this, but didn't find what I was seeking. (Which
doesn't mean it's not there; there are a lot of thoughtful howtos.
I might have just missed the one I needed.)
It seems to me that as flash sizes get larger & larger over time, and
more routers come with M.2 slots, this kind of use case is going to
become more & more common.
If anyone could advise me -- either explanations, or just pointers to the
right pre-existing web pages -- I'd greatly appreciate it.
Thanks.
-EKH