partitions got messed up.

B

Bill Cunningham

I have two fat32 partitions and a ext3 partition 0x83 anyway. I had
that. I formatted my fat32 the bootable one and reinstalled xp x64. Well an
ext partition was created I have one fat32 partition with ntldr ntdetect.com
and boot.ini. And another partition is the main one with everything else on
it. What the heck. And there's 7-8 MB unallocated space between all these
new partitions. Can I get ntldr and ntdect.com and boot.ini all onto one
fat32 partition? The pagefile.sys in one the main system drive. Xp is
calling the other fat32 partition the boot partition. I want boot and system
on one partition. Whew.

Bill
 
P

Paul

Bill said:
I have two fat32 partitions and a ext3 partition 0x83 anyway. I had
that. I formatted my fat32 the bootable one and reinstalled xp x64. Well an
ext partition was created I have one fat32 partition with ntldr ntdetect.com
and boot.ini. And another partition is the main one with everything else on
it. What the heck. And there's 7-8 MB unallocated space between all these
new partitions. Can I get ntldr and ntdect.com and boot.ini all onto one
fat32 partition? The pagefile.sys in one the main system drive. Xp is
calling the other fat32 partition the boot partition. I want boot and system
on one partition. Whew.

Bill

I've run into this with Win2K.

I had a setup with Win2K on it, and decided to install a second copy.

What happened was, Win2K created an Extended Partition and put a
Logical Partition inside it (which should not be boot-able). The
second copy of Windows, relies on the first copy of Windows for
the boot.ini and other associated boot files. So the first copy
of Windows "runs the show", and when in the boot menu, if
you select the second copy, the second copy finishes booting.
In such a setup, you dare not delete the first copy of Windows!

And this means, the second copy doesn't need a complete set of files.
It can be missing boot files, because it depends on the first copy
to boot. As you say "What the heck".

I'm guessing your setup looks roughly like this (for anyone
else playing along at home). In my diagram here, I just assumed
the first WinXP was in the first partition. That's why I assigned
it the Active flag. If the Linux is controlling the booting
right now, and chain loading WinXP (first copy), I suppose it's
possible for the second copy to come up. I'm surprised the
second install doesn't reload the MBR with Windows boot code
(blowing away GRUB).

+-----+----------+---------+------------------+------------------------------------+
| MBR | FAT32 | FAT32 | EXT3 0x83 | Extended envelope (primary entry) |
| | Primary | Primary | (Linux) Primary +-------------------------+-- ... ---+
| | (Active) | | | Logical | |
| | | | | (Second copy of WinXP) | |
+-----+----------+---------+------------------+-------------------------+----------+

What you do next, really depends on what you were
trying to do in the first place.

I would:

0) Back up this hard drive before it is too late!

then

1) Boot my Linux LiveCD.
2) Use GParted.
Delete Extended envelope. Now back to three partitions.
New WinXP is effectively erased.
Create new FAT32 or NTFS primary, located at the end of the
disk, in place of the Extended. That should occupy the fourth
primary partition slot.
3) sudo fdisk /dev/sd...
turn off active on first partition.
make fourth partition active.
change partition type field of first partition (original WinXP) to 0x00
(first partition is now hidden.)
You must be very careful when doing this - the first partition "looks empty",
And lots of tools will jump at the chance to overwrite all the
fields in that first entry.
4) Boot installer CD. Install WinXP (second copy).
Specify location for installation (fourth partition).
Since the installer cannot see the first copy of WinXP, it
won't try any tricks. The MBR gets boot code. GRUB is disabled.
Linux is an orphan.
5) After WinXP install finished, go back to using the
Linux FDISK from your LiveCD (Linux onboard won't run),
change first partition type field from 0x00 to
0x0C or 0x07 or whatever it was in the first place.

This procedure makes the WinXP in the fourth partition,
a complete installation. The active (boot flag) is set.
There is no boot menu, because the new OS doesn't know
about the old OS. The old OS now looks like a data partition
in a way. The pagefile can be seen, but that's not a problem.
Since the OS in the fourth partition was booted, before the
first partition was turned back on, the presence of a pagefile.sys
won't cause a problem.

*******

And in case you say something like "I can't follow this",
you're the individual who thought it would be cool to
triple boot.

*******

I don't do this stuff myself. It's "one OS, one hard drive"
here in my shack. All OSes are independent of one another.
I unplug drives I don't want. No other drive is affected
when I unplug a drive. All drives are perfectly fine if
booted on the PC all by themselves.

I don't have a problem *simulating* triple boot setups
inside a VM, because "nobody gets hurt" if a VM is trashed.
I've had enough "accidents" here with real data and setups,
to not want to risk it with my primary setup.

To give a recent example of a bad outcome, I was multiplexing
OSes on my test machine. Came time to install Ubuntu,
was in a rush to get the show on the road. The prompt said
"will replace your existing Ubuntu install". Fine I said to
myself, it'll overwrite the existing Linux slash partition.
Pushed the button, and it erased the entire disk! Including
my large partition with the backup copies of all the other
OSes being multiplexed in, as well as an original copy
of my laptop backup. Grrr. You can never be too careful,
when a disk has stuff on it you should not be risking...
Ubuntu is now on my "treat it like Debian" list. No more
OS multiplexing on that disk, the OS is now fixed at Win7.
That won't bring back the lost backups. I'd have run TestDisk,
but the important stuff was already overwritten.

*******

I hope you make backups of your setups, before doing
dangerous stuff. If you'd made a backup, you could
just have restored and nobody would need to know what
happened :)

Paul
 
B

Bill Cunningham

[snip]
I hope you make backups of your setups, before doing
dangerous stuff. If you'd made a backup, you could
just have restored and nobody would need to know what
happened :)

I backup onto a USB stick before doing anything like this. My 1st
partition was 0x0c and 2nd 0xc the XP installation was in the 1st partition.
The 2nd fat32 was for any thing I might like to put in there or copy there
for a time. The 3rd partition was 0x83 linux primary. Is there a way to copy
the files from the boot partition ntldr, ntdect.com and boot.ini to the main
system XP partition and boot it? Or is that just too simple for MS to allow?

Bill
 
P

Paul

Bill said:
[snip]
I hope you make backups of your setups, before doing
dangerous stuff. If you'd made a backup, you could
just have restored and nobody would need to know what
happened :)

I backup onto a USB stick before doing anything like this. My 1st
partition was 0x0c and 2nd 0xc the XP installation was in the 1st partition.
The 2nd fat32 was for any thing I might like to put in there or copy there
for a time. The 3rd partition was 0x83 linux primary. Is there a way to copy
the files from the boot partition ntldr, ntdect.com and boot.ini to the main
system XP partition and boot it? Or is that just too simple for MS to allow?

Bill

So you're attempting to make the newest partition viable,
at the expense of anything else ?

Yes, you can copy files. (Make sure you do the copying, from
an environment where you can actually see all the files. You
don't want to miss any.) Now, what's in the files. For
example, are the *references* inside boot.ini correct ?
You'll want to keep one of the clumps of text in there,
because it corresponds to your newest install. Maybe you
don't have to do something about that right away.

There are two boot sectors. The first thing that helps
the boot process is in the MBR. You use "fixmbr" to reload
that. It all depends on what is currently doing the bootstrapping
at the moment, as to whether fixmbr needs to be used or not.
And it's not in the installed Windows OS - it's in the recovery
console of the installer CD. So if you boot the installer
CD, and don't install, the other option gets you to the
recovery console. You can run fixmbr from there.

The second boot sector is in the C: partition itself, up
in the file system header area. It is repaired/replaced with
"fixboot" command. I don't know whether that weird install
process actually loads a boot sector.

You copy over the missing files needed to boot.

Oh, I thought of another detail. You need to change this.

+-----+----------+---------+------------------+------------------------------------+
| MBR | FAT32 | FAT32 | EXT3 0x83 | Extended envelope (primary entry) |
| | Primary | Primary | (Linux) Primary +-------------------------+-- ... ---+
| | (Active) | | | Logical | |
| | | | | (Second copy of WinXP) | |
+-----+----------+---------+------------------+-------------------------+----------+

to this...

+-----+----------+---------+------------------+------------------------------------+
| MBR | FAT32 | FAT32 | EXT3 0x83 | Primary |
| | Primary | Primary | (Linux) Primary | (Second copy of WinXP) |
| | | | | (Active) |
| | | | | |
+-----+----------+---------+------------------+------------------------------------+

That requires a partition manager that knows how to do that. The
extended envelope occupies a couple of sectors, a small space.
The logical partition will likely get moved a short distance to the
left (which could take a while). The reason you have to do that,
is if you move the boot files back to the partition on the
right hand end, it's a logical and cannot boot by itself. There
is a need to get the active boot flag to point at the partition
to be booted, and the active flag cannot be associated with the
logical partition. But converting it back to a primary, the
active flag then makes sense. So you make it a primary first,
then set it active. If it still won't boot, you can apply the
fixboot to the right-most one again, from the recovery console.

And that should be enough to make a single OS run
on your disk. I don't think I have a partition manager
here right now, that would do such a transform.
(I'd have to check GParted to see if it can do that.)

The Linux is an orphan. It could be repaired. There
is presumably a way to re-install grub. I don't know
if it needs a chroot environment, or what it takes
to do the job. The most I've done with grub is update-grub.
Nothing more than that.

I heard the other day, there is a "super-grub livecd",
which apparently contains a way to boot that orphan OS
partition. Assuming that's what is in the 0x83. At one time,
I had a Linux install here, where grub was on a floppy.
I would boot the floppy, and it would pass control off
to the hard drive. So that Linux partition, had no impact
on anything else on the computer. Because the boot aspect
was contained on a floppy. It's possible that was
grub rather than grub2.

Paul
 
P

philo 

I have two fat32 partitions and a ext3 partition 0x83 anyway. I had
that. I formatted my fat32 the bootable one and reinstalled xp x64. Well an
ext partition was created I have one fat32 partition with ntldr ntdetect.com
and boot.ini. And another partition is the main one with everything else on
it. What the heck. And there's 7-8 MB unallocated space between all these
new partitions. Can I get ntldr and ntdect.com and boot.ini all onto one
fat32 partition? The pagefile.sys in one the main system drive. Xp is
calling the other fat32 partition the boot partition. I want boot and system
on one partition. Whew.

Bill



If you performed a default install of Win7 on a new drive,
there would have been a small (100 meg) boot partition.


Since you already had the drive divided up prior to your installation,
Windows simply follows the same rules that is has always followed since
at least Win95:


Windows can be installed on any drive you want...but the C: drive
(which must be an active primary partition must always contain your
necessary "boot" files. So, ntldr, ntdetect.com and boot.ini must remain
on your C: drive.

If all is working I would not worry about it...but personally I would
not use fat32. For it's fault tolerance capabilities I'd never consider
not using NTFS


As to the tiny amount of unallocated space...I would totally leave it
alone. It's way too small to worry about and I have an odd feeling that
if you tried to reclaim it something would get damaged in the process.
 
B

Bill Cunningham

If all is working I would not worry about it...but personally I would not
use fat32. For it's fault tolerance capabilities I'd never consider not
using NTFS

I've seen a lot of hacks for NTFS and some maybe worth using. I don't
"dislike" NTFS as much as I like simple fat32. No journals, extents and so
on that's in NTFS.
As to the tiny amount of unallocated space...I would totally leave it
alone. It's way too small to worry about and I have an odd feeling that if
you tried to reclaim it something would get damaged in the process.

Bill

Yeah I've read that windows and I know XP for sure. Needs that. It is
"marked" unallocated but who knows. In this situation. Now if a save my data
and zero out the mbr and repartition a new drive, I can split it and there;s
no unallocated space.

Why do I do this? Well from time to time adware, malware, and who knows
what all gets in there and I just erase all and re-install clean. Beats
those virus cleaners and such.
 
B

Bill Cunningham

It's fedora's grub2 I have no problem with it. It's in the MBR right
before the partition table. I have an mbr with grub and one without. And yes
there is a way to reinstall grub2 from the linux boot disk. You are right
about the LBA parition being inside a ext'd partition. So you think I should
make the linux partition active? That I haven't tried. What do you have in
mind?

Bill
 
P

Paul

Bill said:
It's fedora's grub2 I have no problem with it. It's in the MBR right
before the partition table. I have an mbr with grub and one without. And yes
there is a way to reinstall grub2 from the linux boot disk. You are right
about the LBA parition being inside a ext'd partition. So you think I should
make the linux partition active? That I haven't tried. What do you have in
mind?

Bill

Linux doesn't have an active partition. The Linux MBR doesn't check
for an active partition. The active flag is considered by a Windows-loaded
MBR.

Installing grub would re-load the MBR, and eventually boot some grub.cfg
with UUID partition addressing. That's how Linux finds the partitions. As
far as I know, the partitions can even be located on other disks, so a
disk1 grub, could access a disk2 slash partition.

If you install grub, after installing Windows, grub can
manage the boot process. It "chain loads" Windows. The question
then is, whether a Windows partition could be in a logical
and still be handed control. My guess is no, and proper maintenance
of your new Windows install will be needed, to make it no longer
depend on the original WinXP install.

grub ---> chain_load ---> pass control
original to new windows
windows install

With grub installed, then if you delete the original windows in the
primary partition, the new windows in the logical partition is
an orphan.

grub ---> ??? ---> pass control
to new windows
install

If you make the fourth partition with the new install, into
a self-sufficient OS, then chain loading directly to it would
work. You'd install grub, after fixing up that fourth partition.
At a minimum, you'd have to put some boot files in it (all
the invisible files seen on the first WinXP install, that
are missing on the second WinXP install.

grub -------------------> boot
to new windows
install

Personally, I would fix that fourth partition, to be a
standalone WinXP. The reason being, if you ever remove
Fedora and grub, you want an easily repairable WinXP.
By that time, a lot more effort has been invested in
loading up that WinXP with programs and stuff.

HTH,
Paul
 
B

Bill Cunningham

Paul said:
Linux doesn't have an active partition. The Linux MBR doesn't check
for an active partition. The active flag is considered by a Windows-loaded
MBR.

Installing grub would re-load the MBR, and eventually boot some grub.cfg
with UUID partition addressing. That's how Linux finds the partitions. As
far as I know, the partitions can even be located on other disks, so a
disk1 grub, could access a disk2 slash partition.

If you install grub, after installing Windows, grub can
manage the boot process. It "chain loads" Windows. The question
then is, whether a Windows partition could be in a logical
and still be handed control. My guess is no, and proper maintenance
of your new Windows install will be needed, to make it no longer
depend on the original WinXP install.

grub ---> chain_load ---> pass control
original to new windows
windows install

With grub installed, then if you delete the original windows in the
primary partition, the new windows in the logical partition is
an orphan.

grub ---> ??? ---> pass control
to new windows
install

If you make the fourth partition with the new install, into
a self-sufficient OS, then chain loading directly to it would
work. You'd install grub, after fixing up that fourth partition.
At a minimum, you'd have to put some boot files in it (all
the invisible files seen on the first WinXP install, that
are missing on the second WinXP install.

grub -------------------> boot
to new windows
install

Personally, I would fix that fourth partition, to be a
standalone WinXP. The reason being, if you ever remove
Fedora and grub, you want an easily repairable WinXP.
By that time, a lot more effort has been invested in
loading up that WinXP with programs and stuff.

HTH,
Paul

Indeed it does. Will give it a try. :)

Bill
 
P

philo 

I've seen a lot of hacks for NTFS and some maybe worth using. I don't
"dislike" NTFS as much as I like simple fat32. No journals, extents and so
on that's in NTFS.


But the journals are there to save your butt.

I've worked on machine that were shut down incorrectly or had failing
hard drives and have always been able to save most of the data on an
NTFS volume.

OTOH: I've seen incorrectly shut down fat32 volumes where CHKDSK (or
scandisk) rendered the entire drive full of tiny .CHK files


Personally I'd go with NTFS
Yeah I've read that windows and I know XP for sure. Needs that. It is
"marked" unallocated but who knows. In this situation. Now if a save my data
and zero out the mbr and repartition a new drive, I can split it and there;s
no unallocated space.

Why do I do this? Well from time to time adware, malware, and who knows
what all gets in there and I just erase all and re-install clean. Beats
those virus cleaners and such.


I do a lot of repair work and never need to reinstall Windows unless
there has been a serious compromise.


A little malware is usually easy enough to get rid of,,,but if it works
for you, who am I to judge?
 
B

Bill Cunningham

philo said:
But the journals are there to save your butt.

I've worked on machine that were shut down incorrectly or had failing hard
drives and have always been able to save most of the data on an NTFS
volume.

OTOH: I've seen incorrectly shut down fat32 volumes where CHKDSK (or
scandisk) rendered the entire drive full of tiny .CHK files

[snip]

chkdsk for the most part has always work for me. If part of the filesystem
is in memory when your computer is on and you simply turn it off. Well
garbage is sometimes written to fat32. I've got "cross-linked files"
"truncated files" and so on. And a lot of chk files and .000 files. But I
just erase those later.

Bill
 
B

Bill Cunningham

Another thing is that the MFT gets pretty fagmented sometimes. I don't
know if you can defrag it or not. And all files are mentioned there. The MFT
Zone that takes up space on the HD can be changed from 12.5% to 50% or more
of the drive. But it's not defragged through "normal" means.

Bill
 
P

philo 

"
I've worked on machine that were shut down incorrectly or had failing hard
drives and have always been able to save most of the data on an NTFS
volume.

OTOH: I've seen incorrectly shut down fat32 volumes where CHKDSK (or
scandisk) rendered the entire drive full of tiny .CHK files

[snip]

chkdsk for the most part has always work for me. If part of the filesystem
is in memory when your computer is on and you simply turn it off. Well
garbage is sometimes written to fat32. I've got "cross-linked files"
"truncated files" and so on. And a lot of chk files and .000 files. But I
just erase those later.

Bill



When the day comes that /all/ your data are written to CHK files you'll
wish you had used NTFS
 
P

philo 

Another thing is that the MFT gets pretty fagmented sometimes. I don't
know if you can defrag it or not. And all files are mentioned there. The MFT
Zone that takes up space on the HD can be changed from 12.5% to 50% or more
of the drive. But it's not defragged through "normal" means.

Bill



I ignore the MFT and it ignores me but like I said, were it not for the
MFT some of the data recovery jobs I've done would never have been
possible. I have seen near miracles happen on severely damaged drives.
 
B

Bill Cunningham

I ignore the MFT and it ignores me but like I said, were it not for the
MFT some of the data recovery jobs I've done would never have been
possible. I have seen near miracles happen on severely damaged drives.

There seems to be something else I have noticed. Ntfs seems to fragment
much more quickly than fat32 when dual booting with a linux partition. I am
assuming the reporting is correct. Otherwise I've noticed with ntfs and
*not* using linux ntfs does not fragment as quickly as fat32. Now I had all
kinds of trouble with Fat16. Maybe it was the speed of the floppy drives
back then in reading 3.5" floppies or what.

Again it's not that I have anything against ntfs. I have used it quite a
bit. And will again. But not lately. I'm really experimenting with the two
also. And portability across platforms. Linux reads and writes to ntfs just
fine now so that's not an issue.

Bill
 
P

philo 

There seems to be something else I have noticed. Ntfs seems to fragment
much more quickly than fat32 when dual booting with a linux partition. I am
assuming the reporting is correct. Otherwise I've noticed with ntfs and
*not* using linux ntfs does not fragment as quickly as fat32. Now I had all
kinds of trouble with Fat16. Maybe it was the speed of the floppy drives
back then in reading 3.5" floppies or what.

Again it's not that I have anything against ntfs. I have used it quite a
bit. And will again. But not lately. I'm really experimenting with the two
also. And portability across platforms. Linux reads and writes to ntfs just
fine now so that's not an issue.

Bill



My main machine runs Linux and dual boots with XP.

The Linux installation has /zero/ effect on XP



The only possible reason for using Fat32 would be for an external drive
that you might want to use to transfer data between a Mac and/or a Linux
machine.

Of course, it would not be good for transferring files over 4 gigs (such
as a video)

Only recently have I realized that exFat is a good way to get over that
barrier
 
B

Bill Cunningham

philo said:
On 12/18/2014 08:03 PM, Bill Cunningham wrote:



My main machine runs Linux and dual boots with XP.

The Linux installation has /zero/ effect on XP

Well I copy files back and forth from ext3 usually and fat32 or ntfs.
After doing that a few times ntfs is ready for defrag. I check fat32 and it
seems to go longer without needing defragged as I copy files between fat32
and ext3. I rarely use ext4 either. Too much overhead and I don't see where
extents and added things help much more than Ted's design for the simple
journal. Maybe I'm wrong.

The only possible reason for using Fat32 would be for an external drive
that you might want to use to transfer data between a Mac and/or a Linux
machine.

Maybe carrying data on a USB Fat32 might even "outperfom" NTFS. If not I
don't know that all the NTFS goodies would be so "economical" on a say 30-40
GB USB
Of course, it would not be good for transferring files over 4 gigs (such
as a video)

I see your point there. Large file support isn't there.

Only recently have I realized that exFat is a good way to get over that
barrier

Yes I know of exfat too. It think it might be a kind of Fat 64 or
attempt at it. Many are pointing to btrfs and xfs as the best of modern
filesystems. But I don't pay much attention to those as XP doesn't run on
them.

Bill
 
P

philo 

Well I copy files back and forth from ext3 usually and fat32 or ntfs.
After doing that a few times ntfs is ready for defrag. I check fat32 and it
seems to go longer without needing defragged as I copy files between fat32
and ext3. I rarely use ext4 either. Too much overhead and I don't see where
extents and added things help much more than Ted's design for the simple
journal. Maybe I'm wrong.


I do access my XP partition from Linux and write to it etc and have not
experienced problems. As to ext3 vs ext4 they are essentially the same
thing. You can actually just mount an ext3 partition as ext4 with no
upgrade being necessary
 
B

Bill Cunningham

Just thought I'd say I formated with NTFS yesterday. Tody I installed
linux and checked ntfs fragmentation. It was a mess. Over 2.4 G of
fragmented files. Whew.

Bill
 
B

Barry Schwarz

Just thought I'd say I formated with NTFS yesterday. Tody I installed
linux and checked ntfs fragmentation. It was a mess. Over 2.4 G of
fragmented files. Whew.

I thought linux used Unix file systems. Isn't NTFS specific to
Windows?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top