Gentoo Archives: gentoo-user

From: Jorge Peixoto de Morais Neto <please.no.spam.here@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Corruption in reiserfs partition
Date: Sat, 08 Sep 2007 22:28:12
Message-Id: e628adfd0709081515x3433bd8dxb85484a6233678e1@mail.gmail.com
In Reply to: Re: [gentoo-user] Corruption in reiserfs partition by Volker Armin Hemmann
1 On 9/8/07, Volker Armin Hemmann <volker.armin.hemmann@××××××××××××.de>
2 wrote:
3 >
4 > On Samstag, 8. September 2007, Jorge Peixoto de Morais Neto wrote:
5 > > http://forums.gentoo.org/viewtopic-p-4225196.html#4225196
6 > >
7 > > Hi. The forums being down, can you give me help by mail on the topic
8 > > http://forums.gentoo.org/viewtopic-p-4225196.html#4225196, since I can't
9 > > use my Gentoo installation until the problem is solved?
10 > >
11 > > The most important thing to me is to know the answer to the two
12 > questions:
13 > >
14 > > 1) How can I know if other files were corrupted?
15 >
16 > well, you can try a script that compares the md5sums of the files
17 > installed
18 > with the m5sums of the files on the harddisk. But everything that wasn#t
19 > installed with portage can't be checked that way.
20
21 There is a equery command for that... equery check if memory serves. But I
22 issued this command some days ago and it always reports some files as
23 different... so I guess it is normal for one or two files out of 1000 in a
24 package to be modified without Portage knowing... but I want to know about
25 the packages that were modified *because of the corruption.*, not the ones
26 that were modified because of other reasons... but, perhaps this is the only
27 option: issue equery check and
28 1) if the checksum match I know it was not corrupted
29 2) if it does not match than it may or may not be because of the corruption
30
31 Too bad it does not apply to files not managed by Portage.
32 Hum, perhaps I should have made checksums of my personal data? Obviously,
33 nothing substitutes a backup, but for data that is not worth backing up
34 (because it is huge - thus costly to back up - and I can withstand a small
35 chance of losing said data, since I can obtain it again; a rip of a DVD
36 movie for example) I could at least save checksums, so if the file gets
37 corrupted, at least I'll know...
38
39
40 > 2) Do you think I should just use the computer, after reemerging the
41 > > packages that provide the corrupted files?
42 >
43 > yes
44
45 Do you think that there is any plausible chance that using the partition
46 might cause further damage?
47
48
49 > The background is: a corruption ocurred in my reiserfs partition, possibly
50 > > due to hardware problems; I performed reiserfsck and recovered virtually
51 > > all files, but at least some files in /bin are corrupted. In fact, they
52 > > cannot be executed, and executing the "file" command on them tells that
53 > > they are just "data" instead of recognising them as an executable. See:
54 > >
55 > >
56 > > jorge@jorge:/media/hda2/bin$ for file in *; do file "${file}" | grep -q
57 > > data && wc -c "${file}"; done
58 > > 13772 basename
59 > > 13500 chroot
60 > > 27048 cut
61 > > 79420 dir
62 > > 13836 dirname
63 > > 59084 du
64 > > 13436 env
65 > > 23336 expr
66 > > 24516 head
67 > > 14644 mkfifo
68 > > 18988 readlink
69 > > 34100 rm
70 > > 14684 rmdir
71 > > 17740 seq
72 > > 14772 sleep
73 > > 65168 sort
74 > > 37380 stty
75 > > 12584 sync
76 > > 35852 tail
77 > > 34328 touch
78 > > 27492 tr
79 > > 12200 true
80 > > 12800 tty
81 > > 15316 uname
82 > > 79420 vdir
83 > > 23108 wc
84 > > 12876 yes
85 > >
86 > > Aren't all these files part of coreutils?
87 >
88 > not all, but most of them.
89 >
90 > >
91 > > For more details, see the forum thread.
92 > > I would appreciate any help. Thanks.
93 >
94 > It doesn't look so bad. You can try moving the corrupted stuff to a backup
95 > dir, and create symlinks to busybox. Busybox should be installed on your
96 > system.
97
98 Yes it is.
99
100 for example
101 > ln -s busybox rm
102
103 Gentoo should have an automated way to do this. For me, it looks like there
104 should be an eselect option for "activating" busybox.
105
106
107 > I hope you learned your lessons!
108 >
109 > Lesson 1: /home on its own partition.
110
111 I read somewhere that most of the time when a disk fails it will take all of
112 its partitions with it, so putting /home is its own partition does not help.
113
114 Perhaps that person was wrong... at least in my case, I clearly had a
115 logical failure in the partition, with no physical failure in the disk, so
116 if I had multiple partitions, maybe only one would have problems.
117
118
119 > Lesson 2: backups.
120
121 Hehe. Yes I know. Fortunately it seems I was very lucky this time...

Replies

Subject Author
Re: [gentoo-user] Corruption in reiserfs partition Neil Bothwick <neil@××××××××××.uk>
Re: [gentoo-user] Corruption in reiserfs partition Volker Armin Hemmann <volker.armin.hemmann@××××××××××××.de>