You are not logged in.

#1 2015-01-28 17:45:37

sweetthdevil
Member
Registered: 2009-10-20
Posts: 417

Grub entry after windows 8.1 re-install

Hi all,

I had to re-install windows 8.1 on my pc (the original partition was too small sda1) so I install a new version on sdc3 (see below lsblk -f) and formated sda1 from Arch after reinstalling grub from the net-cd.

Trouble is that now when trying to boot windows, it is telling me there is an error and must repair it? Is it because the boot segment from windows was on sda1? Or am I missing something?

See my previous grub entry for the previous windows.

menuentry "Microsoft Windows 8 " {
  insmod part_msdos
  insmod ntfs
  insmod search_fs_uuid
  insmod ntldr     
  search --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 F6E467D9E4679A9F
  ntldr /bootmgr
}
[sweetth@linuxbox ~]$ lsblk -f
NAME   FSTYPE  LABEL    UUID                                 MOUNTPOINT
sda                                                          
├─sda1 ntfs    Exchange 42844D5562922749                     
└─sda2 ext3             f4a7ed0a-8a4a-4e43-8b57-4ccddec8f31e /
sdb                                                          
└─sdb1 ext4    Space    7a5f1794-86a5-4d79-88c3-0d8f2c58e56a /media/space
sdc                                                          
├─sdc1 swap             f99badbd-6a62-478f-a4f4-48dbdde9b2df [SWAP]
├─sdc2 vfat    Music    02E7-F757                            /media/Music
└─sdc3 ntfs             1A32A54B32A52D27                     
sdd                                                          
└─sdd1 ntfs    Z        080866D30866BEF6                     /media/z
sde                                                          
└─sde1 vfat    USB      E300-0384                            /run/media/sweett
sr0    iso9660 CDROM    2012-10-29-22-51-42-00               /media/cd

New Grub Windows entry

menuentry "Microsoft Windows 8 " {
  insmod part_msdos
  insmod ntfs
  insmod search_fs_uuid
  insmod ntldr     
  search --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 1A32A54B32A52D27  
  ntldr /bootmgr

Many thanks for your assistance,

Last edited by sweetthdevil (2015-01-28 18:15:15)

Offline

#2 2015-01-28 18:16:27

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,532

Re: Grub entry after windows 8.1 re-install

post

$ blkid

Notwithstanding that the UUID are different so it is better to know the exact UUID. See Grub entry if it fits your questions.


do it good first, it will be faster than do it twice the saint wink

Offline

#3 2015-01-28 18:18:36

sweetthdevil
Member
Registered: 2009-10-20
Posts: 417

Re: Grub entry after windows 8.1 re-install

Hi,

Just edited the post but here is the requested information

[sweetth@linuxbox ~]$ sudo blkid
[sudo] password for sweetth: 
/dev/sda1: LABEL="Exchange" UUID="42844D5562922749" TYPE="ntfs" PARTUUID="109e109e-01"
/dev/sda2: UUID="f4a7ed0a-8a4a-4e43-8b57-4ccddec8f31e" TYPE="ext3" PTTYPE="dos" PARTUUID="109e109e-02"
/dev/sdb1: LABEL="Space" UUID="7a5f1794-86a5-4d79-88c3-0d8f2c58e56a" TYPE="ext4" PARTUUID="bbce7a2d-01"
/dev/sdc1: UUID="f99badbd-6a62-478f-a4f4-48dbdde9b2df" TYPE="swap" PARTUUID="3aae3aae-01"
/dev/sdc2: LABEL="Music" UUID="02E7-F757" TYPE="vfat" PARTUUID="3aae3aae-02"
/dev/sdc3: UUID="1A32A54B32A52D27" TYPE="ntfs" PARTUUID="3aae3aae-03"
/dev/sdd1: LABEL="Z" UUID="080866D30866BEF6" TYPE="ntfs" PARTUUID="9d05bf62-01"
/dev/sr0: UUID="2012-10-29-22-51-42-00" LABEL="CDROM" TYPE="iso9660" PTUUID="346adda7" PTTYPE="dos"
/dev/sde1: LABEL="USB" UUID="E300-0384" TYPE="vfat" PARTUUID="73bf75b4-01"
/dev/loop0: UUID="2014-07-16-17-00-00-00" LABEL="WIN81AIO-X64-EN-US-JUN2014" TYPE="udf"

Offline

#4 2015-01-28 20:14:14

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,778
Website

Re: Grub entry after windows 8.1 re-install

sweetthdevil wrote:

formated sda1 from Arch after reinstalling grub from the net-cd.

How exactly did you do this?

What is the error message?


Jin, Jîyan, Azadî

Offline

#5 2015-01-28 20:33:18

sweetthdevil
Member
Registered: 2009-10-20
Posts: 417

Re: Grub entry after windows 8.1 re-install

Well has easy as starting gparted and deleted partition - then created a new one.

Could I use ms-sys to write mbr on sda? To be able to restart Windows? Or should I just repair windows and reinstall grub after?

Offline

#6 2015-01-28 20:37:22

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,778
Website

Re: Grub entry after windows 8.1 re-install

Did Windows boot before you re-installed GRUB?


Jin, Jîyan, Azadî

Offline

#7 2015-01-28 20:38:32

sweetthdevil
Member
Registered: 2009-10-20
Posts: 417

Re: Grub entry after windows 8.1 re-install

yes - but I formated the partition after installing grub.

And also, when i was booting windows 8.1 - I had the options from windows to boot either windows the 8 (installed on sda1) and the 8.1 installed on sdc3

Thanks for your help

Last edited by sweetthdevil (2015-01-28 20:39:42)

Offline

#8 2015-01-28 21:13:40

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,778
Website

Re: Grub entry after windows 8.1 re-install

I meant, did the newly-installed Windows system (8.1?) boot before you re-installed GRUB?

Repairing the Windows system then re-(re-)installing GRUB would seem sensible but there is a chance Windows will over-write your GNU/Linux partitions (@clfarron4 has had experience of this).

Also, I've just noticed that the new Windows GRUB entry is pointing to sda1:

You wrote:
earch --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 1A32A54B32A52D27

It should be "hd2,msdos3"


Jin, Jîyan, Azadî

Offline

#9 2015-01-28 21:21:29

sweetthdevil
Member
Registered: 2009-10-20
Posts: 417

Re: Grub entry after windows 8.1 re-install

Head_on_a_Stick wrote:

I meant, did the newly-installed Windows system (8.1?) boot before you re-installed GRUB?

yes it did. But has I said with the option to boot either windows 8 (sda1) or windows 8.1 (sdc3) which make me think that the mbr was on sda1. Therefore I would have remove it by formating the partition.

menuentry "Microsoft Windows 8.1 " {
  insmod part_msdos
  insmod ntfs
  insmod search_fs_uuid
  insmod ntldr     
  search --fs-uuid --set=root --hint-bios=hd2,msdos3 --hint-efi=hd2,msdos3 --hint-baremetal=ahci0,msdos3 1A32A54B32A52D27
  ntldr /bootmgr
}

I am recreating my bootable usb key at the moment, once finished I will try the above grub entry - is that correct? or should it be "--hint-baremetal=ahci2,msdos3"?

Offline

#10 2015-01-28 21:24:30

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,778
Website

Re: Grub entry after windows 8.1 re-install

sweetthdevil wrote:

should it be "--hint-baremetal=ahci2,msdos3"?

This (I think).

Have you tried using os-prober & grub-mkconfig to check what entry that script writes?


Jin, Jîyan, Azadî

Offline

#11 2015-01-28 21:25:26

sweetthdevil
Member
Registered: 2009-10-20
Posts: 417

Re: Grub entry after windows 8.1 re-install

I tried os-prober but it did not find any windows....

Offline

#12 2015-01-28 21:34:38

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,778
Website

Re: Grub entry after windows 8.1 re-install

What command did you use to re-install GRUB?


Jin, Jîyan, Azadî

Offline

#13 2015-01-28 21:41:19

sweetthdevil
Member
Registered: 2009-10-20
Posts: 417

Re: Grub entry after windows 8.1 re-install

grub-install /dev/sda

Offline

#14 2015-01-28 21:47:59

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,778
Website

Re: Grub entry after windows 8.1 re-install

Right, just checked the GNU documentation and you should use this format to boot Windows on sda1:

menuentry "Windows" {
	insmod chain
	insmod ntfs
	set root=(hd0,1)
	chainloader +1
}

https://www.gnu.org/software/grub/manua … ading.html

However:

If you have installed DOS (or Windows) on a non-first hard disk, you have to use the disk swapping technique, because that OS cannot boot from any disks but the first one. The workaround used in GRUB is the command drivemap
[,,,]
Another problem arises if you installed more than one set of DOS/Windows onto one disk, because they could be confused if there are more than one primary partitions for DOS/Windows. Certainly you should avoid doing this, but there is a solution if you do want to do so. Use the partition hiding/unhiding technique.

https://www.gnu.org/software/grub/manua … 02fWindows


Jin, Jîyan, Azadî

Offline

#15 2015-05-23 21:46:25

whitetimer
Member
Registered: 2010-05-23
Posts: 207

Re: Grub entry after windows 8.1 re-install

sweetthdevil wrote:

Hi all,

after reinstalling grub from the net-cd.

How did you manage to reinstall grub from live cd ?  Having to reinstall grub too

Offline

Board footer

Powered by FluxBB