Skip to content

Commit 46ff732

Browse files
reset bootloader in recover_fs
1 parent 3dbd128 commit 46ff732

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

recover_fs/index.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,21 @@
4242
return;
4343
}
4444

45-
if (confirm("Are you sure you want to reset the bootloader file /boot/init? This will clear your choice of init system but retains your files.")) {
46-
// delete /boot/init from opfs
45+
if (confirm("Are you sure you want to reset the bootloader? This will clear your choice of init system, boot target, and default shell but retains your files.")) {
46+
// delete /boot/init, /etc/boot_target and /etc/default_shell
4747
const root = await navigator.storage.getDirectory();
4848
try {
4949
const boot_dir = await root.getDirectoryHandle("boot");
5050
await boot_dir.removeEntry("init");
5151

52+
const etc_dir = await root.getDirectoryHandle("etc");
53+
await etc_dir.removeEntry("boot_target");
54+
await etc_dir.removeEntry("default_shell");
55+
5256
alert("Bootloader reset. Heading back to OllieOS.");
5357
window.location.href = "/";
5458
} catch (e) {
55-
alert("Bootloader file /boot/init does not exist. Nothing to reset.");
59+
alert("Bootloader directory /boot does not exist. Nothing to reset.");
5660
}
5761
}
5862
};

0 commit comments

Comments
 (0)