On Tue, 22 Nov 2005 22:04:33 -0500 [EMAIL PROTECTED] wrote: > 大家好, > 我的是debian unstable,昨天晚上动了一下分区表, > 结果弄坏了一个分区,我现在的分区表数据如下 > vax:/home/ailantian# fdisk -l > > Disk /dev/hda: 40.0 GB, 40020664320 bytes > 255 heads, 63 sectors/track, 4865 cylinders > Units = cylinders of 16065 * 512 = 8225280 bytes > > Device Boot Start End Blocks Id System > /dev/hda1 * 1 500 4016218+ 83 Linux > /dev/hda2 501 4865 35061862+ 5 Extended > /dev/hda5 501 1009 4088511 83 Linux > /dev/hda6 1010 1073 514048+ 82 Linux swap / Solaris > /dev/hda7 1074 2289 9767488+ 83 Linux > /dev/hda8 2290 3640 10851876 83 Linux > /dev/hda9 3641 4865 9839781 83 Linux > vax:/home/ailantian# > 我以前的hda1和hda2是合在一起的,装的是windows昨天我把他拆成了两个分区,就是现在的hda1和hda2 > 我是直接用fdisk把所有的分区删除以后重建的,我开始是把各个分区扇区的地址都记住了的,重建的时候只是 > 把原来的第一个windows分区拆分成现在的hda1和hda2,重新起动以后发现其他的各个分区的数据都还在 > 可是hda7的数据读不出来了,mount的时候一开始的时候是说需要指定文件系统类型,就是说认不出来reiserfs分区了 > 后来我装了testdisk,试了很多都不管用, > 然后又reiserfsck重新build-tree和build-sb,--check都不管用了,我来我想是不是testdisk没用, > 我就直接把我在dev/hda1建了几个文本文件,然后把它的前64K都zero了,dd if=/dev/zero of=/dev/hda1 bs=64000 > 结果出现的问题和我的hda7问题一样,我尝试了各种方法也没法恢复,mount的时候也会提示错误,后来mkfs以后才能挂载, > 我想我现在hda7上面的数据应该是还在的,可以我到底该怎么恢复呢?我现在hda8,9的数据都还在的,因为我现在的linux > 系统就在hda9,请问大家有没有什么好意见,谢谢大家 我的错误主要如下 vax:/home/ailantian# reiserfsck /dev/hda7 --fix-fixable reiserfsck 3.6.19 (2003 www.namesys.com)
************************************************************* ** If you are using the latest reiserfsprogs and it fails ** ** please email bug reports to [email protected], ** ** providing as much information as possible -- your ** ** hardware, kernel, patches, settings, all reiserfsck ** ** messages (including version), the reiserfsck logfile, ** ** check the syslog file for any related information. ** ** If you would like advice on using this program, support ** ** is available for $25 at www.namesys.com/support.html. ** ************************************************************* Will check consistency of the filesystem on /dev/hda7 and will fix what can be fixed without --rebuild-tree Will put log info to 'stdout' Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes ########### reiserfsck --fix-fixable started at Tue Nov 22 22:53:44 2005 ########### Replaying journal.. Reiserfs journal '/dev/hda7' in blocks [18..8211]: 0 transactions replayed Checking internal tree.. Bad root block 0. (--rebuild-tree did not complete) Aborted vax:/home/ailantian# reiserfsck /dev/hda7 --rebuild-tree reiserfsck 3.6.19 (2003 www.namesys.com) ************************************************************* ** Do not run the program with --rebuild-tree unless ** ** something is broken and MAKE A BACKUP before using it. ** ** If you have bad sectors on a drive it is usually a bad ** ** idea to continue using it. Then you probably should get ** ** a working hard drive, copy the file system from the bad ** ** drive to the good one -- dd_rescue is a good tool for ** ** that -- and only then run this program. ** ** If you are using the latest reiserfsprogs and it fails ** ** please email bug reports to [email protected], ** ** providing as much information as possible -- your ** ** hardware, kernel, patches, settings, all reiserfsck ** ** messages (including version), the reiserfsck logfile, ** ** check the syslog file for any related information. ** ** If you would like advice on using this program, support ** ** is available for $25 at www.namesys.com/support.html. ** ************************************************************* Will rebuild the filesystem (/dev/hda7) tree Will put log info to 'stdout' Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes Replaying journal.. Reiserfs journal '/dev/hda7' in blocks [18..8211]: 0 transactions replayed ########### reiserfsck --rebuild-tree started at Tue Nov 22 22:55:51 2005 ########### Pass 0: ####### Pass 0 ####### Loading on-disk bitmap .. ok, 8285 blocks marked used Skipping 8285 blocks (super block, journal, bitmaps) 0 blocks will be read Could not find a hash in use. Using "r5" "r5" hash is selected Flushing..finished Read blocks (but not data blocks) 0 Leaves among those 0 Objectids found 2 Pass 1 (will try to insert 0 leaves): ####### Pass 1 ####### Looking for allocable blocks .. finished Flushing..finished 0 leaves read 0 inserted ####### Pass 2 ####### Flushing..finished No reiserfs metadata found. If you are sure that you had the reiserfs on this partition, then the start of the partition might be changed or all data were wiped out. The start of the partition may get changed by a partitioner if you have used one. Then you probably rebuilt the superblock as there was no one. Zero the block at 64K offset from the start of the partition (a new super block you have just built) and try to move the start of the partition a few cylinders aside and check if debugreiserfs /dev/xxx detects a reiserfs super block. If it does this is likely to be the right super block version. If this makes you nervous, try www.namesys.com/support.html, and for $25 the author of fsck, or a colleague if he is out, will step you through it all. Aborted vax:/home/ailantian# reiserfsck --rebuild-sb /dev/hda7 reiserfsck 3.6.19 (2003 www.namesys.com) ************************************************************* ** If you are using the latest reiserfsprogs and it fails ** ** please email bug reports to [email protected], ** ** providing as much information as possible -- your ** ** hardware, kernel, patches, settings, all reiserfsck ** ** messages (including version), the reiserfsck logfile, ** ** check the syslog file for any related information. ** ** If you would like advice on using this program, support ** ** is available for $25 at www.namesys.com/support.html. ** ************************************************************* Will check superblock and rebuild it if needed Will put log info to 'stdout' Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes rebuild-sb: wrong tree height occured (65535), zeroed Reiserfs super block in block 16 on 0x307 of format 3.6 with standard journal Count of blocks on the device: 2441872 Number of bitmaps: 75 Blocksize: 4096 Free blocks (count of blocks - used [journal, bitmaps, data, reserved] blocks): 2441872 Root block: 0 Filesystem is clean Tree height: 0 Hash function used to sort names: "r5" Objectid map size 2, max 972 Journal parameters: Device [0x0] Magic [0x0] Size 8193 blocks (including 1 for journal header) (first block 18) Max transaction length 1024 blocks Max batch size 900 blocks Max commit age 30 Blocks reserved by journal: 0 Fs state field: 0xfa03: FATAL corruptions exist. some corruptions exist. sb_version: 2 inode generation number: 0 UUID: b1fb9d0e-269b-4c36-b606-2430f5809729 LABEL: Set flags in SB: Is this ok ? (y/n)[n]: y The fs may still be unconsistent. Run reiserfsck --check. vax:/home/ailantian# vax:/home/ailantian# mount /dev/hda7 /mnt/ mount: Not a directory vax:/home/ailantian# 最后mount的有些错误输不出来,不是标准错误也不是标准输出,没法重定向,不知道如何截取 > -- > hello sir , > I am a newbie > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] > -- hello sir , I am a newbie -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

