LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 07-25-2010, 02:00 PM   #16
animeman
Member
 
Registered: Dec 2009
Location: Bad Axe mi
Distribution: gentoo, Android, bohidI
Posts: 85

Original Poster
Rep: Reputation: 17

and i tryed to set root=(hd0,2) and tryed to boot it did not work
 
Old 07-25-2010, 02:05 PM   #17
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
If you read my replies you should have used
Code:
set root=(hd0,1)
chainloader +1
boot
Only sda1 has the two essential features of

(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 "*"

Code:
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.

Last edited by saikee; 07-25-2010 at 02:14 PM.
 
Old 07-25-2010, 02:06 PM   #18
zirias
Member
 
Registered: Jun 2010
Posts: 361

Rep: Reputation: 59
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".
 
Old 07-25-2010, 02:21 PM   #19
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
zirias,

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.
 
Old 07-25-2010, 02:36 PM   #20
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Brains,
Quote:
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.

Last edited by saikee; 07-25-2010 at 02:50 PM.
 
Old 07-25-2010, 02:38 PM   #21
zirias
Member
 
Registered: Jun 2010
Posts: 361

Rep: Reputation: 59
Quote:
Originally Posted by saikee View Post
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.
 
Old 07-25-2010, 03:06 PM   #22
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
zirias,

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.
 
Old 07-25-2010, 03:09 PM   #23
zirias
Member
 
Registered: Jun 2010
Posts: 361

Rep: Reputation: 59
Well, linux even allows using a flash drive (as well as a hard disk drive) without a partition table at all But that's not the issue here, so:

@OP: Try to disable this first partition, mark the second (sda2) as bootable, post your results, please
 
Old 07-25-2010, 03:33 PM   #24
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
zirias,

I have assumed the OP's original Windows originally bootable. This Windows should be a Xp as the CD was mentioned whereas Vista or Win7 would have an installation DVD.

There seems to be some rescuing work done with the Windows installation CD and the OP was surprised the Windows had been moved to Drive letter "D".

If the original Windows has been made unbootable by using the installation CD to alter the sda1 then your suggestion in Post #23 could be the cure.

Assuming the above is the case my suggestion is to boot the Windows in sda2 with these commands in Grub2 prompt
Code:
set root=(hd0,2)
parttool (hd0,1) hidden+
parttool (hd0,2) boot+
chainloader +1
boot
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-".

Last edited by saikee; 07-25-2010 at 03:36 PM.
 
Old 07-25-2010, 03:59 PM   #25
fbobraga
Member
 
Registered: Jul 2010
Location: São Paulo - Brasil
Distribution: Debian 7 / Crunchbang 11
Posts: 229

Rep: Reputation: 41
Quote:
Originally Posted by zirias View Post
(...)
edit2:
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

Last edited by fbobraga; 07-25-2010 at 04:04 PM.
 
Old 07-25-2010, 04:14 PM   #26
zirias
Member
 
Registered: Jun 2010
Posts: 361

Rep: Reputation: 59
Well this is really strange, but right now I'm quite positive saikee is right in this: it's probably a (previously) hidden vendor partition, used for some recovery tools.

I'm looking forward to the results of hiding THIS partition and declaring /dev/sda2 bootable
 
Old 07-25-2010, 04:57 PM   #27
animeman
Member
 
Registered: Dec 2009
Location: Bad Axe mi
Distribution: gentoo, Android, bohidI
Posts: 85

Original Poster
Rep: Reputation: 17
well it is a sony vio desktop and its pissing me off....
 
Old 07-25-2010, 05:10 PM   #28
fbobraga
Member
 
Registered: Jul 2010
Location: São Paulo - Brasil
Distribution: Debian 7 / Crunchbang 11
Posts: 229

Rep: Reputation: 41
Quote:
Originally Posted by animeman View Post
well it is a sony vio desktop and its pissing me off....
there is no two entries, for windows, in the GRUB2 boot menu, after install ubuntu? If so, just try the other entry :P

* the laptop I mentioned in the last post, is used by my sister, in other town - she never (up to now) ask me about any boot issues

* the Sony vendor made me stick with the Windows install: without it, he told that the laptop cold not be sended to repair on warranty

Last edited by fbobraga; 07-25-2010 at 05:14 PM.
 
Old 07-25-2010, 05:14 PM   #29
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
animeman,

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
Code:
ls (hd0,1)/
ls (hd0,2)/
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
Code:
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.

Last edited by saikee; 07-25-2010 at 05:25 PM.
 
Old 07-25-2010, 05:20 PM   #30
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 375

Rep: Reputation: 77
Quote:
Originally Posted by animeman View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual Boot Class Project Failed prsnrs Linux - Newbie 2 03-19-2010 04:49 PM
I failed at dual booting Fedora and Windows XP on an Aspire One ao751h. Please help? This is my username Linux - General 2 02-02-2010 05:28 AM
ASUS BIOS hardware monitor failed when using dual boot SuSE 9.2 + Windows XP nguyennh Linux - General 3 02-22-2006 08:26 PM
Dual Boot XP/RH8 autoconfig failed Nimbus Linux - Newbie 2 12-15-2004 01:27 PM
Kernel panic after dual-boot XP drive failed phoenixdbq Linux - Newbie 7 02-05-2004 09:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration