免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1208 | 回复: 8
打印 上一主题 下一主题

口令丢失,但光盘启动时无法mount [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-12-31 10:38 |只看该作者 |倒序浏览
各位大侠,我丢失了root的口令,但我用光盘启动后无法mount,系统提示:
mount: the state of /dev/dsk/c0t0d0s0 is not okey
            and it was attempted to be mounted read/write
mount: Please run fsck and try again
而我执行 fsck /dev/dsk/c0t0d0s0 时,系统又提示:
BAD SUPER BLOCK:TRASHED VALUES IN SUPER BLOCK
   USE AN ALTERNATE SUPER-BLOCK TO SUPPLY NEEDED INFORMATION;
eg. fsck [-F ufs] -o b=#[special ...]
where #is the alternate super block. SEE fsck_ufs(1M).
所以我一直无法mount,进行修改

我想请问一下,下步我该如何办?

论坛徽章:
0
2 [报告]
发表于 2004-12-31 11:14 |只看该作者

口令丢失,但光盘启动时无法mount

不是告诉你了嘛:“BAD SUPER BLOCK”
先用newfs -N  /dev/rdsk/c0t0d0s0读出备份超级块的位置。
再用 fsck [-F ufs] -o b=#[special ...] 修复超级块。

论坛徽章:
0
3 [报告]
发表于 2004-12-31 13:02 |只看该作者

口令丢失,但光盘启动时无法mount

How to Restoring a Bad Superblock---------------------------------------------
    When the superblock of a file system becomes damaged, you must restore it. fsck tells you when a superblock is bad. ortunately, redundant copies of the superblock are stored within a file system. You can use fsck -o b to replace the superblock with one of the copies.

How to Restore a Bad Superblock
1. Become superuser.
2. Change to a directory outside the damaged file system.
3. Unmount the file system.
# umount mount-point
Caution - Be sure to use the newfs -N in the next step. If you omit the -N option,
you will create a new, empty file system.
4. Display the superblock values with the newfs -N command.
# newfs -N /dev/rdsk/device-name
The output of this command displays the block numbers that were used for the
superblock copies when newfs created the file system, unless the file system was
created with special parameters. See “Deciding on Custom File System
Parameters” on page 542 for information on creating a customized file system.
5. Provide an alternative superblock with the fsck command.
# fsck -F ufs -o b=block-number /dev/rdsk/device-name
fsck uses the alternative superblock you specify to restore the primary
superblock. You can always try 32 as an alternative block, or use any of the
alternative blocks shown by newfs -N.
Example—Restoring a Bad Superblock
The following example restores the superblock copy 5264 for the /files7 file
system:
# cd /
# umount /files7
# newfs -N /dev/rdsk/c0t3d0s7
/dev/rdsk/c0t3d0s7: 163944 sectors in 506 cylinders of 9 tracks, 36 sectors
83.9MB in 32 cyl groups (16 c/g, 2.65MB/g, 1216 i/g)
super-block backups (for fsck -b #) at:
32, 5264, 10496, 15728, 20960, 26192, 31424, 36656, 41888,
47120, 52352, 57584, 62816, 68048, 73280, 78512, 82976, 88208,
93440, 98672, 103904, 109136, 114368, 119600, 124832, 130064, 135296,
140528, 145760, 150992, 156224, 161456,
# fsck -F ufs -o b=5264 /dev/rdsk/c0t3d0s7
Alternate superblock location: 5264.
** /dev/rdsk/c0t3d0s7
** Last Mounted on
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
36 files, 867 used, 75712 free (16 frags, 9462 blocks, 0.0% fragmentation)
/dev/rdsk/c0t3d0s7 FILE SYSTEM STATE SET TO OKAY
***** FILE SYSTEM WAS MODIFIED *****
#
If the superblock in the root (/) file system becomes damaged and you cannot boot
the system, reinstall /kernel/unix and rebuild the root (/) file system with newfs.
Checking File System Integrity 523
Because a superblock is created by the newfs command, you do not need to restore it .

论坛徽章:
0
4 [报告]
发表于 2004-12-31 14:38 |只看该作者

口令丢失,但光盘启动时无法mount

楼上的朋友,咱们是中国人,说英文累吧!

论坛徽章:
0
5 [报告]
发表于 2004-12-31 14:51 |只看该作者

口令丢失,但光盘启动时无法mount

If the superblock in the root (/) file system becomes damaged and you cannot boot
the system, reinstall /kernel/unix and rebuild the root (/) file system with newfs.
Checking File System Integrity 523
Because a superblock is created by the newfs command, you do not need to restore it .


我英文不大好,请问这段话究竟是什么意思啊?

论坛徽章:
0
6 [报告]
发表于 2004-12-31 15:15 |只看该作者

口令丢失,但光盘启动时无法mount

dradhzn   how to reinstall /kernel/unix, don't know
you can miniboot your system by cdrom and fsck -N to rebuilt the  backup superblock .


            how to reinstall /kernel/unix

论坛徽章:
0
7 [报告]
发表于 2004-12-31 15:43 |只看该作者

口令丢失,但光盘启动时无法mount

sorry guys , not able to type chinese here, the above article is quoted from Sun's System admin document , i am trying to put the it as detail as possible since it might be an OS recovery . it could be a disaster if you don't handle it carefully . to me i perfer to follow Sun's standard docs.
i am not sure you able to access this link or not (from Sun), since it's even longer steps .
http://docs.sun.com/app/docs/doc/801-6631?l=zh&q=reinstall+%2fkernel%2funix&a=load

论坛徽章:
0
8 [报告]
发表于 2004-12-31 16:07 |只看该作者

口令丢失,但光盘启动时无法mount

good

论坛徽章:
0
9 [报告]
发表于 2005-01-04 09:55 |只看该作者

口令丢失,但光盘启动时无法mount

lyan77   ,能MOUNT上了吗
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP