磁盘“/dev/sdb”不包含有效的分区表

磁盘“/dev/sdb”不包含有效的分区表

我已经在 USB 上安装了 Ubuntu,然后尝试清理光盘以安装另一个版本的 Ubuntu。

sudo -rm由于文件是只读的,我无法做到这一点(即使尝试使用删除文件)。

尝试使用以下命令格式化磁盘gparted:磁盘具有标志 boot 和 lbs。卸载磁盘后,我在控制台中收到代码:

/dev/sdb: unrecognised disk label
Input/output error during write on /dev/sdb

在终端中输入

fdisk -l

我收到此消息:

Disk /dev/sdb: 8441 MB, 8441462784 bytes 64 heads, 32 sectors/track, 8050 cylinders, total 16487232 sectors   

Units = sectors of 1 * 512 = 512 bytes 
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x704e26c8   
Disk /dev/sdb doesn't contain a valid partition table`

运行后:

fdisk /dev/sdb
o
n (and than all default, so: primary, partition number 1, first sector 2048, last sector 16487231)
w

并尝试写入一个新的分区表,我收到以下消息:

The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

跑步后

dmesg | tail

代码:

[ 8223.479979] Info fld=0x0
[ 8223.479984] sd 12:0:0:0: [sdb]  
[ 8223.479990] Add. Sense: Write protected
[ 8223.479995] sd 12:0:0:0: [sdb] CDB: 
[ 8223.479998] Write(10): 2a 00 00 00 00 00 00 00 08 00
[ 8223.480043] end_request: critical target error, dev sdb, sector 0
[ 8223.480050] Buffer I/O error on device sdb, logical block 0
[ 8223.480054] lost page write due to I/O error on sdb
[ 9080.052379] FAT-fs (sdb1): invalid media value (0x10)
[ 9080.052389] FAT-fs (sdb1): Can't find a valid FAT filesystem

运行后:

sudo dd if=/dev/zero of=/dev/sdX bs=512 count=1

我有:

1+0 records in
1+0 records out
512 bytes (512 B) copied, 0,011829 s, 43,3 kB/s

所以我猜它起作用了。卸载磁盘,重新启动系统,问题仍然存在。

  • 您对如何修复它有什么想法吗?

我将非常感激您的帮助!

答案1

在类似的情况下,我弄乱了 USB 笔式驱动器的格式,在打开它时,文件管理器弹出此消息

在 /media/user/usbsrive 上安装 /dev/sdb1 时出错:命令行“mount -t“vfat”-o“uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush”“/dev/sdb1”“/media/user/usbdrive”' 以非零退出状态 32 退出:mount:/dev/sdb1:无法读取超级块

我认为这个命令对我扭转厄运有很大帮助(将 sdX 更改为设备插入的驱动器,例如fdisk -l):

sudo dd if=/dev/zero of=/dev/sdX bs=512 count=1

我用 gparted (v 0.25.0) 重新打开它,它只是抱怨找不到分区表。因此,我用同一个工具再次创建了分区表,按照我的喜好格式化了磁盘,然后重新启动并运行它。我可能用 fdisk 也能达到同样的效果。

以前,我会认为该驱动器已无可挽回地丢失,并将其扔进垃圾箱。

相关内容