LinuxQuestions.org
Visit Jeremy's Blog.
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 02-10-2004, 04:48 AM   #1
Ouch_Taser
LQ Newbie
 
Registered: Feb 2004
Location: Australia
Distribution: RedHat
Posts: 4

Rep: Reputation: 0
Correcting "Hidden Sectors" value to allow booting from an extended partition


Is there a partition table editor for Linux? I have had a look at 'parted' but I don't think it has the capabilities I need.

Cut a long story short - I have a RedHat 9.0 / WinXP dual boot and GRUB won't boot into WinXP. I suspect this is because WinXP is installed on an extended partition. This excellent site - ("Understanding Multibooting" + I'm Feeling Lucky) - suggests that modfying the "Hidden Sectors" value in the partition table can allow booting from an extended partition. Many disk partitioners apparently inccorectly set this value, which prevents GRUB's chainloading technique from locating the WinXP boot sector.

I think I have read just about every support article and forum post on the web relating to GRUB dual booting issues but in case some genius can solve my problem some other way, here are the details (I would be *very* grateful):

Code:
[root@localhost root]# fdisk -l
                                                                                
Disk /dev/hda: 41.1 GB, 41174138880 bytes
255 heads, 63 sectors/track, 5005 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
                                                                                
   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1        13    104391   83  Linux                                      // Linux /boot
/dev/hda2          1148      5004  30981352+   f  Win95 Ext'd (LBA)        // Extended Partition
/dev/hda3            14      1082   8586742+  83  Linux
/dev/hda4          1083      1147    522112+  82  Linux swap
/dev/hda5          1148      1274   1020096    e  Win95 FAT16 (LBA)      // For Linux/XP sharing
/dev/hda6          1275      5004  29961193+   7  HPFS/NTFS                  // WinXP partition
 
Partition table entries are not in disk order

Here is the relevant part of my current grub.conf, which doesn't work ("Error 12: Invalid Device" or something similar if I recall)

title Windows XP
	map (hd0, 0) (hd0, 5)
	map (hd0, 5) (hd0, 0)
	rootnoverify (hd0,5)
	chainloader +1
Thanks for reading all of this, (those that made it this far).

Last edited by Ouch_Taser; 02-10-2004 at 05:32 AM.
 
Old 02-10-2004, 07:04 AM   #2
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
Quote:
/dev/hda2 1148 5004 30981352+ f Win95 Ext'd (LBA)
It's a bit since I've done this bootloader stuff so please treat what I say with caution.

Above quote says Windows not on first partition? Next to impossible to get it to boot unless it is on the first partition of one of the drives??

Quote:
title Windows XP
map (hd0, 0) (hd0, 5)
map (hd0, 5) (hd0, 0)
rootnoverify (hd0,5)
chainloader +1
Just spotted above; is this trying to convince Windows it's on the first partition? The use of the map command I am familiar with is using it when Windows is on the first partition of a non-first drive, say hdb1, to make it think it's on first partition of drive a - hda1.

Quote:
/dev/hda5 1148 1274 1020096 e Win95 FAT16 (LBA) // For Linux/XP sharing
Probably bollocks but isn't Win95 vfat, i.e. is the 'FAT 16' wrong??
 
Old 02-10-2004, 06:17 PM   #3
Ouch_Taser
LQ Newbie
 
Registered: Feb 2004
Location: Australia
Distribution: RedHat
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by lugoteehalt
Above quote says Windows not on first partition? Next to impossible to get it to boot unless it is on the first partition of one of the drives??
I had some progress last night. I used the PT Disk Editor (graphical DOS based editor) to change the Hidden Sector value in the NTFS logical partition to the correct value. Now GRUB *does* chainload to the correct location. However now I am getting the msg "Can't find NTLDR", but at least it is getting there.

I highly reccommend this article: http://www.goodells.net/multiboot/. Specifically: http://www.goodells.net/multiboot/ptedit.htm. A good straight-to-the-point post can be found here: http://groups.yahoo.com/group/xosl/message/2864


Quote:
Just spotted above; is this trying to convince Windows it's on the first partition?
Yeah I was but I didn't really know what I was doing, it was just a guess. It is now:

rootnoverify (hd0,5)
chainloader +1

Quote:
Probably bollocks but isn't Win95 vfat, i.e. is the 'FAT 16' wrong?? [/B]
Hmm, I don't think so. I thought vfat was some linux thing. In any case I havn't touched that drive since using DiskDruid

I have read the MS support article on fixing the NTLDR problem, but their scenarios do not cover Linux dual booting, so I suspect there is a simpler way to fix it in this case. Any suggestions?
 
Old 02-11-2004, 10:03 AM   #4
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
Quote:
modfying the "Hidden Sectors" value
Grub has a command for hidding - ?hiding - things. Maybe that would help.

Suspect, but don't take my word for it, that the problem is complex and it would be quickest to re-install Windows on the first partition and then, if necessary, re-install Linux.
 
  


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
"HOWTO Change Colour of Comments in VIM editor" manikantha Linux - General 8 07-16-2013 03:36 AM
"No partition table or unknown signature on partition table" 10.1 install madcow007 Slackware 4 02-09-2009 11:04 AM
RH Linux 9.0 installation step "Auto partitioning" not able to read partition table awahab Linux - Newbie 5 05-19-2005 07:53 AM
LiveCDs "building partition table" usually fail Audrey Linux - Newbie 1 04-14-2005 06:16 AM
Slack 10: S-ATA = "No partition table or unknown signature on partition table"? dissolved soul Slackware - Installation 11 08-05-2004 02:12 PM

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

All times are GMT -5. The time now is 11:12 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
Open Source Consulting | Domain Registration