2024年11月Linux系统格式化分区时提示Could not start /dev怎么办?

发布时间:

  ⑴在格式化Linux分区的时候,不少人遇到了棘手的问题,提示Could not stat /dev/sda --- No such fileor directory错误,那么有什么办法能够解决Linux格式化分区的报错问题呢?

  ⑵Linux查看已经分好的区

  ⑶[rootlinuxidc ~]# fdisk -l /dev/sda

  ⑷Disk /dev/sda: . GB, bytes

  ⑸ heads, sectors/track, cylinders

  ⑹Units = cylinders of * = bytes

  ⑺Sector size (logical/physical: bytes / bytes

  ⑻I/O size (minimum/optimal: bytes / bytes

  ⑼Disk identifier: xdcbf

  ⑽Device Boot Start End Blocks Id System

  ⑾/dev/sda + Extended

  ⑿/dev/sda Linux

  ⒀/dev/sda + Linux

  ⒁/dev/sda + Linux

  ⒂格式化新分区的时候,报错,提示下面的错误,没有这个文件或目录。

  ⒃Could not stat /dev/sda --- No such fileor directory

  ⒄The device apparently does not exist; didyou specify it correctly?

  ⒅[rootlinuxidc ~]# mkefs -t ext /dev/sda

  ⒆mkefs .. (-May-

  ⒇Could not stat /dev/sda --- No such fileor directory

  ⒈The device apparently does not exist; didyou specify it correctly?

  ⒉执行partprobe 命令

  ⒊partprobe包含在parted的rpm软件包中。

  ⒋partprobe可以修改kernel中分区表,使kernel重新读取分区表。

  ⒌因此,使用该命令就可以创建分区并且在不重新启动机器的情况下系统能够识别这些分区。

  ⒍查看是否安装过该命令:

  ⒎[rootlinuxidc~]# rpm -q parted

  ⒏packageparted is not installed

  ⒐提示没有安装过,则需要安装parted

  ⒑安装命令:#yum install parted #前提是保证你的虚拟机可以上网,要从网络下载安装包

  ⒒[rootlinuxidc~]# yum install parted

  ⒓Loadedplugins: fastestmirror

  ⒔ Loadingmirror speeds from cached hostfile

  ⒕* base: mirrors.skyshe.

  ⒖* extras: mirrors.skyshe.

  ⒗* updates: mirrors.skyshe.

  ⒘base | . kB :

  ⒙extras |. kB :

  ⒚updates | . kB :

  ⒛Settingup Install Process

  ①ResolvingDependencies

  ②--》Running transaction check

  ③---》Package parted.i :.-.el will be installed

  ④--》Finished Dependency Resolution

  ⑤DependenciesResolved

  ⑥Package Arch Version Repository Size