日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux没有系统如何删除sda,Linux:解决U盘可以识别,但在/dev目录下只有sda,却无设备节点(sda1)的问题...

發布時間:2023/12/20 linux 56 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux没有系统如何删除sda,Linux:解决U盘可以识别,但在/dev目录下只有sda,却无设备节点(sda1)的问题... 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

問題:U盤接入,系統可以識別,但在/dev目錄下只有sda(或其他),卻無設備節點sda1(或其他)?

解決:

(1)查看U盤是否分區

#fdisk /dev/sda /*進入fdisk命令操作空間*/

#Command (m for help): m /*命令查看*/

Command action

a toggle a bootable flag #設置引導扇區

b edit bsd disklabel #編輯卷標(linux下使用的卷標bsd通用)

c toggle the dos compatibility flag

d delete a partition #刪除分區

l list known partition types #列出已知的分區類型

m print this menu

n add a new partition #添加一個新的分區

o create a new empty DOS partition table #生成一個新的空DOS分區列表

p print the partition table #打印分區列表

q quit without saving changes #不保存退出

s create a new empty Sun disklabel

t change a partition's system id #改變一個分區列表的ID

u change display/entry units

v verify the partition table

w write table to disk and exit #寫入列表到磁盤并退出

x extra functionality (experts only)

#Command (m for help): p

Disk /dev/sda: 8178 MB, 8178892800 bytes

252 heads, 62 sectors/track, 1022 cylinders

Units = cylinders of 15624 * 512 = 7999488 bytes

Device Boot Start End Blocks Id System /*可見U盤無分區*/

(2)若未分區,創建分區sda1,并格式化(也可以不進行格式化)

#fdisk /dev/sda

Command (m for help): m

Command Action

a toggle a bootable flag

b edit bsd disklabel

c toggle the dos compatibility flag

d delete a partition

l list known partition types

n add a new partition

o create a new empty DOS partition table

p print the partition table

q quit without saving changes

s create a new empty Sun disklabel

t change a partition's system id

u change display/entry units

v verify the partition table

w write table to disk and exit

x extra functionality (experts only)

Command (m for help): n /*n表示添加一個新的分區*/

Command action

e extended /*創建擴展分區*/

p primary partition (1-4) /*創建主分區*/

p

Partition number (1-4): 1 /*輸入主分區號,這里設置為1*/

First cylinder (1-1022, default 1): Using default value 1 /*起始,回車使用默認值*/

Last cylinder or +size or +sizeM or +sizeK (1-1022, default 1022): Using default value 1022 /*結尾,回車使用默認值*/

Command (m for help): p /*p表示打印分區列表*/

Disk /dev/sda: 8178 MB, 8178892800 bytes

252 heads, 62 sectors/track, 1022 cylinders

Units = cylinders of 15624 * 512 = 7999488 bytes

Device Boot Start End Blocks Id System /*可見sda1分區已創建*/

/dev/sda1 1 1022 7983833 83 Linux

Command (m for help): w

The partition table has been altered.

Calling ioctl() to re-read partition table

#mkfs -t vfat /dev/sda1 /*對sda1進行格式化(也可以不進行這一步)*/

mkfs.vfat 3.0.12 (29 Oct 2011)

mkfs.vfat: /dev/sda1 contains a mounted file system.

#fsck -t vfat /dev/sda /*格式化完成后對U盤進行修復*/

fsck from util-linux 2.20.1

dosfsck 3.0.12, 29 Oct 2011, FAT32, LFN

Logical sector size (64543 bytes) is not a multiple of the physical sector size.

(3)前兩步完成后,在/dev目錄下將會出現設備節點sda1;如果沒有,則手動創建設備節點sda1

#mknod /dev/sda1 b 8 1 /*手動創建設備節點sda1*/

#mount /dev/sda1 /mnt/udisk /*掛載U盤到/mnt/udisk目錄下*/

#umount /mnt/udisk /*卸載U盤*/

總結

以上是生活随笔為你收集整理的linux没有系统如何删除sda,Linux:解决U盘可以识别,但在/dev目录下只有sda,却无设备节点(sda1)的问题...的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。