Linux Server Hacks Volume Two phần 10

368 tin nhắn Thấy như "/ dev / foo: thiết bị không thể tìm thấy" không bao giờ là một điều tốt. Tuy nhiên, thông điệp này có thể được gây ra bởi một số vấn đề khác nhau. Không có nhiều bạn có thể làm gì về một lỗi phần cứng hoàn chỉnh, nhưng nếu bạn "may mắn" bảng phân vùng đĩa cứng của bạn chỉ có thể bị hư hại và các dữ liệu của bạn có thể chỉ là tạm thời không thể tiếp cận. . | 368 Seeing messages like dev FOO device not found is never a good thing. However this message can be caused by a number of different problems. There isn t much you can do about a complete hardware failure but if you re lucky your disk s partition table may just have been damaged and your data may just be temporarily inaccessible. If you haven t rebooted execute the cut Iproc partitions command to see if it still lists your device s partitions. Unless you have a photographic memory your disk contains only a single partition or you were sufficiently disciplined to keep a listing of its partition table trying to guess the sizes and locations of all of the partitions on an ailing disk is almost impossible without some help. Thankfully Michail Brzitwa has written a program that can provide exactly the help you need. His gpart guess partitions program scans a specified disk drive and identifies entries that look like partition signatures. By default gpart displays only a listing of entries that appear to be partitions but it can also automatically create a new partition table for you by writing these entries to your disk. That s a scary thing to do but it beats the alternative of losing all your existing data. If you re just reading this for information and aren t actually in the midst of a lost data catastrophe you may be wondering how to back up a disk s partition table so that you don t have to depend on a recovery utility like gpart. You can easily back up a disk s master boot record MBR and partition table to a file using the following dd command where FOO is the disk and FILENAME is the name of the file to which you want to write your backup dd if dev FOO of FILENAME bs 512 count 1 If you subsequently need to restore the partition table to your disk you can do so with the following dd command using the same variables as before dd if FILENAME of dev FOO bs 1 count 64 skip 446 seek 446 The gpart program works by reading the entire disk and comparing sector sequences

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
12    87    2    12-06-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.