Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

(Windows) Grub entry erased

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
martin.forum
Posts: 3
Joined: 2017-01-01 09:45

(Windows) Grub entry erased

#1 Post by martin.forum »

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

#!/bin/sh
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?

peter_irich
Posts: 1403
Joined: 2009-09-10 20:15
Location: Saint-Petersburg, Russian Federation
Been thanked: 11 times

Re: (Windows) Grub entry erased

#2 Post by peter_irich »

By which utility partitions was created - fdisk or parted?
If by fdisk, perhaps, to try write

Code: Select all

set root='(hd0,msdos1)'
Peter.

martin.forum
Posts: 3
Joined: 2017-01-01 09:45

Re: (Windows) Grub entry erased

#3 Post by martin.forum »

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?

Regards

Martin

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: (Windows) Grub entry erased

#4 Post by Segfault »

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.

Post Reply