PDA

View Full Version : Dual Booting Problem



COKEDUDE
May 25th, 2010, 08:22 PM
I'm having difficulty with dual booting mint and windows xp. I've seen many people say that the Boot Info Script will help so I got that to save some time. I'm able to boot into mint just fine with no problems. Unfortunately the boot menu is not showing up at all. I'm pretty sure part of my problem lies in the /etc/default/grub file. I know I need to comment out "GRUB_HIDDEN_TIMEOUT=0" for starters. When I use the live cd I can edit the file fine, but I can't get the sudo update-grub command to work. When I'm in my mint system I can't save the /etc/default/grub file. I can't boot into XP at all.


I followed this guide to try to fix my grub. I'm not sure if that helped at all. Any help would be greatly appreciated.
http://ubuntuforums.org/showthread.php?t=1014708

http://bootinfoscript.sourceforge.net/


Boot Info Script 0.55 dated February 15th, 2010

============================= Boot Info Summary: ==============================

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
partition #1 for /boot/grub.

sda1: __________________________________________________ _______________________

File system: ext3
Boot sector type: -
Boot sector info:
Operating System: Linux Mint 9 Isadora
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda2: __________________________________________________ _______________________

File system: Extended Partition
Boot sector type: Unknown
Boot sector info:

sda5: __________________________________________________ _______________________

File system: swap
Boot sector type: -
Boot sector info:

sda6: __________________________________________________ _______________________

File system: ext3
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:

sda3: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files/dirs: /boot.ini /ntldr /NTDETECT.COM

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders, total 195371568 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sda1 2,048 20,000,767 19,998,720 83 Linux
/dev/sda2 20,002,814 88,000,511 67,997,698 5 Extended
/dev/sda5 20,002,816 28,000,255 7,997,440 82 Linux swap / Solaris
/dev/sda6 28,002,304 88,000,511 59,998,208 83 Linux
/dev/sda3 * 88,004,070 195,366,464 107,362,395 7 HPFS/NTFS


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/sda1 4fb33fae-d738-405d-8ba1-bc1ede832411 ext3
/dev/sda2: PTTYPE="dos"
/dev/sda3 D07C698F7C697160 ntfs
/dev/sda5 51e07bf0-b029-416c-bfdb-5a18372d8232 swap
/dev/sda6 4fa4e92e-3532-48fd-a83d-6ea340a669b6 ext3
/dev/sda: PTTYPE="dos"

============================ "mount | grep ^/dev output: ===========================

Device Mount_Point Type Options

aufs / aufs (rw)
/dev/sr0 /cdrom iso9660 (ro,noatime)
/dev/loop0 /rofs squashfs (ro,noatime)


=========================== sda1/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/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
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
}
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 4fb33fae-d738-405d-8ba1-bc1ede832411
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 4fb33fae-d738-405d-8ba1-bc1ede832411
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
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 ###
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 4fb33fae-d738-405d-8ba1-bc1ede832411
insmod png
if background_image /boot/grub/linuxmint.png ; then
set color_normal=white/black
set color_highlight=white/light-gray
else
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
fi
### END /etc/grub.d/06_mint_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Linux Mint 9, 2.6.32-22-generic-pae (/dev/sda1)" --class linuxmint --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 4fb33fae-d738-405d-8ba1-bc1ede832411
linux /boot/vmlinuz-2.6.32-22-generic-pae root=UUID=4fb33fae-d738-405d-8ba1-bc1ede832411 ro quiet splash
initrd /boot/initrd.img-2.6.32-22-generic-pae
}
menuentry "Linux Mint 9, 2.6.32-22-generic-pae (/dev/sda1) -- recovery mode" --class linuxmint --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 4fb33fae-d738-405d-8ba1-bc1ede832411
echo 'Loading Linux 2.6.32-22-generic-pae ...'
linux /boot/vmlinuz-2.6.32-22-generic-pae root=UUID=4fb33fae-d738-405d-8ba1-bc1ede832411 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-22-generic-pae
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_lupin ###
### END /etc/grub.d/10_lupin ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 4fb33fae-d738-405d-8ba1-bc1ede832411
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 4fb33fae-d738-405d-8ba1-bc1ede832411
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep --interruptible 3 ; then
set timeout=0
fi
fi
fi
### 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 ###

=============================== sda1/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=4fb33fae-d738-405d-8ba1-bc1ede832411 / ext3 errors=remount-ro 0 1
# /home was on /dev/sda6 during installation
UUID=4fa4e92e-3532-48fd-a83d-6ea340a669b6 /home ext3 defaults 0 2
# swap was on /dev/sda5 during installation
UUID=51e07bf0-b029-416c-bfdb-5a18372d8232 none swap sw 0 0

=================== sda1: Location of files loaded by Grub: ===================


9.4GB: boot/grub/core.img
9.3GB: boot/grub/grub.cfg
9.4GB: boot/initrd.img-2.6.32-22-generic-pae
9.4GB: boot/vmlinuz-2.6.32-22-generic-pae
9.4GB: initrd.img
9.4GB: vmlinuz

================================ sda3/boot.ini: ================================

[boot loader]
timeout=1
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOW S
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader on sda2

00000000 b2 66 21 9a b7 ca 9c 31 c5 a2 c2 7c 44 a7 b4 bc |.f!....1...|D...|
00000010 99 dc 80 1f 01 01 06 97 3a 01 10 a9 97 be de 7e |........:......~|
00000020 88 cc da 95 e5 04 00 08 a0 31 df 7e 08 3c d2 83 |.........1.~.<..|
00000030 ef dd d8 c2 a1 23 6a 30 72 30 b3 37 f6 0d 9c 17 |.....#j0r0.7....|
00000040 46 52 5e db 58 74 40 ca e2 50 d8 40 50 bc 9e e2 |FR^.Xt@..P.@P...|
00000050 5a 3c ad 96 36 bf c6 67 de c6 b1 7d 57 4f 05 58 |Z<..6..g...}WO.X|
00000060 b0 7b e1 c9 9c 9f 82 04 23 0f 2a a6 df 05 93 34 |.{......#.*....4|
00000070 e9 fc 99 8a 2d 17 eb 27 e5 1b ef dc 9b b1 91 3b |....-..'.......;|
00000080 e1 3e 22 10 d0 4d 36 dc 10 f2 3f 88 69 c8 eb 17 |.>"..M6...?.i...|
00000090 26 6a 29 9e 72 b8 d4 f6 27 6c 5b 13 30 bd 7f f9 |&j).r...'l[.0...|
000000a0 7c 50 2f b0 11 59 10 29 f9 bb 88 03 3e cb 37 2e ||P/..Y.)....>.7.|
000000b0 20 5d 73 2d a2 a6 12 1a 05 39 09 99 ee 5d 66 df | ]s-.....9...]f.|
000000c0 db 83 14 d8 95 39 9a 6d ee 19 1a a0 a9 d5 e2 0a |.....9.m........|
000000d0 fc 43 23 a2 0f 34 a3 da 07 07 22 ea 00 c2 a0 b8 |.C#..4....".....|
000000e0 20 b9 42 7d ec f5 94 c6 28 e1 14 3b 92 a5 9f 76 | .B}....(..;...v|
000000f0 a7 50 85 87 7a ca e0 7d 5f 02 df 73 18 79 4b 85 |.P..z..}_..s.yK.|
00000100 a6 ec 70 19 ed aa 29 e7 eb 06 79 1e 29 8b eb 02 |..p...)...y.)...|
00000110 60 85 15 4f 6e 0a c2 00 50 a7 27 d5 99 ac 5d 00 |`..On...P.'...].|
00000120 96 28 25 50 b2 59 9b 31 4d 05 85 e3 ce 18 0d 88 |.(%P.Y.1M.......|
00000130 b4 3b 36 85 67 98 c0 94 04 70 db eb 9f c1 8f ac |.;6.g....p......|
00000140 58 b9 56 d9 19 e7 9c fd 1a ae 40 fa 51 e4 52 46 |X.V.......@.Q.RF|
00000150 12 9c 91 c5 63 a8 4a 43 c2 d5 e5 cb 03 01 58 cb |....c.JC......X.|
00000160 99 18 4a 8c 26 29 8b ab 58 1c a7 30 48 11 91 6e |..J.&)..X..0H..n|
00000170 2e 8e c0 31 25 d2 00 d5 7c 03 bb cd 2e 33 69 86 |...1%...|....3i.|
00000180 5e 95 10 4f ef 92 30 08 57 05 37 8a 67 a2 64 38 |^..O..0.W.7.g.d8|
00000190 32 f1 18 50 ce 4a 83 ab 22 b2 0c 9f a7 7a 6c f6 |2..P.J.."....zl.|
000001a0 50 32 3d 9a 66 87 e7 a6 67 7c 99 a7 86 6d c1 99 |P2=.f...g|...m..|
000001b0 a4 22 d2 76 4b 67 c5 35 46 6d 0b 93 70 35 00 fe |.".vKg.5Fm..p5..|
000001c0 ff ff 82 fe ff ff 02 00 00 00 00 08 7a 00 00 fe |............z...|
000001d0 ff ff 05 fe ff ff 11 0c 7a 00 f1 83 93 03 00 00 |........z.......|
000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200

darkod
May 25th, 2010, 08:34 PM
Have you tried just running update-grub?

Don't know if it works the same as in ubuntu, but you can try:

sudo update-grub

If XP was installed after mint, it needs to be found by grub2.

kansasnoob
May 25th, 2010, 08:55 PM
Is Win XP in a logical partition?

Please post the output of:


sudo parted /dev/sda print

darkod
May 25th, 2010, 09:13 PM
Is Win XP in a logical partition?



I thought that too at first. But it's in sda3, primary. It's just created 'after' the extended.

oldfred
May 26th, 2010, 05:16 AM
Your boot.ini refers to partition 2 but you now have XP in sda3.

partition(2)

Change to

partition(3)

COKEDUDE
May 26th, 2010, 09:51 AM
Have you tried just running update-grub?

Don't know if it works the same as in ubuntu, but you can try:

sudo update-grub

If XP was installed after mint, it needs to be found by grub2.

I unfortunately did this the complicated way. I installed Mint then XP. I didn't know when I first started with the dual booting that would make life WAY more difficult.

When I did sudo update-grub all by itself it didn't work. So I'm guessing the grub.cfg got corrupted. When I did sudu grub-mkconfig I assume it fixed my problem with the grub.cfg. After that the sudo update-grub worked fine. So my process to fix my problem was these two commands together.

sudu grub-mkconfig
sudo update-grub



Is Win XP in a logical partition?

Please post the output of:


sudo parted /dev/sda print

I'm not sure if this is of any use to you now, but here it is.


Model: ATA Hitachi HTS72101 (scsi)
Disk /dev/sda: 100GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 10.2GB 10.2GB primary ext3
2 10.2GB 45.1GB 34.8GB extended
5 10.2GB 14.3GB 4095MB logical linux-swap(v1)
6 14.3GB 45.1GB 30.7GB logical ext3
3 45.1GB 100GB 55.0GB primary ntfs boot




Your boot.ini refers to partition 2 but you now have XP in sda3.

partition(2)

Change to

partition(3)


I assume if the two commands I listed above wasn't able to fix my problem that I would of had to edit the boot.ini in XP. Is that correct?

darkod
May 26th, 2010, 12:06 PM
You have to change to partition(3) in boot.ini anyway. Grub2 will just hand over loading to the windows boot files when XP is selected. And the boot.ini file points to a wrong partition.

Installing windows after linux by itself is no problem. You just reinstall grub to the MBR of the disk after that and all is fine. At least it should be.
A problem might occur when you are actually resizing the linux partition to make space for windows. That process can sometimes lead to corruption. Otherwise, if you had the space already as unallocated, installing windows after linux is not a problem at all.

That's why when planning to dual boot you should never allow the first OS installed to take the whole disk. You are just creating more work for you to shrink the first OS later when you need to install the second. I'm just saying this in general, I don't know which method you used.

kansasnoob
May 26th, 2010, 01:02 PM
Your boot.ini refers to partition 2 but you now have XP in sda3.

partition(2)

Change to

partition(3)

Good catch oldfred :)

I didn't see that.

COKEDUDE
May 26th, 2010, 11:43 PM
You have to change to partition(3) in boot.ini anyway. Grub2 will just hand over loading to the windows boot files when XP is selected. And the boot.ini file points to a wrong partition.

Installing windows after linux by itself is no problem. You just reinstall grub to the MBR of the disk after that and all is fine. At least it should be.
A problem might occur when you are actually resizing the linux partition to make space for windows. That process can sometimes lead to corruption. Otherwise, if you had the space already as unallocated, installing windows after linux is not a problem at all.

That's why when planning to dual boot you should never allow the first OS installed to take the whole disk. You are just creating more work for you to shrink the first OS later when you need to install the second. I'm just saying this in general, I don't know which method you used.

Are you sure you are right about my boot.ini being messed up? I just booted into my XP partition with no problems. If your right do you the Boot Info Script made a mistake? All I did was copy and paste what was in the terminal and that's what it said.