Gentoo Archives: gentoo-user

From: Wols Lists <antlists@××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] power button to shutdown for openrc? [SOLVED]
Date: Mon, 18 Nov 2019 10:41:25
Message-Id: 5DD2754A.70501@youngman.org.uk
In Reply to: Re: [gentoo-user] power button to shutdown for openrc? [SOLVED] by n952162
1 On 17/11/19 20:35, n952162 wrote:
2 >>
3 >> Needless to say, you would not try this on the original partition, but a
4 >> backup image you can create with ddrescue and friends. In any case,
5 >> running
6 >> fsck.ext4 -n (or -E nodiscard) should not cause any fs losses, unless the
7 >> disk/hardware is faulty. Hence working on a backup image is the safest
8 >> option.
9 >>
10 >
11 > Thanks for the tip about ddrescue.
12
13 I'll throw in another tip, about dm-verity. If you haven't met it, it's
14 part of the block-management layer. It's new so I don't know much about
15 it but I'm personally excited about its capabilities for raid recovery
16 and stuff like that.
17
18 Basically, on top of your block device you would create a dm-verity
19 device. I don't know whether you can, but if you can't it needs adding -
20 you want to create a device in corrupted mode where any read access will
21 trigger a read error.
22
23 As ddrescue copies your old device across it will reset the integrity
24 layer. So when you go to read your device image, any attempt to read a
25 successfully recovered block will be fine, any attempt to read a block
26 that couldn't be recovered will trigger a read error.
27
28 Cheers,
29 Wol