|
各位朋友你们好!
我从昨天才开始学习对Linux的文件系统实际操作.
在学习中误用一个命令[mkfs.ext3]导致当前硬盘的分区表丢失.因为我对Linux还不熟习.所以不能解决这个问题.上google搜索,由于概念不明确不能得到明确的信息.下边是整个过程.
1.我使用了这个命令:
#mkfs.ext3 /dev/hdb
系统提示这不是一个分区,而是一个整盘.问我是否强制执行.
我按了 'Y'.
从这以后,系统就开始显示 [N]/768 数字跳变,当时没有在意,我觉得是在格式化之类的. 执行完后的情况如下:
[root@localhost /]# fdisk -l
Disk /dev/hdb: 40.0 GB, 40037760000 bytes
255 heads, 63 sectors/track, 4867 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
[root@localhost /]# df -lh
Filesystem Size Used Avail Use% Mounted on
/dev/hdb2 32G 2.4G 28G 8% /
none 62M 0 62M 0% /dev/shm
/dev/hdb1 4.9G 1.7G 3.3G 34% /mnt/c
[root@localhost /]# sfdisk -d
sfdisk: ERROR: sector 0 does not have an msdos signature
/dev/hdb: unrecognized partition
No partitions found
Warning: start=63 - this looks like a partition rather than
the entire disk. Using fdisk on it is probably meaningless.
[Use the --force option if you really want this]
通过上边几个命令.我自认为数据是没有丢失,只是分区表被破坏了.
而且MBR里边应该什么都没有.
这是/etc/fstab 的内容:
[root@localhost /]# more /etc/fstab
LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hdb3 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,r
o 0 0
这是tune2fs -l /dev/hdb的结果.
[root@localhost /]# tune2fs -l /dev/hdb
tune2fs 1.32 (09-Nov-2002)
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: 2d7b8b3d-8919-408b-ac1d-78b377b94abc
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal filetype sparse_super
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 4889248
Block count: 9774843
Reserved block count: 488742
Free blocks: 9613201
Free inodes: 4889237
First block: 0
Block size: 4096
Fragment size: 4096
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 16352
Inode blocks per group: 511
Filesystem created: Wed Aug 2 15:34:33 2006
Last mount time: n/a
Last write time: Wed Aug 2 15:35:20 2006
Mount count: 0
Maximum mount count: 39
Last checked: Wed Aug 2 15:34:33 2006
Check interval: 15552000 (6 months)
Next check after: Mon Jan 29 15:34:33 2007
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 128
Journal UUID: <none>
Journal inode: 8
Journal device: 0x0000
First orphan inode: 0
这是tune2fs -l /dev/hdb2 的结果:
[root@localhost /]# tune2fs -l /dev/hdb2
tune2fs 1.32 (09-Nov-2002)
Filesystem volume name: /
Last mounted on: <not available>
Filesystem UUID: 45a6e07b-9c4c-4414-a42d-28d7884a9fe1
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal filetype needs_recovery sparse_super
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 4202464
Block count: 8393962
Reserved block count: 419698
Free blocks: 7645180
Free inodes: 4071212
First block: 0
Block size: 4096
Fragment size: 4096
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 16352
Inode blocks per group: 511
Filesystem created: Tue Jul 4 09:11:35 2006
Last mount time: Tue Aug 1 10:27:57 2006
Last write time: Tue Aug 1 21:05:19 2006
Mount count: 8
Maximum mount count: 10
Last checked: Fri Jul 21 00:07:18 2006
Check interval: 0 (<none>)
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 128
Journal UUID: <none>
Journal inode: 8
Journal device: 0x0000
First orphan inode: 0
该系统目前是正常运行..但是个人理解,重启后将导致引导失败..
请各位朋友帮忙分析一下.重启计算机后会不会导致引导失败.
如果会,那么现在应该怎样做.如果不会,那么为什么我现在的分区表是空的呢?
谢谢!!!
付机器情况:
[root@localhost /]# more /proc/version
Linux version 2.4.21-32.EL ([email protected]) (gcc version 3.2.3 20030502 (R
ed Hat Linux 3.2.3-52)) #1 Fri Apr 15 21:29:19 EDT 2005 |
|