Come faccio a recuperare da asr typo?

1

Stavo convertendo la partizione di ripristino da Apple_HFS a Apple_Boot come da istruzioni qui . Ha avuto successo Come esperimento, ho provato un refuso intenzionale per vedere se riflettesse su diskutil list . Non è stato così, e il disco è incasinato.

Poiché non sono a conoscenza di cosa fa esattamente asr adjust , lo chiedo prima qui. Che cosa fa esattamente il comando e come posso recuperare da un errore simile?

Sessione terminale annotata:

########### Convert successful, reflected on diskutil ###########
test-session:~ pnda$ sudo asr adjust --target /dev/disk0s3 -settype "Apple_Boot"
Password:
Fsck /dev/disk0s3 ....10....20....30....40....50....60....70....80....90....100
Adjust completed successfully

########### intentional typo here ###########
test-session:~ pnda$ sudo asr adjust --target /dev/disk0s3 -settype "Apple_Boo"
Fsck /dev/disk0s3 ....10....20....30....40....50....60....70....80....90....100
Adjust completed successfully

########### oh sh*t ###########
test-session:~ pnda$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *121.3 GB   disk0
   1:         Microsoft Reserved                         16.8 MB    disk0s1
   2:                  Apple_HFS Macintosh HD            40.9 GB    disk0s2
   3: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF               650.1 MB   disk0s3
   4:           Linux Filesystem                         18.5 GB    disk0s4
   5:           Linux Filesystem                         261.1 MB   disk0s5
   6:           Windows Recovery                         523.2 MB   disk0s6
   7:                        EFI NO NAME                 104.9 MB   disk0s7
   8:       Microsoft Basic Data                         59.1 GB    disk0s8

########### mission abort ###########
test-session:~ pnda$ sudo asr adjust --target /dev/disk0s3 -settype "Apple_Boot"
asr: Volume adjustment failed: Invalid argument
test-session:~ pnda$ sudo asr adjust --target /dev/disk0s3 -settype "Apple_HFS"
asr: Volume adjustment failed: Invalid argument

.....

    
posta The One 24.08.2018 - 05:23
fonte

1 risposta

2

È possibile utilizzare gdisk per modificare il tipo di partizione nella tabella delle partizioni GUID. È installato con homebrew:

brew install gptfdisk

l elencherà i tipi di partizioni, quindi puoi usare t per cambiare il tipo di partizione in quello che desideri, quindi scriverlo su disco con w

sudo gdisk /dev/disk3
GPT fdisk (gdisk) version 1.0.4

Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): ?
b   back up GPT data to a file
c   change a partition's name
d   delete a partition
i   show detailed information on a partition
l   list known partition types
n   add a new partition
o   create a new empty GUID partition table (GPT)
p   print the partition table
q   quit without saving changes
r   recovery and transformation options (experts only)
s   sort partitions
t   change a partition's type code
v   verify disk
w   write table to disk and exit
x   extra functionality (experts only)
?   print this menu

Command (? for help): l
Type search string, or <Enter> to show all codes:
0700 Microsoft basic data  0c01 Microsoft reserved    2700 Windows RE
3000 ONIE boot             3001 ONIE config           3900 Plan 9
4100 PowerPC PReP boot     4200 Windows LDM data      4201 Windows LDM metadata
4202 Windows Storage Spac  7501 IBM GPFS              7f00 ChromeOS kernel
7f01 ChromeOS root         7f02 ChromeOS reserved     8200 Linux swap
8300 Linux filesystem      8301 Linux reserved        8302 Linux /home
8303 Linux x86 root (/)    8304 Linux x86-64 root (/  8305 Linux ARM64 root (/)
8306 Linux /srv            8307 Linux ARM32 root (/)  8308 Linux dm-crypt
8309 Linux LUKS            8400 Intel Rapid Start     8e00 Linux LVM
a000 Android bootloader    a001 Android bootloader 2  a002 Android boot 1
a003 Android recovery 1    a004 Android misc          a005 Android metadata
a006 Android system 1      a007 Android cache         a008 Android data
a009 Android persistent    a00a Android factory       a00b Android fastboot/ter
a00c Android OEM           a00d Android vendor        a00e Android config
a00f Android factory (alt  a010 Android meta          a011 Android EXT
a012 Android SBL1          a013 Android SBL2          a014 Android SBL3
a015 Android APPSBL        a016 Android QSEE/tz       a017 Android QHEE/hyp
a018 Android RPM           a019 Android WDOG debug/s  a01a Android DDR
a01b Android CDT           a01c Android RAM dump      a01d Android SEC
a01e Android PMIC          a01f Android misc 1        a020 Android misc 2
a021 Android device info   a022 Android APDP          a023 Android MSADP
Press the <Enter> key to see more codes:
    
risposta data 24.08.2018 - 06:20
fonte

Leggi altre domande sui tag