LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't boot to Windows on Mepis 3.4 (https://www.linuxquestions.org/questions/linux-newbie-8/cant-boot-to-windows-on-mepis-3-4-a-440437/)

Evok3 05-01-2006 12:30 AM

Can't boot to Windows on Mepis 3.4
 
Well, things have been going fine, not had too much trouble. Untill I decided to move my 2nd hard drive.
I've got Mepis and Windows XP on different partitions of my SATA hard drive and I sued to have a backup IDE drive for my things I wanted to make sure I didn't loose. Whenever I used to boot into Windows, the grub menu would show 3 entries, Linux, HDA1, and SDA1, Windows is on the sata drive but for some reason if I selected that it wouldn't work, I'd go into some kind of prompt screen. Nothing from a normal command prompt would work. However, if I chose to boot from the backup drive, SDA1, I would then boot to Windows, no problem. Since then I no longer have that drive, I've given it to a mate who needs a spare drive, so now I can't boot into Windows. I have no idea how I could fix this, I mean I can't find anything about boot up in the control center and know next to nothing of what I could do in the command line, which I'm guessing is where I'll have to fix it from :D
If anyone can save me from loosing all my "My Documents" things and another HUGE install I'd be oh so gratefull.

Regards,

~evo

Emerson 05-01-2006 08:57 AM

First, you can mount your Windows partition(s) under Linux and access your files.
Second, we cannot help you without knowing your disks layout, please post output of fdisk -l. Furthermore, we need to see the contents of your /boot/grub/grub.conf and /boot/grub/device.map.

Evok3 05-01-2006 02:31 PM

It's not so much accessing my files I need, more actually being able to use Windows too. Here's the things you asked for:

fdisk -l:
Code:

Disk /dev/hda: 6488 MB, 6488294400 bytes
255 heads, 63 sectors/track, 788 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hda1  *          1        788    6329578+  b  W95 FAT32

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1              1        7295    58597056    7  HPFS/NTFS
/dev/sda2  *        7296        8573    10265535  83  Linux
/dev/sda3            9668        9729      498015  82  Linux swap / Solaris
/dev/sda4            8574        9667    8787555  83  Linux

Partition table entries are not in disk order

/boot/grub/device.map:
Code:

(hd0)        /dev/hda
(hd1)        /dev/sda

But there was no /boot/grub/grub.conf in there. I hope this is of some help, thanks.

~evo

Emerson 05-01-2006 03:01 PM

Well, you really need to find your grub.conf.
You have quite a mess there. GRUB is obviously installed to the MBR of hda, everything else is on sda.

One way to get your Windows to boot is by mapping drives in grub.conf, Windows won't boot if it finds itself on the second drive.

This is how Windows section in your grub.conf should look like:
Code:

rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1

Second, much cleaner way, is to make your system independent of that IDE disk. This involves installing GRUB to the MBR of sda, editing devices.map and grub.conf. Let us know if you want to go this way.

Edit: Mepis may have menu.lst file instead of grub.conf.

Evok3 05-01-2006 04:56 PM

Ok thanks for your intrest, your correct, there is a menu.lst file, here is it's contents:
Code:

timeout 15
color cyan/blue white/blue
foreground ffffff
background 0639a1

gfxmenu /boot/grub/message

title MEPIS at sda2, kernel 2.6.15-1-586tsc
kernel /boot/vmlinuz-2.6.15-1-586tsc root=/dev/sda2 nomce quiet vga=791

title Windows at sda1
rootnoverify (hd1,0)
chainloader +1

title MEMTEST
kernel /boot/memtest86.bin

I didn't exectyly understand what you meant about the mbr, but I know last time I tried to install Ubuntu, which would only let me install to the mbr of my sata drive Windows wouldn't load then either. So with Mepis I had the option of putting GRUB on the root partition(I think) which did work fine at first.

Emerson 05-01-2006 05:11 PM

Well, am I correct assuming BIOS is set to boot from IDE? If yes, then add those map lines to the Windows section. Probably this makeactive line is not needed, it won't hurt either.

title Windows at sda1
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1

Evok3 05-01-2006 05:20 PM

no, sorry, it's set to boot from my sata drive. I don't know why there is a boot flag for my IDE drive. As far as I can tell it boots from my second partition(Mepis root) of my sata drive.

Emerson 05-01-2006 05:32 PM

If BIOS is set to boot from SATA, then you need to swap entries in device.map.

(hd0) /dev/sda
(hd1) /dev/hda

Your menu.lst should look like this:

title MEPIS at sda2, kernel 2.6.15-1-586tsc
root (hd0,1)
kernel /boot/vmlinuz-2.6.15-1-586tsc root=/dev/sda2 nomce quiet vga=791

title Windows at sda1
rootnoverify (hd0,0)
makeactive
chainloader +1

Edit: Also make sure GRUB is installed to the MBR of sda or it wont work.

Evok3 05-01-2006 05:48 PM

ok I just changed my menu.lst, so it looks like this:
Code:

timeout 15
color cyan/blue white/blue
foreground ffffff
background 0639a1

gfxmenu /boot/grub/message

title MEPIS at sda2, kernel 2.6.15-1-586tsc
kernel /boot/vmlinuz-2.6.15-1-586tsc root=/dev/sda2 nomce quiet vga=791

title Windows at sda1
rootnoverify (hd1,0)
chainloader +1

title MEMTEST
kernel /boot/memtest86.bin

and it didn't work still, just goes to a GRUB prompt when I select Windows. I tried this before you mentioned about installing it on the MBR so maybe thta was why. If I've already got GRUB installed on my root partition how do I go about putting it on my MBR? Sorry for dragging this out but I really have no idea what I'm doing, though I'm learnin quick I think :D

Thanks,

~evo

Emerson 05-01-2006 05:52 PM

Did you also correct your device.map? And you should add makeactive to Windows section because sda1 is not bootable for Windows if partition is not active.
If you get GRUB prompt then it is already installed to the MBR.

Edit: just saw you still have (hd1,0) under Windows, fix it.

Evok3 05-01-2006 06:20 PM

I'm typing this from Windows :D You fixed my problem, thank you so much. I learnt a little along the way too :) Again, thanks, it's really appreciated.

Regards,
~evo

Emerson 05-01-2006 06:29 PM

Glad to hear it. :)


All times are GMT -5. The time now is 10:31 AM.