close
Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": /usr/lib/python2.7/dist-packages/libsvn/_core.so: cannot map zero-fill pages: Cannot allocate memory). Look in the Trac log for more information.
2010-11-17
Android
Linux
- 如何查詢 Disk UUID - [參考] 使用UUID掛載磁碟分割
- 查詢 /dev/disk/by-uuid/ 目錄內容 - [缺點] 剛格式化完,縱使重跑 udev 也不會跑出新的裝置。
jazz@drbl:~$ ls -l /dev/disk/by-uuid/
總計 0
lrwxrwxrwx 1 root root 10 2010-11-12 10:16 8f309621-1141-44eb-8bd9-892cc6663a60 -> ../../sda1
lrwxrwxrwx 1 root root 10 2010-11-12 10:16 b08cf2c1-4ce0-4e08-a7d2-609e66e028e3 -> ../../sda5
- 使用 blkid
jazz@drbl:~$ sudo blkid
/dev/sda1: UUID="8f309621-1141-44eb-8bd9-892cc6663a60" TYPE="reiserfs"
/dev/sda5: TYPE="swap" UUID="b08cf2c1-4ce0-4e08-a7d2-609e66e028e3"
/dev/sdb1: UUID="9cd0865c-931f-40fb-a5f8-c3e6096b41b1" SEC_TYPE="ext2" TYPE="ext3"
- 使用 vol_id
jazz@drbl:~$ sudo vol_id /dev/sdb1
ID_FS_USAGE=filesystem
ID_FS_TYPE=ext3
ID_FS_VERSION=1.0
ID_FS_UUID=9cd0865c-931f-40fb-a5f8-c3e6096b41b1
ID_FS_UUID_ENC=9cd0865c-931f-40fb-a5f8-c3e6096b41b1
ID_FS_LABEL=
ID_FS_LABEL_ENC=
ID_FS_LABEL_SAFE=
- 使用 disktype - debian 套件 - disktype
jazz@jazzbook:~$ disktype /dev/sda
--- /dev/sda
Block device, size 465.8 GiB (500107862016 bytes)
DOS/MBR partition map
Partition 1: 463.8 GiB (497999151104 bytes, 972654592 sectors from 2048, bootable)
Type 0x83 (Linux)
Ext3 file system
UUID FBAA4A70-FD53-43BF-B9A0-198E52718CC2 (DCE, v4)
Volume size 463.8 GiB (497999151104 bytes, 121581824 blocks of 4 KiB)
Partition 2: 1.962 GiB (2106589184 bytes, 4114432 sectors from 972656640)
Type 0x82 (Linux swap / Solaris)
Linux swap, version 2, subversion 1, 4 KiB pages, little-endian
Swap size 1.962 GiB (2106580992 bytes, 514302 pages of 4 KiB)
Download in other formats: