Partition alignment (start) does not change resizing with partx parted etc.
not typically done within OpenWrt.
https://openwrt.org/docs/guide-user/installation/openwrt_x86#installation
Not always necessary or desirable. It would be good to know what it is that you want to achieve with a larger partition. But, for resizing, see this (which could largely be scripted, if you want):
OpenWrt runs by default with just a single user (root) and doesn't usually use a chroot type construct. What additional setup do you need to do and why do you need to do it with chroot?
Usually not recommended. Typically, backups are of the config files (and other files you may specify). Since you can easily include/exclude packages relative to a typical default installation (using the image builder), the "whole image" is rarely necessary. What is the purpose of this backup -- why the whole installation?
- not planning to copy (
dd
) openwrt to disk from openwrt, I personally do it using a live iso, It's easier to move a usb (with the live iso) than to move the whole internal HDD around. Also this is not an issue, unless a usb drive is the destination, IDK why usb doesn't boot when I write the openwrt image on it!!
I might even modify a FinixOS iso in order to start installing openwrt on boot (with some safety prompt, ofc). - I, once, had so many logs and hit the space limit, doesn't happen often, but when it does you wish you have just one 100MB more, you know what I mean, I hate this part specifically, my little knowledge is not enough to automate this part without some magic numbers like start and end of a partition.
- by
chroot
I only refer to a way to configure the OS without having to wait for boot, but the main reason is to install a driver for the other network interface so I don't have to modify LAN's config in order to have internet and download the driver and then reset the LAN and then configure the WAN, if the setup is done on the 1st boot (which is what I assume) - Except for having to do the whole installation thing again, this is more efficient. This might depend on how easy it is to install.
This would be related to the BIOS/EFI configuration or limitations of your specific device.
The effort of dd-ing to a disk is relatively easy and typically one-time (or one time and a relatively long time before you'll need to consider it again)
That said, if you're experimenting and breaking things or want to play with multiple different configurations really quickly (i.e. change media), you may find it desirable to use a device such as a Pi with micro-SD cards... pull the card, put in another, reimage, etc... really simple.
Instead of expanding the partition, create another one and write to that. Let's say you have a 16GB drive... partition 1 for OpenWrt can be just 100MB (or whatever the default is) which is enough for a bunch of packages to be installed and obviously way more than the OS needs in general. Then, setup partition 2 with ext4 format, mount it, and point your logs there. This also means that your logs will survive even if you completely rewrite your main OpenWrt partition.
I'm not following.... but OpenWrt boots very quickly, so waiting is not really a thing here. To install a driver, you need to have the OS booted anyway. And you only need to do it once -- you can even have it pre-built into your image using the image builder. Configuring the lan and wan is simple.
Again, pre-build your image with necessary driver packages and the only other thing is the configuration. It is rarely useful to backup and restore an entire image... but you can have a pre-built image that has everything you need, then a quick restore of the config and you're done.
In the same while you overengineer to automate copying one file medieval engineers would already set bridge overspans across wildest river.
- I don't know how would the SD card thing go, since I couldn't get it to boot from my usb in this core2duo
- little more configuration, but that's a good way to avoid the alignment thing and not losing old logs, thank you.
- I'll miss around with image building, that's a good idea.
I'm also thinking about a Debian machine with a bunch of docker containers, IDK how openwrt handles this. this will make things very easy if it's possible.
Also I'm wondering why can't openwrt be used without booting into it for simple tasks, for instance: I can chroot
into an alpine (OS) file system and install packages without booting into it.
The SD card example works with Pi devices and other SBCs that specifically use SD card media for booting.
Check the BIOS or EFI configuration of your x86 device to see if there is a mechanism to boot from USB with OpenWrt. As I said before, this is a function of your computer, not OpenWrt.
Yes, it's really simple.
Exactly. You don't even have to setup the image builder on your own computer. The firmware selector allows custom builds.
Depends on your goals. OpenWrt in docker doesn't really work well due to the way that the networking is handled with the docker containers. Virtulaizing OpenWrt is possible, but the complicated part is typically about configuring the VM host system/OS and hypervisor/supervisor environment.
If your purpose of running OpenWrt is as a router, run it bare-metal. If you're trying to do other things, virtualized might work.
I think you still are lacking a fundamental understanding of what OpenWrt is. It is a routing optimized OS that targets very low resource devices (i.e. embedded, such as consumer all-in-one wifi routers). It runs in a footprint as small as 8MB flash and 64MB RAM (and yes, that's megabytes!). It is not a general purpose OS.
You may be able to chroot into other OS/filesystems, but you still need to boot some OS to get that far. OpenWrt is likely more lean than even the minimal OS's you are using to boot for chrooting. OpenWrt is (by default and by design) a single user (root) OS.
I'm going to ask a rather blunt question here: What are you doing???
Continuing with the bluntness (not trying to be rude): It is not clear why you are trying to use OpenWrt, and what your goals are. You continue to flail about since you don't know how to use OpenWrt, and you haven't yet asked a coherent set of questions and set forward your goals in such a way as to actually achieve success (or, conversely, to learn if maybe OpenWrt is not the right platform your your specific project). Your questions thus far have been numerous and meandering with critical information omitted, leading to more questions and difficulty solving your issues.
If you want meaningful help, tell us what you are doing. Tell us your specific goals, and let us guide you rather than you running off hitting brick walls at every turn and us trying to help you clean up the mess you've unnecessarily made of things. I'm sorry to be so frank with my comments, and please believe me that I have no intention of being rude or uninviting... I say all of this because you're not going to succeed with your current methodology/trajectory, but you're here and you seem to want to use OpenWrt.... we are here to help, if you'll make that possible.
You might be right, OpenWrt is not for me, this is too minimal for my brain. I'm going to try Pfsense. Thanks for all the help.
It may or may not actually be too minimal -- it depends on your needs/goals. But none of that is clear at this point because you have never communicated what you are trying to achieve.
pfsense is obviously another routing-first OS -- it's got a lot of great features, but is also complex and specialized in its own ways.Whatever works for you is fine, though... good luck.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.