Commit 34dfeda
Sync the grub cmdline changes before exiting (#24)
* Fix: exit on failures during defrag operation and add verbose logging
* After updating GRUB configuration to enable hibernation, the tool does not ensure that these changes
are fully committed to disk. On some filesystems, committing can take tens or even hundreds of seconds.
If a hibernation request occurs before the commit completes, the subsequent resume fails because the
resume and resume_offset parameters are missing from the kernel command line.
To prevent this, the changes to the GRUB cmdline must be explicitly committed to disk. This requires:
1. sync() to flush data buffers, and
2. fsfreeze/unfreeze to flush filesystem metadata and ensure the journal is clean.
---------
Co-authored-by: root <root@DESKTOP-UT47VEB>1 parent 462c733 commit 34dfeda
1 file changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1259 | 1259 | | |
1260 | 1260 | | |
1261 | 1261 | | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
1262 | 1279 | | |
1263 | 1280 | | |
1264 | 1281 | | |
| |||
0 commit comments