You are not logged in.
Pages: 1
I have a dual boot laptop. The other day I plugged the charger of my laptop into the socket while the other end was still plugged into the laptop and I think that caused a power surge that altered the partition table. When I turned it on, it skipped the GRUB menu and booted Windows. I rebooted it and since then it hasn't found any partition and defaults to the BIOS.
I have tried to debug the problem with an Archlinux USB live. Here are some diagnostics:
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 788.2M 1 loop /run/archiso/airootfs
sda 8:0 0 128K 0 disk
sdb 8:16 1 7.5G 0 disk
├─sdb1 8:17 1 940M 0 part
└─sdb2 8:18 1 15M 0 part
# efibootmgr -v
BootCurrent: 0005
Timeout: 1 seconds
BootOrder: 0005,0004,0001,0002,0003,0000
Boot0000 Windows Boot Manager VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d0000000c000100000010000000040000007fff0400
dp: 01 04 14 00 e7 75 e2 99 a0 75 37 4b a2 e6 c5 38 5e 6c 00 cb / 7f ff 04 00
data: 57 49 4e 44 4f 57 53 00 01 00 00 00 88 00 00 00 78 00 00 00 42 00 43 00 44 00 4f 00 42 00 4a 00 45 00 43 00 54 00 3d 00 7b 00 39 00 64 00 65 00 61 00 38 00 36 00 32 00 63 00 2d 00 35 00 63 00 64 00 64 00 2d 00 34 00 65 00 37 00 30 00 2d 00 61 00 63 00 63 00 31 00 2d 00 66 00 33 00 32 00 62 00 33 00 34 00 34 00 64 00 34 00 37 00 39 00 35 00 7d 00 00 00 0c 00 01 00 00 00 10 00 00 00 04 00 00 00 7f ff 04 00
Boot0001* UEFI: PXE IP4 Realtek PCIe GBE Family Controller PciRoot(0x0)/Pci(0x1c,0x0)/Pci(0x0,0x0)/MAC(5c857e47c7ce,0)/IPv4(0.0.0.0,0,DHCP,0.0.0.0,0.0.0.0,0.0.0.0)0000424f
dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 00 1c / 01 01 06 00 00 00 / 03 0b 25 00 5c 85 7e 47 c7 ce 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 03 0c 1b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 7f ff 04 00
data: 00 00 42 4f
Boot0002* UEFI: PXE IP6 Realtek PCIe GBE Family Controller PciRoot(0x0)/Pci(0x1c,0x0)/Pci(0x0,0x0)/MAC(5c857e47c7ce,0)/IPv6([::],0,Static,[::],[::],64)0000424f
dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 00 1c / 01 01 06 00 00 00 / 03 0b 25 00 5c 85 7e 47 c7 ce 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 03 0d 3c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 7f ff 04 00
data: 00 00 42 4f
Boot0003 GRUB VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
dp: 01 04 14 00 e7 75 e2 99 a0 75 37 4b a2 e6 c5 38 5e 6c 00 cb / 7f ff 04 00
Boot0004* UEFI: 1100 PciRoot(0x0)/Pci(0x14,0x0)/USB(5,0)/CDROM(1,0x1d6000,0x1e000)0000424f
dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 00 14 / 03 05 06 00 05 00 / 04 02 18 00 01 00 00 00 00 60 1d 00 00 00 00 00 00 e0 01 00 00 00 00 00 / 7f ff 04 00
data: 00 00 42 4f
Boot0005* UEFI: 1100, Partition 2 PciRoot(0x0)/Pci(0x14,0x0)/USB(5,0)/HD(2,MBR,0xe3fe56f2,0x1d6000,0x7800)0000424f
dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 00 14 / 03 05 06 00 05 00 / 04 01 2a 00 02 00 00 00 00 60 1d 00 00 00 00 00 00 78 00 00 00 00 00 00 f2 56 fe e3 00 00 00 00 00 00 00 00 00 00 00 00 01 01 / 7f ff 04 00
data: 00 00 42 4f
#bootctl status
Couldn't find EFI system partition. It is recommended to mount it to /boot or /efi.
Alternatively, use --esp-path= to specify path to mount point.
System:
Firmware: n/a (n/a)
Firmware Arch: x64
Secure Boot: disabled
TPM2 Support: yes
Measured UKI: no
Boot into FW: supported
Current Boot Loader:
Product: n/a
Features: ✗ Boot counting
✗ Menu timeout control
✗ One-shot menu timeout control
✗ Default entry control
✗ One-shot entry control
✗ Support for XBOOTLDR partition
✗ Support for passing random seed to OS
✗ Load drop-in drivers
✗ Support Type #1 sort-key field
✗ Support @saved pseudo-entry
✗ Support Type #1 devicetree field
✗ Enroll SecureBoot keys
✗ Retain SHIM protocols
✗ Menu can be disabled
✗ Boot loader sets ESP information
ESP: n/a
File: └─n/a
Random Seed:
System Token: not set
No boot loaders listed in EFI Variables.
# gdisk /dev/sda -l
GPT fdisk (gdisk) version 1.0.10
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries in memory.
Disk /dev/sda: 256 sectors, 128.0 KiB
Model: Generi Loader SA
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 82495B0E-39A7-4140-9F45-6D8D53175071
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 222
Partitions will be aligned on 2048-sector boundaries
Total free space is 189 sectors (94.5 KiB)
Number Start (sector) End (sector) Size Code Name
So it clearly doesn't see any EFI system partition. Only a partition is seen, /dev/sda (no sda1, which I'm guessing is bad), of 128K in size. I'm tempted to install GRUB in this partition but I am afraid I will ruin it for good. Maybe it's not even possible, being the partition so small.
Is there any way to make the partitions detectable so that I can restore the EFI partition and access the hard drives?
Last edited by capstayn (2024-05-10 15:25:25)
Offline
You can recreate partitions (usually) without destroying the data on the drive, using fdisk or another partition tool. The partition table just tells your PC what range the file systems are in; it isn't the file system itself.
/dev/sda is not a partition, but rather an entire device (which is incorrectly reporting its capacity as 128KB) - you are correct that you want to see sda1, sda2, etc. Don't try installing GRUB on that drive until you have your partitions sorted!
Last edited by mesaprotector (2024-05-10 21:17:00)
Offline
Seems like your drive got fried What does it look like in dmesg? Also what kind of drive is it... like, it could be a recoverable firmware bug on some ssd, but the chance is miniscule...
You shouldn't write anything to a drive that shows up with the wrong capacity. fdisk or other partitioners won't fix this.
Last edited by frostschutz (2024-05-10 21:25:44)
Offline
Also what laptop model?
Next to the drive (firmware) fried you could also be facing an UEFI/BIOS bug (introduced by the dual boot and an UEFI update on windows or whatever) and resetting that (more w/ a vendor specific hack than just resetting the CMOS) might help.
Online
Sorry for the belated reply - somewhat naïvely, I left the laptop at work.
Relevant information from dmesg:
# dmesg
...
[ 0.463427] libata version 3.00 loaded.
[ 0.607353] ata1: DUMMY
[ 0.607356] ata2: SATA max UDMA/133 abar m2048@0x80502000 port 0x80502180 irq 123 lpm-pol 3
[ 0.921735] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 0.923005] ata2.00: ATA-9: Generi Loader SATA Device, 00000000, max UDMA/133
[ 0.923008] ata2.00: 256 sectors, multi 0: LBA
[ 0.923409] ata2.00: Read log 0x30 page 0x00 failed, Emask 0x1
[ 0.925261] ata2.00: Read log 0x30 page 0x00 failed, Emask 0x1
[ 0.925273] ata2.00: configured for UDMA/133
...
[ 0.938357] sd 1:0:0:0: [sda] 256 512-byte logical blocks: (131 kB/128 KiB)
[ 0.938435] sd 1:0:0:0: [sda] Write Protect is off
[ 0.938437] sd 1:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 0.938582] sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 0.938806] sd 1:0:0:0: [sda] Preferred minimum I/O size 512 bytes
[ 0.939802] sd 1:0:0:0: [sda] Attached SCSI disk
Information about the drive:
# hdparm -I /dev/sda
/dev/sda:
ATA device, with non-removable media
Model Number: Generi Loader SATA Device
Firmware Revision: 00000000
Transport: Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
Standards:
Supported: 9 8 7 6 5
Likely used: 9
Configuration:
Logical max current
cylinders 130 0
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 0
LBA user addressable sectors: 256
Logical Sector size: 512 bytes
Physical Sector size: 512 bytes
Logical Sector-0 offset: 0 bytes
device size with M = 1024*1024: 0 MBytes
device size with M = 1000*1000: 0 MBytes
cache/buffer size = unknown
Form Factor: 2.5 inch
Nominal Media Rotation Rate: Solid State Device
Capabilities:
LBA, IORDY(can be disabled)
Standby timer values: spec'd by Standard, no device specific minimum
R/W multiple sector transfer: Max = 16 Current = 16
DMA: mdma0 mdma1 mdma2 mdma3 mdma4 mdma5 mdma6 mdma7 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
Security:
Master password revision code = 65534
supported
not enabled
not locked
frozen
expired: security count
supported: enhanced erase
2min for SECURITY ERASE UNIT. 2min for ENHANCED SECURITY ERASE UNIT.
1SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 04 51 e0 01 21 04 00 00 80 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Checksum: correct
The laptop is a Toshiba Satellite Pro C50-H-106 (one of those dynabook). Could you give me any pointer as to how to debug the UEFI/BIOS?
Another thing that is happening now is that every reboot the "secure boot" flag gets enabled and I get a red screen.
Thanks for all the insights.
Last edited by capstayn (2024-05-15 06:58:05)
Offline
Online
Pages: 1