Hacker News new | ask | show | jobs
by hagbard_c 492 days ago
On virtual routers there is no content in /rom. What you can easily do is install another copy of the same image on another VM or container and run it through firstboot. Make a backup and compare it with a backup from your running system. Even better is to make a backup just after firstboot, then use the system and compare your current backup with the first one.

Do keep in mind that the OpenWRT backup does not contain information about which extra packages were installed after firstboot. I solved this adding a cron job which runs opkg list-installed > /etc/opkg_installed.txt and adding that last filepath to /etc/sysupgrade.conf so it gets added to backups.

1 comments

If you have an overlay, you can do something like this to list user-installed packages only:

    ls /overlay/upper/usr/lib/opkg/info/*.list | sed -e 's/.*\///' | sed -e 's/\.list//'
There is no overlay on ext4-based virtual routers.

    # mount|grep ext4
    /dev/mapper/pve-vm--501--disk--0 on / type ext4 (rw,relatime,stripe=512)
The /overlay directory exists just like the /rom one does but they're empty:

    # ls -l /|grep -E 'overlay|rom' 
    drwxr-xr-x    2 root     root          1024 Jan 27 23:53 overlay
    drwxr-xr-x    2 root     root          1024 Jan 27 23:53 rom
These are empty directories (there is a note file in /rom with some info for those using squashfs which is not applicable to these installations).