View previous topic :: View next topic |
Author |
Message |
BadAvocado n00b
Joined: 22 Mar 2013 Posts: 5
|
Posted: Wed May 15, 2013 4:50 pm Post subject: can't dual boot windows 7 on sdb |
|
|
What am I doing wrong? I appreciate your help in advance!
I have two disks and Gentoo (32-bit) is on sda. Disk #2 was empty, so I installed Windows 7 (32-bit) on it.
I first unplugged Gentoo / sda then installed Windows 7, so that I wouldn't accidentally overwrite the Gentoo disk. After the Windows 7 installation, I connected the Gentoo / sda disk again and did ...
Code: |
# os-prober
# grub2-mkconfig -o /boot/grub2/grub.cfg
# grub2-install /dev/sda
|
os-prober and grub2 recognized that Windows 7 was on sdb and the appropriate menu was added, but if I select Windows 7 in the boot menu, my computer just restarts.
/boot/grub2/grub.cfg
Code: |
menuentry 'Windows 7 (loader) (on /dev/sdb1)' --class windows --class os $menuentry_id_option 'osprober-chain-C6F4C248F4C23A87' {
insmod part_msdos
insmod ntfs
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 C6F4C248F4C23A87
else
search --no-floppy --fs-uuid --set=root C6F4C248F4C23A87
fi
chainloader +1
}
menuentry 'Windows 7 (loader) (on /dev/sdb1)' --class windows --class os $menuentry_id_option 'osprober-chain-C6F4C248F4C23A87' {
insmod part_msdos
insmod ntfs
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 C6F4C248F4C23A87
else
search --no-floppy --fs-uuid --set=root C6F4C248F4C23A87
fi
chainloader +1
}
|
So, I then tried Grub Legacy. In the menu.lst below, title entry 'windows 7-a' gives Error 13 and 'windows 7-b' just reboots the machine in the same way Grub2 does.
/boot/grub/menu.lst
Code: |
title Gentoo Linux 3.6.11-r2
root (hd0,0)
kernel /boot/kernel-3.6.11-gentoo-r2 root=/dev/sda3
title windows 7-a
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd0,0)
#makeactive
chainloader +1
title windows 7-b
rootnoverify (hd1,0)
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
|
Windows 7 will start normally if I unplug Gentoo / sda from the computer power source.
The only thing "odd" I can think to mention is that sdb (Windows 7) is installed on a partition that does not consume the entire space of sdb... I alloted approximately 1000GB for Windows 7, and left the rest of the disk unpartitioned (so I could return to it later and make a partition to share files easily between linux / windows)
Here are some other details:
fdisk - l
Code: |
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes, 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x3b86ca46
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 83 Linux
/dev/sda2 206848 8595455 4194304 82 Linux swap / Solaris
/dev/sda3 8595456 637741055 314572800 83 Linux
/dev/sda4 637743102 3907028991 1634642945 5 Extended
Partition 4 does not start on physical sector boundary.
/dev/sda5 637743104 1919301631 640779264 83 Linux
/dev/sda6 1919303680 3907026943 993861632 83 Linux
Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes, 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00027a1e
Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 2048002047 1024000000 7 HPFS/NTFS/exFAT
|
/etc/fstab (Gentoo on sda)
Code: |
/dev/sda1 /boot ext2 defaults,noatime 0 2
/dev/sda2 none swap sw 0 0
/dev/sda3 / ext4 noatime 0 1
/dev/sda6 /home/myusername/videos ext4 noatime 0 0
/dev/cdrom /mnt/cdrom auto noauto,user,ro 0 0
|
blkid
Code: |
/dev/sda1: UUID="76b13b88-f6df-43da-a310-8a4376bd5b83" TYPE="ext2"
/dev/sda2: UUID="a318e39d-2ead-4fcd-aaa9-67cb40ac160f" TYPE="swap"
/dev/sda3: UUID="1bd35d6a-fc5e-4f6f-a521-95fe0e900e69" TYPE="ext4"
/dev/sda5: UUID="5483b9bc-d4e0-4a1b-b0dc-92c508aad39d" TYPE="ext4"
/dev/sda6: UUID="f01bacae-baa3-4d8f-aaa0-270f108e6161" TYPE="ext4"
/dev/sdb1: UUID="C6F4C248F4C23A87" TYPE="ntfs"
|
lsblk
Code: |
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 100M 0 part /boot
├─sda2 8:2 0 4G 0 part [SWAP]
├─sda3 8:3 0 300G 0 part /
├─sda4 8:4 0 1K 0 part
├─sda5 8:5 0 611.1G 0 part
└─sda6 8:6 0 947.8G 0 part /home/myusername/videos
sdb 8:16 0 1.8T 0 disk
└─sdb1 8:17 0 976.6G 0 part
sr0 11:0 1 1024M 0 rom
|
|
|
Back to top |
|
|
666threesixes666 Veteran
Joined: 31 May 2011 Posts: 1248 Location: 42.68n 85.41w
|
Posted: Wed May 15, 2013 4:55 pm Post subject: |
|
|
did you try switching the cables around, to make windows sda and linux sdb, then reinstall grub / lilo / syslinux? (youll probably need to edit your fstab too) |
|
Back to top |
|
|
BadAvocado n00b
Joined: 22 Mar 2013 Posts: 5
|
Posted: Wed May 15, 2013 5:23 pm Post subject: |
|
|
666threesixes666 wrote: | did you try switching the cables around, to make windows sda and linux sdb, then reinstall grub / lilo / syslinux? (youll probably need to edit your fstab too) |
No, I haven't tried that yet. What exactly do I need to do? I think I need to change /etc/fstab to UUID's (or use sdb for sda), but is there anything else I should do to keep Gentoo from behaving strangely? _________________ Thank you,
Brian aka Bad Avocado |
|
Back to top |
|
|
BadAvocado n00b
Joined: 22 Mar 2013 Posts: 5
|
Posted: Thu May 16, 2013 7:09 pm Post subject: |
|
|
Ok, I switched the cables so Windows 7 is now sda and it booted fine - but I still had the problem of dual booting.
I used the Gentoo CD to mount sdb (gentoo) and chroot. I tried to install legacy grub to sda (Win7) but had problems (something about it couldn't find boot sector).
I had the bright idea that Ubuntu is usually pretty good at figuring out how to coexist with Windows and it usually finds other Linux installations too. So, I had an Xubuntu CD and installed that to the same disk as Windows, but on the 2nd partition. It found both windows 7 and Gentoo, but I still can't boot into Windows (nor Gentoo for that matter). Xubuntu uses Grub2. When choosing Xubuntu's Grub2 Windows entry, my computer just reboots.
Here's the Grub2 entry from the Xubuntu install:
Code: |
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-C6F4C248F4C23A87' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 C6F4C248F4C23A87
else
search --no-floppy --fs-uuid --set=root C6F4C248F4C23A87
fi
chainloader +1
}
|
_________________ Thank you,
Brian aka Bad Avocado |
|
Back to top |
|
|
666threesixes666 Veteran
Joined: 31 May 2011 Posts: 1248 Location: 42.68n 85.41w
|
Posted: Thu May 16, 2013 8:40 pm Post subject: |
|
|
im suggesting setting your windows as the primary master drive... /dev/sda, and linux as secondary /dev/sdb (windows doesnt like to be on slave drives in my experience) then set linux to manage boot loading... grub dump into windows's boot manager, or load linux. linux can boot fine as /dev/sdb windows will freak out if you touch anything of its boot manager. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|