Grub Missing XP and W7!

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
mortymoose

Grub Missing XP and W7!

Post by mortymoose »

Good morning non sports fans..... just got me a shiny new 2tb hdd, partitioned it into 3 , installed XP on the one W7 on the other and then my first go at Mint10 on the last, I was kinda hoping , that i would then get a boot menu on restarting, where I could choose which OS , I was looking for,..... however that was not the case... after browsing the forum, I read about using the start up manager to choose which order OS to boot with, but alas, whoa betide me, under the default operating drop down menu , I can only see Linux mint, Linux mint recover and memtest...... Please pray tell wise green mint folk, where and how can I get my W7 and Xp onto the dropdown menu, I need XP to be default .... as the kids and good wench don;t like to tinker in the minty world of ours...

Awaiting thy response shortly....\

Morty....
:D
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.
User avatar
tdockery97
Level 14
Level 14
Posts: 5058
Joined: Sun Jan 10, 2010 8:54 am
Location: Mt. Angel, Oregon

Re: Grub Missing XP and W7!

Post by tdockery97 »

First thing to try is while running Mint open a Terminal. Then do the following commands:

Code: Select all

sudo grub-install /dev/sda
The MBR should be on sda.

Then:

Code: Select all

sudo update-grub
After entering this command you should see grub.config being built and showing Mint and your two windows installations. If it does, then check your startup options again and see if they are all shown.
Mint Cinnamon 20.1
spandey

Re: Grub Missing XP and W7!

Post by spandey »

Here is a link for bootinfo script. Please go thru and after execution post the result here.

http://forums.linuxmint.com/viewtopic.php?f=42&t=64044
mortymoose

Re: Grub Missing XP and W7!

Post by mortymoose »

Thanks for the effort, I have followed the steps and this is what is generated:

"morty@morty-MS-7529 ~ $ sudo grub-install /dev/sda
[sudo] password for morty:
Installation finished. No error reported.
morty@morty-MS-7529 ~ $ sudo update-grub
Generating grub.cfg ...
Found Debian background: linuxmint.png
Found linux image: /boot/vmlinuz-2.6.35-22-generic
Found initrd image: /boot/initrd.img-2.6.35-22-generic
Found memtest86+ image: /boot/memtest86+.bin
done
morty@morty-MS-7529 ~ $ "

*****************************************************
No mention of spotting any of the other OS's

I must reiterate, that this is a 2TB drive, that I partitioned into 5 parts,
1) XP on NTFS
2) W7 on NTFS
3) nothing on NTFS
4) Mint
5) A little swap space.....

I installed all the OS's in the above order, I was kinda hoping that the Mint installation would be wise enough to all me to setup the order in which to load....seeing that W7 and Xp don't want to have anything to do with recognising Linux....

Thanks
:?
mortymoose

Re: Grub Missing XP and W7!

Post by mortymoose »

Ok..... I ran the script and got the following:

*****************************************************************
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 #2 for (,msdos2)/boot/grub.

sda1: _________________________________________________________________________

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

sda5: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: According to the info in the boot sector, sda5 starts
at sector 63.
Operating System: Windows XP
Boot files/dirs:

sda6: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: According to the info in the boot sector, sda6 starts
at sector 63.
Operating System:
Boot files/dirs:

sda7: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: According to the info in the boot sector, sda7 starts
at sector 63.
Operating System: Windows 7
Boot files/dirs: /Windows/System32/winload.exe

sda2: _________________________________________________________________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Linux Mint 10 Julia
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda3: _________________________________________________________________________

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

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

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 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 16,126 3,702,227,444 3,702,211,319 f W95 Ext d (LBA)
/dev/sda5 16,128 2,063,838,419 2,063,822,292 7 HPFS/NTFS
/dev/sda6 2,063,838,483 3,292,618,139 1,228,779,657 7 HPFS/NTFS
/dev/sda7 3,292,618,203 3,702,227,444 409,609,242 7 HPFS/NTFS
/dev/sda2 * 3,702,228,992 3,899,215,871 196,986,880 83 Linux
/dev/sda3 3,899,215,872 3,907,028,991 7,813,120 82 Linux swap / Solaris


blkid -c /dev/null: ____________________________________________________________

Device UUID TYPE LABEL

/dev/sda1: PTTYPE="dos"
/dev/sda2 91c7f57c-869b-499d-bd72-0cef3488bb88 ext4
/dev/sda3 cd45e0a5-fad2-4e52-ba6e-73dc65932339 swap
/dev/sda5 509C385C9C383EB2 ntfs
/dev/sda6 01CBB709457A6930 ntfs 2Terra2
/dev/sda7 01CBB709A746BA10 ntfs 2Terra3
/dev/sda: PTTYPE="dos"

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

Device Mount_Point Type Options

/dev/sda2 / ext4 (rw,errors=remount-ro,commit=0)
/dev/sda5 /media/509C385C9C383EB2 fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)


=========================== sda2/boot/grub/grub.cfg: ===========================

#
# 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 part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set 91c7f57c-869b-499d-bd72-0cef3488bb88
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set 91c7f57c-869b-499d-bd72-0cef3488bb88
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=15
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 part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set 91c7f57c-869b-499d-bd72-0cef3488bb88
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 10, 2.6.35-22-generic (/dev/sda2)' --class linuxmint --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set 91c7f57c-869b-499d-bd72-0cef3488bb88
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=91c7f57c-869b-499d-bd72-0cef3488bb88 ro splash quiet splash
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Linux Mint 10, 2.6.35-22-generic (/dev/sda2) -- recovery mode' --class linuxmint --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set 91c7f57c-869b-499d-bd72-0cef3488bb88
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=91c7f57c-869b-499d-bd72-0cef3488bb88 ro single splash
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-22-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='(hd0,msdos2)'
search --no-floppy --fs-uuid --set 91c7f57c-869b-499d-bd72-0cef3488bb88
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set 91c7f57c-869b-499d-bd72-0cef3488bb88
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-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 ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

=============================== sda2/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
/dev/sda2 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda3 during installation
UUID=cd45e0a5-fad2-4e52-ba6e-73dc65932339 none swap sw 0 0

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


1906.4GB: boot/grub/core.img
1979.4GB: boot/grub/grub.cfg
1966.8GB: boot/initrd.img-2.6.35-22-generic
1906.4GB: boot/vmlinuz-2.6.35-22-generic
1966.8GB: initrd.img
1906.4GB: vmlinuz

*******************************************************************************
I am not a techie, but I do enjoy tinkering around when I have a wee bit of time....

I see this script can see W7 and XP, but now for the million dollar question, how to get Mint to let me choose/change my default OS....

Thanks
morty
:D
User avatar
rivenathos
Level 6
Level 6
Posts: 1070
Joined: Wed May 06, 2009 7:32 am
Location: USA

Re: Grub Missing XP and W7!

Post by rivenathos »

Not sure, but I thought Windows required installation on a Primary partition. I do not use Windows, so am just grasping at straws here.
Current hardware: a Dell OptiPlex 3010 desktop, a Dell Inspiron 531 desktop, and a Dell Inspiron 1545 laptop.
Current OS: LMDE 3
wayne128

Re: Grub Missing XP and W7!

Post by wayne128 »

As you do not have any Primary partition , during windows installation, it installer cannot make logical partition active thus it did not install the boot code on the partition.

To save you trouble on windows, you need to install windows OS on primary partitions.
mortymoose

Re: Grub Missing XP and W7!

Post by mortymoose »

So in essence a simple thing as primary and logical......

To fix this , I should reinstall both XP and W7 on primary partitions?

It;s not too much of a hassle, as both OS's are a fresh installations form this morning.....

Is there a way, i can use this Mint , to reformat both those partitions to primary parts?

Will I then be able to go back and reinstall the two Win OS's and then come back to mint and then select which os can be my default...


thanks

Morty
User avatar
rivenathos
Level 6
Level 6
Posts: 1070
Joined: Wed May 06, 2009 7:32 am
Location: USA

Re: Grub Missing XP and W7!

Post by rivenathos »

At this point, you may as well start over with a new and improved game plan. Yeah, you can move partitions around, but it may take a while. Using a Live CD would be best if you want to go that route.

You may wish to try something similar to this:
sda1 - /XP *primary
sda2 - /W7 *primary
sda4 - *extended
sda5 - /swap *logical
sda6 - /Mint *logical
sda7 - /home for Mint *logical
Last edited by rivenathos on Thu Jan 20, 2011 9:54 am, edited 1 time in total.
Current hardware: a Dell OptiPlex 3010 desktop, a Dell Inspiron 531 desktop, and a Dell Inspiron 1545 laptop.
Current OS: LMDE 3
mortymoose

Re: Grub Missing XP and W7!

Post by mortymoose »

Ok,,,,, let me slog it out later this evening...... I need to get back to work now....., but first have to put me old drive back so that the wench and the offspring can do their thing.....

Thanks for your help once again, and once I have reinstalled all three OS's on the right kinda parts, I shall endevour to report back here....

I salute you.....

:D

cheers

Morty
User avatar
rivenathos
Level 6
Level 6
Posts: 1070
Joined: Wed May 06, 2009 7:32 am
Location: USA

Re: Grub Missing XP and W7!

Post by rivenathos »

Good luck. Please share how things turn out.
Current hardware: a Dell OptiPlex 3010 desktop, a Dell Inspiron 531 desktop, and a Dell Inspiron 1545 laptop.
Current OS: LMDE 3
mortymoose

Re: Grub Missing XP and W7!

Post by mortymoose »

@rivenathos, Thanks for taking the time to help me, This issue has now been resolved, you were 100% right, all three Os's are now installed, , the grub loads first, giving me a choice between Mint or Windows Loader....

Primary and Logical, who would have thought,

Thanks...
Realheroaustralia

Re: Grub Missing XP and W7!

Post by Realheroaustralia »

I am not a techie, but I do enjoy tinkering around when I have a wee bit of time.... :roll:
ThistleWeb

Re: Grub Missing XP and W7!

Post by ThistleWeb »

Microsoft design Windows to be installed (usually) by OEM partners as the only OS a PC will ever see. They design it to take valuable resources like demanding primary partitions, although I could be wrong, it may only be the boot Windows partition that needs to be primary. They also extend the hand of OS co-existence to blasting away the MBR to ignore any mention of something they didn't make, meaning ya have to go fix it afterwards if you install Linux first.
Locked

Return to “Installation & Boot”