Scientific Linux Forum.org



  Reply to this topicStart new topicStart Poll

> SL7 and dual boot with windows, Windows boot lost
simrec
 Posted: Jul 7 2015, 09:20 AM
Quote Post


SLF Newbie


Group: Members
Posts: 10
Member No.: 3483
Joined: 30-June 15









Hi all

I started life with Windows 7 and then installed Ubuntu 14.04 LTS before deciding to load SL7

After the LS7 install I have a grub with Ubuntu and SL7 but no windows

I followed the following procedure

Created a 15_Windows file (logged in as root) in /etc/grub.d and made it executable
Ran the command grub2-mkconfig -o /boot/grub2/grub.cfg

The update terminates with error

Here are the contents of 15_Windows (I have manually deleted and re-entered the " marks)

#! /bin/sh -e
echo "Adding Windows 7" >&2
cat <<EOF
menuentry "Windows 7" {
set root=(hd0,1)
chainloader +1
}
EOF


Also here is the file configuration of my system

[root@localhost ~]# cd /boot/grub2
[root@localhost grub2]# cat device.map
# this device map was generated by anaconda
(hd0) /dev/sda
(hd1) /dev/sda

[root@localhost grub2]# cd /etc/grub.d
[root@localhost grub.d]# fdisk -l |grep "Disk /dev"
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Disk /dev/sdb: 300.1 GB, 300067970560 bytes, 586070255 sectors

[root@localhost grub.d]# blkid
/dev/sda1: LABEL="System Reserved" UUID="F480E14080E10A46" TYPE="ntfs"
/dev/sda2: UUID="A264E99664E96D8B" TYPE="ntfs"
/dev/sda4: UUID="ad89d0ce-1ca8-4d93-8e7a-df13672bd598" TYPE="ext4"
/dev/sda5: UUID="44e135de-ce9d-4425-b9dd-809044354def" TYPE="ext4"
/dev/sda6: UUID="1e1ce11e-73e4-4b9b-a179-ac2f1ae79194" TYPE="swap"
/dev/sdb1: UUID="6E401B1B401AEA1B" TYPE="ntfs"

[root@localhost grub.d]# fdisk -l
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x3fcfb520

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 819199999 409496576 7 HPFS/NTFS/exFAT
/dev/sda3 1893820414 1953523711 29851649 5 Extended
/dev/sda4 819200000 1014511615 97655808 83 Linux
/dev/sda5 1893820416 1936785407 21482496 83 Linux
/dev/sda6 1936787456 1953523711 8368128 82 Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/sdb: 300.1 GB, 300067970560 bytes, 586070255 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x38553854

Device Boot Start End Blocks Id System
/dev/sdb1 * 63 586051199 293025568+ 7 HPFS/NTFS/exFAT
[root@localhost grub.d]#


Here is the error

[root@localhost grub.d]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-229.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-229.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-229.7.2.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-229.7.2.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-3388ecde99c341769ed317ddd6199584
Found initrd image: /boot/initramfs-0-rescue-3388ecde99c341769ed317ddd6199584.img
: invalid option

Anyone any ideas?


PMEmail Poster
^
+X^N
 Posted: Jul 11 2015, 05:44 PM
Quote Post


SLF Member
***

Group: Members
Posts: 130
Member No.: 2581
Joined: 27-June 13









QUOTE
Created a 15_Windows file (logged in as root) in /etc/grub.d and made it executable
Ran the command grub2-mkconfig -o /boot/grub2/grub.cfg

The update terminates with error

Is this related to your post "Dual boot install" dated June 30 , 2015 here :
http://scientificlinuxforum.org/index.php?showtopic=3187?
.
I will start by saying that I have not used SL for about 6 months (using Wind for CAD) ;
however , I did experiment with RH7beta & SL7beta & got them to "dual boot" .
If I recall this worked "GRUB 2 does not add Windows to menu during install" :
http://scientificlinuxforum.org/index.php?showtopic=2901 ;
that post has some source information links .
So , it looks like you are on the right track.
Also ,
Do a seach on some of my earlier posts & seach generally here on "dual boot".
..
Related to your specifics :
.
1)
GRUB2 changed the partition numbering convention :
"Partition numbers in GRUB device names now start at 1, not 0"
http://www.gnu.org/software/grub/manual/grub.html#Changes-from-GRUB-Legacy
see also :
"What is System Reserved Partition in Windows 8 / 7" http://www.thewindowsclub.com/system-reserved-partition-windows
"Microsoft Reserved Partition" https://en.wikipedia.org/wiki/Microsoft_Reserved_Partition
"What are system partitions and boot partitions?" http://windows.microsoft.com/en-us/windows/what-are-system-boot-partitions#1TC=windows-7
"Windows and GPT FAQ" https://msdn.microsoft.com/en-us/library/windows/hardware/dn640535%28v=vs.85%29.aspx
.
The importance is , rather than (hd0,1)
you might need to point to (hd0,2)
.
2)
Additional source info. reference links :
GRUB 2 Manual :
"Chain-loading an OS"
http://www.gnu.org/software/grub/manual/grub.html#Chain_002dloading
.
"not detect other operating systems in the grub list":
https://bugs.centos.org/view.php?id=7227#c20093
has :
# grub2-mkconfig --output=/etc/grub.cfg
&
further on that same posting :
https://bugs.centos.org/view.php?id=7227#c20093
"I was having a similar issue, until I realized that I'd not mounted the NTFS drive/partition before running grub2-mkconfig, so I mounted it and it worked."
.
Finally , it looks like you issued command :
grub2-mkconfig -o /boot/grub2/grub.cfg
while my post shows :
grub2-mkconfig -o /etc/grub2.cfg
...
try that maybe
other experts please feel free to chime in
(I am no guru)
{disclaimer , disclaimer , disclaimer}

--------------------
DELL Precision 470 Workstation Xeon 3.2GHz (x2) , 2GB ECC ram ;
DELL UltraSharp 2007WFPb (L) ips monitor
Dual boot :1st installed: WinXPPro & then SL6.4 x86_64 - via 2 'everything' DVD s { GRUB going into the SL6.4 partition } ;
Updated to 6.5 via DVD s

& Steelcase vintage / old-school stenographers seat (made in Grand Rapids , MI , USA)
PMUsers Website
^
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll