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!
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.
Click Here to receive this Complete Guide absolutely free.
(1) The partition Type is 7 for NTFS (fat16 and Fat32 can also be used for booting)
(2) The partition has been marked active by a "*"
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 13 26698 214348020+ 7 HPFS/NTFS
/dev/sda3 26699 38914 98118657 5 Extended
/dev/sda5 26699 38411 94083072 83 Linux
/dev/sda6 38411 38914 4034560 82 Linux swap / Solaris
In you case your Windows should be booted from sda1, which would be given the drive letter "C" and the actual system is in sda2 which should have a drive letter "D" drive.
Hmm, right, I guess you originally installed windows on "drive C:". Now it is D: and I really have no idea where your little partition /dev/sda1 is coming from. But of course, a windows configured to run from C: won't boot from D:, especially the NTLDR is VERY "stupid" and will just fail.
One other thing you COULD try (but, be aware you could destroy your system..): You could use e.g. cfdisk to change the partition type of /dev/sda1 to something windows doesn't know, like, for example, a linux partition. Then windows will call the second primary partition "C:" and maybe you can boot it successfully. If not, this change is reversible.
To be sure, backup your MBR. use "dd if=/dev/sda of=/path/to/backup.bin bs=512 count=2".
My guess is the OP's sda1 was originally a utility partition by the computer vendor as 13 Cylinders can hold about 10Mb of data.
The OP must have in the past reformatted this partition and forces the Windows to use it.
All MS Windows must be booted form the first primary partition, which has to be marked active, it detected and it would be where the boot loader goes. The actual WIndows system can be in a logical partition.
In one of my PCs I use a Dos partition as the booting partition with Dos, Win2, Xp, Vista and Win7 boot loaders inside along side with Grub that boots other 30+ Linux. The booting partition, corresponding to OP's sda1, can be just a data-only partition without an operating system inside.
I did not want to point the finger at anyone in particular, but the quoted comment came to be because you are in this thread. And you hate others that can offer good/better advice.
I may be many things but am opposite to the way you described.
I see myself offering contribution only on areas missing and would have no hesitation to interface my contribution with the good suggestions already raised by others. That is why I kept referring to zirias request of "fdisk -l" as it would clarify a lot of unknowns.
I also put in a fair bit of explanations so that people like yourself can challenge if you find anything unsound and inappropriate. I cannot be right all the time but at least the basis I put a suggestion forward has been based on facts. I would have no hesitation to apologise for any mistake or misguide others. After all we all learn from each other.
In this instance you have contributed mainly your opinion.
I started my contribution to this thread because as a frequent member of the forum I felt Tux Rules's loose reply in Post #3, issued after zirias's good suggestion in Post #2 can give a wrong impression leading us further away from a true solution.
I took no pleasure in pointing out other's deficiency but if Tux Rules has ground to support there has been a Grub problem then at least we could all learn from it.
You have suggested using Grub rearranged by a third party and that is fine as your choice.
I need to put my case forward because the same 3 lines of Grub commands I put down in Post #7 had been documented by me to repeatedly boot 145 systems of Dos, Windows, Linux, BSD and Solaris. I have reason to believe the same simple procedure could work for his Windows.
All MS Windows must be booted form the first primary partition, which has to be marked active,
Believe me, THIS is wrong. Windows of the "Chicago" line (up to win ME) could only CREATE one primary partition, but it could very well USE others. The windows NT line has no problems at all with more primary partitions. Windows will ignore all partition types it doesn't know about at bootup and just call the FIRST NTFS or FAT32 partition it finds "C:", the second "D:" and so on...
So if you're right and sda1 is just a vendor utility partition, hiding it (either by setting it to hidden or by chosing a partition type windows doesn't know) should do the trick.
I meant the first primary partition "recognised" by the MS systems. It can be any of the sda1 to sda4. You can create logical partitions only in hard disk so that there is no primary partitions in the hard disk at all. The point I was making is a MS Windows has to be booted from the "C" drive which must be active and being a primary partition.
A MS system MBR from Dos to Win7 only searches the first 4 primaries and boots whichever one that has been marked "active". I have used this characteristic to use Vista's boot loader to fire up Grub installed in a Dos primary partition.
Whether an operating is capable or willing to create more than one partition in a device is that OS's choice. All USB flash drives are treated by all MS Windows as a Super floppy" that can have only one partition. However in Linux the same flash drive can have any number of partitions. If it is used in a MS Windows then only the first one recognised by the Windows would be mounted. The others are disregarded.
The red statement specifies sda2 to be booted
The blue statement will hide the sda1 temporarily.
The magenta statement will make sda2 active.
The rest will fire the Windows inside by loading its NTLDR first and then handing over the control to Windows.
The above should not be used if the Windows was bootable originally as a "D" drive. The current suggestion is to make it booted from a "C" drive by altering sda1 from partition Type 7 (ntfs) to partition 17 (hidden ntfs) therefore cheating the Windows into thinking the partition is foreign and will mount it so the "C" drive status will be awarded to sda2. The Type 17 partition sda1 is visible and mountable in Linux and can be reverted back to its present form by command "parttool (hd0,1) hidden-".
this first partition seems to be VERY small ... maybe this is part of the problem and your windows really resides in /dev/sda2. Then it would be plausible that windows declares it "D:" -- but I have no idea how this could have happened?
I've seen something like this before: I've bought an Sony VAIO laptop, that comes with Windows 7, some months ago, and after installing Ubuntu lucid on it, it shows me 2 entries in the GRUB2 boot menu related to Windows (one of those not works: the system restarts after try to use) - the two entries seemed related to two existing windows partitions on the disk, one very small (~7GB) and the other using the rest os the hard-disk space
We possibly have offered 50 tomes more information than you have told us what exactly you have done with the first partition sda1.
You still have Grub and pressing the "c" key at the booting menu will get you a Grub prompt.
There is no installed operating system in a PC that cannot be booted up from a Grub prompt. So use it.
Your Ubuntu 10.04 has the latest Grub2 and the instruction we gave you in Post #24 is for booting Windows installed in Drive C and in Post #17 for booting Windows originally installed in Drive D. Only you know what is was. We are only gusessing as you have not told us enough.
Grub2 prompt is very powerful if you use it. For example if you want to see the directory of a partition you use "dir c:" in Windows. For Grub you can ask Grub to display the files and folders of sda1 and sda2 by command
You haven't even told us what version of Windows you have got.
If your Windows is a Xp the partition that it boots must have the following files; boot.ini, NTLDR and ntdetect.com.
Therefore if you want Grub to find which partition has boot.ini you can issue this command in a Grub2 prompt
search -f /boot.ini
If your have a Vista or Win7 then the partition that boots it must have bootmgr.exe and a \boot directory.
With the above information and the steps listed in Post #24 you should be running Windows by now.
well it is a sony vio desktop and its pissing me off....
I've been using Linux for eight or so years. I used to move my Linux images all over my drives and boot them up without issues, grub is installed in the partition only, not MBR on my units. But lately, someone decided to take up maintaining grub and it's been pissing me off also, grub 1.98. I don't have the time to run around trying all the old fixes that don't seem to work anymore including trying to install in the partition in a chroot like grub 2, so I downloaded a small iso of Super Grub, burned the iso to CD, slap it in and tell it to boot my Linux directly, once booted into it Linux I issue command: grub-install /dev/sda1 --force and everything is cool.
I'm no newbie, but I'm no idiot neither, and have better things to do with my time as a result.
Stress will shorten your lifespan.
Most Windows boxes now come with a bootable recovery partition. If your Windows won't boot, you boot into the recovery partition either through the bios or a recovery CD that will boot that partition and from there you repair Windows.
Which is why Grub put two entries for fbobraga.