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.
Okay, so I'm not exactly a newbie to Linux and it's OS, I have been using Ubuntu since the 8.xx release. But I've run into a major issue that I cannot fix myself. Try as I may, no one has been able to help me, and I mean NO ONE. I've searched dozens if not hundreds of websites, including the Ubuntu Forums, to no prevail.
Here is the Issue. I have two hard drives in my system, Hard Drive #1 is the primary drive and is 250GB, this hard drive is only used for Windows 7 Pro 64bit. The second hard drive is 320GB and split into two partitions. The first half has Windows XP Pro on it and the second partition has Ubuntu 10.04 on it. Both are split evenly at 160GB each.
Here's how I did it, I first started by loading Windows XP Pro onto second hard drive, using the entire drive, once all updates and settings were applied I then installed Windows 7 Pro 64bit onto the first hard drive and used it fully. Once all settings and updates were applied I restarted the computer and it loaded directly into Win7, which is to be expected. I opened my computer, browsed through the second drive to make sure all files were intact. I then downloaded and created a USB installation drive for Ubuntu 10.04.
After the creation of the USB drive I proceeded to install Ubuntu 10.04 on my second drive, using half the space for Windows XP Pro, and half the space for Ubuntu 10.04.
After that was all setup and done, I restarted one last time. Low and behold Ubuntu 10.04 and Windows 7 both appear on the boot menu, however Windows XP Pro does not. I panicked for a few short seconds but after logging into Windows 7 I realized all my XP Pro files where safe.
So now I have 2 hard drives with 3 operating systems. Hard drive one has Windows 7 ONLY and hard drive 2 is split between XP Pro and Ubuntu. However I cannot get Windows XP Pro added to the boot menu no matter how hard I try.
I'm not entirely confident using the terminal as I am just starting to learn programming, but I know how to enter the commands and get things moving. Every website that I look at tells me I need to start by editing some grub/menu.lsd, which for some reason does not exist or is "invalid directory", some websites say I need to run "sudo apt-get grub-update", which again is an invalid command.
Here's what I need. A step by step tutorial on how to add my XP into the loading menu. Example of step by step includes "Step 1: Open Terminal" and etc... It needs to be basic and down to earth. Don't just tell me to run codes and type a bunch of junk because that doesn't seem to work for me. I do not know what (hd,0) or (hd,1) means, but assuming the websites are correct, (hd,0) would be my Windows 7 HD and (hd,1) would be my Windows XP/Ubuntu HD? Like I said I have no clue what's going on here so someone please help?
When you installed Windows 7 second, it should have found the Windows XP install, and after the Win7 install (but before Ubuntu), when you restarted you should have seen a Windows boot menu that let you choose between Windows 7 and "Earlier version of Windows." Did this not happen for you?
Then when you installed Ubuntu, grub should have detected the Ubuntu install and the Windows boot loader. Then you would boot XP by (1) selecting the Windows bootloader from the Grub menu then (2) selecting "Earlier version of windows" from the Windows bootloader.
I know this because I triple-booted Debian, Win7, and WInXP for a while. No, it's not impossible.
It sounds like you should reinstall the Win7 bootloader from your Win7 CD, and troubleshoot why it isn't picking up XP. Once it picks up XP, reinstall grub from your Linux CD and you should be able to boot all three OSes.
Here's what I need. A step by step tutorial on how to add my XP into the loading menu. Example of step by step includes "Step 1: Open Terminal" and etc... It needs to be basic and down to earth. Don't just tell me to run codes and type a bunch of junk because that doesn't seem to work for me. I do not know what (hd,0) or (hd,1) means, but assuming the websites are correct, (hd,0) would be my Windows 7 HD and (hd,1) would be my Windows XP/Ubuntu HD?
This kind of stuff is not that simple. We will need to ask you for more info and guide you through it, since we cannot telepathically read the exact way your computer is set up.
When Windows 7 was finished installing it did not load a boot menu with WinXP/Win7, it just went directly into Windows 7, I know there's a way you can setup the Win7 Bootloader to add WinXP to the menu but I did not care about that as I was not finished with all my installs. I was under the assumption that GRUB would be able to read all the HDs and determine which OS's were installed and then build a list accordingly. So now I have a boot loader with the 6 different Linux options and at the bottom it says "Windows 7 BootLoader (on/sdev/something or other)", so I can comfortably switch between Linux and Win7. I don't know if there's a terminal command you can run that will build a list of specifics, such as Hard drive locations and file systems.
@AlucardZero: Essentially what you're saying is I need to go into Windows 7, add WinXP to the Windows 7 BootLoader, then when I restart and select "Windows 7 BootLoader" from the list, it should say "1.) Windows 7" and "2.) WinXP Pro" or something similar? So boot screen one should have my 6 linux options then the Windows 7 Bootloader at the bottom. I can give this a shot and see what happens.
... Every website that I look at tells me I need to start by editing some grub/menu.lsd, which for some reason does not exist or is "invalid directory"...
the name of the file is menu.lst
I agree with MTK358, in order to provide additional information please open a terminal and post the output of
Code:
fdisk -l
also please post the menu.lst file (if it exists).
We can't guess what condition your XP partition is in. We don't know how you shrank that partition. I (at least) don't know what, if any, damage was done to XP while installing Windows 7.
I also don't know how you put XP onto the second drive: In a way that Windows understands it is on the second drive (which likely means some small part of XP was actually installed on the first drive and later trashed by installing Windows 7)? Or using the BIOS to make the second drive boot, so that Windows thinks the second drive is the first drive when XP was booted.
It is fairly easy to reconfigure for triple boot if only the configuration of grub2 needs to be fixed. If you need to fix something in the install of XP, that will take more diagnosis.
Quote:
Originally Posted by AeroBoy1987
Every website that I look at tells me I need to start by editing some grub/menu.lsd,
/boot/grub/menu.lst is the text file you would edit to reconfigure grub. But Ubuntu 10 uses grub2, not grub. The instructions for grub2 are a bit more involved, totally different (from grub) and also available on many web sites, including online Ubuntu documentation.
Quote:
Originally Posted by AeroBoy1987
@AlucardZero: Essentially what you're saying is I need to go into Windows 7, add WinXP to the Windows 7 BootLoader, then when I restart and select "Windows 7 BootLoader" from the list, it should say "1.) Windows 7" and "2.) WinXP Pro" or something similar? So boot screen one should have my 6 linux options then the Windows 7 Bootloader at the bottom. I can give this a shot and see what happens.
I expect that would work. But I don't really know (both I don't know that much about Windows 7 and I don't know that much about the condition of your XP partition).
But even if it works, the two level menu is lame. If that can work then properly configuring grub2 also can work.
Okay, so I swapped over to Windows 7 and opened the bootloader only to find it does not show WinXP Pro anywhere.
@markush: I opened "Terminal" and typed "fdisk -l" and nothing happened. Again, I'm a newbie at this "Terminal" thing, so your response should have reflected "sudo fdisk -l", which worked perfectly. Here are those results, although I have no idea what they mean:
(Windows 7 Hard Drive Listed Below)
Disk /dev/sda: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xbb1bbb1b
Device Boot Start End Blocks Id System
/dev/sda1 * 1 30516 245114880 7 HPFS/NTFS
(LinuXp Hard Drive Listed Below)
Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00082ec7
Device Boot Start End Blocks Id System
/dev/sdb1 1 19457 156280304+ 7 HPFS/NTFS
/dev/sdb2 19457 38914 156290049 5 Extended
/dev/sdb5 19457 38166 150281216 83 Linux
/dev/sdb6 38166 38914 6007808 82 Linux swap / Solaris
@johnsfine: I first installed WinXP Pro on Second Hard Drive Labeled "LinuXp" in the above post, and it booted fine from the second hard drive. Then I installed Windows 7 to the first hard drive, and Windows 7 Booted fine. If I open my bios and change the order in which the hard drives boot I can get either Win7 or WinXP booting, it's just a pain to constanly switch the hard drive boot order. So then I installed Ubuntu onto Second Hard Drive and used the "Automatic Partitioning Tool" that was provided upon install. I moved the little slider to reflect half the space for WinXP and half the space for Ubuntu. Then when I restarted it loads the "Grub Menu" with 6 linux options and one "Windows 7 Bootloader" option at the bottom. Now I can go between Ubuntu and Windows 7. If I access the bios and again flop the hard drive order, I can access WinXP Pro perfectly no problems, but then I do not have access to Windows 7 or Ubuntu...See how confusing this can be?
Probably that means XP was installed on the second drive in a way that used boot code only on the first drive. That boot code was then destroyed by the next install of Windows. That makes booting XP quite a bit trickier.
Maybe whatever the OP did to shring sdb1 also removed the boot flag. In that case the lack of boot flag doesn't matter. But that seems less likely.
Bote the lack of boot flag on sdb1 is not a problem itself. I'm just looking at it as an indicator of a different problem.
If I access the bios and again flop the hard drive order, I can access WinXP Pro perfectly no problems, but then I do not have access to Windows 7 or Ubuntu...See how confusing this can be?
Great. I don't know how that can work without the boot flag in sdb1, but it means the second drive has all the boot code needed for XP and it will be very easy to configure GRUB2 to put in the third choice you need.
Windows 7 should have detected your xp installation when you installed windows 7 as you already had xp installed and the drive attached.
If you don't know how to edit the windows bootloader files, you could go to this site and download EasyBCD for windows 7. It usually works pretty well and is fairly easy. The download link is at the bottom left of the page.
@Markush: Here is the terminal output of code "sudo fdisk -l". The 251.0 GB drive is my Windows 7, the 320.1 GB drive is split between Windows XP and Ubuntu.
Let's pretend both these disks are brand new out of the box. I put both disks into my computer. I started by installing Windows XP Pro onto Disk 2, worked perfectly - booted perfectly. I then installed Windows 7 Pro 64bit onto Disk 1, worked perfectly - booted perfectly. If I enter the bios and change the order in which the hard drives boot, I can access both Windows 7 and WinXP Pro. I then installed Ubutuntu onto 1/2 of Disk 2 using the "Automatic Partitioning Tool" provided during installation. I moved the little slider to reflect 1/2 XP Pro and 1/2 Ubuntu. Upon restarting the Grub Menu appears, listed are 6 different Linux Options and at the bottom is listed "Windows 7 Bootloader". Now I can move between Windows 7 and Ubuntu, but not Windows XP Pro. If I then enter the Bios again and swap the drive order, I can access Windows XP Pro, but lose access to Windows 7 and Ubuntu, until I switch the Biso again.
It would be interesting to know on which mbr grub is installed /dev/sda or /dev/sdb. I had once an issue with dualbooting Slackware and Gentoo on my server. The machine has two disks /dev/sda and /dev/sdb and once I had installed grub2 (I will never use it ) in the mbr of sda1 I had to clean the mbr with the dd command before I was able to install any other's OS's bootmanager on it. Now I'm gone back to lilo.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.