Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| toh:linksys:whw03_v1 [2024/05/15 09:59] – [Repartitioning] lanchon | toh:linksys:whw03_v1 [2024/07/17 06:09] – [Repartitioning] lanchon | ||
|---|---|---|---|
| Line 182: | Line 182: | ||
| WARNING: VERIFY THAT YOUR GPT HASH IS THE SAME AS MINE! DO NOT PROCEED OTHERWISE! | WARNING: VERIFY THAT YOUR GPT HASH IS THE SAME AS MINE! DO NOT PROCEED OTHERWISE! | ||
| - | - Backup | + | - Backup |
| - Install these packages: gdisk sgdisk blkdiscard | - Install these packages: gdisk sgdisk blkdiscard | ||
| Line 192: | Line 192: | ||
| IMPORTANT: DO NOT PROCEED WITHOUT DOING THE 2 SYSUPGRADES! For the procedure to succeed, the installed commands need to be in rootfs, not rootfs_data, | IMPORTANT: DO NOT PROCEED WITHOUT DOING THE 2 SYSUPGRADES! For the procedure to succeed, the installed commands need to be in rootfs, not rootfs_data, | ||
| - | - Make backups of the GPT (partition table) | + | - Make backups of the GPT (partition table): |
| < | < | ||
| Line 208: | Line 208: | ||
| 33+0 records in | 33+0 records in | ||
| 33+0 records out | 33+0 records out | ||
| + | </ | ||
| + | - Make backups of the stock partitions: | ||
| + | |||
| + | NOTE: The last partition (mmcblk0p19 " | ||
| + | It is 3.4 GiB in size, with an ext4 filesystem that only contains about 250 KiB of files (when i looked). | ||
| + | However this filesystem is not trimmed, and as time goes on it accumulates stale data in unused areas. | ||
| + | If the backup commands below fail with /tmp running out of space, this stale data is the culprit. | ||
| + | |||
| + | You then have 3 options: | ||
| + | |||
| + | 1) If one backup fits in /tmp, scp the first backup (see next step), remove it from /tmp, then do the second backup. | ||
| + | |||
| + | 2) Else pipe the backups over SSH (see below). Note that this might not work from a Windows PC due to character translations (but you could work some magic with base64 or similar). | ||
| + | |||
| + | 3) Or mount and fstrim the partition to remove the stale data (requires the " | ||
| + | |||
| + | < | ||
| # now you can backup the complete eMMC (GPTs and all partitions): | # now you can backup the complete eMMC (GPTs and all partitions): | ||
| Line 216: | Line 233: | ||
| root@OpenWrt:/# | root@OpenWrt:/# | ||
| + | |||
| + | # or if you ran out of space in /tmp, you can pipe the backups over SSH from your Linux PC: | ||
| + | |||
| + | you@your-pc: | ||
| + | you@your-pc: | ||
| + | |||
| + | # and test your backups after piping them, especially if done from a Windows PC: | ||
| + | |||
| + | you@your-pc: | ||
| </ | </ | ||
| - | - Using SCP from you PC, bring all backup files to your PC and store them safely: | + | - Using SCP from your PC, bring all backup files to your PC and store them safely: |
| < | < | ||
| - | you@your-pc: | + | you@your-pc: |
| </ | </ | ||