Strange dual boot difficulties (XP and Mint 5) - need advice

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Husse

Re: Strange dual boot difficulties (XP and Mint 5) - need advice

Post by Husse »

This post is so long that I lost track of what you did....
Anyway
when you first installed Mint it installed grub to (hd0) which is the MBR of the disk Mint is on - neither Mint nor any other Linux can know that you have other disks with an OS on that are first in the BIOS boot order - so the grub was correct and you should leave it at that - ie chainload XP from the 80 GB disk
When this happened "However, upon rebooting, the computer loaded straight into XP." this was because grub was on another MBR than the one first in boot sequence as you suspected
So you now have to change the settings in menu.lst for XP
Remember XP can't boot from "anywhere" you have trick it into believing that it boots from C
Because of this you may have ntldr on what was the first disk at some time and xp on another - but that should not matter....
You must have something like
map (hd0) (hd1)
map (hd1) (hd0)
The (hd0) always to be in the same place and in the other places the (hdx) of the Windows disk
You could boot into Mint and look at the other disks to find out where XP is and if ntldr is on the same disk
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Husse

Re: Strange dual boot difficulties (XP and Mint 5) - need advice

Post by Husse »

Sorry I should have expressed myself somewhat diferently - it's always good with facts - it's only that I got overwhelmed....
This is really strange, and perhaps I should call in some help :)
Anyway inside Mint you should be able to look into the disks - ntldr is not a hidden file I believe
Fred

Re: Strange dual boot difficulties (XP and Mint 5) - need advice

Post by Fred »

Greetings gentlemen,

You know, sometimes when you work with a problem long enough without a solution, you develop a mental block.

What say we back up, take a deep breath, and start fresh here.

@ madmanmick

Please fix everything back, including your boot sequence, so it boots directly into Windows.

Then use the Gparted live cd and post screen shots of all your drives.

Then post your Mint /boot/grub/menu.lst file.

If you will do this in sequence, and post this information, We may be able to help you better.

Fred
Fred

Re: Strange dual boot difficulties (XP and Mint 5) - need advice

Post by Fred »

madmanmick,

OK, I really can't tell you were you put the Gparted images. Let's do this. Post your /etc/fstab file from Mint. Also post your Mint /boot/grub/menu.list file. If you can't boot into Mint, you can use the Mint live cd to find and copy these files.

With the bios set however it has to be set to boot directly into Windows, run the Live cd of Gparted, (url below), and write down the partition table, ie. like I have below. Send me that too. It is important that the BIOS be set so that it will boot directly into windows when you run the Live cd of Gparted though.

http://sourceforge.net/project/showfile ... _id=271779

sda1.... NTFS...... 50 Gig....... Windows
sda2.... NTFS...... 25 Gig....... storage
sda5.... ext3....... 10 Gig....... /
sda6.. etc....................
etc.....

Maybe the above will be easier to do. I really do need that information to help though.

If you have questions, post back.

Fred
Husse

Re: Strange dual boot difficulties (XP and Mint 5) - need advice

Post by Husse »

Fred is your helper here, but he is not quite well at the moment - hurt his back
This is far too much for me to read in on again and I know I have difficulties with this...
Husse

Re: Strange dual boot difficulties (XP and Mint 5) - need advice

Post by Husse »

OK Fred is limiting his computer time right now
Can you boot into Mint? If I understand you right you can
Do so and post the outcome of

Code: Select all

sudo sfdisk -l
The best would be if you can have Mint in the position you want it to be
I strongly suspect your troubles has to do with that you assign the wrong partitions to the different OS you have
Husse

Re: Strange dual boot difficulties (XP and Mint 5) - need advice

Post by Husse »

If i were to reinstall GRUB to my Windows drive (hd0), how would i do that? Do i run the Mint Live CD (I dont want to have to boot into HDD Mint because that changes the BIOS boot order) and reinstall the GRUB through terminal?
Yes - spot on
http://www.linuxmint.com/wiki/index.php ... _your_grub
This can be done from the live CD
Be very careful to search for grub
Study the menu.lst carefully first so the chainloading gets right
You have the supergrub disk - that can restore the MBR to the "Win way" - you better look at how to do that first
Fred

Re: Strange dual boot difficulties (XP and Mint 5) - need advice

Post by Fred »

madmanmick,

I apologize for being so tardy with my assistance. The partition table that you posted will work just fine. What is important is to not get confused by changing it in bios. You need to leave it as you showed it to me so that it boots directly into windows without a problem. That puts windows on sda1, which is where it needs to be.

Your grub menu.lst file will have to be corrected and also you fstab file will need major changes.

I will make a commitment to you. I will redo those two files and post them today. Just give me a bit more time. I'll post back after a while.

Fred
Husse

Re: Strange dual boot difficulties (XP and Mint 5) - need advice

Post by Husse »

Thanks Fred - I read and write so many posts that I actually get confused over these a bit more complicated ones
Fred

Re: Strange dual boot difficulties (XP and Mint 5) - need advice

Post by Fred »

madmanmick,

Ok, you have a little editing to do. :-)

You need to do all this with your bios set the way it was when you sent me the partition table. So Windows will boot. Use the SuperGrub disk to boot into the Mint install. It might be flaky but it should work. Do not try to fix anything with SuperGrub, just use it to boot the Mint install.

If this won't work you will have to use the Mint live cd to do the editing with. But try what I suggested above first.

Open your Mint /etc/fstab file for editing and remove everything that is in it. Replace it with what I have in the code box labeled "fstab" below.

Open your Mint /boot/grub/menu.lst file for editing and remove everything in it and replace with what I have in the code box labeled "menu.lst" below.

Type in a terminal:

cd /media

sudo mkdir sda1

sudo mkdir sda5

sudo mkdir sdc1

close terminal

Make sure your bios is set like it was when you gave me the partition table. ie., so Windows would boot.

Open a terminal and type:

sudo grub

root (hd1,0)

setup (hd0)

quit

Close terminal and reboot.

fstab

Code: Select all

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0

# /dev/sdb1	UUID=cb194486-527f-4821-a8a3-c1970c765fd4
/dev/sdb1	/ ext3 relatime,errors=remount-ro 0 1

# /dev/sda1
/dev/sda1	/media/sda1	ntfs	defaults,umask=007,gid=46	0	2

# /dev/sda5
/dev/sda5	/media/sda5	ntfs	defaults,umask=007,gid=46	0	2

# /dev/sdc1
/dev/sdc1	/media/sdc1	ntfs	defaults,umask=007,gid=46	0	2

# /dev/sdb5	UUID=b8781941-0823-456b-8c41-52c77804a542
/dev/sdb5	none swap sw 0 0

/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0


menu.lst

Code: Select all

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-legacy-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default 0

gfxmenu=/etc/grub/message.elyssa

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

# Pretty colours
color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/sdb1 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd1,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery mode) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Linux Mint, kernel 2.6.24-16-generic
root (hd1,0)
kernel /boot/vmlinuz-2.6.24-16-generic root=/dev/sdb1 ro quiet splash
initrd /boot/initrd.img-2.6.24-16-generic

title Linux Mint, kernel 2.6.24-16-generic (recovery mode)
root (hd1,0)
kernel /boot/vmlinuz-2.6.24-16-generic root=/dev/sdb1 ro single
initrd /boot/initrd.img-2.6.24-16-generic

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root

title      Microsoft Windows XP
root      (hd0,0)
savedefault
makeactive
chainloader   +1

title
root

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sdc1

title Microsoft Windows XP Home Edition
root (hd2,0)
makeactive
savedefault
map (hd0) (hd2)
map (hd2) (hd0)
chainloader +1
I was left unsure if sdc1 was another copy of Windows. I made the assumption it was and set it up in the menu. If it isn't, it won't boot, of course. If you want access to your ntfs partitions in your /home folder let me know and we can fix that easily. Right now you should have access through /media to those partitions.

I am sorry I took so long, but I just couldn't sit at the computer long enough to do this until now.

Fred

PS: In order for all this to work you must leave your bios set like it was when you sent me the partition table. If you change the bios settings you will scramble everything again.
Fred

Re: Strange dual boot difficulties (XP and Mint 5) - need advice

Post by Fred »

Husse,

No problem sir. Anytime I can help, fell free to call on me. I know how busy you are. I really don't see how you do it sometimes. I am always happy to do what I can.

Fred
Fred

Re: Strange dual boot difficulties (XP and Mint 5) - need advice

Post by Fred »

madmanmick,

When you complete the tasks that I gave you above, you will have installed grub to the MBR of sda.

As I said in my earlier post, the secret is to not tamper with your bios settings. Put them like they were when you gave me the partition table and leave them like that. Changing the bios settings changes the partition table in the MPT, which scrambles everything.

Good luck,

Fred
Fred

Re: Strange dual boot difficulties (XP and Mint 5) - need advice

Post by Fred »

madmanmick,

Well, based on your previous experience I would do it just like you did before. Then the files I did will still be correct.

When you are finished check your partition table and see if it is still like what you sent me. If it is, all the instructions I gave you will still be accurate. Just make sure your bios is set where you are going to leave it. Remember, every time you change it you scramble the master partition table and all bets are off. :-)

Fred
Fred

Re: Strange dual boot difficulties (XP and Mint 5) - need advice

Post by Fred »

madmanmick,

Set your bios exactly the way it was when Windows was booting properly and you got the partition table you posted to me.

Try booting. Then use the Mint live cd and open Gparted and check the partition table and see if it is still exactly like what you posted for me.

If it is still all the same then follow my original instructions. Don't mess with the bios.

Fred
Fred

Re: Strange dual boot difficulties (XP and Mint 5) - need advice

Post by Fred »

Is this like it was when you posted it? It appears that the installer is not seeing this partition table when it installs, so the partitions are not correctly identified in the install. I believe that is why your fstab and menu.lst were wrong.

Now that it is installed, we should be able to fix the fstab and menu.lst and reinstall grub and be ok. At least that is what I am thinking. I posted everything you should need to do that. Just follow the instructions I posted earlier.

Fred
Fred

Re: Strange dual boot difficulties (XP and Mint 5) - need advice

Post by Fred »

madmanmick,
ok... assuming you are on the Mint live cd desktop. go to /media/sdb1. You should see the file system of your Mint install. open /boot and you should see the grub folder. open the grub folder and you should see a file called menu.lst. If grub is installed anywhere there will be a grub folder containing a menu.lst on /media/sdb1/boot

To install grub you use the root and setup commands. refer to my instructions. That is how grub is installed. Like I said before, if you follow my instructions you will have installed grub to the MBR of what is currently sda, which I hope is the drive that your Windows install is still on. :-)

To edit the menu.lst from the live cd type:

gksu gedit /media/sdb1/boot/menu.lst


To edit fstab from the live cd type:

gksu gedit /media/sdb1/etc/fstab

I think I am seeing the confusion now. You are having a hard time editing the actual hard drive Mint install.

Post back if you don't understand what I just posted.

Fred

EDIT: When you look at /media/sdb1, if you don't see your Mint file system then look at /media/sda1 and see if it is there. If it is adjust the editing commands above to reflect that. I think it will be on /media/sdb1 however.
Fred

Re: Strange dual boot difficulties (XP and Mint 5) - need advice

Post by Fred »

madmanmick,

No matter where grub is installed there is a grub folder placed in /boot of the Mint install. If you don't have a grub folder in /boot of the Mint install file system it says that grub was not installed at all... anywhere. You can not see where the grub kernel is installed. the only indication that you have is the confirmation you receive when you run the setup command.

If you tried to install it to (hd0) the last time, install it to (hd1) this time. At this point, I don't care where it installs. I will be happy if it installs anywhere. We can always change the grub kernel location, but it is a lot harder to get the other half of grub into the /boot folder.

Fred

EDIT: I have seen... or actually heard of a couple of systems that had a problem with the hd notation. Try sdb as the location for the grub and see if it will take it.
Fred

Re: Strange dual boot difficulties (XP and Mint 5) - need advice

Post by Fred »

madmanmick,

This gets stranger all the time... lol

I know, it isn't funny. I am sure it is quite frustrating on your end.

Maybe it is actually seeing sda as sdb. Try installing grub to the mbr of the other disk, sdb. It is booting off of one of them.

run 'sudo grub':
root (hd1,0)
setup (hd1)
quit

That should put the grub kernel on sdb. Maybe Linux is seeing it as sdb when the computer is seeing it as sda. It's worth a try and shouldn't hurt anything.

A note on the above commands. The root command tells the grub kernel where the menu.lst is. The setup command tells where to install the grub kernel. The grub kernel is very small and to put it very simply serves to point and execute the commands in the menu.lst with the help of stage 2 which is also located in the /boot/grub folder.

Fred
ukstar

Re: Strange dual boot difficulties (XP and Mint 5) - need advice

Post by ukstar »

I am not an expert but this is the way I have installed dual boot for various distros in the past, and it works for me.
I have two sata hard drives, XP on the first and Mint on the second.
This is far the easiest way to dual boot I have found so far.

I like to keep my XP MBR, don't like any linux distro overwriting XP.
I always set up a boot, a swap and the "/" partitions.
When installing Mint or any other distro that let's you choose where to put the mbr,
click on advanced and put your mbr on the first sector of boot partition, then carry on with the installation.
When you re-boot you will obviously only get Windows.
Now you download bootpart from http://winimage.com/winimage.htm. Make sure the .exe is on the root C:\ partiton in Windows.

OK. Now run bootpart and you will see Mint there on your second drive.
You should get something like
1 type=83*, thats what you want,
type;
bootpart 1 mint.lnx Mint

exit
reboot
You should now see Windows XP and Mint.

This is my menu.lst
Also comment out, otherwise you will get that message and think it's not working.
# gfxmenu=/etc/grub/message.elyssa

title Linux Mint, kernel 2.6.24-18-generic
root (hd1,0)
kernel /vmlinuz-2.6.24-18-generic root=/dev/sdb3 ro quiet splash
initrd /initrd.img-2.6.24-18-generic

title Linux Mint, kernel 2.6.24-18-generic (recovery mode)
root (hd1,0)
kernel /vmlinuz-2.6.24-18-generic root=/dev/sdb3 ro single
initrd /initrd.img-2.6.24-18-generic

title Linux Mint, kernel 2.6.24-16-generic
root (hd1,0)
kernel /vmlinuz-2.6.24-16-generic root=/dev/sdb3 ro quiet splash
initrd /initrd.img-2.6.24-16-generic

title Linux Mint, kernel 2.6.24-16-generic (recovery mode)
root (hd1,0)
kernel /vmlinuz-2.6.24-16-generic root=/dev/sdb3 ro single
initrd /initrd.img-2.6.24-16-generic

title Linux Mint, kernel memtest86+
root (hd1,0)
kernel /memtest86+.bin

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Windows XP Professional x64 Edition
root (hd0,0)
savedefault
chainloader +1

You can of course set up within Windows to make Mint the default.
Hope this helps
Locked

Return to “Installation & Boot”