Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[issue]: update seems to have wiped the entire drive or at least the partition table #3128

Open
1 task done
dev-jam opened this issue Feb 21, 2025 · 9 comments
Open
1 task done

Comments

@dev-jam
Copy link

dev-jam commented Feb 21, 2025

Official FAQ

  • I have checked the official FAQ.

Ventoy Version

1.1.03

What about latest release

Yes. I have tried the latest release, but the bug still exist.

Try alternative boot mode

Yes. I have tried them, but the bug still exist.

BIOS Mode

Both

Partition Style

GPT

Disk Capacity

2TB

Disk Manufacturer

Transcend

Image file checksum (if applicable)

Yes.

Image file download link (if applicable)

No response

What happened?

Updating from 1.1.01 to 1.103 seems to have wiped the entire disk or at least the partiton table.
The disk had 1 exfat ventoy partition, 1 EFI partition and 1 luks partition.
After this update the partition table changed to 'Unknown (PMBR)' in gnome disk.

I downgraded to 1.1.01 which was possible but did not fix the problem.
Ventoy still sees the installed version but gparted and gnome disk do not recognize the partition table.

Seems it even damaged the backup partition table.

Repair with gdisk seems to be successful. I can mount Ventoy and the luks partition again and on first sight, all the files seem to be there.

gdisk report:

GPT fdisk (gdisk) version 1.0.9

Caution! After loading partitions, the CRC doesn't check out!
Warning! Main and backup partition tables differ! Use the 'c' and 'e' options
on the recovery & transformation menu to examine the two tables.

Warning! One or more CRCs don't match. You should repair the disk!
Main header: OK
Backup header: OK
Main partition table: ERROR
Backup partition table: ERROR

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: damaged

@ediazrod
Copy link

ediazrod commented Feb 21, 2025

I am on the same situation :-( Event the install has errors on it.

This is the log file for install

[2025/02/21 23:09:50.484] Now retry to install...
[2025/02/21 23:09:50.484] #####################################################
[2025/02/21 23:09:50.516] InstallVentoy2PhyDrive try2 MBR PhyDrive1 <<USB SanDisk 3.2Gen1 64GB>>
[2025/02/21 23:09:50.532] #####################################################
[2025/02/21 23:09:50.564] Disk signature: 0xfdb9846b
[2025/02/21 23:09:50.579] ReservedSector: 0
[2025/02/21 23:09:50.595] Lock disk for clean .............................
[2025/02/21 23:09:50.604] QueryDosDeviceA success \Device\Harddisk1\DR12
[2025/02/21 23:09:50.842] [0] CreateFileA \.\PhysicalDrive1 code:0 000002C0
[2025/02/21 23:09:50.934] FSCTL_LOCK_VOLUME success
[2025/02/21 23:09:50.958] LogicalDrive:\.\C: PhyDrive:0 Num:1 Offset:290455552 ExtentLength:1021821583360
[2025/02/21 23:09:50.980] No drive letter was assigned...
[2025/02/21 23:09:50.997] GetFirstUnusedDriveLetter D: ...
[2025/02/21 23:09:51.017] Will use 'D:' as volume mountpoint
[2025/02/21 23:09:51.067] VDS init OK, service 007783E4
[2025/02/21 23:09:51.611] Callback 1 process for disk <\?\PhysicalDrive1>
[2025/02/21 23:09:51.618] Deleting ALL partitions from disk '\?\PhysicalDrive1':
[2025/02/21 23:09:51.642] No partition to delete on disk '\?\PhysicalDrive1'
[2025/02/21 23:09:51.669] VDS_DeleteAllPartitions 1 ret:1 (SUCCESS)
[2025/02/21 23:09:51.693] Deleting all partitions ......................... OK
[2025/02/21 23:09:51.722] Lock disk for write .............................
[2025/02/21 23:09:51.743] QueryDosDeviceA success \Device\Harddisk1\DR12
[2025/02/21 23:09:51.756] [0] CreateFileA \.\PhysicalDrive1 code:0 00000344
[2025/02/21 23:09:51.764] Opened \.\PhysicalDrive1 for exclusive write access
[2025/02/21 23:09:51.776] FSCTL_LOCK_VOLUME success
[2025/02/21 23:09:51.793] Formatting part1 exFAT ...
[2025/02/21 23:09:51.802] Formatting Part1 exFAT ...
[2025/02/21 23:09:51.814] WriteFile error bRet:0 WriteSize:4608 dwSize:0 ErrCode:5
[2025/02/21 23:09:51.823] WriteFile error bRet:0 WriteSize:58880 dwSize:0 ErrCode:5
[2025/02/21 23:09:51.832] WriteFile error bRet:0 WriteSize:1876992 dwSize:0 ErrCode:5
[2025/02/21 23:09:51.840] WriteFile error bRet:0 WriteSize:131072 dwSize:0 ErrCode:5
[2025/02/21 23:09:51.850] WriteFile error bRet:0 WriteSize:512 dwSize:0 ErrCode:5
[2025/02/21 23:09:51.858] WriteFile error bRet:0 WriteSize:512 dwSize:0 ErrCode:5
[2025/02/21 23:09:51.868] WriteFile error bRet:0 WriteSize:512 dwSize:0 ErrCode:5
[2025/02/21 23:09:51.877] WriteFile error bRet:0 WriteSize:512 dwSize:0 ErrCode:5
[2025/02/21 23:09:51.889] WriteFile error bRet:0 WriteSize:512 dwSize:0 ErrCode:5
[2025/02/21 23:09:51.900] WriteFile error bRet:0 WriteSize:512 dwSize:0 ErrCode:5
[2025/02/21 23:09:51.912] Formatting Part1 exFAT failed, write error.
[2025/02/21 23:09:51.923] FormatPart1exFAT failed.
[2025/02/21 23:09:51.937] FindProcessOccupyDisk for PhyDrive 1
[2025/02/21 23:09:51.944] QueryDosDeviceA success \Device\Harddisk1\DR12
[2025/02/21 23:09:52.074] handles->NumberOfHandles = 298752
[2025/02/21 23:09:52.075] NOTE: Could not identify the process(es) or service(s) accessing \Device\Harddisk1\DR12
[2025/02/21 23:09:52.107] PhyDrive1 ALL match, now continue
[2025/02/21 23:09:52.136] This time install failed, clean disk by diskpart, wait 10s and retry...
[2025/02/21 23:09:52.156] CleanDiskByDiskpart <1>
[2025/02/21 23:09:52.192] CreateProcess <C:\Windows\system32\diskpart.exe /s "C:\temp\ventoy-1.1.03-windows\ventoy-1.1.03\ventoy\diskpart_29080.txt">
[2025/02/21 23:09:52.233] Wair process ...

@ediazrod
Copy link

I test the ventoy-1.1.02 works ok.. I try on my USB principal, (I need to make security copy first)

@ediazrod
Copy link

Please @ventoy take the new release down ASAP.

@dev-jam
Copy link
Author

dev-jam commented Feb 21, 2025

Ah good thinking, I forgot that Ventoy writes a log file.

I only did an update and I found it rewrites the EFI partition with a new secure boot.

Seems to be this commit: 4e8d8b2

Relevant log:

[2025/01/21 21:19:34] ==========================================================
[2025/01/21 21:19:34] ===== ventoy update /dev/sdb new_secureboot:1 =========
[2025/01/21 21:19:34] ==========================================================
[2025/01/21 21:19:34] /dev/sdb version:1.1.00 partstyle:1 oldsecureboot:1 reserve:1099511631360
[2025/01/21 21:19:34] disk is not mounted now, we can do the update ...
[2025/01/21 21:19:34] start update thread ESD310C TS2TESD310C (USB) ...
[2025/01/21 21:19:34] func handler update <{ "result" : "success" }>
[2025/01/21 21:19:34] ventoy_update_thread run ...
[2025/01/21 21:19:34] check disk sdb
[2025/01/21 21:19:34] disk is not mounted now, we can do continue ...
[2025/01/21 21:19:34] read core.img.xz rc:0 len:455200
[2025/01/21 21:19:34] ventoy_unxz_stg1_img len:455200 rc:0
[2025/01/21 21:19:34] read disk.img.xz rc:0 len:13451168
[2025/01/21 21:19:34] ventoy_unxz_efipart_img len:13451168 rc:0 unxzlen:33554432
[2025/01/21 21:19:34] Formatting part2 EFI ...
[2025/01/21 21:19:34] Formatting part2 EFI offset:948863045632 ...
[2025/01/21 21:19:34] VentoyProcSecureBoot 1 ...
[2025/01/21 21:19:34] Secure boot is enabled ...
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] write disk writelen:1048576 datalen:1048576 [ success ]
[2025/01/21 21:19:34] Writing legacy grub ...
[2025/01/21 21:19:34] Write GPT stage1 ...
[2025/01/21 21:19:34] lseek offset:17408(17408) writelen:1031168(1031168)
[2025/01/21 21:19:34] Writing reserve data offset:1044480 len:4096 ...
[2025/01/21 21:19:34] No need to update MBR
[2025/01/21 21:19:34] Read GPT table offset:0 len:17408 ...
[2025/01/21 21:19:34] Update EFI part attr from 0xc000000000000001 to 0x8000000000000000
[2025/01/21 21:19:34] write backup gpt part table off:2048408247808 len:512
[2025/01/21 21:19:34] write main gpt part table off:2048408231424 len:16384
[2025/01/21 21:19:34] write gpt part head off:0 len:17408
[2025/01/21 21:19:34] fsync data1...
[2025/01/21 21:19:34] ====================================
[2025/01/21 21:19:34] ====== ventoy update success ======
[2025/01/21 21:19:34] ====================================

@ventoy
Copy link
Owner

ventoy commented Feb 22, 2025

I have fixed in the latest 1.1.04 release.
1.1.03 release has been deprecated.

@ediazrod
Copy link

ediazrod commented Feb 22, 2025

I am guesting the data on the USB removed for the "1.1.03" lost right? ( I have backup copy) but it is only to know, my issue was with a windows version..

@dev-jam
Copy link
Author

dev-jam commented Feb 22, 2025

I could fix it with gdisk automatically. Both the main and backup header were intact but the main and backup partition tables had an error in it. Not sure what the corruption was.

All data on the USB was backed up but i am glad i did not have to restore it.

@DevDorrejo
Copy link

Update function is corrupting the USB.

@ediazrod
Copy link

@ventoy I think that a good backup was make a backup of the original partition first (in order to avoid this) when you update.. it is cheap on terms of space and will save for some disasters. :-D I will try recover my usb with gparted Regards!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants