Hello,
I just bought a new 160 GB Seagate Hard drive to replace the 40 GB in my computer. I decided to clone the system using a linux live CD and did weeks of research on how to do it. The hard drive came, and I went to work. I used dd (exact command dd if=/dev/sda of=/dev/sdb bs32768) and it worked like a charm. I then resized the partitions, made the NTFS partition 100 GB bigger, and extended the FAT 32 partition then I created an ext3 partition. I then tried to make a linux-swap partition at the end of the drive, and it told me I could not have more than 4 primary partitions (1 FAT 16 partition, 1 NTFS, 1 FAT 32, 1 ext3). it suggested creating an extended partition and creating primary drives within that. I did this, applied the changes, it completed with no errors. I then started windows with my old drive, with the new repartitioned drive in an external enclosure, and was pleased to see all the partitions and be able to use all the files in the NTFS partition. I powered off the machine, slipped the new drive in, and started it up. I got a boot error, restarted, got it again. I switched back, put the drive back in an enclosure, and from then on it registers as the exact same size as my old drive, 38.5 GBs and I have formatted it, wiped it, even zeroed it out with dban, all to no avail. BIOS recognizes it as a 40 GB, so does linux and windows. I have tried everything to get it back to factory settings, but it hasn't worked. any suggestions?
saikee
08-25-2007, 07:20 PM
You should solve one problem at a time.
Currently you have two; one is the cloned drive doesn't boot and second the partition isn't the size you want.
On the first problem we need to know a little bit more as you have not mentioned if the original hard disk has Linux or not.
Your first priority is to get XP cloned successfully and use it first.
Having done that you can download the current version of Parted Magic or Gparted to "resize" the XP partition to the new size you want it to.
My guess is that you have changed the partition table, by resizing and creating extra partition with a fat partition involved, but did not reboot to let the OS validate the partition table. If you don't then the partition table may not have been written out properly, especially if you mounted the partitions and have files moving around. The Bios may be still using the old partition table.
If you change a partition boundary always reboot and then check the system.
-------------------------------
By the way
Welcome to JustLinux mikey85co
mikey85co
08-28-2007, 12:30 PM
OK, I found out how to restore the original harddrive capacity.
I have tried multiple times to clone the harddrive with the "dd" utility in Knoppix (dd if=/dev/sdb [old drive] of=/dev/sda [new drive] bs=32768) it always completes successfully with no errors. As soon as it finishes cloning, I reboot, then I resize the partitions, then I reboot. The walkthrough I am using says that once I do this, I just need to boot from the windows install disk and run fixmbr, then it will boot normally. It doesn't. Every time I try to boot into windows, it gives a hard drive error, won't boot, then when I reboot the BIOS reads it as a 40 GB hard drive, when up until that point it had been reading it as a 160 GB every time I booted up. This is getting really frustrating and makes me wish I could clone XP as easily as OS X can be cloned.
Any suggestions?
mrrangerman43
08-28-2007, 01:11 PM
I've not used dd so this is more of a question for better understanding, wouldn't it work to take the 160 drive and make the first pri-partition the size you want for windows-xp first, with cfdisk or fdisk? Then mirror xp onto that partition with the dd command, then after you can make what ever partition sceem you like with the remaining space. Like I said I've never used dd so I don't know if you can make the partition first and then mirror or if it needs to do it all in one shot.
mikey85co
08-28-2007, 02:25 PM
I have tried that. The problem seems to be that if I do not mirror the entire hard drive, the computer will not boot from the new drive. If I size a partition, and mirror the system partition to it, it simply doesn't work. If I mirror the entire hard drive, it will boot, but only recognize the drive as a 40 Gb, which tells me that somehow I need to get a utility which will be able to successfully update the partition table so that windows simply sees more space on the system disk and not errors.
All I know about dd is that it copies every bit of data on the specified partition or drive to the new drive, leaving any unused space unallocated. I just don't know what to do. I have a Dell laptop, so it could be that there is some more complex way that I need to do this. Thanks.
saikee
08-28-2007, 07:28 PM
mikey85co,
You really need to simplify the questions because I do not read just one post. Your information is confusing as I don't know what needs to be advised on.
Let me see you seem to have got the idea of cloning the whole disk will work and the systems always boot, right? mrrangerman43 idea of cloning one partition instead of the whole disk is not as easy and reliably as cloning the hole disk because the latter can guarantee absolutely no change in the partition table and no excuse for XP not to boot.
However your post #3 quotes
Every time I try to boot into windows, it gives a hard drive error, won't boot, then when I reboot the BIOS reads it as a 40 GB hard drive
To be honest I have never seen a Bios that can tell the size of a hard disk. It normally just says Samsung HD501 or WD500 which is just the model number. It is never the Bios business to interfere with how much capacity of the disk is being used by operating systems.
As far as I am aware your clone disk will boot if you remove the original 40Gb disk and put the clone in exactly the same position with exactly the same jumper setting.
When you keep saying the disk only shows 40Gb after cloning isn't this what cloning supposed to be? A 100% mirror image of the original. The remaining balance of the disk capacity is just empty hard disk space which you can used for creating a maximum of total 15 partitions, or as I stated in Post #2
you can download the current version of Parted Magic or Gparted to "resize" the XP partition to the new size you want it to.
Linux needs to treat a ntfs partition very carefully because it is a proprietary system that the specification is not available to the public. You need to install a special software like ntfs-3g in order to write a ntfs partition reliably. To "resize" a ntfs partition is even more demanding because one wrong move can result the partition unbootable and even corrupted. Is it a big deal to download a "free" but reliable tool to resize a ntfs partition?
Parted Magic or Gparted are tools that a Linux user should not do without so having them does no harm at all.
If you are unwilling to use the resize "utility" to change the boundary of the XP system then just use the empty free hard disk space for other purposes.
mikey85co
08-29-2007, 10:55 AM
OK, let me clarify, and I am trying to do this process on a Dell Inspiron E1505. Let me describe what happens start to finish. I put a completely blank 160 GB drive in a USB external enclosure. I connect it, then boot from the Knoppix liveCD. I open the console, and run dd to mirror my notebook drive to the one in the enclosure. When that process completes, I reboot, then I boot back into knoppix and use Gparted to resize the partitions on the drive in the enclosure. I then power down, pull the 160 GB drive out of the enclosure and switch it with my internal 40 GB notebook drive, which I completely disconnect. I boot, go into the BIOS where it says what type and what size the hard drive is to verify that it detects a 160 GB drive. I then boot from the Windows install disk and run chkdsk. It finds no errors, so I boot directly to the hard disk. It begins to boot, then Windows displays a fatal error. When I power off and power back on, the BIOS now says I have a 38 GB hard drive when it said 160 the last time I turned the computer on. The space is simply not there. It does not show unallocated space, neither in any Linux LiveCD or in disk management in windows. There is no empty space to extend the partitions to, as far as OSes are concerned. I hope that clarifies my situation. Also, I spent weeks reading up on how to do this, have followed directions to the tee, but my computer seems to not like the idea of booting to a different hard drive.
saikee
08-29-2007, 12:31 PM
OK
This is a possible explanation. XP has a record of its last setting and the hard disk serial number. You should not have run the installation disk because that is what might have gone wrong. If the disk has been cloned successfully there is no need to check for error.
When a cloned disk boots first time XP will discover the recorded serial number of the hard disk no longer matches the new disk. XP need a correction and so it will demand an immediate reboot before the hardware can work satisfactorily. You must stop everything to allow XP to do this reboot. The message will come with minutes on the first boot.
If you use the installation CD to run chkdsk then XP may try to protect itself by hanging on to the old partition table and setting.
In any case your free hard disk space can only be seen in the disk management program.
In conclusion you should clone the disk, run it to see if everything is satisfactory, allow XP to reboot itself and then you resize it.
mikey85co
08-29-2007, 07:28 PM
I found on the Dell forums that this problem is common, and is causde by a Dell program called Mediadirect. It allows you to boot directly into its own little OS and watch DVD's, listen to music. It uses the LBA-3 sector of the hardrive and utilizes HPA so that the partition can be booted too alternatively to the primary partition. The solution to my problem lies in going into the LBA-3 sector and zeroing it out, thus disabling the feature for all time on my computer. Oh well, good riddance, Its a waste of space and I've only used it once. Thanks for all who gave advice, I'm going to go try this now, and will let everybody know how it goes.
mikey85co
09-01-2007, 11:15 AM
OK, after a ton of research and a lot of good suggestions here, I finally did manage to get the computer to boot into my old configuration and have all the space of the 160 GB hard drive. Here's how. Dell puts a special MBR on their disks which allows you to boot into Windows, or a system recovery partition, or a diagnostics partition, or Mediadirect. once I migrated the system over, I used HDAT2 to restore the system capacity, then I used a regular XP Pro install disk (not the Dell disc they sent at my request) and used the fixmbr command. It warned me that there was an irregular MBR and that overwriting it could possibly do harm to my partition table. I hit "y" when it asked me if I was sure, and boom, done. I booted up, and all the space showed up in disk management. I restarted, booted knoppix, and used Gparted to delete the FAT32 recovery partition, and resize the NTFS partition. (There is also a FAT16 partition at the beginning of the drive with the Dell utilities, but when I removed this, the computer would not boot) I hit apply, restarted, powered down and then booted into windows. Picture perfect.
Now, I want to complete this little operation by installing Ubuntu 7.04 and making the system dual boot. Here is another question for the forum:
If I already have a FAT 16 and NTFS partition, that means I can only make two more primary partitions. Is it possible to utilize extended partitions to be able to create an ext-3, linux-swap, and FAT 32 partition to share with windows and still make the computer dual boot properly? I thought about making the ext-3 and linux-swap primary, and the FAT 32 extended, but I'm not sure exactly how to go about this successfully.
Thanks for your help everyone.
saikee
09-01-2007, 08:30 PM
You can have 11 logical partitions in an extended partition that must come from any one of the 4 permissible primaries in any hard disk.
Just run a Live CD, log in as root, go to terminal and use the cfdisk program say on sda
cfdisk /dev/sda
The first logical partition you create will automatically sda5 and the extended partition is automatically used up according whichever the first unused one available.
You need empty space in the hard disk first before you can create new logical partitions.
All Linux can be installed and boot from a logical partition. You can use a logical partition to do dual boot, say sda15.
mikey85co
09-01-2007, 11:33 PM
thanks for the info saikee.
mikey85co
09-03-2007, 02:11 PM
OK, so I have successfully dual booted Win XP and Ubuntu 7.04. Now I am trying to get my wireless card to work with ndiswrapper. I have tried to install it, but the Ubuntu console will not give me access. I have tried becoming the super user, and many other things, but I keep getting "access denied" errors. Any idea why this would be?
ladoga
09-03-2007, 04:45 PM
The original problem is solved. We have guidelines (http://www.justlinux.com/forum/showthread.php?t=91066) here which tell to post a new thread of every problem that needs solving. (so that forum stays clean, easily searchable and whatever) So I suggest you to do so.
Then give as detailed info as you can. Which console commands you are running and exact error messages.
je_fro
09-04-2007, 09:11 AM
Yeah, start a new thread and *cough* try to avoid ndiswrapper in favor of madwifi or bcmxx or whatever *cough*.
Thanks!
justlinux.com
Copyright 2007 Jupitermedia Corporation All Rights Reserved.