Good afternoon, tell me, can I increase the size of the partition where openwrt mtd4, mtd5 is installed by deleting alternative partitions mtd6, mtd7, or is it a complicated procedure.
do I understand correctly that you need to remove mtd4-mtd7, then create mtd4-mtd5, rebuild u-boot specifying the required partition sizes there, and when building openwrt in the kernel, specify the correct partition size ?
I'm not good at working with linux partitions, especially on routers, so I ask for help with increasing the main partition for openwrt, I don't need an alternative partition.
the size of the openwrt assembly I get is more than 40 Mb. the option with exroot will not work.
I'm ready to assemble u-boot and the kernel, I just need your help in building, I haven't done this yet, but I changed the openwrt kernel to boot from hdd to ext4 which is connected to sata and can load an openwrt image of any size, but hdd buzzes and interferes sleep
Given the efforts needed and risks involved, replacing the device with one that provides 'enough' usable flash would be far more reasonable. These days we fortunately have options, but on the other hand, a >40 MB image is also a sign of doing something wrong (it's a router, keep it lean).
You shouldn't need to touch u-boot, if you are not changing the start location of the kernel partition.
Partition sizes are in the DTS for kernel, not in the compiled u-boot.
But, WRT12900AC u-boot is designed for a dual-boot logic. Removing the "alternative" kernel and rootfs means that you need to remove the whole dual-boot logic from u-boot env variables. You need to re-design the bootcmd.
(And OpenWrt sysupgrade routine and boot routine for the device)
First guess is that you have included Samba package in the build. Sometimes it causes crazy large images. (if yes, you might consider ksmbd tools instead)
At least kernel1+rootfs1 (40 MB), kernel2+rootfs2 (40 MB) and syscfg (38 MB) are expected and used (required) by bootloader- and OpenWrt (sysupgrade) without serious changes (and that ignores u-boot (2 MB), u_env (256 KB), s_env (256 KB) and devinfo (1 MB)), which are totally hands-off), that doesn't leave you with much to salvage (128 MB total flash size).
it would be nice to combine the main partition (40 MB) and the alternate (40 MB) into one partition (80 MB) and build an openwrt assembly with the necessary components so that everything is stored in one nand-memory, for 40 MB The alternative partition is not used, and I no need to run the OS from an alternate partition.
I need samba 4 and qbittorrent, and they are voluminous
That is not going to happen for OpenWrt, if you want that, you will have to make all necessary source changes (and there are more interactions than you seem to think - and more for these linksys mvebu devices than for most other devices as well) yourself, for all future updates to come.
So, no, there isn't a compelling reason not to use USB and extroot, you just want to do it the way you want to do it. Which is fair enough, but this is less a project of necessity and more just experimenting with how you can bend OpenWrt's design on your device.