Yesterday I saved the data from a friend’s disk, of which the partition info had gone. With testdisk I could repair that, and make a backup of the user data, but the system would not boot from the disk.
Setting the root partition as bootable, and, as last resort, letting testdisk write a new MBR, didn’t help.
The disk has three partitions, on swap, root and home. When connected to my Tumbleweed system, I see the original data in both root and home (well, otherwise I couldn’t have made a back-up ;))
So I decided to install leap 42.1 on it, but the install program sees a complete different partition scheme. Three partitions, but no swap seen, much smaller, and the main part of the disk as unpartitioned.
And it finds no fstab to grab a partitioning scheme from.
Of course I could simply repartition the disk, having a backup, but I’m curious to what goes wrong here…
fdisk -l /dev/sdg
Schijf /dev/sdg: 931,5 GiB, 1000204886016 bytes, 244190646 sectoren
Eenheid: sectoren van 1 * 4096 = 4096 bytes
Sectorgrootte (logisch/fysiek): 4096 bytes / 4096 bytes
In-/uitvoergrootte (minimaal/optimaal): 4096 bytes / 4096 bytes
Schijflabeltype: dos
Schijf-ID: 0x00000000
Apparaat Op. Begin Einde Sectoren Grootte ID Type
/dev/sdg1 40192 566271 526080 2G 82 Linux wisselgeheugen
/dev/sdg2 * 566272 5809151 5242880 20G 83 Linux
/dev/sdg3 5809408 244190463 238381056 909,4G 83 Linux
gdisk -l /dev/sdg
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory.
***************************************************************
Disk /dev/sdg: 244190646 sectors, 931.5 GiB
Logical sector size: 4096 bytes
Disk identifier (GUID): 3A11D696-D398-4311-BF3F-27D9A36955C9
Partition table holds up to 128 entries
First usable sector is 6, last usable sector is 244190640
Partitions will be aligned on 256-sector boundaries
Total free space is 40619 sectors (158.7 MiB)
Number Start (sector) End (sector) Size Code Name
1 40192 566271 2.0 GiB 8200 Linux swap
2 566272 5809151 20.0 GiB 8300 Linux filesystem
3 5809408 244190463 909.4 GiB 8300 Linux filesystem
But gdisk does not complain about -l, and gives more data.
Without -l:
gdisk /dev/sdg
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************
It seems to be MBR boot on a DOS partitioned disk The gdisk and fdisk agree on partitioning and size.
If you boot the install in EFI mode (assuming an UEFI BIOS) things may look different since it may be wanting to change the partitioning to GPT from DOS to accommodate the EFI boot
I don’t know how to issue that commands when booted from the install medium. From the install menu, I can escape to a shell, but fdisk nor gdisk are available.
I suspect the cause was that the CPU-fan was not reconnected when the system was cleaned by a computer firm. Or maybe the fact that the mains socket was not earthed.
She did not do anything special, was downloading MuseScore from its website when the system stopped and wouldn’t reboot. She hasn’t got the root password, so she can’t do updates.
fsck /dev/sdg
'fsck' uit util-linux 2.28.2
e2fsck 1.43.3 (04-Sep-2016)
ext2fs_open2(): Ongeldig magisch getal in superblok
fsck.ext2: Superblok is ongeldig -- reservekopieblokken worden bekeken...
fsck.ext2: Ongeldig magisch getal in superblok tijdens openen van /dev/sdg
Het superblok is onleesbaar of omschrijft geen geldig ext2/3/4-bestandssysteem.
Als het apparaat juist is en werkelijk een ext2-, ext3- of ext4-bestandssysteem
bevat (en niet swap of UFS of iets anders), dan is het superblok beschadigd.
U kunt dan proberen een ander superblok te gebruiken, bijvoorbeeld:
e2fsck -b 8193 <apparaat>
of:
e2fsck -b 32768 <apparaat>
Er is een dos-partitietabel gevonden in /dev/sdg