Linux格式化分割槽報錯Could not start /dev/sda No such file or directory 解決辦法
[root@linuxidc ~]# fdisk -l /dev/sda
Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280bytes
Sector size (logical/physical): 512 bytes /512 bytes
I/O size (minimum/optimal): 512 bytes / 512bytes
Disk identifier: 0x7d57cb1f
Device Boot Start End Blocks Id System
/dev/sda1 1 2610 20964793+ 5 Extended
/dev/sda5 1 128 1028097 83 Linux
/dev/sda6 129 256 1028128+ 83 Linux
/dev/sda7 257 384 1028128+ 83 Linux
格式化新分割槽的時候,報錯,提示下面的錯誤,沒有這個檔案或目錄。
Could not stat /dev/sda7 --- No such fileor directory
The device apparently does not exist; didyou specify it correctly?
[root@linuxidc ~]# mke2fs -t ext4 /dev/sda7
mke2fs 1.41.12 (17-May-2010)
Could not stat /dev/sda7 --- No such fileor directory
The device apparently does not exist; didyou specify it correctly?
解決方法:執行partprobe 命令
partprobe包含在parted的rpm軟體包中。
partprobe可以修改kernel中分割槽表,使kernel重新讀取分割槽表。
因此,使用該命令就可以建立分割槽並且在不重新啟動機器的情況下系統能夠識別這些分割槽。
檢視是否安裝過該命令:
[root@linuxidc~]# rpm -q parted
packageparted is not installed
提示沒有安裝過,則需要安裝parted
安裝命令:#yum install parted #前提是保證你的虛擬機器可以上網,要從網路下載安裝包
[root@linuxidc~]# yum install parted
Loadedplugins: fastestmirror
1234567 Loadingmirror speeds from cached hostfile
* base: mirrors.skyshe.cn
* extras: mirrors.skyshe.cn
* updates: mirrors.skyshe.cn
base | 3.7 kB 00:00
extras |3.3 kB 00:00
updates | 3.4 kB 00:00
Settingup Install Process
ResolvingDependencies
-->Running transaction check
--->Package parted.i686 0:2.1-25.el6 will be installed
-->Finished Dependency Resolution
DependenciesResolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
parted i686 2.1-25.el6 base 595 k
TransactionSummary
=============================================================================
Install 1 Package(s)
Totaldownload size: 595 k
Installedsize: 2.1 M
Isthis ok [y/N]: y
DownloadingPackages:
parted-2.1-25.el6.i686.rpm | 595 kB 00:16
Runningrpm_check_debug
RunningTransaction Test
TransactionTest Succeeded
RunningTransaction
Installing : parted-2.1-25.el6.i686 1/1
Verifying : parted-2.1-25.el6.i686 1/1
Installed:
parted.i686 0:2.1-25.el6
Complete!
安裝完成後,再進行查詢一次,已經安裝成功。
[root@linuxidc~]# rpm -q parted
parted-2.1-25.el6.i686
執行一下該命令:
[root@linuxidc~]# partprobe
Warning:WARNING: the kernel failed to re-read the partition table on /dev/sda (Deviceor resource busy). As a result, it maynot reflect all of your changes until after reboot.
Warning:WARNING: the kernel failed to re-read the partition table on /dev/sdb (Deviceor resource busy). As a result, it maynot reflect all of your changes until after reboot.
Warning:Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only.
Warning:Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only.
Error:Invalid partition table - recursive partition on /dev/sr0.
然後執行格式化,就OK了,如果還提示出錯,重啟之後再執行格式化就可以了。
[root@linuxidc~]# mkfs -t ext4 /dev/sda7
mke2fs1.41.12 (17-May-2010)
Filesystemlabel=
OStype: Linux
Blocksize=4096 (log=2)
Fragmentsize=4096 (log=2)
Stride=0blocks, Stripe width=0 blocks
64384inodes, 257032 blocks
12851blocks (5.00%) reserved for the super user
Firstdata block=0
Maximumfilesystem blocks=264241152
8block groups
32768blocks per group, 32768 fragments per group
8048inodes per group
Superblockbackups stored on blocks:
32768, 98304, 163840, 229376
Writinginode tables: done
Creatingjournal (4096 blocks): done
Writingsuperblocks and filesystem accounting information: done
Thisfilesystem will be automatically checked every 35 mounts or
180days, whichever comes first. Use tune2fs-c or -i to override.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7490392/viewspace-2127273/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Linux 格式化分割槽 報錯Could not stat /dev/sda3 --- No such file or directoryLinuxdev
- Could not resolve host: 'localhost 報錯解決辦法localhost
- Windows分割槽報錯解決Windows
- VMware 啟動報錯 "Failed to lock the file"解決辦法AI
- /dev/null解決辦法devNull
- pg_basebackup 報錯could not create directory
- Could not find *.apk!解決辦法APK
- sysctl -P 報錯解決辦法
- Linux 分割槽和格式化Linux
- Linux下新增硬碟,分割槽,格式化詳解Linux硬碟
- cnpm link 報錯解決辦法NPM
- git報錯400的解決辦法Git
- 開機checking file錯誤的解決辦法
- apache PHP 隱藏 index.php 報錯 No input file specified. 解決辦法ApachePHPIndex
- NPM run dev 失敗解決辦法NPMdev
- WIN10安裝我們無法刪除所選分割槽怎麼辦 win10安裝無法格式化所選分割槽解決方法Win10
- gitbook no such file or directory 怎麼解決Git
- psql: error: could not connect to server: No such file or directorySQLErrorServer
- Mybatis批量更新SQL報錯☞解決辦法MyBatisSQL
- 執行Docker命令報錯解決辦法Docker
- isNaN("abc")編譯報錯解決辦法NaN編譯
- 安裝ionic 報錯 安裝canvas報錯 解決辦法Canvas
- NPM run dev 出現這樣錯誤我的解決辦法NPMdev
- linux fdisk 分割槽、格式化、掛載!Linux
- linux下磁碟分割槽與格式化Linux
- 學習linux分割槽/dev/shm的應用Linuxdev
- 安裝sysbench過程報錯,解決辦法
- 建庫時EM報錯的解決辦法
- IOConsole Updater 報錯解決辦法
- 練習專案npm start啟動時報錯的個人解決辦法NPM
- Linux下ODBC連線HGDB報Could not SQLConnect錯解決方法LinuxSQL
- Linux 格式化擴充套件分割槽(Extended)Linux套件
- linux磁碟分割槽格式化-fdisk命令工具Linux
- linux 中的分割槽與格式化(轉)Linux
- tar (child): bzip2: Cannot exec: No such file or directory 報錯
- gpt分割槽無法安裝win10怎麼解決_gpt分割槽無法安裝win10解決教程GPTWin10
- ImportError: Start directory is not importable: './test_case'怎麼解決?ImportError
- myeclipse專案報錯終極解決辦法Eclipse