Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #243928 > unrolled thread
| Started by | frantal@libero.it |
|---|---|
| First post | 2022-01-12 19:10 +0100 |
| Last post | 2022-01-13 23:10 +0100 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.debian.user
Request of urgent help.... frantal@libero.it - 2022-01-12 19:10 +0100
Re: Request of urgent help.... David Christensen <dpchrist@holgerdanske.com> - 2022-01-13 03:20 +0100
Re: Request of urgent help.... frantal@libero.it - 2022-01-13 09:10 +0100
Re: Request of urgent help.... Tim Woodall <debianuser@woodall.me.uk> - 2022-01-13 23:10 +0100
| From | frantal@libero.it |
|---|---|
| Date | 2022-01-12 19:10 +0100 |
| Subject | Request of urgent help.... |
| Message-ID | <DEQem-3ZL-5@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
Hi. I inadvertently deleted the Mac and EFI partitions of an HD inserted on a Macbook Pro (2009). Fortunately I have the Linux one (with Debian XFCE) that I am writing from. I tried to recover with Gparted (by installing gpart), but after more than an hour I stopped having no recovery signal. Then I installed test disk and this is the screen. <TestDisk 7.1, Data Recovery Utility, July 2019 Christophe GRENIER <grenier@cgsecurity.org> https://www.cgsecurity.org Disk /dev/sda - 480 GB / 447 GiB - CHS 58369 255 63 Partition Start End Size in sectors P EFI System 40 409639 409600 [EFI System Partition] >P Mac HFS 409640 700519039 700109400 P Linux filesys. data 700520448 759113727 58593280 P Linux Swap 759113728 761114607 2000880 P Linux filesys. data 761114624 937701375 176586752 Structure: Ok. Use Up/Down Arrow keys to select partition. Use Left/Right Arrow keys to CHANGE partition characteristics: P=Primary D=Deleted Keys A: add partition, L: load backup, T: change type, Enter: to continue HFS+ blocksize=4096 + Backup, 358 GB / 333 GiB> All partitions appear highlighted in green. What can I do to reset Mac OS? I don't dare shut down because I'm afraid it won't reboot anymore having wiped the EFI partition as well. How can I do without loosing the Mac data? Thanks in advance Francesco
[toc] | [next] | [standalone]
| From | David Christensen <dpchrist@holgerdanske.com> |
|---|---|
| Date | 2022-01-13 03:20 +0100 |
| Message-ID | <DEXSx-VH-1@gated-at.bofh.it> |
| In reply to | #243928 |
On 1/12/22 10:00 AM, frantal@libero.it wrote: > Hi. I inadvertently deleted the Mac and EFI partitions of an HD inserted on a Macbook Pro (2009). Fortunately I have the Linux one (with Debian XFCE) that I am writing from. I tried to recover with Gparted (by installing gpart), but after more than an hour I stopped having no recovery signal. Then I installed test disk and this is the screen. > <TestDisk 7.1, Data Recovery Utility, July 2019 > Christophe GRENIER <grenier@cgsecurity.org> > https://www.cgsecurity.org > > Disk /dev/sda - 480 GB / 447 GiB - CHS 58369 255 63 > Partition Start End Size in sectors > P EFI System 40 409639 409600 [EFI System Partition] >> P Mac HFS 409640 700519039 700109400 > P Linux filesys. data 700520448 759113727 58593280 > P Linux Swap 759113728 761114607 2000880 > P Linux filesys. data 761114624 937701375 176586752 > > Structure: Ok. Use Up/Down Arrow keys to select partition. > Use Left/Right Arrow keys to CHANGE partition characteristics: > P=Primary D=Deleted > Keys A: add partition, L: load backup, T: change type, > Enter: to continue > HFS+ blocksize=4096 + Backup, 358 GB / 333 GiB> > > All partitions appear highlighted in green. > What can I do to reset Mac OS? > I don't dare shut down because I'm afraid it won't reboot anymore having wiped the EFI partition as well. > How can I do without loosing the Mac data? Thanks in advance > Francesco Please run the following commands and reply with the complete console session -- prompts displayed, commands entered, and output displayed: # cat /etc/debian_version ; uname -a # lsblk # fdisk -l # which parted David
[toc] | [prev] | [next] | [standalone]
| From | frantal@libero.it |
|---|---|
| Date | 2022-01-13 09:10 +0100 |
| Message-ID | <DF3lf-4Nx-1@gated-at.bofh.it> |
| In reply to | #243940 |
> Il 13/01/2022 03:08 David Christensen <dpchrist@holgerdanske.com> ha scritto: > > > On 1/12/22 10:00 AM, frantal@libero.it wrote: > > Hi. I inadvertently deleted the Mac and EFI partitions of an HD inserted on a Macbook Pro (2009). Fortunately I have the Linux one (with Debian XFCE) that I am writing from. I tried to recover with Gparted (by installing gpart), but after more than an hour I stopped having no recovery signal. Then I installed test disk and this is the screen. > > <TestDisk 7.1, Data Recovery Utility, July 2019 > > Christophe GRENIER <grenier@cgsecurity.org> > > https://www.cgsecurity.org > > > > Disk /dev/sda - 480 GB / 447 GiB - CHS 58369 255 63 > > Partition Start End Size in sectors > > P EFI System 40 409639 409600 [EFI System Partition] > >> P Mac HFS 409640 700519039 700109400 > > P Linux filesys. data 700520448 759113727 58593280 > > P Linux Swap 759113728 761114607 2000880 > > P Linux filesys. data 761114624 937701375 176586752 > > > > Structure: Ok. Use Up/Down Arrow keys to select partition. > > Use Left/Right Arrow keys to CHANGE partition characteristics: > > P=Primary D=Deleted > > Keys A: add partition, L: load backup, T: change type, > > Enter: to continue > > HFS+ blocksize=4096 + Backup, 358 GB / 333 GiB> > > > > All partitions appear highlighted in green. > > What can I do to reset Mac OS? > > I don't dare shut down because I'm afraid it won't reboot anymore having wiped the EFI partition as well. > > How can I do without loosing the Mac data? Thanks in advance > > Francesco > > > Please run the following commands and reply with the complete console > session -- prompts displayed, commands entered, and output displayed: > > # cat /etc/debian_version ; uname -a > 11.2 Linux debian 5.10.0-10-amd64 #1 SMP Debian 5.10.84-1 (2021-12-08) x86_64 GNU/Linux > # lsblk > NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 447,1G 0 disk ├─sda3 8:3 0 27,9G 0 part / ├─sda4 8:4 0 977M 0 part [SWAP] └─sda5 8:5 0 84,2G 0 part /home sdc 8:32 1 57,8G 0 disk └─sdc1 8:33 1 57,7G 0 part /media/frantal/KINGSTON sr0 11:0 1 1024M 0 rom > # fdisk -l > Disk /dev/sda: 447,13 GiB, 480103981056 bytes, 937703088 sectors Disk model: CT480BX500SSD1 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 20F7D036-E7D4-4247-9944-2190A2A933AE Device Start End Sectors Size Type /dev/sda3 700520448 759113727 58593280 27,9G Linux filesystem /dev/sda4 759113728 761114623 2000896 977M Linux swap /dev/sda5 761114624 937701375 176586752 84,2G Linux filesystem Disk /dev/sdc: 57,8 GiB, 62058921984 bytes, 121208832 sectors Disk model: DataTraveler 3.0 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x2e247b39 Device Boot Start End Sectors Size Id Type /dev/sdc1 * 257280 121208831 120951552 57,7G c W95 FAT32 (LBA) > # which parted > /usr/sbin/parted > > David gpart version: gpart v0.2.3-dev (c) 1999-2001 Michail Brzitwa <michail@brzitwa.de> Regards Francesco
[toc] | [prev] | [next] | [standalone]
| From | Tim Woodall <debianuser@woodall.me.uk> |
|---|---|
| Date | 2022-01-13 23:10 +0100 |
| Message-ID | <DFgs9-5QC-3@gated-at.bofh.it> |
| In reply to | #243954 |
Do you have an external disk you can copy sda to and experiment on? >>> Disk /dev/sda - 480 GB / 447 GiB - CHS 58369 255 63 >>> Partition Start End Size in sectors >>> P EFI System 40 409639 409600 [EFI System Partition] >>>> P Mac HFS 409640 700519039 700109400 >>> P Linux filesys. data 700520448 759113727 58593280 >>> P Linux Swap 759113728 761114607 2000880 >>> P Linux filesys. data 761114624 937701375 176586752 >>> >> # fdisk -l >> Disk /dev/sda: 447,13 GiB, 480103981056 bytes, 937703088 sectors > Disk model: CT480BX500SSD1 > Units: sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 512 bytes > I/O size (minimum/optimal): 512 bytes / 512 bytes > Disklabel type: gpt > Disk identifier: 20F7D036-E7D4-4247-9944-2190A2A933AE > > Device Start End Sectors Size Type > /dev/sda3 700520448 759113727 58593280 27,9G Linux filesystem > /dev/sda4 759113728 761114623 2000896 977M Linux swap > /dev/sda5 761114624 937701375 176586752 84,2G Linux filesystem > Looks like sda1 and sda2 are missing from the partition table. If it's just that then putting that back but changing nothing else is all that is needed. I'd use fdisk to do it, but other tools might be easier/less error prone. But making a disk level backup first is strongly recommended! It's really easy to make things worse. It's not obvious to me why there is a gap between the end of the HFS partition and the start of sda3. That might be expected or might mean the sector numbers aren't quite right... Tim.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web