You are not logged in.
Hi,
I've just setup dual boot with Win7, but due to Win7 being encrypted, I can't touch the MBR. Thus, I used a program called BCDEdit to point to partition where I have Linux in order to boot using Win's bootloader.
So, on boot, I get a Windows menu and arrow down to Arch's entry, which points it to /dev/sda2.
/dev/sda2 contains my separate /boot partition since I'm encrypted.
I installed grub with:
# grub
> root (hd0,1)
> setup (hd0,1)
And my menu.lst is like so:
# (1) Arch Linux
title Arch Linux
root (hd0,1)
kernel /vmlinuz26 root=/dev/mapper/root cryptdevice=/dev/sda3:root ro
initrd /kernel26.img
When Win does whatever it does, however, I get a grub shell rather than it booting. If I type in exactly what it says above, however, I can then boot. In other words, I get the Win boot menu, choose arch and then it looks like this:
grub >
So I type in:
grub > root (hd0,1)
grub > kernel /vmlinuz26 root=/dev/mapper/root cryptdevice=/dev/sda3:root ro
grub > initrd /kernel26.img
grub > boot
And it boots.
So... I've either installed grub to the wrong place or it's not finding my menu.lst for some reason. Any suggestions. I didn't see too much help for installing grub to a partition rather than the MBR. Should I have done:
grub > root (hd0,1) # tells grub where stag1 and so are, but then done
grub > setup (hd0,2) # so the bootloader goes on the actual root partition instead of boot?
?
Not sure what to do.
Thanks!
Offline
My guess is that you didn't copy the first 512 bytes of your linux boot partition into the windows one with the BCDedit. I think the best way is to boot into linux (via cdrom or however) then stick a USB in. Mount it as vfat or whatever, into /mnt/stick, then do this
mkdir /mnt/stick
mount /dev/sdb1 /mnt/stick (assuming this is where your USB is)
my_booter=/dev/sda2 (your separate linux boot partition)
dd if=$my_booter of=/mnt/stick/linux.bin bs=512 count=1
This will make sure you copy all of it.
Now boot into Windows. Copy that linux.bin directly into your C: drive.
Then do the rest of the BCDedit commands, substituting the ID you get from running the first command where it says {ID}:
bcdedit /create /d “Linux” /application BOOTSECTOR
bcdedit /set {ID} device partition=c:
bcdedit /set {ID} path \linux.bin
bcdedit /displayorder {ID} /addlast
bcdedit /timeout 30
Again my guess is that you didn't fully copy it over, so try doing it this way, maybe. It looks like you had BCDedit "point to your linux partition".. which I don't understand. I'm really curious how you did that exactly. But anyway, this is how I did it, and I just did it 5 minutes ago.
Last edited by solostyle (2011-07-29 21:28:51)
Offline
@solostyle: thanks for the reply. I wish I had recalled this. I ended up getting this working... but don't recall what I did. I wrote it up on Arch Wiki, though.
--- HERE is the arch wiki article
--- HERE is my forum post that inspired it
From the looks of the dates, I wrote this post just before finding the solution, but I must have forgotten to come back and close this out...
Glad you got it working!
Offline