Dual boot -- resized windows partition and lost grub -- only windows 10 boots

Dual boot for 10 years or longer. windows 10 and now leap 15.6. Made changes to reduce windows and at some time increase linux disk size.
From windows boot, I shrunk windows partition using windows gparted like app. I changed using windows because I thought that would handle windows files best. I made no changes to linux partitions.

Now I can only boot into windows. Grub boot selection window does not show up at all.

Mb has ASUS bios. Can’t get mouse working to easily change boot options. Trying ways using keyboard.

Should I try to add linux bootloader onto windows bootloader OR should I try to remount grub using grub rescue?

I have timeshift system backups of opensuse on another drive but don’t see how to get at it.
Again, no changes made to linux side of disk. Only shrunk windows partition. Did not even add newly unallocated space to linux yet.

Any suggestions, tom kosvic.

I can get pc to boot into cd. I have a windows “neosmart” boot cd that can modify windows bootloader. I also have an openSUSE 15.6 live cd that also boots.
I see some messages aiout no root. YAST grub won’t load due to errors.

I have timeshift system backup for yesterday. Don’t know if a restore of this would solve problem. I also don’t know how to run harddisk software from live cd.

Experienced help requested.

thanks, tom kosvic

This is a total disaster. Using AOMEI in windows to reduce the size of windows 10, unallocated my whole linux partition of 3 tbs. There are no linux partitions at all; only unallocated space. The linux partition was never to be touched by AOMEI, it was only to shrink the windows partition.

I have timeshift system backups and also backintime backups that may let me recover. I am also looking into data recovery since all the data and partition info should be untouched.

Any guidance? tom kosvic

Thanks windows 10 for bringing you into this situation.

You seems to have proper backups and given that I would just reinstall Leap. A typical backup does not include the bootloader.

I would also consider an additional drive, you can add a NVME drive using a NVME M.2 PCIe adapter and get an nice speed update.

I have “timeshift” system snapshots of the system on an external drive. I also have “backintime” backups of /home files on externel drive.

Plan is to new install of leap 15.5 into the newly unallocated disk partition. Then restore “timeshift” snapshot to get system files to current. Then will restore /home files from backintime.

I have a bunch of vm files that are not in either backup. I am trying to reclaim them off the unallocated disk area using “testdisk” and “photorec”. testdisk is taking 20 hours to scan 4 tb disk.

if all goes well, I should be back in a few days. I complained/yelled at “AOMEI” and all they said was to try their recovery tool. Their tool looks to be just a paid commercial version of foss testdisk.

Always looking for ideas and help. tom kosvic

You wrote in a previous paragraph, going to install 15.5 … I’m sure that’s a typing error.

We’ve gone thru the various “imaging backup” tools … but for us, not worth the hassle.

We only back up /home (a separate XFS partition - we use rsync for backup).

If there is a catastrophic failure of the system… it’s WAY faster to install the system from scratch … then restore /home from its backup.

Fresh install might take an hour, then restore /home - maybe 30 mins to an hour (?).

I know, that opinion doesn’t improve your situation, but maybe change your method in the future (?).

@aggie, I have dozens of applications that I have compiled myself and at times modified the code and compiled over the years. These are outside of zyppers knowledge. A new install just gets me back back to openSUSE. I run “timeshift” to hopefully collect all these and restore them. Never tried this restore before.

I too am concluding that the data restore, e.g., testdisk might not be worth the effort. It took more than 18 hrs to do deep search on 4 tb disk. I just want to recover my *.qcow2 (libvirt) vm files if I can. Put really a lot of hours into them and have no backup for them.

Then I will do leap 15.6 new install followed by timeshift restore and then by backintime restore.

thanks for your insights. tom kosvic

1 Like

Okay, it seems like your systems has quite some storage or is that 4 Tb one disk?

Would you mind sharing the output of lsblk, for my system:

> lsblk -o  +PARTLABEL
NAME          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS PARTLABEL
sda             8:0    0 931.5G  0 disk              
nvme2n1       259:0    0   1.9T  0 disk              
├─nvme2n1p1   259:1    0     1G  0 part  /boot/efi   lexar_boot
├─nvme2n1p2   259:2    0     1G  0 part  /boot       lexar_boot_efi
├─nvme2n1p3   259:3    0   120G  0 part  /           lexar_root
├─nvme2n1p4   259:4    0   130G  0 part  /data3      lexar_data
└─nvme2n1p5   259:5    0   1.5T  0 part              lexar_home
  └─cr-auto-1 254:0    0   1.5T  0 crypt /home       
nvme0n1       259:6    0 238.5G  0 disk              
├─nvme0n1p1   259:7    0   100M  0 part              EFI system partition
├─nvme0n1p2   259:8    0    16M  0 part              Microsoft reserved partition
├─nvme0n1p3   259:9    0 237.6G  0 part

It looks like you never tested your backups and have some special tweaks. Based on this I woul first try to reinstall the bootloader:

Then start to provide information instead of repeating “I did not do nothing”.

Linux partitions? You had multiple partitions? Explain your disk layout, show the actual output of fdisk -l, show where unallocated space is, explain what it contained earlier.

If you made backups, you may have some description of disk layout as part of these backups. If not, you may remember what partitions you had, in which order, what filesystems were on these partitions. Maybe the software you used has logs that would help or even backups of partition table or similar.

This will irreversibly overwrite whatever is in this space now.

In summary, the linux part of my 4 tb single disk system became unallocated space from a windows app. The only partitions visible on it are windows; representing 500 gb. The remaining 3.5 tb of ext linux files are unallocated by gparted.

I tried several data recovery tools on the unallocated disk space over last 3 days as it takes a long time to run each one. “R-linux” freeware showed all my linux files are there and readable. Thus, I want to not do re-install of entire system but try repair/reinstall of bootloader first.

I want to do partition table repair and grub reinstall and repair.
I am reviewing Reinstalling GRUB Bootloader from the Rescue System | Support | SUSE
I am also looking at “super grub” bootable iso.
I have also seen other instruction sets using both grub and/or grub-rescue terminals.

Not sure of which to try as I probably only get one shot. Appreciate experiences of others.

thanks, tom kosvic

@tckosvic order another 4TB disk, dd the contents over and play with that and don’t do anything with the current disk.

There should be a gpt backup file on the disk… So go research that, but again don’t do anything with the current disk…

I am believing that if the linux space is labeled unallocated and is outside the windows partitions then windows OS cannot write anything to it. Thus, I’m thinking nothing can happen. Maybe I am wrong.

I run openSUSE booting to a live cd and that should also not do anything to “unallocated”.

I do have another 4 tb external HD attached that could hold the used space of my main drive. Maybe I’ll dd over to that. Could dd affect the disk just by copying from it?

thanks, tom kosvic

@tckosvic using dd should not as just reading…

Then on the test disk see if you can inspect the device to see where the old partitions started and ended, parted may help.

Then if you can find the start and end points (since the data is still there) of the removed partitions you should be able to mount each one and inspect/recover.

Again only use the test disk for this!!!

In this case R-Linux should also show you the detected filesystem information including guessed partition layout. Just create this partition.

You cannot reinstall bootloader as long as you do not even have partition with operating system.

Very important answer.

“You cannot reinstall bootloader as long as you do not even have partition with operating system”.

I was thinking that repair to grub would fix the partitions. Guess I was wrong.

R-linux could read files on “unallocated” linux partitions but can’t write partition table. Now I’m looking for something else.

If nothing shows up, I’ll go to Plan B of fresh openSUSE 15.6 install followed by system root files restore from “timeshift” snapshot followed by /home restore from “backintime” backup.

Any one know good system restore app for linux partitions? I can run it from windows or linux live cd.

thanks, tom kosvic

Success!!! I am back on linux.

I found a partition repair code on windows from the same company who’s code trashed my linux partition while shrinking windows. It worked and found the partitions on linux and wrote the partition table. It labeled the disks labels as microsoft basic data disks but didn’t change from ext4.

Attached is fdisk print.

(base) tom@mydesktop: ~ $ sudo fdisk -l
[sudo] password for root: 
Disk /dev/sda: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: TOSHIBA HDWE140 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 04F040ED-92C0-4D0B-B201-2192DE39FD0C

Device          Start        End    Sectors   Size Type
/dev/sda1        2048     923647     921600   450M Windows recovery environment
/dev/sda2      923648    1128447     204800   100M EFI System
/dev/sda3     1128448    1161215      32768    16M Microsoft reserved
/dev/sda4     1161216  946565864  945404649 450.8G Microsoft basic data
/dev/sda5  2046390272 2048133119    1742848   851M Microsoft basic data
/dev/sda6  2048135168 2052351983    4216816     2G Linux swap
/dev/sda7  2052352000 2261153791  208801792  99.6G Linux filesystem
/dev/sda8  2261155840 7814035455 5552879616   2.6T Linux filesystem


Disk /dev/sdb: 3.64 TiB, 4000786153472 bytes, 7814035456 sectors
Disk model: My Book 25ED    
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 391619D9-3443-4044-98BB-4337A97BBED5

Device          Start        End    Sectors  Size Type
/dev/sdb1        2048 1677733552 1677731505  800G Microsoft basic data
/dev/sdb2  1677733888 7814

There is 500 gb unallocated between sda4 and sda5. That is the 500 gb I took from windows that started all this mess.

Problem remaining is that I used supergrub2 disk to boot into linux. I need details of how to rebuild/reinstall/repair grub and any other necessary files so I can boot from harddisk as I used to.

I am going to attack AOEMI to get the money back that I paid them to recover from the mistake their software caused.

I am leaving openSUSE on until I can fix grub.

thanks all for listening to my rants. tom kosvic

I got a refund from AOEMI with no argument. Their software garbled my linux partitions when I was using it solely to reduce the size of windows partition. It caused days of turmoil for me but it is fixed except for grub login that I am working on.

System only boots to windows from regular boot using harddisk. To get into openSUSE, I boot from supergrub2 cd. It works.

thanks, tom kosvic

1 Like

In principle, from a running Leap 15.6 you should be able to reinstall / reconfigure the bootloader, you should still have yast2-bootloader installed so looking at what it offers should be simple. Just not save if you don’t know what you are doing and exit by hitting “Cancel”, since dual booting Win10 might have some caveats and I cannot offer advice there (I left dual booting with Win ages ago :wink: ).

@OrsoBruno , I am looking at what is needed to reconfigure grub from operating system as you suggested.

The reality is I only use linux. My system is on 365/24/7 in linux. I only boot to windows 10 to update it every couple of months. There is one windows program related to cataloging postage stamp collections that I look at once a year or so. Can’t get it over to linux.

I got into my mess reducing size of windows disk space. I do some astronomy analyses and the size of the astronomy ".fits files is eating up linux space.

I should be good for now but I had a 4 days panic diversion due to AOMEI software.

tom kosvic

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.