Re: Linux and Windows partitioners fail to see opposite partitions
Joe wrote: Elmer E. Dow wrote: Recall that I used the DOS console to run fdisk /mbr to get XP to boot. Would installing grub on the MBR make Linux once again see the whole drive? It should at least allow correct booting. I wish I knew for sure. The XP Disc Manager and fdisk seem to agree on what's where, I really don't understand why gparted isn't seeing exactly the same thing. The Lenny installer is normally able to see Windows installations, and to either offer to include them in the grub menu or do so without asking. Even if it doesn't, that's easy to fix, as long as it puts itself in the right place. You'll certainly learn something from the early stages of the Lenny installation. Since you have XP recovery media and it's a new installation, you have nothing to lose by experimenting. There's clearly something odd going on, as I would certainly expect the recovery to have taken the whole drive, possibly splitting it into more than one partition, but all Windows types. And I've never known an XP installation, whether from recovery or Microsoft media, to need a repair to the MBR before it would boot. That's just silly, recovery should be simple enough for a businessman to do. As to Partition Magic, it certainly should do no harm and may throw some more light on the situation. Also, a recovery partition normally is just that, possibly a hidden type, but always listed in the partition table, showing in the Disc Manager or with fdisk. I've never seen apparently unallocated space used before, which tells us that the BIOS must know something about the disc details, and is maintaining some kind of safeguard against deletion. I'd assume that the Disc Manager is also unable to write there. My feeling is that the partition table is not completely standard. If I wasn't worried about XP, I'd probably write the numbers down, delete it all with fdisk and recreate it, then write the table back to disc. That won't touch the data, but it might mess up something that the recovery system uses. Maybe, initiating the recovery again from the BIOS would restore it, maybe not. I'd only try it if I was certain I'd never need Windows recovery again. On the other hand, presumably the separate recovery media you have should work even on a new blank HD. Best of luck, I don't think I can offer any more advice. If you do solve it, let us know, it might help someone else in future. I found the answer here: http://ubuntuforums.org/showthread.php?t=437814 fdisk /dev/hda m w This rewrites the partition table. Gparted is now displaying the partitions in what appears to be a correct manner. I'm off and running. Now I can finish my multiboot installation. Will post again if there are any complications caused by this procedure. Thanks for your input. Elmer -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4baa3a24.3090...@att.net
Re: Linux and Windows partitioners fail to see opposite partitions
On Wed, Mar 24, 2010 at 9:13 AM, Elmer E. Dow elmere...@att.net wrote: [snip] I found the answer here: http://ubuntuforums.org/showthread.php?t=437814 fdisk /dev/hda m w Maybe you didn't see my email reply to Debian List when you first posted this but this is exactly what I said to do, except I suggested using cfdisk via an Ubuntu Live CD. Glad it's working though. Mark
Re: Linux and Windows partitioners fail to see opposite partitions
Mark wrote: On Wed, Mar 24, 2010 at 9:13 AM, Elmer E. Dow elmere...@att.net mailto:elmere...@att.net wrote: [snip] I found the answer here: http://ubuntuforums.org/showthread.php?t=437814 fdisk /dev/hda m w Maybe you didn't see my email reply to Debian List when you first posted this but this is exactly what I said to do, except I suggested using cfdisk via an Ubuntu Live CD. Glad it's working though. Mark I appreciated your suggestion, but in my ignorance I wasn't sure what to do after I entered cfdisk. You said, You could try and fix this using the cfdisk command via an Ubuntu Live CD, it's worked before for me to rewrite the mbr according to the partition locations it recognizes and I didn't equate rewriting the partition table (as the cfdisk man page says for the command W) with rewriting the mbr as you said. It's sinking in now that evidently the mbr and the partition table are the same thing. I need to do some reading to get a better understanding of the workings of a computer system in general and the boot process in particular. Elmer -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4baa536f.1080...@att.net
Re: Linux and Windows partitioners fail to see opposite partitions
On Wed, 24 Mar 2010 14:01:19 -0400 (EDT), Elmer E. Dow wrote: It's sinking in now that evidently the mbr and the partition table are the same thing. The master boot record is cylinder 0, head 0, record 1, the very first record on the hard disk, which is outside of any partition. The master boot record *contains* the main partition table. According to the standard MS-DOS partitioning scheme, one can define a minimum of 0, maximum of 4 primary partitions, a minimum of 0, maximum of 1 extended partitions, and the total of primary partitions plus extended partitions is a minimum of 0, maximum of 4. Thus, if an extended partition is present, there can be a maximum of three primary partitions. If an extended partition is not present, there can be up to four primary partitions. Linux assigns the partitions defined here a number in the range 1-4. If an extended partition is defined, then the boot sector for the extended partition (which is separate from the master boot record) *contains* the definitions for the logical drives, which can be thought of as a secondary partition table. (I'm using DOS terminology here. DOS calls them logical drives. Linux calls them logical partitions.) Linux assigns these logical partitions a number from 5 and up. There can be a gap in partition numbers if an extended partition is defined and fewer than three primary partitions are defined. For example, /dev/hda1 could be a primary partition, /dev/hda2 could be an extended partition, /dev/hda3 does not exist, /dev/hda4 does not exist, and /dev/hda5 is a logical partition. The extents defined for the extended partition in the main partition table (starting cylinder and ending cylinder) must cover the entire range of extents defined for all logical drives, and may overlap on both sides. In other words, a logical partition is a sub-division of the extended partition. HTH -- .''`. Stephen Powellzlinux...@wowway.com : :' : `. `'` `- -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/159132389.21394991269455492286.javamail.r...@md01.wow.synacor.com
Re: Linux and Windows partitioners fail to see opposite partitions
Elmer E. Dow wrote: page says for the command W) with rewriting the mbr as you said. It's sinking in now that evidently the mbr and the partition table are the same thing. I need to do some reading to get a better understanding of the workings of a computer system in general and the boot process in particular. In addition to Stephen's post, which covers most of what you need to know in practical terms, there are plenty more gory details here: http://en.wikipedia.org/wiki/Master_boot_record To avoid confusion, I'd add that most (all?) MBR fixing utilities don't actually touch the partition table entries, they write the first 446 bytes. Recreating a partition table by reading the raw drive data, containing unknown partition types and filesystems, is not a trivial job, and will not be attempted by a simple utility. So it's still possible for an MBR fixing utility to replace 446 bytes of correct code but leave a corrupted partition table in place. It is also possible, but made clear not to be the case here by your fdisk listing, for partition table entries to be placed out of order on the physical drive i.e. fdisk will allow you to create hda6 with higher-numbered cylinders than hda7. Most software which reads the partition table can deal with this, some cannot and will fail to see all partitions. There was a Microsoft-approved method of installing NT4.0 to a hard drive of greater than a certain size (I forget how big, but 8GB rings a bell) which involved two NT4.0 installations, one to a primary partition placed after an extended partition i.e. with higher cylinder numbers than the extended and logical partitions. I recall at least one piece of software, possibly Partition Magic or one of its competitors, freaking out about that. -- Joe -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4baa7119.9090...@jretrading.com
Re: Linux and Windows partitioners fail to see opposite partitions
It couldn't be said better than this way. :-) You don't know where your shadow will fall, Somebody.- Olaf Reitmaier Veracierta (BB) ola...@gmail.com http://olafrv.googlepages.com -Original Message- From: Stephen Powell zlinux...@wowway.com Date: Wed, 24 Mar 2010 14:31:32 To: debian-user@lists.debian.org Subject: Re: Linux and Windows partitioners fail to see opposite partitions On Wed, 24 Mar 2010 14:01:19 -0400 (EDT), Elmer E. Dow wrote: It's sinking in now that evidently the mbr and the partition table are the same thing. The master boot record is cylinder 0, head 0, record 1, the very first record on the hard disk, which is outside of any partition. The master boot record *contains* the main partition table. According to the standard MS-DOS partitioning scheme, one can define a minimum of 0, maximum of 4 primary partitions, a minimum of 0, maximum of 1 extended partitions, and the total of primary partitions plus extended partitions is a minimum of 0, maximum of 4. Thus, if an extended partition is present, there can be a maximum of three primary partitions. If an extended partition is not present, there can be up to four primary partitions. Linux assigns the partitions defined here a number in the range 1-4. If an extended partition is defined, then the boot sector for the extended partition (which is separate from the master boot record) *contains* the definitions for the logical drives, which can be thought of as a secondary partition table. (I'm using DOS terminology here. DOS calls them logical drives. Linux calls them logical partitions.) Linux assigns these logical partitions a number from 5 and up. There can be a gap in partition numbers if an extended partition is defined and fewer than three primary partitions are defined. For example, /dev/hda1 could be a primary partition, /dev/hda2 could be an extended partition, /dev/hda3 does not exist, /dev/hda4 does not exist, and /dev/hda5 is a logical partition. The extents defined for the extended partition in the main partition table (starting cylinder and ending cylinder) must cover the entire range of extents defined for all logical drives, and may overlap on both sides. In other words, a logical partition is a sub-division of the extended partition. HTH -- .''`. Stephen Powellzlinux...@wowway.com : :' : `. `'` `- -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/159132389.21394991269455492286.javamail.r...@md01.wow.synacor.com
Re: Linux and Windows partitioners fail to see opposite partitions
On Wed, 24 Mar 2010 16:07:53 -0400 (EDT), Joe wrote: In addition to Stephen's post, which covers most of what you need to know in practical terms, there are plenty more gory details here: http://en.wikipedia.org/wiki/Master_boot_record Good link, Joe. Thanks. wikipedia is one of my favorite research sites too. -- .''`. Stephen Powellzlinux...@wowway.com : :' : `. `'` `- -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1999432118.21428071269463622597.javamail.r...@md01.wow.synacor.com
Re: Linux and Windows partitioners fail to see opposite partitions
Elmer E. Dow wrote: I have an IBM R40 laptop which had WinXP and Debian Lenny installed. Due to a problematic upgrade to XP SP2, I decided to use the built-in system restore to reinstall XP. Also, I wanted to play around with Lenny more, so I decided that I'd reinstall two versions of Lenny, too. So I used dban on the partitions to assure a fresh start, then reinstalled XP using the built-in restore feature. I expected that XP would do what it did during the last installation session: allocate the whole drive to itself. Then I expected to go in with gparted and set up the Linux partitions. Windows installed just fine, except that after doing so, I had to do fdisk /mbr from a DOS console in order to set the mbr to boot XP. I decided to prep for the installation of the two versions of Debian, so I booted up a gparted live 0.5.2-1 cd. I discovered that gparted only saw the 34.31GB unallocated area on the 40GB drive -- no sign of the partition with XP on it. So I tried an older version of gparted on a Puppy cd and it agreed with the gparted cd: 34.31GB unallocated. I'm concerned that the new Lenny installations won't be able to see the XP partition. I booted XP and it reported 5.86GB total, with 1.93GB free. It doesn't see beyond its borders either. I'm tempted to reinstall Partition Magic on XP and see what it reports. Is that a wise move or should I look at other options? I'd used it during the last installation on this machine and I'm guessing that using a different partitioner has caused this current problem. If I use Partition Magic to resize the Linux partitions, isn't it likely that Linux won't then be able to then see those partitions, too? I'm wondering if grub won't be able to boot Linux if grub is installed on the MBR at the beginning of the drive (where XP is located) because it won't see the Linux partition. Or will grub install on the first Linux partition because it can't see the XP partition before it? Then grub won't boot XP because it can't see it. How can I use Linux tools to fix what Linux can't see? I'd appreciate any advice as to how to proceed. To begin with, run fdisk -l from a Linux command line, then when you're sure of the disc name, fdisk /dev/. If you're not sure what you're looking at, post the result here. When you say 'built-in restore', what do you actually mean? If you haven't got a recovery CD, that generally means there is a hidden partition on the hard drive, which may complicate things. You don't want to damage that if you will need XP in the future, so if you find one it's probably best copied off onto a DVD ASAP. The recovery system, whatever it is, will start by partitioning the drive exactly as it came from the factory. Windows generally will neither see nor mount filesystems it doesn't use itself, but the XP Disc Manager (in Admin Tools, Computer Management) should show other partitions as existing and 'unknown'. Needless to say, all Linux tools should show all partitions. Windows also needs to have its boot files at least on a primary, bootable partition. Linux doesn't care. The non-booting of XP is suspicious, and something I've never seen. By the way, depending on what you're using it for, and for how long, your XP partition might be a bit small. -- Joe -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4ba87f92.1060...@jretrading.com
Re: Re: Linux and Windows partitioners fail to see opposite partitions
Elmer E. Dow wrote: I have an IBM R40 laptop which had WinXP and Debian Lenny installed. Due to a problematic upgrade to XP SP2, I decided to use the built-in system restore to reinstall XP. Also, I wanted to play around with Lenny more, so I decided that I'd reinstall two versions of Lenny, too. So I used dban on the partitions to assure a fresh start, then reinstalled XP using the built-in restore feature. I expected that XP would do what it did during the last installation session: allocate the whole drive to itself. Then I expected to go in with gparted and set up the Linux partitions. Windows installed just fine, except that after doing so, I had to do fdisk /mbr from a DOS console in order to set the mbr to boot XP. I decided to prep for the installation of the two versions of Debian, so I booted up a gparted live 0.5.2-1 cd. I discovered that gparted only saw the 34.31GB unallocated area on the 40GB drive -- no sign of the partition with XP on it. So I tried an older version of gparted on a Puppy cd and it agreed with the gparted cd: 34.31GB unallocated. I'm concerned that the new Lenny installations won't be able to see the XP partition. I booted XP and it reported 5.86GB total, with 1.93GB free. It doesn't see beyond its borders either. I'm tempted to reinstall Partition Magic on XP and see what it reports. Is that a wise move or should I look at other options? I'd used it during the last installation on this machine and I'm guessing that using a different partitioner has caused this current problem. If I use Partition Magic to resize the Linux partitions, isn't it likely that Linux won't then be able to then see those partitions, too? I'm wondering if grub won't be able to boot Linux if grub is installed on the MBR at the beginning of the drive (where XP is located) because it won't see the Linux partition. Or will grub install on the first Linux partition because it can't see the XP partition before it? Then grub won't boot XP because it can't see it. How can I use Linux tools to fix what Linux can't see? I'd appreciate any advice as to how to proceed. Joe: To begin with, run fdisk -l from a Linux command line, then when you're sure of the disc name, fdisk /dev/. If you're not sure what you're looking at, post the result here. -- Elmer: Here's the result of fdisk -l: Warning:invalid flag 0x of partition table 5 will be corrected by w(rite) Disk /dev/hda: 36.8GB 368448527872 bytes 240 heads, 63 sectors/track, 4759 cylinders Units: cylinders of 15120*512=7741440 bytes Disk identifier: 0xcccdcccd Device Boot Start End Blocks ID Systen /dev/hda1 * 1 813 6146248+ 7 HPFS/NTFS /dev/hda2 814 2234 10742760 Linux /dev/hda3 2235 2880 4883760 83 Linux /dev/hda4 2881 4301 10742760 f W95 Ext'd (LBA) Joe: When you say 'built-in restore', what do you actually mean? If you haven't got a recovery CD, that generally means there is a hidden partition on the hard drive, which may complicate things. You don't want to damage that if you will need XP in the future, so if you find one it's probably best copied off onto a DVD ASAP. -- There's a hidden recovery partition which doesn't show up on Partition Magic nor has it shown up previously on gparted. When resizing partitions, the partitioner just won't use the last 3 or 4 GB or so at the end of the drive. It can be made viewable by changing a setting in the BIOS. I also have recovery CDs, so I could get recovery even if I messed up the reinstallation from the recovery partition. -- Joe: The recovery system, whatever it is, will start by partitioning the drive exactly as it came from the factory. -- Elmer: That's what I thought, too, and so am surprised that it didn't take over the whole drive. Joe: Windows generally will neither see nor mount filesystems it doesn't use itself, but the XP Disc Manager (in Admin Tools, Computer Management) should show other partitions as existing and 'unknown'. Needless to say, all Linux tools should show all partitions. Windows also needs to have its boot files at least on a primary, bootable partition. Linux doesn't care. The non-booting of XP is suspicious, and something I've never seen. By the way, depending on what you're using it for, and for how long, your XP partition might be a bit small. -- Joe --- Elmer: I'm keeping XP around for legal DVD playing, so I don't need much space
Re: Linux and Windows partitioners fail to see opposite partitions
Elmer E. Dow wrote: Recall that I used the DOS console to run fdisk /mbr to get XP to boot. Would installing grub on the MBR make Linux once again see the whole drive? It should at least allow correct booting. I wish I knew for sure. The XP Disc Manager and fdisk seem to agree on what's where, I really don't understand why gparted isn't seeing exactly the same thing. The Lenny installer is normally able to see Windows installations, and to either offer to include them in the grub menu or do so without asking. Even if it doesn't, that's easy to fix, as long as it puts itself in the right place. You'll certainly learn something from the early stages of the Lenny installation. Since you have XP recovery media and it's a new installation, you have nothing to lose by experimenting. There's clearly something odd going on, as I would certainly expect the recovery to have taken the whole drive, possibly splitting it into more than one partition, but all Windows types. And I've never known an XP installation, whether from recovery or Microsoft media, to need a repair to the MBR before it would boot. That's just silly, recovery should be simple enough for a businessman to do. As to Partition Magic, it certainly should do no harm and may throw some more light on the situation. Also, a recovery partition normally is just that, possibly a hidden type, but always listed in the partition table, showing in the Disc Manager or with fdisk. I've never seen apparently unallocated space used before, which tells us that the BIOS must know something about the disc details, and is maintaining some kind of safeguard against deletion. I'd assume that the Disc Manager is also unable to write there. My feeling is that the partition table is not completely standard. If I wasn't worried about XP, I'd probably write the numbers down, delete it all with fdisk and recreate it, then write the table back to disc. That won't touch the data, but it might mess up something that the recovery system uses. Maybe, initiating the recovery again from the BIOS would restore it, maybe not. I'd only try it if I was certain I'd never need Windows recovery again. On the other hand, presumably the separate recovery media you have should work even on a new blank HD. Best of luck, I don't think I can offer any more advice. If you do solve it, let us know, it might help someone else in future. -- Joe -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4ba926d6.8080...@jretrading.com
Linux and Windows partitioners fail to see opposite partitions
I have an IBM R40 laptop which had WinXP and Debian Lenny installed. Due to a problematic upgrade to XP SP2, I decided to use the built-in system restore to reinstall XP. Also, I wanted to play around with Lenny more, so I decided that I'd reinstall two versions of Lenny, too. So I used dban on the partitions to assure a fresh start, then reinstalled XP using the built-in restore feature. I expected that XP would do what it did during the last installation session: allocate the whole drive to itself. Then I expected to go in with gparted and set up the Linux partitions. Windows installed just fine, except that after doing so, I had to do fdisk /mbr from a DOS console in order to set the mbr to boot XP. I decided to prep for the installation of the two versions of Debian, so I booted up a gparted live 0.5.2-1 cd. I discovered that gparted only saw the 34.31GB unallocated area on the 40GB drive -- no sign of the partition with XP on it. So I tried an older version of gparted on a Puppy cd and it agreed with the gparted cd: 34.31GB unallocated. I'm concerned that the new Lenny installations won't be able to see the XP partition. I booted XP and it reported 5.86GB total, with 1.93GB free. It doesn't see beyond its borders either. I'm tempted to reinstall Partition Magic on XP and see what it reports. Is that a wise move or should I look at other options? I'd used it during the last installation on this machine and I'm guessing that using a different partitioner has caused this current problem. If I use Partition Magic to resize the Linux partitions, isn't it likely that Linux won't then be able to then see those partitions, too? I'm wondering if grub won't be able to boot Linux if grub is installed on the MBR at the beginning of the drive (where XP is located) because it won't see the Linux partition. Or will grub install on the first Linux partition because it can't see the XP partition before it? Then grub won't boot XP because it can't see it. How can I use Linux tools to fix what Linux can't see? I'd appreciate any advice as to how to proceed. EED -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4ba7f2ff.2010...@att.net
Re: Linux and Windows partitioners fail to see opposite partitions
On Mon, Mar 22, 2010 at 3:45 PM, Elmer E. Dow elmere...@att.net wrote: [snip] So I used dban on the partitions to assure a fresh start, then reinstalled XP using the built-in restore feature. I expected that XP would do what it did during the last installation session: allocate the whole drive to itself. Then I expected to go in with gparted and set up the Linux partitions. [snip] From my experience, dban'ing messes up the mbr, even if you don't destroy the whole drive (i.e. even if you select a few partitions from the dban screen instead of them all). It deletes the partition but doesn't update the partition table per say. My guess is this is where the trouble started. You could try and fix this using the cfdisk command via an Ubuntu Live CD, it's worked before for me to rewrite the mbr according to the partition locations it recognizes, and you can also use it to make the XP partition bootable by toggling the bootable flag on but it sounds like XP is already bootable for you. Might save you some headache in the future though. [snip] I'm concerned that the new Lenny installations won't be able to see the XP partition. [snip] What I've done for dual-boots is to first make sure the machine boots to Windows before installing Debian. If it does that, the mbr is in tact and Grub has always recognized the Windows installation, for me at least. Mark