부팅 볼륨 확인

부팅 볼륨 확인

프로그래밍 방식으로 lun 노드가 부팅 볼륨인지 여부를 어떻게 확인할 수 있습니까? lun 노드는 /dev/Linux 시스템(예: RHEL, Ubuntu 또는 기타 Linux 버전)에서 생성됩니다.

dd내가 아는 바로는 , hexdump, 와 같은 유틸리티를 사용 file하거나 프로그래밍 방식으로 처음 512바이트를 읽는 등(lun 노드에서 첫 번째 512바이트를 확인/읽는 방식으로) 확인하는 방법이 있습니다 .

이를 수행하는 다른 효율적인 방법이 있습니까? 미리 감사드립니다.

답변1

파티션이 부팅 가능한지 확인하는 것과 관련하여 sfdisk다음을 식별하는 데 사용할 수 있습니다.

$ sudo sfdisk -l

Disk /dev/sda: 60801 cylinders, 255 heads, 63 sectors/track
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1   *      0+     63-     64-    512000   83  Linux
/dev/sda2         63+  60801-  60738- 487873536   8e  Linux LVM
/dev/sda3          0       -       0          0    0  Empty
/dev/sda4          0       -       0          0    0  Empty

부팅 가능한 항목은 *출력의 두 번째 열에 이 표시됩니다. LVM 및 SD 카드와 같은 다른 유형의 장치의 경우:

Disk /dev/mapper/fedora_greeneggs-swap: 997 cylinders, 255 heads, 63 sectors/track

Disk /dev/mapper/fedora_greeneggs-root: 6527 cylinders, 255 heads, 63 sectors/track

Disk /dev/mapper/fedora_greeneggs-home: 53212 cylinders, 255 heads, 63 sectors/track

Disk /dev/mmcblk0: 488672 cylinders, 4 heads, 16 sectors/track
sfdisk: Warning: The partition table looks like it was made
  for C/H/S=*/255/63 (instead of 488672/4/16).
For this listing I'll assume that geometry.

Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/mmcblk0p1          0+   1946-   1947-  15633408    c  W95 FAT32 (LBA)
/dev/mmcblk0p2          0       -       0          0    0  Empty
/dev/mmcblk0p3          0       -       0          0    0  Empty
/dev/mmcblk0p4          0       -       0          0    0  Empty

내가 아는 바로는 LVM 논리 볼륨(LV)을 부팅할 수 없으며 별표는 *SD 카드와 같은 다른 유형의 미디어에도 적용됩니다.

관련 정보