Gentoo Archives: gentoo-user

From: Volker Armin Hemmann <volker.armin.hemmann@××××××××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Corruption in reiserfs partition
Date: Sat, 08 Sep 2007 20:26:43
Message-Id: 200709082214.17041.volker.armin.hemmann@tu-clausthal.de
In Reply to: [gentoo-user] Corruption in reiserfs partition by Jorge Peixoto de Morais Neto
1 On Samstag, 8. September 2007, Jorge Peixoto de Morais Neto wrote:
2 > http://forums.gentoo.org/viewtopic-p-4225196.html#4225196
3 >
4 > Hi. The forums being down, can you give me help by mail on the topic
5 > http://forums.gentoo.org/viewtopic-p-4225196.html#4225196, since I can't
6 > use my Gentoo installation until the problem is solved?
7 >
8 > The most important thing to me is to know the answer to the two questions:
9 >
10 > 1) How can I know if other files were corrupted?
11
12 well, you can try a script that compares the md5sums of the files installed
13 with the m5sums of the files on the harddisk. But everything that wasn#t
14 installed with portage can't be checked that way.
15
16
17 > 2) Do you think I should just use the computer, after reemerging the
18 > packages that provide the corrupted files?
19
20 yes
21
22 > Or should I reinstall the system from scratch?
23
24 no.
25
26 >
27 > The background is: a corruption ocurred in my reiserfs partition, possibly
28 > due to hardware problems; I performed reiserfsck and recovered virtually
29 > all files, but at least some files in /bin are corrupted. In fact, they
30 > cannot be executed, and executing the "file" command on them tells that
31 > they are just "data" instead of recognising them as an executable. See:
32 >
33 >
34 > jorge@jorge:/media/hda2/bin$ for file in *; do file "${file}" | grep -q
35 > data && wc -c "${file}"; done
36 > 13772 basename
37 > 13500 chroot
38 > 27048 cut
39 > 79420 dir
40 > 13836 dirname
41 > 59084 du
42 > 13436 env
43 > 23336 expr
44 > 24516 head
45 > 14644 mkfifo
46 > 18988 readlink
47 > 34100 rm
48 > 14684 rmdir
49 > 17740 seq
50 > 14772 sleep
51 > 65168 sort
52 > 37380 stty
53 > 12584 sync
54 > 35852 tail
55 > 34328 touch
56 > 27492 tr
57 > 12200 true
58 > 12800 tty
59 > 15316 uname
60 > 79420 vdir
61 > 23108 wc
62 > 12876 yes
63 >
64 > Aren't all these files part of coreutils?
65
66 not all, but most of them.
67
68 > So hopefully this was just a
69 > misbehaved coreutils emerge instead of a consequence of filesystem
70 > corruption.
71
72 maybe both. I had a nasty corruption some weeks ago thanks to a loose
73 sata-cable (I hate this f* plugs... ) .. which resulted in some nasty
74 breakage in /var ... and it is not funny when can't log in....
75
76 >
77 > For more details, see the forum thread.
78 > I would appreciate any help. Thanks.
79
80 It doesn't look so bad. You can try moving the corrupted stuff to a backup
81 dir, and create symlinks to busybox. Busybox should be installed on your
82 system.
83 for example
84 ln -s busybox rm
85
86 and so on. After that emerge coreutils and the other packages. Make sure, that
87 you don't have 'collision protect' or something like that set.
88
89 I hope you learned your lessons!
90
91 Lesson 1: /home on its own partition.
92 Lesson 2: backups.
93
94
95 --
96 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Corruption in reiserfs partition Jorge Peixoto de Morais Neto <please.no.spam.here@×××××.com>