Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.18 KB | None | 0 0
  1. -bash-3.2# diskutil list
  2. /dev/disk0 (internal, physical):
  3. #: TYPE NAME SIZE IDENTIFIER
  4. 0: GUID_partition_scheme *251.0 GB disk0
  5. 1: EFI EFI 209.7 MB disk0s1
  6. 2: Microsoft Basic Data BOOTCAMP 33.8 GB disk0s3
  7.  
  8. /dev/disk1 (external, physical):
  9. #: TYPE NAME SIZE IDENTIFIER
  10. 0: GUID_partition_scheme *16.0 GB disk1
  11. 1: EFI EFI 209.7 MB disk1s1
  12. 2: Apple_HFS Install macOS Mojave 15.7 GB disk1s2
  13.  
  14. /dev/disk2 (disk image):
  15. #: TYPE NAME SIZE IDENTIFIER
  16. 0: GUID_partition_scheme +2.1 GB disk2
  17. 1: Apple_HFS OS X Base System 2.0 GB disk2s1
  18.  
  19. /dev/disk3 (disk image):
  20. #: TYPE NAME SIZE IDENTIFIER
  21. 0: untitled +5.2 MB disk3
  22.  
  23. /dev/disk4 (disk image):
  24. #: TYPE NAME SIZE IDENTIFIER
  25. 0: untitled +524.3 KB disk4
  26.  
  27. /dev/disk5 (disk image):
  28. #: TYPE NAME SIZE IDENTIFIER
  29. 0: untitled +524.3 KB disk5
  30.  
  31. /dev/disk6 (disk image):
  32. #: TYPE NAME SIZE IDENTIFIER
  33. 0: untitled +524.3 KB disk6
  34.  
  35. /dev/disk7 (disk image):
  36. #: TYPE NAME SIZE IDENTIFIER
  37. 0: untitled +2.1 MB disk7
  38.  
  39. /dev/disk8 (disk image):
  40. #: TYPE NAME SIZE IDENTIFIER
  41. 0: untitled +524.3 KB disk8
  42.  
  43. /dev/disk9 (disk image):
  44. #: TYPE NAME SIZE IDENTIFIER
  45. 0: untitled +524.3 KB disk9
  46.  
  47. /dev/disk10 (disk image):
  48. #: TYPE NAME SIZE IDENTIFIER
  49. 0: untitled +12.6 MB disk10
  50.  
  51. /dev/disk11 (disk image):
  52. #: TYPE NAME SIZE IDENTIFIER
  53. 0: untitled +4.2 MB disk11
  54.  
  55. /dev/disk12 (disk image):
  56. #: TYPE NAME SIZE IDENTIFIER
  57. 0: untitled +1.0 MB disk12
  58.  
  59. /dev/disk13 (disk image):
  60. #: TYPE NAME SIZE IDENTIFIER
  61. 0: untitled +2.1 MB disk13
  62.  
  63. /dev/disk14 (disk image):
  64. #: TYPE NAME SIZE IDENTIFIER
  65. 0: untitled +524.3 KB disk14
  66.  
  67. /dev/disk15 (disk image):
  68. #: TYPE NAME SIZE IDENTIFIER
  69. 0: untitled +524.3 KB disk15
  70.  
  71. /dev/disk16 (disk image):
  72. #: TYPE NAME SIZE IDENTIFIER
  73. 0: untitled +1.0 MB disk16
  74.  
  75. /dev/disk17 (disk image):
  76. #: TYPE NAME SIZE IDENTIFIER
  77. 0: untitled +6.3 MB disk17
  78.  
  79. /dev/disk18 (disk image):
  80. #: TYPE NAME SIZE IDENTIFIER
  81. 0: untitled +6.3 MB disk18
  82.  
  83. /dev/disk19 (disk image):
  84. #: TYPE NAME SIZE IDENTIFIER
  85. 0: untitled +524.3 KB disk19
  86.  
  87. /dev/disk20 (disk image):
  88. #: TYPE NAME SIZE IDENTIFIER
  89. 0: untitled +2.1 MB disk20
  90.  
  91. -bash-3.2# gpt -r show disk0
  92. gpt show: disk0: Suspicious MBR at sector 0
  93. start size index contents
  94. 0 1 MBR
  95. 1 1 Pri GPT header
  96. 2 32 Pri GPT table
  97. 34 6
  98. 40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
  99. 409640 380859368 2 MBR part 218
  100. 381269008 42970096
  101. 424239104 65994752 3 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  102. 490233856 863
  103. 490234719 32 Sec GPT table
  104. 490234751 1 Sec GPT header
  105. -bash-3.2# diskutil umountDisk disk0
  106. Unmount of all volumes on disk0 was successful
  107. -bash-3.2# gpt remove -i 2 disk0
  108. gpt remove: disk0: Suspicious MBR at sector 0
  109. -bash-3.2# gpt add -i 2 -b 409600 -s 431203056 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk0
  110. gpt add: unable to open device 'disk0': Resource busy
  111. -bash-3.2# diskutil verifyDisk disk0
  112. Started partition map verification on disk0
  113. Checking prerequisites
  114. Checking the partition list
  115. Checking the partition map size
  116. Checking for an EFI system partition
  117. Checking the EFI system partition's size
  118. Checking the EFI system partition's file system
  119. Checking the EFI system partition's folder content
  120. Checking all HFS data partition loader spaces
  121. Checking booter partitions
  122. Checking Core Storage Physical Volume partitions
  123. The partition map appears to be OK
  124. Finished partition map verification on disk0
  125. -bash-3.2# diskutil verifyVolume disk0s2
  126. Unable to find disk for disk0s2
  127. -bash-3.2# dd if=/dev/disk0s2 count=3 | hexdump
  128. -bash: hexdump: command not found
  129. dd: /dev/disk0s2: No such file or directory
  130.  
  131. -bash-3.2# gpt -r show /dev/disk0
  132. gpt show: /dev/disk0: Suspicious MBR at sector 0
  133. start size index contents
  134. 0 1 MBR
  135. 1 1 Pri GPT header
  136. 2 32 Pri GPT table
  137. 34 6
  138. 40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
  139. 409640 380859368 2 MBR part 218
  140. 381269008 42970096
  141. 424239104 65994752 3 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  142. 490233856 863
  143. 490234719 32 Sec GPT table
  144. 490234751 1 Sec GPT header
  145. -bash-3.2# fdisk /dev/disk0
  146. Disk: /dev/disk0 geometry: 30515/255/63 [490234752 sectors]
  147. Signature: 0xAA55
  148. Starting Ending
  149. #: id cyl hd sec - cyl hd sec [ start - size]
  150. ------------------------------------------------------------------------
  151. 1: EE 1023 254 63 - 1023 254 63 [ 1 - 409639] <Unknown ID>
  152. *2: DA 1023 254 63 - 1023 254 63 [ 409640 - 380859368] <Unknown ID>
  153. 3: 0C 1023 254 63 - 1023 254 63 [ 424239104 - 65994752] Win95 FAT32L
  154. 4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
  155. -bash-3.2# fdisk -e /dev/disk0
  156. fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
  157. Enter 'help' for information
  158. fdisk: 1> setpid 2
  159. Starting Ending
  160. #: id cyl hd sec - cyl hd sec [ start - size]
  161. ------------------------------------------------------------------------
  162. *2: DA 1023 254 63 - 1023 254 63 [ 409640 - 380859368] <Unknown ID>
  163. Partition id ('0' to disable) [0 - FF]: [DA] (? for help) 0
  164. fdisk:*1> quit
  165. Writing current MBR to disk.
  166. Device could not be accessed exclusively.
  167. A reboot will be needed for changes to take effect. OK? [n] y
  168. -bash-3.2# gpt -f add -i 2 -b 409640 -s 380859368 -t apfs disk0
  169. gpt add: disk0: Suspicious MBR at sector 0
  170. disk0s2 added
  171. -bash-3.2# fdisk -e /dev/disk0
  172. fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
  173. Enter 'help' for information
  174. fdisk: 1> edit 2
  175. Starting Ending
  176. #: id cyl hd sec - cyl hd sec [ start - size]
  177. ------------------------------------------------------------------------
  178. 2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
  179. Partition id ('0' to disable) [0 - FF]: [0] (? for help) DA
  180. Do you wish to edit in CHS mode? [n] n
  181. Partition offset [0 - 490234752]: [409640] 409640
  182. Partition size [1 - 489825112]: [489825112] 380859368
  183. fdisk:*1> quit
  184. Writing current MBR to disk.
  185. Device could not be accessed exclusively.
  186. A reboot will be needed for changes to take effect. OK? [n] y
  187. -bash-3.2# gpt -r show /dev/disk0
  188. gpt show: /dev/disk0: Suspicious MBR at sector 0
  189. start size index contents
  190. 0 1 MBR
  191. 1 1 Pri GPT header
  192. 2 32 Pri GPT table
  193. 34 6
  194. 40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
  195. 409640 380859368 2 GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
  196. 381269008 42970096
  197. 424239104 65994752 3 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  198. 490233856 863
  199. 490234719 32 Sec GPT table
  200. 490234751 1 Sec GPT header
  201. -bash-3.2# fdisk /dev/disk0
  202. Disk: /dev/disk0 geometry: 30515/255/63 [490234752 sectors]
  203. Signature: 0xAA55
  204. Starting Ending
  205. #: id cyl hd sec - cyl hd sec [ start - size]
  206. ------------------------------------------------------------------------
  207. 1: EE 1023 254 63 - 1023 254 63 [ 1 - 409639] <Unknown ID>
  208. 2: DA 1023 254 63 - 1023 254 63 [ 409640 - 380859368] <Unknown ID>
  209. 3: 0C 1023 254 63 - 1023 254 63 [ 424239104 - 65994752] Win95 FAT32L
  210. 4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
  211. -bash-3.2#
  212.  
  213. -bash-3.2# diskutil list
  214. /dev/disk0 (internal, physical):
  215. #: TYPE NAME SIZE IDENTIFIER
  216. 0: GUID_partition_scheme *251.0 GB disk0
  217. 1: EFI EFI 209.7 MB disk0s1
  218. 2: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF 217.0 GB disk0s2
  219. 3: Microsoft Basic Data BOOTCAMP 33.8 GB disk0s3
  220.  
  221. /dev/disk1 (external, physical):
  222. #: TYPE NAME SIZE IDENTIFIER
  223. 0: GUID_partition_scheme *16.0 GB disk1
  224. 1: EFI EFI 209.7 MB disk1s1
  225. 2: Apple_HFS Install macOS Mojave 15.7 GB disk1s2
  226.  
  227. /dev/disk2 (disk image):
  228. #: TYPE NAME SIZE IDENTIFIER
  229. 0: GUID_partition_scheme +2.1 GB disk2
  230. 1: Apple_HFS OS X Base System 2.0 GB disk2s1
  231.  
  232. /dev/disk3 (disk image):
  233. #: TYPE NAME SIZE IDENTIFIER
  234. 0: untitled +5.2 MB disk3
  235.  
  236. /dev/disk4 (disk image):
  237. #: TYPE NAME SIZE IDENTIFIER
  238. 0: untitled +524.3 KB disk4
  239.  
  240. /dev/disk5 (disk image):
  241. #: TYPE NAME SIZE IDENTIFIER
  242. 0: untitled +524.3 KB disk5
  243.  
  244. /dev/disk6 (disk image):
  245. #: TYPE NAME SIZE IDENTIFIER
  246. 0: untitled +524.3 KB disk6
  247.  
  248. /dev/disk7 (disk image):
  249. #: TYPE NAME SIZE IDENTIFIER
  250. 0: untitled +2.1 MB disk7
  251.  
  252. /dev/disk8 (disk image):
  253. #: TYPE NAME SIZE IDENTIFIER
  254. 0: untitled +524.3 KB disk8
  255.  
  256. /dev/disk9 (disk image):
  257. #: TYPE NAME SIZE IDENTIFIER
  258. 0: untitled +524.3 KB disk9
  259.  
  260. /dev/disk10 (disk image):
  261. #: TYPE NAME SIZE IDENTIFIER
  262. 0: untitled +12.6 MB disk10
  263.  
  264. /dev/disk11 (disk image):
  265. #: TYPE NAME SIZE IDENTIFIER
  266. 0: untitled +4.2 MB disk11
  267.  
  268. /dev/disk12 (disk image):
  269. #: TYPE NAME SIZE IDENTIFIER
  270. 0: untitled +1.0 MB disk12
  271.  
  272. /dev/disk13 (disk image):
  273. #: TYPE NAME SIZE IDENTIFIER
  274. 0: untitled +2.1 MB disk13
  275.  
  276. /dev/disk14 (disk image):
  277. #: TYPE NAME SIZE IDENTIFIER
  278. 0: untitled +524.3 KB disk14
  279.  
  280. /dev/disk15 (disk image):
  281. #: TYPE NAME SIZE IDENTIFIER
  282. 0: untitled +524.3 KB disk15
  283.  
  284. /dev/disk16 (disk image):
  285. #: TYPE NAME SIZE IDENTIFIER
  286. 0: untitled +1.0 MB disk16
  287.  
  288. /dev/disk17 (disk image):
  289. #: TYPE NAME SIZE IDENTIFIER
  290. 0: untitled +6.3 MB disk17
  291.  
  292. /dev/disk18 (disk image):
  293. #: TYPE NAME SIZE IDENTIFIER
  294. 0: untitled +6.3 MB disk18
  295.  
  296. /dev/disk19 (disk image):
  297. #: TYPE NAME SIZE IDENTIFIER
  298. 0: untitled +524.3 KB disk19
  299.  
  300. /dev/disk20 (disk image):
  301. #: TYPE NAME SIZE IDENTIFIER
  302. 0: untitled +2.1 MB disk20
  303.  
  304. -bash-3.2# gpt -r show disk0
  305. gpt show: disk0: Suspicious MBR at sector 0
  306. start size index contents
  307. 0 1 MBR
  308. 1 1 Pri GPT header
  309. 2 32 Pri GPT table
  310. 34 6
  311. 40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
  312. 409640 423829464 2 GPT part - FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF
  313. 424239104 65994752 3 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  314. 490233856 863
  315. 490234719 32 Sec GPT table
  316. 490234751 1 Sec GPT header
  317. -bash-3.2#
  318.  
  319. fdisk -e /dev/disk0
  320. setpid 2
  321. 0
  322. quit
  323. y
  324. gpt -f add -i 2 -b 409640 -s 380859368 -t apfs disk0
  325. fdisk -e /dev/disk0
  326. edit 2
  327. DA
  328. n
  329. 409640
  330. 380859368
  331. quit
  332. y
  333.  
  334. $ fdisk -e /dev/disk0
  335. fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
  336. Enter 'help' for information
  337. fdisk: 1> setpid 2
  338. Starting Ending
  339. #: id cyl hd sec - cyl hd sec [ start - size]
  340. ------------------------------------------------------------------------
  341. 2: DA 25 127 15 - 1023 254 63 [ 409640 - 380859368] <Unknown ID>
  342. Partition id ('0' to disable) [0 - FF]: [DA] (? for help) 0
  343. fdisk:*1> quit
  344. Writing current MBR to disk.
  345. Device could not be accessed exclusively.
  346. A reboot will be needed for changes to take effect. OK? [n] y
  347. $ gpt -f add -i 2 -b 409640 -s 380859368 -t apfs disk0
  348. gpt add: disk0: Suspicious MBR at sector 0
  349. disk0s2 added
  350. $ fdisk -e /dev/disk0
  351. fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
  352. Enter 'help' for information
  353. fdisk: 1> edit 2
  354. Starting Ending
  355. #: id cyl hd sec - cyl hd sec [ start - size]
  356. ------------------------------------------------------------------------
  357. 2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
  358. Partition id ('0' to disable) [0 - FF]: [0] (? for help) DA
  359. Do you wish to edit in CHS mode? [n] n
  360. Partition offset [0 - 492187540]: [409640] 409640
  361. Partition size [1 - 491777900]: [491777900] 380859368
  362. fdisk:*1> quit
  363. Writing current MBR to disk.
  364. Device could not be accessed exclusively.
  365. A reboot will be needed for changes to take effect. OK? [n] y
  366. $
  367.  
  368. diskutil apfs resizecontainer disk0s2 0
  369.  
  370. $ diskutil apfs resizecontainer disk0s2 0
  371. Started APFS operation
  372. Aligning grow delta to 22,000,689,152 bytes and targeting a new physical store size of 217,000,685,568 bytes
  373. Determined the maximum size for the targeted physical store of this APFS Container to be 217,000,685,568 bytes
  374. Resizing APFS Container designated by APFS Container Reference disk3
  375. The specific APFS Physical Store being resized is disk0s2
  376. Verifying storage system
  377. Performing fsck_apfs -n -x /dev/disk0s2
  378. Checking volume
  379. Checking the container superblock
  380. Checking the space manager
  381. Checking the object map
  382. Checking the APFS volume superblock
  383. Checking the object map
  384. Checking the fsroot tree
  385. Checking the snapshot metadata tree
  386. Checking the extent ref tree
  387. Checking the snapshots
  388. Verifying allocated space
  389. The volume /dev/disk0s2 appears to be OK
  390. Storage system check exit code is 0
  391. Growing APFS Physical Store disk0s2 from 194,999,996,416 to 217,000,685,568 bytes
  392. Modifying partition map
  393. Growing APFS data structures
  394. Finished APFS operation
  395. $
  396.  
  397. /dev/disk0 (internal, physical):
  398. #: TYPE NAME SIZE IDENTIFIER
  399. 0: GUID_partition_scheme *252.0 GB disk0
  400. 1: EFI EFI 209.7 MB disk0s1
  401. 2: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF 217.0 GB disk0s2
  402. 3: Microsoft Basic Data BOOTCAMP 33.8 GB disk0s3
  403.  
  404. gpt -f remove -i 2 disk0
  405. fdisk -e /dev/disk0
  406. setpid 2
  407. 0
  408. quit
  409. y
  410. gpt -f add -i 2 -b 409640 -s 423829464 -t apfs disk0
  411. fdisk -e /dev/disk0
  412. edit 2
  413. DA
  414. n
  415. 409640
  416. 423829464
  417. quit
  418. y
  419.  
  420. $ gpt -f remove -i 2 disk0
  421. gpt remove: disk0: Suspicious MBR at sector 0
  422. disk0s2 removed
  423. $ fdisk -e /dev/disk0
  424. fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
  425. Enter 'help' for information
  426. fdisk: 1> setpid 2
  427. Starting Ending
  428. #: id cyl hd sec - cyl hd sec [ start - size]
  429. ------------------------------------------------------------------------
  430. 2: DA 1023 254 63 - 1023 254 63 [ 409640 - 423829464] <Unknown ID>
  431. Partition id ('0' to disable) [0 - FF]: [DA] (? for help) 0
  432. fdisk:*1> quit
  433. Writing current MBR to disk.
  434. Device could not be accessed exclusively.
  435. A reboot will be needed for changes to take effect. OK? [n] y
  436. $ gpt -f add -i 2 -b 409640 -s 423829464 -t apfs disk0
  437. gpt add: disk0: Suspicious MBR at sector 0
  438. disk0s2 added
  439. $ fdisk -e /dev/disk0
  440. fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
  441. Enter 'help' for information
  442. fdisk: 1> edit 2
  443. Starting Ending
  444. #: id cyl hd sec - cyl hd sec [ start - size]
  445. ------------------------------------------------------------------------
  446. 2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
  447. Partition id ('0' to disable) [0 - FF]: [0] (? for help) DA
  448. Do you wish to edit in CHS mode? [n] n
  449. Partition offset [0 - 492187540]: [409640] 409640
  450. Partition size [1 - 491777900]: [491777900] 423829464
  451. fdisk:*1> quit
  452. Writing current MBR to disk.
  453. Device could not be accessed exclusively.
  454. A reboot will be needed for changes to take effect. OK? [n] y
  455. $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement