LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-01-2014, 02:47 PM   #1
FarmerJohn
LQ Newbie
 
Registered: May 2014
Posts: 4

Rep: Reputation: Disabled
Unhappy Lint 16 installed in freespace same drive as Win XP but no option to boot to XP


Pure Newbeee here, I installed Mint 16 on my XP system on same drive 80GB with Win XP allocated 40GB and other 40GB as freespace installed mint in freespace (do something else) which ended with:
/boot 800MB /dev/sda5
/ 10GB /dev/sda6
/home 27GB /dev/sda7
swap 2GB /dev/sda8
device for bootloader installation was left at /dev/sda

Problem is system will only boot to Linux, never get the option to select XP.
I checked the system file /boot/grub but there is no menu.lst file

I don't know where to go from here, any help appreciated
 
Old 05-01-2014, 02:57 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,980

Rep: Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294
The partition information you posted only shows Linux. Boot Mint and open a terminal by simultaneously holding down the Ctrl+Alt+t keys and type: sudo fdisk -l(Lower Case Letter L in the command) to show your partition information and you can post it here. There should be at least one ntfs partition.

Did you use the 'Something Else' option on Installation Type page? If you left the default for bootloader installation and cana boot Mint, you may just need an entry for xp in the cfg file.

Quote:
I checked the system file /boot/grub but there is no menu.lst file
Correct. There is none and none is expected to be there as Mint uses Grub2 which has a different menu configuration file located at:
/boot/grub/grub.cfg.

Simplest thing to do is to open a terminal and run: sudo update-grub. Watch the output to see if it detects xp. If you don't get results, run: sudo os-prober and then sudo update-grub.
 
Old 05-01-2014, 03:50 PM   #3
FarmerJohn
LQ Newbie
 
Registered: May 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
yancek, thanks for quik response. I performed commands as you suggested, following is results:
Disk /dev/sda: 82.0 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders, total 160086528 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009b2c0

Device Boot Start End Blocks Id System
/dev/sda1 * 63 82317059 41158498+ 7 HPFS/NTFS/exFAT
/dev/sda2 82317310 160086015 38884353 5 Extended
/dev/sda5 82317312 83879935 781312 83 Linux
/dev/sda6 83881984 103411711 9764864 83 Linux
/dev/sda7 103413760 156162047 26374144 83 Linux
/dev/sda8 156164096 160086015 1960960 82 Linux swap / Solaris

Disk /dev/sdb: 82.0 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders, total 160086528 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x5f300384

Device Boot Start End Blocks Id System
/dev/sdb1 63 160071659 80035798+ 7 HPFS/NTFS/exFAT

second suggestion gave the following:
skip@skip-desktop ~ $ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.11.0-12-generic
Found initrd image: /boot/initrd.img-3.11.0-12-generic
Found memtest86+ image: /memtest86+.bin
No volume groups found
done
skip@skip-desktop ~ $ sudo os-prober
No volume groups found
skip@skip-desktop ~ $

Still in trouble
 
Old 05-01-2014, 05:16 PM   #4
DJ Shaji
Member
 
Registered: Dec 2004
Location: Yo Momma's house
Distribution: Fedora Rawhide, ArchLinux
Posts: 513
Blog Entries: 15

Rep: Reputation: 106Reputation: 106
Add the following to /boot/grub2/grub.cfg

Code:
menuentry 'Windows XP' {
    set root='hd0,msdos1'
    chainloader +1
}
You will need to be root to do this. Prefix your command by "sudo"
Code:
 sudo gedit /boot/grub2/grub.cfg
 
Old 05-01-2014, 05:48 PM   #5
FarmerJohn
LQ Newbie
 
Registered: May 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
D J, thanks for reply, first I don't have a /boot /grub2 "folder" , only /grub. It does have grub.cfg
I tried entering your code as follows,
### 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.
menuentry 'Windows XP' {
set root='hd0,msdos1'
chainloader +1
}
### END /etc/grub.d/40_custom ###

however system still boots directly to linux, it seems linux install may have installed /grub, not /grub2
any way to change it, or should entry be at some other point in the grub.cfg file?

such as below

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="0"

if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi

export menuentry_id_option

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
Thanks JH
 
Old 05-01-2014, 07:25 PM   #6
DJ Shaji
Member
 
Registered: Dec 2004
Location: Yo Momma's house
Distribution: Fedora Rawhide, ArchLinux
Posts: 513
Blog Entries: 15

Rep: Reputation: 106Reputation: 106
Towards the beginning of the file there woulf be a "timeout" entry. Set it to something greater than one. If there isn't, add
Code:
timeout=10
to the file.
 
Old 05-01-2014, 09:55 PM   #7
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,980

Rep: Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294
Quote:
I don't have a /boot /grub2 "folder" , only /grub. It does have grub.cfg
If you have a grub.cfg file, you are using Grub2. I have seen systems with a /boot/grub directory which can be either Grub Legacy or Grub2. I have seen systems which just have a /boot/grub2 and systems which have both /boot/grub and /boot/grub2. You found the file and made the edit but did you run: sudo update-grub after? It won't show in the grub.cfg file until after you do that. If you had put the entry in the grub.cfg and NOT run update-grub, it should have shown in the menu.

It isn't really clear if you are seeing xp in the menu and it doesn't boot or if you do not see xp at all, can you clarify? If you don't see a menu, then the timeout change would help. If it still doesn't boot, put the two lines below in the menuentry suggested above, above the set root line.


Code:
insmod part_msdos
insmod ntfs
 
Old 05-01-2014, 10:04 PM   #8
FarmerJohn
LQ Newbie
 
Registered: May 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
D J, thanks again, the timout was set to timeout=1, I changed it to timeout=10 saved and rebooted.
Again system booted directly to linux.
Maybe I should try replacing grub with grub2 ???
JH
 
Old 05-01-2014, 10:43 PM   #9
cwizardone
Senior Member
 
Registered: Feb 2007
Distribution: Slackware64-current with "True Multilib." FreeBSD.
Posts: 3,283
Blog Entries: 1

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
How many primary partitions can one have on a hard drive?
 
Old 05-06-2014, 04:13 PM   #10
DJ Shaji
Member
 
Registered: Dec 2004
Location: Yo Momma's house
Distribution: Fedora Rawhide, ArchLinux
Posts: 513
Blog Entries: 15

Rep: Reputation: 106Reputation: 106
Make a new file in the directory /etc/grub.d with the name "50_win_xp" and make it executable by running "chmod +x" on it. Put the following in it:

Code:
#!/bin/sh -e
cat << EOF
menuentry "Windows XP" {
    set root=(hd0,1)
    chainloader (hd0,1) +1
}
EOF
Update grub by running "update-grub". That should do the trick!

Refer here for more info: http://www.dedoimedo.com/computers/g...mozTocId293325
 
Old 05-06-2014, 04:21 PM   #11
DJ Shaji
Member
 
Registered: Dec 2004
Location: Yo Momma's house
Distribution: Fedora Rawhide, ArchLinux
Posts: 513
Blog Entries: 15

Rep: Reputation: 106Reputation: 106
Thumbs up DJ Shaji likes this

Quote:
Originally Posted by cwizardone View Post
How many primary partitions can one have on a hard drive?
As many as you want, buddy! Just kidding. The answer's four.
 
Old 05-06-2014, 04:45 PM   #12
cwizardone
Senior Member
 
Registered: Feb 2007
Distribution: Slackware64-current with "True Multilib." FreeBSD.
Posts: 3,283
Blog Entries: 1

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Quote:
Originally Posted by DJ Shaji View Post
As many as you want, buddy! Just kidding. The answer's four.
And, swap is counted as a primary partition, so the OP has 5 primary partitions on that drive. Could that be the problem?
 
Old 05-06-2014, 06:05 PM   #13
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,980

Rep: Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294
Quote:
And, swap is counted as a primary partition, so the OP has 5 primary partitions on that drive.
Actually he has two. sda1 is his windows partition, sda2 is a primary used as an Extended. In Linux, logical partitions are numbered beginning with 5 so sda8, the swap is a logical partition also.
 
Old 05-06-2014, 06:08 PM   #14
DJ Shaji
Member
 
Registered: Dec 2004
Location: Yo Momma's house
Distribution: Fedora Rawhide, ArchLinux
Posts: 513
Blog Entries: 15

Rep: Reputation: 106Reputation: 106
the first is a primary partition. the second one's extended, and the rest are all logical. more than four can't be created due to restrictions, but maybe they can. See here for more: http://www.linuxquestions.org/questi...tition-898740/

Last edited by DJ Shaji; 05-06-2014 at 06:12 PM.
 
1 members found this post helpful.
Old 05-06-2014, 10:20 PM   #15
cwizardone
Senior Member
 
Registered: Feb 2007
Distribution: Slackware64-current with "True Multilib." FreeBSD.
Posts: 3,283
Blog Entries: 1

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
1, 5, 6, 7, and 8 are all primary partitions.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual Boot win XP with Deb 6 already installed Greebstreebling Debian 7 05-15-2012 05:42 AM
Kubuntu 10.10 Dual Boot W/ Win 7 Pro: No Option To Boot Kubuntu FrostBot Ubuntu 2 01-26-2011 09:17 PM
No option to boot into WinXP (with Ubuntu 8.04 installed) linuxnbe Linux - Newbie 19 03-15-2009 05:31 AM
Cannot boot already installed ubuntu on newly installed win xp abhi_337 Ubuntu 1 07-13-2006 04:33 AM
dual boot when linux on 1 drive, win on other drive, both scsi? nornad Red Hat 3 04-08-2004 09:44 AM


All times are GMT -5. The time now is 05:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration