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 will apologies now for my limited or non existant knowledge of Linux, I have recently (yesterday) installed Ubuntu onto my PC, currently I also have Windows XP installed on a seperate HDD, however when I reboot I see the Grub menu but there is no option for Windows XP.
I have read some of the posts relating to this style of issue but most seem to be on the same hdd, I have Win XP on a SATA and Ubuntu on IDE.
Could someone please assist in how I should resolve this?
In Ubuntu, add an entry for WinXP to the file /boot/grub/menu.lst (you will need to edit the file as root). You will need to post the output of 'fdisk -l' in order for someone to tell you exactly how to phrasr the entry for winxp.
It will be something like this:
title WinXP
root (hdX,Y) where X and Y indicate the drive and partition of winxp
makeactive
chainloader +1
First do you have any experience with terminal? To make a long story short you will need to modify you /boot/grub/menu.lst. Windows wants to be on the first partition of the first hd to boot. Your ide hd will boot first so we need to change the boot menu where windows thinks it is booting first. This will take three or four steps but we need to have an idea where to start.
Hi Thanks for the great help and suggestions please find below the requested fdisk -l output.
Larry Webb I have a little experience with Terminal but want to expand this knowledge as much as I can. I am sure it will take a while but hey I love a challenge.
Quote:
alan@alan-ubuntu:~$ sudo fdisk -l
Disk /dev/sda: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x8f168f16
Device Boot Start End Blocks Id System
/dev/sda1 * 1 408 3277228+ 7 HPFS/NTFS
/dev/sda2 409 2434 16273845 5 Extended
/dev/sda5 409 2343 15542856 83 Linux
/dev/sda6 2344 2434 730926 82 Linux swap / Solaris
Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xadadb3ad
Device Boot Start End Blocks Id System
/dev/sdb1 1 9729 78148161 42 SFS
Disk /dev/sdc: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x519e519d
Device Boot Start End Blocks Id System
/dev/sdc1 * 1 3824 30716248+ 7 HPFS/NTFS
/dev/sdc2 3825 9728 47423880 f W95 Ext'd (LBA)
/dev/sdc5 3825 9728 47423848+ 7 HPFS/NTFS
Disk /dev/sdd: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x9da92c3b
Device Boot Start End Blocks Id System
/dev/sdd1 2 60801 488376000 f W95 Ext'd (LBA)
/dev/sdd5 2 60801 488375968+ 7 HPFS/NTFS
alan@alan-ubuntu:~$
Just wondered whether the following info would assist with helping me understand what needs to be entered into menu.1st?
IDE 0 Master Ubuntu Installation 20Gb
IDE 0 Slave Data Storage 80Gb
IDE 1 Master DVD Device (optical)
SATA 0 Windows XP Pro 80Gb
SATA 1 Media Storage 500Gb
Am I correct in thinking they would be labeled as follows
IDE 0 Master = hda,x
IDE 0 Slace = hdb,x
IDE 1 = hdc,0
SATA 0 = sda,x
SATA 1 = sdb,x
The hds are listed hda,? is where the 'a' is the first drive and the "?' is the partition number on that drive (such as 1 for the first partition and so forth). hdb would be the second hd to boot and of course the partition is marked the same. sda is the same as the hds except it stands for sata drives and most external. They say the ides will always boot before the sdas in the boot order. Now with windows on your sda we need to trick it into thinking it is the first in the boot. I need you to go to terminal and show us your '/boot/grub/menu.lst' as root. If you have trouble locating it use the command ' find /boot/grub/menu.lst ' All of this without the hash marks.
I am sorry for the prior post, too late at night, your ubuntu will probably list all the hds at sd?. I appears you have one type of windows on sda1 and linux on sda5. Please go to terminal and locate '/boot/grub/menu.lst' by using the command 'find /boot/grub/menu.lst/' without the hash marks.
Grub count from 0 and so the 1st partition of the 1st disk will be known as (hd0,0) to Grub. The notations used by Grub is different to Linux. Since your Ubuntu in IDE primary master boots so (hd0,0) will be sda1 with partition Type 7 indicating it is a NTFS partition. (hd0,4) or sda5 should be your Ubuntu partition.
By comparing the geometry of each disk with the sudo fdisk -l in post #6 you can find out the disk orders.
A MS Windows must be booted by a primary partition marked by a "*" in the output of fdisk -l. In your case there are two of them; namely sda1 and sdc1. So your WIndows will boot if you instruct Grub to boot up either sda1 or sdc1.
The commands, installed in /boot/grub/menu.lst, will be as per bigrigdriver's suggestion in Post #2. All you need is the partition referefernce of (hdx,y). For sda1 it would be (hd0,0). If sdc is your 3rd disk then the partition reference should be (hd2,0).
The above assumes you have not altered the disk order before and after Ubuntu installation. If you did then this is the time to tell us because the booting instructions will have to be modified.
The other way you can find out which partition you should boot to is to look at the files inside. The partition that can fire up Xp will have the files like boot.ini and NTLDR inside.
Lastly Ubuntu belongs to the modern group of Linux that has standardised calling all IDE, PATA, Sata, USB external hard disk and USB memory devices by device names sda, adb, sdc, sdd, sde,....etc.
The device map is accurate at the time when the Linux installer install Grub. If the disk order has been altered subsequently then the device.map can be out of date.
The interrogation with a Grub shell is the disk order as seen by Grub at the time the commands are issured.
If the OP has not altered the disk order or added or withdrawed the hard disks then the device.map would be current.
If the device.map is out of date, the system often won't boot - or a multiboot system that uses different hard drives may fail to boot some of the alternate choices.
I often write my own menu.lst and never bother with the device.map myself. Thus I don't think it matters. Grub only cares about the instructions in menu.lst (or grub.conf if it is a Red Hat).
Whenever I put Grub into a data-only partition or a USB drive I use only two files; stage1 and stage2. That is all one needs to boot "any" PC system manually. The menu.lst is just a script file.
Thank you all for your help this far I have been able to confirm the list of devices and also what the grub line should read. However I have one last issue.
This will sound stupid but can someone please advise on how to enter the information? I seem to be limited by permissions when opening the menu.lst with a notepad?
thanks again to everyone for your help and assistance on this.
Last edited by Kiwi944; 05-30-2008 at 04:47 PM.
Reason: poor spelling
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.