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.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

I apologise for not reading everybody's post but as far as Linux is concerned the OP problem appears to be due to

(1) the deletion of a previous hdc2 formatted in a fat32 partition
(2) Resize the boundary of hdc1 to absorb the space left by hdc2
(3) The partition table of the previous hdc3 and hdc4 were physically moved into positions of hdc2 and hdc3. (This could be the work of a non-Linux software because it is against the normal practice in Linux. This software is likely the culprit responsible for creating the boundary errors in the partition table.)

Consequently Ubuntu residing in previous hdc3 is now living in hdc2 and its swap position is in the wrong place too.

In order to get the Linux boots again the following must be implemented

(1) Partition reference in menu.lst must be change from (hd1,2) to (hd1,1) assuming hdc is the 2nd boot disk and sda boots first. I am assuming the by-uuid addressing is used in "root=" parameter.

(2) In the /etc/fstab the /dev/hdc3 should be changed to /dev/hdc2. Change the swap to /dev/hdc3 too. This step can be omitted if both the / and swap are identified by the by-uuid method of using a unique long string.

(3) Restore Grub again (source the root from (hd1,1))

Adjust (hd1,X) to (hd0,x) if you have told the Bios to boot hdc ahead of sda.

You Windows boot is more complicated and it all depends on how many M$ systems you have and which one you use to multi boot the other.

Your Post #4 tells us that you have two active partitions, sda1 and hdc1 previously, but later changes show sda1 is no longer active.

You Windows therefore can only boot with sdb1 and must have the following

(1) There is a M$ boot loader inside hdc1. For XP it will be NTLDR. For Vista it should be Bootmgr.
(2) If hdc is the current first boot disk then your Windows must be installed when hdc was the first boot disk, otherwise you need to use the "map" statements to re-map the hdc back to the disk order it was originally installed.

The cure is different if your Windows was booted by a boot loader residing elsewhere. Rather for me to explain each possible combination why don't you explain your case saving us to speculate. WE also need to know the order of XP and Vista installation as the later system overwrites the boot setting of the older system, making salvage work a lot more difficult. If you install Vista later and remove it then the bootmgr will still override NTLDR making the booting very messy.

Grub always boots a M$ Windows by booting up its boot loader because Grub can't even read a ntfs partition.

hdc is the first boot drive so I guess NTLDR is stored there. Vista was formatted away and XP was installed in its place but first I shrunk the partition from 45 GB to 30 GB. 15 GB is still unformatted.

Can you tell us after you installed XP did you have it run successfully at all? If the answer is yes then how was it booted? by Grub or by a M$ boot loader?

The situation now is your XP is in a logical partition. AFAIK XP does not boot directly from a logical partition. It may if there is another bootable MS system in an active primary partition to house NTLDR. That to me has to be hdc1 as it is the only one marked active with a "*". Linux does not need partition marked active to boot and never uses the damn thing.

However you now confirm 175Gb hdc1 is a data storage and XP is in a 30Gb sda5 partition. (all partition number higher than 4 are logicals because the first 4 are reserved primaries).

Technically if hdc1 is a data-only partition then it would not be bootable and therefore cannot launch NTLDR from there.

This will make sense if you have installed XP but never see it working. In other word you newly installed XP was never in a working condition to start with. If you migrated XP from another partition then it will not work either.

sda1 is an extended partition, meaning it is just a border defining the beginning and finishing cylinders of the logical partitions.

sda1 starts with cylinder 2 and finishes at cylinder 5738 and has a size of 45Gb.

Inside sda1 the first logical partition sda5 occupies the boundary from cylinder 2 to 3825 and a size of 30Gb.

There is an empty space after the 3825th cylinder because the next one used is 5739 of sda2. This tells me you created sda2 after sda5. The remaining 15Gb after sda5 is still usable for creation of sda6 to sda15.

Thus I don't think your XP boots from sda1 because an extended partition has no storage of its own. It is just a border!

NTLDR is always visible as a file and never in the boot sector.

If your information is correct then your XP should have been booted from hdc1 which has originally a bootable NT operating system inside. Chances are the NTLDR would be there. You should use Linux to munt this partition and see it for yourself.

If this is the case your Windows should boot if before selecting a system to boot you press the "c" key at the Grub boot screen and drop into a Grub prompt. XP should fire up by terminal Grub commands

Code:

root (hd0,0)
chainloader +1
boot

When you boot a XP or a Vista you always boot to the partition that stores its boot loader. It is the duty of M$ boot loader to find its master and none of the business of Grub.

The above is to boot XP "manually". If it works you can then add to the menu.lst of the Linux all the manual commands except adding at the begining a "title" line like

Code:

title dude said boot hdc1 and it will find XP in sda5"

For booting with menu.lst the last "boot" statement is optional and can be removed. I never use it but it does no hard to leave it there.

Inside sda1 the first logical partition sda5 occupies the boundary from cylinder 2 to 3825 and a size of 30Gb.

There is an empty space after the 3825th cylinder because the next one used is 5739 of sda2. This tells me you created sda2 after sda5. The remaining 15Gb after sda5 is still usable for creation of sda6 to sda15.

No, sda2 has been there unchanged for at least two years

Quote:

Originally Posted by saikee

Thus I don't think your XP boots from sda1 because an extended partition has no storage of its own. It is just a border!

NTLDR is always visible as a file and never in the boot sector.

If your information is correct then your XP should have been booted from hdc1 which has originally a bootable NT operating system inside. Chances are the NTLDR would be there. You should use Linux to munt this partition and see it for yourself.

Will do as soon as I get home. I think it boots from there too seeing as it is the first disk in the boot order.

Quote:

Originally Posted by saikee

If this is the case your Windows should boot if before selecting a system to boot you press the "c" key at the Grub boot screen and drop into a Grub prompt. XP should fire up by terminal Grub commands

Code:

root (hd0,0)
chainloader +1
boot

When you boot a XP or a Vista you always boot to the partition that stores its boot loader. It is the duty of M$ boot loader to find its master and none of the business of Grub.

The above is to boot XP "manually". If it works you can then add to the menu.lst of the Linux all the manual commands except adding at the begining a "title" line like

Code:

title dude said boot hdc1 and it will find XP in sda5"

For booting with menu.lst the last "boot" statement is optional and can be removed. I never use it but it does no hard to leave it there.

I checked and I have two NTLDR, one NTLDR and one ntldr (lower case). ntldr was last modified on August 4, 2007 at 02:59 AM and NTLDR was last modified on August 4 at 00:59 AM. Both are the exact same size. Should I delete one of them?

Edit:
Never mind, one of them (the upper case one) was in a copy of the disk contents I made for VMware.