📄 00000003.htm
字号:
<HTML><HEAD> <TITLE>BBS水木清华站∶精华区</TITLE></HEAD><BODY><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER>发信人: linuxrat (竹剑居士*农大历史上最差的学生), 信区: Linux <BR>标 题: 挽救已遭破坏的分区表[FWD] <BR>发信站: BBS 水木清华站 (Thu Feb 3 11:32:50 2000) <BR> <BR> 想来不小心的道友经常会碰上这种事情, 这里提供一篇文章, 参考一下吧. <BR> 不过我的习惯总是fdisk -l /dev/hdX > hdX.info. 备份起来就高枕无忧了. <BR> 预防为主么, 不要等到出了问题才慌张哦. 防患于未然啦. 呵呵... <BR> URL:<A HREF="http://www.linuxforum.com/plug/articles/partition.html">http://www.linuxforum.com/plug/articles/partition.html</A> <BR>===Begin=== <BR> Partition Disaster Recovery <BR> <BR> If you have attempted an install of a RedHat/Mandrake distribution and <BR> you are dual-booting another operating system (like MS Windows), you <BR> may have trashed your partition table and can no longer access MS <BR> Windows. <BR> <BR> There is a Linux Partition-Rescue mini-HOWTO, but it seems slightly <BR> askew to me, telling you to find Partition Magic, a commercial <BR> program, "on the internet", and having used the program Partition <BR> Magic, I don't think it could do it as well as this article. <BR> <BR> But fear not, there is a way to recover. Essentially, you will be <BR> using Linux fdisk to rebuild your partition table. If you get it <BR> correct, your partitions are restored. The reason this works is that <BR> Linux fdisk does not automatically format the partition when it is <BR> created; you need to give a separate command for that in Linux, <BR> because you have many choices as to how to format the partition. MS <BR> fdisk just creates a new table and formats at teh same time. <BR> <BR> Like most recovery strategies, it helps if you plan ahead. If you are <BR> reading this before the fact, here is what you should do: <BR> * Run Linux fdisk with the -l option, like this: fdisk /dev/hda -l > <BR> /tmp/hdaconfig.txt <BR> * This generates a file that contains teh same info as if you ran <BR> fdisk /dev/hda and used the p copmmand to see the drive partition <BR> information. <BR> * Print this information out and save it- it can come in very handy. <BR> * Practice with any recoery tools you may need to use. <BR> <BR> The Magic <BR> * Boot to Linux (you can use an all-on-a-floppy distro like <BR> tomsrtbt). <BR> * Run fdisk /dev/hda at the prompt after you log on. <BR> * Using the information that you had prviously saved, re-create the <BR> partition table exactly, including parition types (fat32, ext2, <BR> etc.) <BR> * Use the w command to write the new partition table and exit fdisk. <BR> * If your MBR is messed up, boot to the Windows Emergency Boot <BR> Disk(you did make one, didn't you?) and run fdisk /mbr to restore <BR> the MS master boot record. <BR> * Re-boot and Windows should be back. <BR> * You can use you Linux boot disk (you did make one, didn't you?) to <BR> boot to your Linux install and run /sbin/lilo to restore lilo to <BR> the mbr if needed. <BR> <BR> HELP - I didn't make a MS Windows Emergency Boot Disk or Don't Have a <BR> Bootable DOS Disk With MS fdisk! <BR> <BR> You can: <BR> * Borrow one from a friend. Remember to thank them. <BR> * Begin the MS Windows install on another computer and go only as <BR> far as the "Create and Emergency Boot Disk" section. (If you stop <BR> there, it won't mess up the existing insttall of MS WIndows on <BR> that machine - don't do anything stupid. OK?) <BR> * Use FREEDOS . <BR> <BR> HELP - I didn't make a Linux Boot Disk! <BR>(这个tomsrtbt可以在<A HREF="http://www.toms.net/rb/home.html找到,">http://www.toms.net/rb/home.html找到,</A> 其实也就是一个 <BR> rescue盘之类的东东啦. ) <BR> You can get tomsrtbt , the install/utility disk from Peanut Linux, <BR> AIRMID Linux or something similar, then boot your Linux of choice. <BR> * From the lilo prompt of Peanut and AIRMID, you can try lilo <BR> root=/dev/hdax ro ,where x is the partition number of your Linux <BR> partition. <BR> <BR> <BR> * For tomsrtbt, you need to mount the Linux partition from your hard <BR> drive by: <BR> <BR> mkdir /mnt/linux #this is to create a mount point <BR> <BR> mount -t ext2 /dev/hdax /mnt/linux #this mounts an ext2 partition <BR> known as hdax (where x is the number of the partition) <BR> <BR> /lilo -r /mnt/linux/etc #this causes tomsrtbt to run lilo using the <BR> configuration in you hard drive partition, writing you lilo <BR> information to your mbr. <BR> <BR> <BR> This article is a work in progress. I would appreciate you feedback. <BR> <BR>===End===== <BR>-- <BR> //sigh, 签名档太长会浪费空间, 所以放到个人说明档里面去了。呵呵... <BR> 我转载的一切文章, 版权归相应的作者所有。 <BR> <BR>※ 修改:·linuxrat 於 Feb 3 15:02:07 修改本文·[FROM: 202.112.168.253] <BR>※ 来源:·BBS 水木清华站 smth.org·[FROM: 202.112.168.253] <BR><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -