Yes, sorry, I should have mentioned: I would like to install a couple of additional packages on it. Otherwise, you are correct, since it's 8MB, the 24.10 fits (actually it's already successfully installed) but that leaves only 1.5MB free for packages. As you said, it's tight.
Hence, my idea to build a custom image (without luci) with a uci-defaults script, something like this (completely untested, first draft):
uci set network.lan.proto='dhcp'
uci set dhcp.lan.ignore=1
uci set system.@system[0].hostname='blackbox'
uci set network.lan6=interface
uci set network.lan6.proto='dhcpv6'
uci set network.lan6.device='@lan'
uci set dhcp.lan6=dhcp
uci set dhcp.lan6.interface='lan6'
uci set dhcp.lan6.ignore='1'
uci add_list firewall.@zone[0].network='lan6'
uci commit firewall
uci commit network
uci commit dhcp
uci commit system
opkg update
opkg install block-mount kmod-fs-ext4 e2fsprogs parted kmod-usb-storage block-mount fdisk kmod-usb-ohci kmod-usb-uhci nano
/etc/init.d/firewall restart
/etc/init.d/system restart
/etc/init.d/network restart
/etc/init.d/dnsmasq restart
Input welcome. (I suspect for example if I do a "system restart" I don't need to restart the other services individually, do I?)
Here is the current config on the openwrt WDR3600, which I am trying to replicate with the above commands. A lot of things are defaults I don't really need and can be ignored: it's just an unmanaged switch. I don't need WAN, I don't need VLANs...
/etc/config/dhcp
config dnsmasq
option domainneeded '1'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option cachesize '1000'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
option localservice '1'
option ednspacket_max '1232'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
list ra_flags 'managed-config'
list ra_flags 'other-config'
option ignore '1'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
/etc/config/network
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd06:643d:c23b::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0.1'
config interface 'lan'
option device 'br-lan'
option proto 'dhcp'
config device
option name 'eth0.2'
option macaddr 'e8:94:f6:06:25:c7'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0t 2 3 4 5'
option vid '1'
config interface 'lan6'
option proto 'dhcpv6'
option device '@lan'
option reqaddress 'try'
option reqprefix 'auto'
/etc/config/firewall
config defaults
option syn_flood '1'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'lan'
list network 'lan6'
config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
config forwarding
option src 'lan'
option dest 'wan'
config rule
option name 'Allow-DHCP-Renew'
option src 'wan'
option proto 'udp'
option dest_port '68'
option target 'ACCEPT'
option family 'ipv4'
config rule
option name 'Allow-Ping'
option src 'wan'
option proto 'icmp'
option icmp_type 'echo-request'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-IGMP'
option src 'wan'
option proto 'igmp'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-DHCPv6'
option src 'wan'
option proto 'udp'
option dest_port '546'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-MLD'
option src 'wan'
option proto 'icmp'
option src_ip 'fe80::/10'
list icmp_type '130/0'
list icmp_type '131/0'
list icmp_type '132/0'
list icmp_type '143/0'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Input'
option src 'wan'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
list icmp_type 'router-solicitation'
list icmp_type 'neighbour-solicitation'
list icmp_type 'router-advertisement'
list icmp_type 'neighbour-advertisement'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Forward'
option src 'wan'
option dest '*'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-IPSec-ESP'
option src 'wan'
option dest 'lan'
option proto 'esp'
option target 'ACCEPT'
config rule
option name 'Allow-ISAKMP'
option src 'wan'
option dest 'lan'
option dest_port '500'
option proto 'udp'
option target 'ACCEPT'
(I probably could remove WAN completely, including all associated fw rules and make it instead a port in the lan bridge, but I don't need the port for now, so I figured, why bother. Same with VLANs, don't need them, but they are here by default.)
Subsidiary question: is it ok to make lan6 an alias of lan, rather than being its own device? I just noticed I had done this here.
Maybe I can even configure extroot directly in this script, I'll test this when I have time. The USB drive is always the same, thus I expect the device name will also not change.