Dual boot WinXP64 and Linux Mint 13 (SOLVED)

Hi All,

having sorted my Linux installation disk problems, thanks to a massive amount of help received from experienced Linux users on this forum, I am now in a position to get started, that is, if I can get answers to the following: -

I should point out at this stage that my first installation of Linux Mint 13, because I was so ****-scared of fouling up my Win XP64 installations, was done on a separate hard drive with my crucial Win XP64 drives disconnected.

I would, however, prefer to have a dual-boot option, rather than having to go into the BIOS to select the Boot Disk. This being so, can I install Linux on a separate hard drive and still get ‘dual-boot’ or do I have to install it in a partition on my Windows XP64 hard drive?

Do I need to create a separate “Linux swap” partition (is this the equivalent of “pagefile.sys”?) or will Linux do this for itself. I propose to use the “Cinnamon” version.

In either case, where would the “boot.ini” file, or Linux equivalent if this grabs precedence, reside. I am familiar with “boot.ini” in Windows as I have used, in the past, dual 64bit and 32bit options and am familiar with editing this file.

Also, if I get a dual-boot system up and running how can I run Windows programs from Linux. I installed “Wine 1.5.14” successfully, after a few “sudo dpkg --configure -a” commands when it refused to complete, but, although “Wine” was fully installed, there is no way I could get my PCB design program to run via “Wine”. It may be that I was not using it correctly.

It is absolutely essential that I can run my CAD program, even if I am using Linux Mint as my primary OS.

I have heard that there is a program that will install Windows ‘inside’ Linux, or was it vice-versa?

Any advice on this would be much appreciated.

Thanks in advance

Tony Norton

A reminder of my hardware configuration can be seen in my last post “Cannot get a bootable Linux Mint 13 disk (SOLVED)”.

One thing at a time, first install:

I would, however, prefer to have a dual-boot option, rather than having to go into the BIOS to select the Boot Disk. This being so, can I install Linux on a separate hard drive and still get 'dual-boot' or do I have to install it in a partition on my Windows XP64 hard drive?
If you are happy with your Mint install on the separate drive then you could just re-install grub (boot loader) First boot with your Mint LiveCD

Get the list your disks and relevant partitions.
Open up a terminal and enter (that is lowercase L):

sudo fdisk -l

I would assume yours would look like this:
/dev/sda1 Windows XP (with NTFS formatting)
/dev/sda2 etc for other partitions you may have on same disk

/dev/sdb1 Linux (with EXT4 formatting). This would be your Mint installation
/dev/sdb2 Linux swap

If you rather do this one step at a time then stop here (just post the results from the last command)

Next type in terminal:

sudo mount /dev/sdb1 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc

Now change the root from the LiveCD to your installed Mint partition.

sudo chroot /mnt

Install, check, and update grub.

grub-install /dev/sda
grub-install --recheck /dev/sda
update-grub

Exit you mounted hard disk, and unmount.

exit
sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt

Shut down and turn your computer back on, and you will see the default Grub2 screen.

@ Sezo

Isn’t installing GRUB to the Windows drive overcomplicating things ?

If he already has Mint on a separate hard drive and is using the BIOS to select the boot device … wouldn’t it be easier just to set the Mint drive as the primary HDD, then let the already installed GRUB pick up the Windows installation ?


My advice would be rather than install the GRUB bootloader to the drive with Windows on it … let the GRUB bootloader you ALREADY have installed pick up the Windows drive and chainload it.

So …

Go into the BIOS and set the Drive you have Mint on as the FIRST (Primary) hard drive (Windows drive SECOND) … or just swap the data cables on the drives … then let it boot into Mint, open a terminal and run:

sudo update-grub

GRUB should detect Windows on the second drive and add it to the GRUB boot menu.

No need to install GRUB to the Windows drive :slight_smile:

And no need to reinstall Mint :slight_smile:


Following SeZo’s “one step at a time” idea …

Swap the data cables on your 2 hard drives (or change the boot order in the BIOS) … so both drives are attached, but it boots into Mint without user input … then open a terminal (Ctrl+Alt+T) and send the output from:

sudo fdisk -l

so we can verify the Linux drive is /dev/sda

if it is … you can just sudo update-grub


In answer to your questions …

No Linux can be either on the same drive as Windows, or on a separate drive.

It’s “best” to have a separate swap partition, but depending on the install it would likely be set up for you … but it can be set up as a file … yes it’s the same as the pagefile.sys

WINE … it can be difficult (or impossible) to get Windows applications to run properly in WINE, we may be ale to give more detaiss if you can name the application … but in a worse case scenario you could always install Windows in a virtual machine “inside” Mint using something like Virtualbox, that way your Windows application ARE running in Windows, but there’s no need to reboot.

I think that’s covered your questions ? … but if I’ve missed anything, you know what to do … ask :wink:

Knew this will come back and bite me :cry:
But, that is very much the setup I am using now:
/dev/sda1 WinXp
/dev/sda5 to 7 Salix

/dev/sdb1 to 3 Linux Mint Debian
boot controlled by Mint with grub installed to the MBR on /dev/sda :wink:

I agree, leaving the Windows drive as /dev/sda … then installing GRUB stage 1 to /dev/sda (MBR) which then passess to GRUB stage 2 on /dev/sdb1 WILL work.

I just think it would be easier to swap the data cables (or drive order in the BIOS), making the Mint drive /dev/sda … then update GRUB to chainload Windows on (what is now /dev/sdb).

That should also have the added benefit of not making Window unbootable if the Mint drive is ever removed.
(ie. it make NO changes to the Windows drive)

Or am I missing something glaringly obvious due to tiredness ? … and believe me I’m knackered ATM :wink:

No, you are probably (more than likely) right but I seem to have some recollection that Windows “LIKES” to be on the first partition of the first HDD ??? :-\

I think there is some misunderstanding about this … AFAIK, the Windows bootable partition NEEDS to be the FIRST PARTITION of a drive (and have the boot flag set), but it can be the first partition of the second drive.
(but don’t quote me on that just yet :wink: )

In any case, there’s absolutely no risk (to Windows OR Linux) trying it first :slight_smile:


@ Tony Norton

These ARE both internal drives ? and it’s a desktop PC not a laptop ?

If so, with BOTH hard drives attached, can you boot to Mint then open a terminal (Ctrl+Alt+T), and run:

sudo fdisk -l

and post what’s returned in the terminal back here.

Hello again,

I’m not quite there yet, but I’m getting there.

To clarify the system/disk situation, it is a desktop PC (self-built on the Mobo described earlier) and fitted with 3 internal hard drives.

CH 0 Master 40GB IDE with Linux Mint Cinnamon installed. This is connected on the end of a dual connector IDE cable.

CH0 Slave 80GB IDE partitioned “E:” and “F:” for my design work data and personal data respectively, connected on first IDE connector

CH2 Master 160GB SATA II partitioned “C” and “D”. “C” for my Win XP Pro 64 installation and “D” a very small partition with nothing on it but exists to maintain the historical lettering of my data drive.

The Linux installation is new and was done with all hard drives connected.

Setting the Linux disk in the BIOS as the ‘first’ in the boot order I do get a boot option menu, which is only on the screen for a very short time. I did manage, by trial and error, to find which option allows me to boot to Windows.

So question 1: -

What is this file called, and where can I find it to edit it?
I would like to modify the text to instantly recognize the options and, if possible, to increase the time I have to read and make a choice.

Entering the suggested “sudo fdisk -l” in the terminal yielded the following: -


Disk /dev/sda: 160 GB, 160040803840 bytes

Device Boot Start End Blocks ID System

/dev/sda1 *63 312560639 156280288+ 7 HPFS/NTFS/exFAT
/dev/sda2 312560640 3125767704 8032+ f W95 Ext’d (LBA)
/dev/sda5 312560703 3125767704 8001 7 HPFS/NTFS/exFAT

Disk /dev/sdb: 40.0 GB, 40019582464 bytes

Device Boot Start End Blocks ID System

/dev/sdb1 * 2048 78161919 39079936 83 Linux

Disk /dev/sdc: 80.0 GB, 80026361856 bytes

/dev/sdc2 * 16065 156296384 78140160 5 Extended
/dev/sdc5 16135 20482874 10233370 7 HPFS/NTFS/exFAT
/dev/sdc6 20482939 3125767704 67906723 7 HPFS/NTFS/exFAT


I’ve left out all the guff about sectors etc and, because I didn’t know how to copy and paste from Linux terminal had to create a document and type the above in by hand.

Is this the sort of thing you expected to see?

Question 2: -

I’ve tried to download and install, without success, “VirtualBox”, but couldn’t find a version for Mint 64. Wher is the best place to get this from?

Thanks for all your help, and sorry to have kept you up so late that you land up totally knackered!

Cheers

Tony N

OK, boot to Mint … open a terminal (Ctrl+Alt+T) and run:

gedit /boot/grub/grub.cfg

and post the contents back here

Then run:

gedit /etc/default/grub

And post the contents of that file too.

Then I’ll explain what needs changing, and how to do it :slight_smile:

[b]Hi Mark,

the .cfg option came up with this lot: -[/b]

[i]#

DO NOT EDIT THIS FILE

It is automatically generated by grub-mkconfig using templates

from /etc/grub.d and settings from /etc/default/grub

BEGIN /etc/grub.d/00_header

if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default=“0”
if [ “${prev_saved_entry}” ]; then
set saved_entry=“${prev_saved_entry}”
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z “${boot_once}” ]; then
saved_entry=“${chosen}”
save_env saved_entry
fi
}

function recordfail {
set recordfail=1
if [ -n “${have_grubenv}” ]; then if [ -z “${boot_once}” ]; then save_env recordfail; fi; fi
}

function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root=‘(hd1,msdos1)’
search --no-floppy --fs-uuid --set=root e711845f-a06d-483b-a510-104185286ef0
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_msdos
insmod ext2
set root=‘(hd1,msdos1)’
search --no-floppy --fs-uuid --set=root e711845f-a06d-483b-a510-104185286ef0
set locale_dir=($root)/boot/grub/locale
set lang=en_GB
insmod gettext
fi
terminal_output gfxterm
if [ “${recordfail}” = 1 ]; then
set timeout=-1
else
set timeout=10
fi

END /etc/grub.d/00_header

BEGIN /etc/grub.d/05_debian_theme

set menu_color_normal=white/black
set menu_color_highlight=black/light-gray

END /etc/grub.d/05_debian_theme

BEGIN /etc/grub.d/06_mint_theme

set menu_color_normal=white/black
set menu_color_highlight=white/light-gray

END /etc/grub.d/06_mint_theme

BEGIN /etc/grub.d/10_linux

function gfxmode {
set gfxpayload=“$1”
if [ “$1” = “keep” ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
if [ ${recordfail} != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ “$linux_gfx_mode” != “text” ]; then load_video; fi
menuentry ‘Linux Mint 13 Cinnamon 64-bit, 3.2.0-23-generic (/dev/sdb1)’ --class linuxmint --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root=‘(hd1,msdos1)’
search --no-floppy --fs-uuid --set=root e711845f-a06d-483b-a510-104185286ef0
linux /boot/vmlinuz-3.2.0-23-generic root=UUID=e711845f-a06d-483b-a510-104185286ef0 ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.2.0-23-generic
}
menuentry ‘Linux Mint 13 Cinnamon 64-bit, 3.2.0-23-generic (/dev/sdb1) – recovery mode’ --class linuxmint --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root=‘(hd1,msdos1)’
search --no-floppy --fs-uuid --set=root e711845f-a06d-483b-a510-104185286ef0
echo ‘Loading Linux 3.2.0-23-generic …’
linux /boot/vmlinuz-3.2.0-23-generic root=UUID=e711845f-a06d-483b-a510-104185286ef0 ro recovery nomodeset
echo ‘Loading initial ramdisk …’
initrd /boot/initrd.img-3.2.0-23-generic
}

END /etc/grub.d/10_linux

BEGIN /etc/grub.d/10_lupin

END /etc/grub.d/10_lupin

BEGIN /etc/grub.d/20_linux_xen

END /etc/grub.d/20_linux_xen

BEGIN /etc/grub.d/20_memtest86+

menuentry “Memory test (memtest86+)” {
insmod part_msdos
insmod ext2
set root=‘(hd1,msdos1)’
search --no-floppy --fs-uuid --set=root e711845f-a06d-483b-a510-104185286ef0
linux16 /boot/memtest86+.bin
}
menuentry “Memory test (memtest86+, serial console 115200)” {
insmod part_msdos
insmod ext2
set root=‘(hd1,msdos1)’
search --no-floppy --fs-uuid --set=root e711845f-a06d-483b-a510-104185286ef0
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}

END /etc/grub.d/20_memtest86+

BEGIN /etc/grub.d/30_os-prober

menuentry “Windows NT/2000/XP (on /dev/sda1)” --class windows --class os {
insmod part_msdos
insmod ntfs
set root=‘(hd0,msdos1)’
search --no-floppy --fs-uuid --set=root 50804BE6804BD0E0
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry “Windows XP Professional x64 Edition (on /dev/sdc5)” --class windows --class os {
insmod part_msdos
insmod ntfs
set root=‘(hd2,msdos5)’
search --no-floppy --fs-uuid --set=root D810436D104351A4
drivemap -s (hd0) ${root}
chainloader +1
}

END /etc/grub.d/30_os-prober

BEGIN /etc/grub.d/40_custom

This file provides an easy way to add custom menu entries. Simply type the

menu entries you want to add after this comment. Be careful not to change

the ‘exec tail’ line above.

END /etc/grub.d/40_custom

BEGIN /etc/grub.d/41_custom

if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi

END /etc/grub.d/41_custom ###[/i]

and the default with this: -

[i]# If you change this file, run ‘update-grub’ afterwards to update

/boot/grub/grub.cfg.

For full documentation of the options in this file, see:

info -f grub -n ‘Simple configuration’

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian
GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash”
GRUB_CMDLINE_LINUX=“”

Uncomment to enable BadRAM filtering, modify to suit your needs

This works with Linux (no patch required) and with any kernel that obtains

the memory map information from GRUB (GNU Mach, kernel of FreeBSD …)

#GRUB_BADRAM=“0x01234567,0xfefefefe,0x89abcdef,0xefefefef”

Uncomment to disable graphical terminal (grub-pc only)

#GRUB_TERMINAL=console

The resolution used on graphical terminal

note that you can use only modes which your graphic card supports via VBE

you can see them in real GRUB with the command `vbeinfo’

#GRUB_GFXMODE=640x480

Uncomment if you don’t want GRUB to pass “root=UUID=xxx” parameter to Linux

#GRUB_DISABLE_LINUX_UUID=true

Uncomment to disable generation of recovery mode menu entries

#GRUB_DISABLE_RECOVERY=“true”

Uncomment to get a beep at grub start

#GRUB_INIT_TUNE=“480 440 1”[/i]

[b]It’s like being back in the days of MSDOS :wink:

I guess i would have to change the “TIMEOUT” figure to see it for longer but, rather than play about with it I’ll await your sound advice.

Tony N
[/b]

Yes you’re right … open a terminal and run:

sudo gedit /etc/default/grub

Find the line that reads:-

GRUB_TIMEOUT=10

and change it to something like

GRUB_TIMEOUT=20

(which will give you 20 seconds to pick which OS before it automatically boots Mint)

SAVE the file … then back in the terminal, run:

sudo update-grub

If you’d prefer it to automatically boot Windows rather than Mint (if you don’t choose an OS within 20 seconds) let us know.

Hi All,

I did the “GRUB_TIMEOUT” mod without any problem, many thanks for that, and, after fumbling around a bit, came to the following conclusions: -

  1.        "gedit" is fairly obviously an editing facility, but if one wants to edit system files, e.g. "grub.cfg", one needs to start the command with "sudo".
    
  2.        That "#" at the beginning of a line is equivalent to "REM" in an MSDOS textfile. 
    
  3.        That text in quotes is a display only, non-command, entry.
    

These being my conclusions, I ran “sudo gedit /boot/grub/grub.cfg” (which is headed “do not edit this file”!?) in an attempt to modify the textual entries in the boot options so that they more closely resembled the actual construction of my system.

For instance (/dev/sdc5) is described as “Windows XP Professional x64 Edition” whereas it is actually on non-bootable partition that was formatted using XP64 and (/dev/sda1), my XP64 bootable partition, is described as “Windows 2000/NT/XP”.

So I edited the comments in quotes to match my system and saved the file. Then ran “sudo update-grub”, which appeared to happen. When I re-booted, however, I found that nothing in the boot menu had changed.

I guess I must have done something wrong, but what?

Also, could someone please tell me in which file, and what position, I should enter the command “clocksource=hpet”, so that I can turn HPET back on in the BIOS. Windows doesn’t seem to like it being [disabled] and sometimes ‘hangs’ or refuses to properly come out of standby, Linux doesn’t like it being [enabled] and refuses to boot at all.

I don’t need to make Windows the default boot option, as I’m quite happy to have Linux as the default (might push me into using it more) and for some years I ran with 3 boot options in my “boot.ini” and am quite happy to have to make a selection.

If somebody could please answer these questions for me I would be most grateful.

Tony N

OK, what happens when you run “sudo update-grub” is the os-prober searches for installed OS’s and when found modifies /boot/grub/grub.cfg accordingly (but it gets some of the user configuration from /etc/default/grub).

So when you manually edited /boot/grub/grub.cfg … all was fine till you ran “sudo update-grub” … which would have re-edited it back to how it was.

First I’ll answer your questions, then we’ll work our way through the reconfiguration of GRUB …

1) "gedit" is fairly obviously an editing facility, but if one wants to edit system files, e.g. "grub.cfg", one needs to start the command with "sudo".

Editing ANYTHING outside of your “Home” director is likely to require root privileges as the files are “owned” by root … in Ubntu/Mint/Debian/etc. you can give an application root privileges by prefixing the command with “sudo”.

Privileges, and permissions are a BIG part of any *nix OS … and one of the reasons they’re so secure :slight_smile:

In reality, any GUI application (that you want to temporarily give root privileges) should be started with gksudo rather than sudo … but gedit is OK either way.

2) That "#" at the beginning of a line is equivalent to "REM" in an MSDOS textfile.

YES … exactly the same, it’s REMarking (windows) or “Commenting” (Linux) … anything preceded with # is seen as a comment, and not code to be processed.

So if anyone ever says “comment out that line”, they mean prefix it with #

3) That text in quotes is a display only, non-command, entry.

NO … text in quotes means read as a single block … ie. ignore spaces.

otherwise any command would attempt to act on the first word, then the second, then the third, etc.

So in the grub.cfg menu entries it means print to screen ALL this text … rather than the first word, then the second, etc.


OK first lets add the clocksource=hpet kernel boot parameter then update-grub …

Open a terminal and run:

sudo gedit /etc/default/grub

find the line that reads:-

GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash”

and make it read:-

GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash clocksource=hpet”

Proofread your edit, then SAVE the file and close gedit, then back in the terminal run:

sudo update-grub

Once that’s finished … Reboot and change the HPET setting in your BIOS, and see if Mint boots

If it does … we’ll move o to the GRUB menu entries.