標籤:

用centos修復問題u盤

用centos修復問題u盤

來自專欄 SW/Telcom

[alex@~]$ls /dev/sd*/dev/sda /dev/sda1 /dev/sda2 /dev/sda3 /dev/sdb /dev/sdb1[alex@~]$ls /dev/sdb/dev/sdb[alex@~]$lsanaconda3 bin Desktop Downloads Pictures temp.foo times1.exebase core.2517 Documents Music Public Templates Videos[alex@~]$cd /dev/sdb1bash: cd: /dev/sdb1: Not a directory[alex@~]$oot@alex:/home/alex #fsck /dev/sdb1fsck from util-linux 2.23.2e2fsck 1.42.9 (28-Dec-2013)ext2fs_open2: Bad magic number in super-blockfsck.ext2: Superblock invalid, trying backup blocks...fsck.ext2: Bad magic number in super-block while trying to open /dev/sdb1The superblock could not be read or does not describe a correct ext2filesystem. If the device is valid and it really contains an ext2filesystem (and not swap or ufs or something else), then the superblockis corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 <device>root@alex:/home/alex #dd if=/dev/zero of=/dev/sdb1

dd 看上去死在那裡了,monitor 一下

還好,在工作

root@alex:/home/alex #dd if=/dev/zero of=/dev/sdb1dd: writing to 『/dev/sdb1』: No space left on device15154210+0 records in15154209+0 records out7758955008 bytes (7.8 GB) copied, 600.193 s, 12.9 MB/sroot@alex:/home/alex #mkfs.ntfs -f /dev/sdb1bash: mkfs.ntfs: command not found...[alex@~]$sudo yum list ntfs-3g[sudo] password for alex: Loaded plugins: auto-update-debuginfo, fastestmirror, langpacksLoading mirror speeds from cached hostfile * base: mirrors.cn99.com * elrepo: mirrors.tuna.tsinghua.edu.cn * nux-dextop: li.nux.roInstalled Packagesntfs-3g.x86_64 2:2017.3.23-6.el7 @epel[alex@~]$難怪上次就是企圖將u盤格式化為ntfs 格式時出錯,gui 靠不住呀.root@alex:/home/alex #mkfs.ntfs-3g -f /dev/sdb1bash: mkfs.ntfs-3g: command not found...root@alex:/home/alex #mkfs.fat -n udisk -f 2 /dev/sdb1mkfs.fat 3.0.20 (12 Jun 2013)root@alex:/home/alex #ls

這時,/dev/sdb1還是沒法訪問, 拔出再插入,桌面就顯示u盤了.

正常使用.........

推薦閱讀:

TAG:U盤 | Linux |