Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i got a silly problem . after installing ubuntu 10.04 my grub 2 loader
shows my Xp at sda3 but when i click it it return to grub menu again.
here is my /boot/grub/grub.cfg file
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda3)" {
insmod fat
set root='(hd0,3)'
search --no-floppy --fs-uuid --set d417-e7a0
drivemap -s (hd0) ${root}
chainloader +1
}
I don't know if this will help you solve your problem, but here goes:
I've seen friends, on their first attempts at installing Linux, run into problems with their Windows partitions when they had C and D drives set up (one for the OS and the other for data). The older version of grub identified both at Windows partitions and wrote a config for both to show on the grub menu. When selected, one would boot and the other would not.
So, please show the output of 'fdisk -l' and any other grub.cfg entries which also relate to Windows.
Comparing fdisk to grub.cfg should make it possible to determine if you grub.cfg needs edit.
@bigrigdriver
yea my problem occur for same reason. my xp is in C drive but my System Volume info in D Drive. how can i solve this problem.
Here is my fdisk -l info
Device Boot Start End Blocks Id System
/dev/sda1 1 146 1172713+ 82 Linux swap / Solaris
/dev/sda2 147 1971 14659312+ 83 Linux
/dev/sda3 * 1972 3187 9767520 c W95 FAT32 (LBA)
/dev/sda4 3188 19456 130680712 f W95 Ext'd (LBA)
/dev/sda5 3188 7011 30716248+ b W95 FAT32
/dev/sda6 7012 10835 30716248+ b W95 FAT32
/dev/sda7 10836 14659 30716248+ b W95 FAT32
/dev/sda8 14660 19456 38531871 7 HPFS/NTFS
If you see a Grub screen pressing the "c" key instead of selecting system to boot will drop you into a Grub prompt where you communicate with Grub directly.
If you type as I suggest in Post #3 by
Code:
set root='(hd0,3)'
you tell Grub that you want to boot the 3rd partition of the first disk. In Linux term that is sda3 which should have XP's NTLDR inside. All MS Windows place their boot loaders in the first partition they recognise and themselves can reside elsewhere.
By the command
Code:
chainloader +1
you tell to boot up the boot loader inside the specified partition.
The statement
Code:
boot
is the green light for Grub to hand over its control to the boot loader inside sda3 and you should see Xp boots up.
sda3 is likely to be the location of the Xp boot loader because all MS Windows must be booted from a "active" primary partition. The "*" means sda3 is active and in LInux only sda1 to sda4 can the primary or extended partition.
If you prove your Xp bootable then you amend the /bootgrub/grub.cfg to the manual commands you have used.
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369
Rep:
For a start GRUb2 starts counting by one .
So if windows is on sda 4 than it is (hd0,4)
Although you can edit grub.cfg it is not recommended .
On the terminal try the command sudo update-grub
If it does not work see http://ubuntuforums.org/showthread.php?t=1195275
For a start GRUb2 starts counting by one .
So if windows is on sda 4 than it is (hd0,4)
Sorry if my post threw confusion into that aspect of the problem. The (hd0,3) was correct for grub2. Windows seems to be on sda3. Certainly not on sda4.
For those nervous about editing grub.cfg the worst that could happen if grub.cfg doesn't work is Grub will default to a Grub prompt which in my view is the most powerful booting tool.
I always edit the Grub configuration and even generate it myself or remove it to suit my requirement.
@saikee i have tried your command using pressing c and e and edit
as you say but still no change.
i have also tried with this
apt-get update
#apt-get install grub2
then
sudo gedit /etc/grub.d/11_Windows.save
then write it
#! /bin/sh -e
echo "Adding Windows" >&2
cat << EOF
menuentry "Windows XP" {
set root=(hd0,3)
chainloader +1
}
EOF
then chmod a+x /etc/grub.d/11_Windows
then update-grub2
Were you able to solve this issue? I am having the same problem. I'v tried all the suggestions here but no luck so far. I just installed Ubuntu 10.04 on a computer in the lab that had XP on it. I dont use the XP but some of the other fellows in the lab need it. There was only one partition before installing Ubuntu and that was 500gb. I resized that and took 50gb for root and 3gb for swap. Any suggestions?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.