(Windows) Grub entry erased

If none of the more specific forums is the right place to ask

(Windows) Grub entry erased

Postby martin.forum » 2017-11-30 14:15

it seems that with one of the last debian updates, the windows entry in grub was erased. It was working after installing Windows and afterwards Debian. How can I get it back?

System Setup
/dev/sda1 Windows 8.1
/dev/sda2 crypt-luks Debian 9 Stretch
/dev/sda3 ext3 /boot (with a light Debian system)

What I have done so far
I have extended the file /etc/grub.d/40_custom

exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Windows 8.1" {
set root='(hd0,1)'
chainloader +1

and executed "grub-mkconfig -o /boot/grub/grub.cfg". After a restart two windows grub entries are visible but the system does not boot from them. Furthermore analyzing /dev/sda1 with gparted, it shows that no file system is on this partition. Is this ok?

Can anybody help what I can do now to get the windows partition back?
Posts: 3
Joined: 2017-01-01 09:45

Re: (Windows) Grub entry erased

Postby peter_irich » 2017-11-30 18:14

By which utility partitions was created - fdisk or parted?
If by fdisk, perhaps, to try write
Code: Select all
set root='(hd0,msdos1)'

Posts: 1195
Joined: 2009-09-10 20:15
Location: Saint-Petersburg, Russian Federation

Re: (Windows) Grub entry erased

Postby martin.forum » 2017-12-03 10:49

Hello Peter,

thank you, but it was not working. Most likely I have used gparted for the partitioning.

The error message says: no such disk/partition.

Maybe it is a problem that gparted can also not see this partition?
What and how do I have to change (I assume) the fstab to bring this partition back?


Posts: 3
Joined: 2017-01-01 09:45

Re: (Windows) Grub entry erased

Postby Segfault » 2017-12-03 14:40

fstab only affects mounting existing partitions. You need to use a forensics utility as testdisk to restore lost/deleted partition table entries. It may be easier to restore from backup.
Posts: 552
Joined: 2005-09-24 12:24

Return to General Questions

Who is online

Users browsing this forum: No registered users and 8 guests