[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/6] describe fixing filesystem corruption in the hurd manual.
From: |
address@hidden |
Subject: |
[PATCH 1/6] describe fixing filesystem corruption in the hurd manual. |
Date: |
Wed, 20 Sep 2023 22:44:55 -0400 |
I would have documented how to make /etc/fstab auto-fsck /home, but reading
/etc/fstab,
I think I already did that on my /etc/fstab, and I always have to manually fsck
/home.
Also there have been times, that I HAD to manually fsck /. So it's good to
show users
how to fsck their partitions. Especially, since they will most likely deal with
filesystem corruption.
* doc/hurd.texi (Repairing Filesystems): described fixing filesystem
corruption.
* doc/hurd.texi (Shutdown): added the hurd specific halt-hurd command.
---
doc/hurd.texi | 53 +++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 51 insertions(+), 2 deletions(-)
diff --git a/doc/hurd.texi b/doc/hurd.texi
index b713850c..ccad3228 100644
--- a/doc/hurd.texi
+++ b/doc/hurd.texi
@@ -777,13 +777,23 @@ If neither @option{--interleave} or @option{--layer} is
specified, multiple
@node Shutdown
@section Shutdown
-@scindex halt
+@scindex halt, poweroff, shutdown
@scindex reboot
You can shut down your GNU/Hurd machine by typing
+@example
$ @kbd{su}
# @kbd{halt}
+@end example
+
+If the above commands do not work to poweroff the machine, then you
+should instead use the hurd specific commands @kbd{halt-hurd},
+@kbd{poweroff-hurd}, or @kbd{reboot-hurd}, which do not actually shut
+down daemons, but properly sync data to the disk. After the data is
+synced to the disk, you can safely hard shut off the machine (usually
+via holding the power off button). To deal with filesystem
+corruption, see @ref{Repairing Filesystems}.
@node Foundations
@chapter Foundations
@@ -3625,8 +3635,47 @@ workstations, as well.
@section Repairing Filesystems
@pindex fsck
-FIXME: finish
+Please note that as of 2023, the Hurd still uses the @code{ext2}
+filesystem, which is not a journaling filesystem. This means that
+filesystem corruption is still possible, normally when the Hurd
+becomes unresponsive, and you are forced to hard shutoff the
+machine. Luckily, the @code{/} filesystem is automatically checked and
+fixed at boot time (though you may have to manually fsck your
+partitions every now and then). You will know that your filesystem
+partitions need to be repaired if the command @command{fsysopts <mount
+point>} outputs @code{--readonly}. For example:
+
+@example
+$ fsysopts /home
+ /hurd/ext2fs --readonly --relatime /dev/hd0s6
+@end example
+
+To fix your filesystems, you should take a look at @code{/etc/fstab}
+to find your partitions:
+
+@example
+$ cat /etc/fstab
+@end example
+
+Your partition/s will be something like @code{/dev/sd0sN} (or
+@code{/dev/hd0sN}), where 'N' is a number. To fix the corrupted
+filesystem, login as the 'root' user, and run the following command
+(replacing N with your number).
+
+@example
+# umount /dev/sd0sN
+# fsck.ext2 /dev/sd0sN
+@end example
+
+If you have many partitions, then you may need to repeat this
+procedure for all partitions. Then you can reboot.
+
+@example
+# reboot
+@end example
+If the @command{reboot} command fails, which happens occassionally,
+then use the hurd specific command @command{halt-hurd}.
@node Linux Extended 2 FS
@section Linux Extended 2 FS
--
2.40.1
- [PATCH 1/6] describe fixing filesystem corruption in the hurd manual.,
address@hidden <=
- [PATCH 1/6] describe fixing filesystem corruption in the hurd manual., Joshua Branson, 2023/09/21
- [PATCH 2/6] add a short ext2fs description to the hurd manual., Joshua Branson, 2023/09/21
- [PATCH 3/6] describe the ISO-9960 filesystem in the hurd manual., Joshua Branson, 2023/09/21
- [PATCH 4/6] add a FAT FS section to the hurd manual., Joshua Branson, 2023/09/21
- [PATCH 6/6] added short documentation for some translators., Joshua Branson, 2023/09/21
- [PATCH 5/6] trivial hurd manual changes., Joshua Branson, 2023/09/21