Ubuntu system installed today, USB flash disk installation, hard disk installation is not good! After installation, select the trial or installation interface, and the screen will be black. The USB flash disk cannot be installed on that interface. At first, I thought it was an iso file problem. md5 check was correct. When I checked the black screen, the English prompt (English is very important, and I reminded myself again) was generally prompted for partition table check. Think of it, using the disk tool in ubuntu may corrupt the partition table.
No way. It is a newbie in linux, so you can go to pe and Diskman to check it. At the beginning, many error messages will pop up, including invalid partition parameters, overlapping partitions, and Partition Table errors, use Diskman to fix the problem and install it successfully.
Find the tutorial and try again
Hard Disk Data Recovery and Partition Table recovery in Linux
[IT168 application] Hard Disk Partition tables or data loss is a headache. Fortunately, a considerable number of tools are available to restore data.
Experience testdisk, restore a partition table on the hard disk, and retrieve important data. The entire process took less than 10 minutes and does not require system restart (requires a specific hardware environment ).
Does partition damage the partition table on the hard disk ?). Colleagues use easy recovery: in Advanced recovery mode, partition tables cannot be scanned, so data cannot be restored. In RAW recovery mode, data is found and recovered, but cannot be used.
Get the hard disk, connect it to the mobile hard disk box (it is recommended that computer maintenance personnel keep it, hard disk maintenance is commonly used), and connect it to my ubuntu system.
1. Check hard disk status
Connect to the mobile hard disk, turn on the power of the mobile hard disk, the hard disk turns stably, no abnormal sound. Therefore, it is determined that the hardware works normally. No mobile disk is found in nautilus. The command line checks whether the device is recognized by the system:
User @ ubuntu :~ $ Ls/dev/sd */dev/sda/dev/sda1
The results show that the hard disk and primary partition are found, but the extended partition is not recognized.
2. Install testdisk
User @ ubuntu :~ $ Sudo apt-get install testdisk
3. Run testdisk and fix it.
User @ ubuntu :~ $ Sudo testdisk
4. Reconnect the hard disk and check
The reason why the system is not restarted is mainly because the mobile hard disk box is used. If you use IDE directly, restart the computer. After you reconnect the mobile hard disk, you can view the three extended partitions in nautilus and perform data operations.
Restore the accidentally deleted Linux partition table
In an accidental operation, the Linux extended partition table is deleted. The extended partition has three logical partitions and one is mounted to the root directory.
Fortunately, the machine was not restarted. If the machine was restarted, everything on the machine would be lost.
After consulting with relevant persons, someone provided that fdisk can be used to reconstruct the partition according to the previous size and the partition can be retrieved. After careful analysis, if the size of the previous partition is unknown after the partition is re-created, the file allocation table will be lost. This is definitely not the result I want,
After logging on to the machine, cat/proc/partitions finds that the previous partition information is still there. At this time, if you want to use parted to restore the partition table, after creating the partition table, parted cannot correctly identify the original Partition Table type, you have to delete the newly created partition table. At this time, I am sure I am dead.
Search for linux parted on google with the last hope. I found a glimmer of hope that someone suggested using testdisk to restore the partition table. After downloading the binary code of testdisk in Linux, testdisk says: kernel too old, thinking, is the testdisk linux version compiled on the kernel of the high version? Fortunately, testdisk is released based on the gpl protocol. After downloading the linux source code, make and make install. Run again, OK! It can run normally!
After starting testdisk, follow the menu prompts to use the restoration function. After several minutes, testdisk finds all the partition tables that have been deleted. Great!
Testdisk, I love you !!
Testdisk Baidu encyclopedia
Software category: disk repair tools
Running Environment: DOS, Windows (NT4, 2000, XP, 2003, Vista, 2008, Windows 7 (x86 & x64), Linux, FreeBSD, NetBSD, OpenBSD, SunOS, MacOS X
Software nature: foreign software
TestDisk is an open-source disk repair tool that complies with the GPL license. It can Repair Disk startup failures due to Software defects or virus-related partition loss or partition table loss. TestDisk uses BIOS (DOS/Win9x) or operating system (Linux, FreeBSD) to query hard disk features (LBA size and CHS parameters ). Then, the system will quickly check the disk data structure and restore the partition table.
Linux partition repair software Testdisk
In linux, the super handsome Partition Table repair software. I have used more than n Partition Table repair software for windows. I didn't expect such a convenient repair software in linux to be fast .. I never saw this partition table repair software before .....
Well, this software is called testdisk. It's very handsome ..
If you are using a repair disc, download the software to your computer.
# Sudo apt-get install testdisk
Sudo testdisk first
1. Select Create for analysis.
Use arrow keys to select, then press Enter key:
[Create] Create a new log file
[Append] Append information to log file
[No Log] Don't record anything
2. Select the hard disk to be repaired in testdisk, and press Enter.
Select a media (use Arrow keys, then press Enter ):
Disk/dev/sda-160 GB/149 GiB-ata hitachi HTS54251
Disk/dev/sdb-3272 MB/3121 MiB-SM324BC USB DISK
3. We chose the testdisk Repair Platform from Intel, so we chose it.
Please select the partition table type, press Enter when done.
[Intel] Intel/PC partition
[Efi gpt] efi gpt partition map (Mac i386, some x86_64 ...)
[Mac] Apple partition map
[None] Non partitioned media
[Sun] Sun Solaris partition
[XBox] XBox partition
[Return] Return to disk selection
4. Use testdisk for analysis. Now select Analyse for analysis.
[Analyse] Analyse current partition structure and search for lost partitions
[Advanced] Filesystem Utils
[Geometry] Change disk geometry
[Options] Modify options
[MBR Code] Write TestDisk MBR code to first sector
[Delete] Delete all data in the partition table
[Quit] Return to disk selection
5. If you can see it, basically all the partitions are out, just press Enter. By default, press enter to quickly scan.
* = Primary bootable P = Primary L = Logical E = Extended D = Deleted
[Quick Search] [Backup]
Then, because vista is useless, select n.
Shocould TestDisk search for partition created under Vista? [Y/N] (answer Yes if
Unsure)
N
6. Go to and see your table in the table area.
Disk/dev/sda-160 GB/149 GiB-CHS 19457 255 63
Partition Start End Size in sectors
* HPFS-NTFS 0 1 1 1567 254 63 25189857
L FAT32 LBA 1568 2 1 5097 254 63 56709324 [no name]
L Linux Swap 5098 1 1 5221 254 63 1991997
L Linux 5222 1 1 7298 254 63 33366942
L Linux 7299 1 1 19456 254 63 195318207
Structure: OK. Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
* = Primary bootable P = Primary L = Logical E = Extended D = Deleted
Keys A: add partition, L: load backup, T: change type, P: list files,
Enter: to continue
NTFS, 12 GB/12 GiB
You can also press p to see if the file is what you want, and the following shows the file system size and system.
When I got to this location, I basically found out that there is no need to modify anything. If it is different from your partition, you may also need to use the Deeper search function. I successfully fixed it, So I directly wrote it to the partition table by using write to fix it.