-
You have not described the way you clone the disk but I increasingly come to the conclusion that you are cloning the whole disk. That will be consistent with getting repeatedly the error of "No Space Left on the Device".
If you have a source disk bigger than a target disk you must clone partition by partition.
To explain I paste the hard disk information you reported in Post #43 below
Code:
"Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 6 48163+ de Dell Utility
/dev/sda2 * 7 3830 30716280 7 HPFS/NTFS
Disk /dev/sdb: 40.0 GB, 40000000000 bytes
255 heads, 63 sectors/track, 4863 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table"
It is very simple. If you clone the large source sda, which has 9726 cylinders, into a small target sdb which has 4863 cylinders dd will start from the 1 cylinder and run it to the end of the 9726 cylinder but finds the target has "No Space Left on the Device" after successfully clone the first 4863 cylinder over. You are effectively pouring gasoline from a 10-gallon container into a 5-gallon container. Of course it cannot work.
The resulting target disk cannot be read either because in its partition table, which was cloned as the very first sector, it is stated there are 9726 cylinders (because it is from the partition table of sda) whereas the physical number of cylinders of sdb is only 4836. Would this not cause the system to report "Disk /dev/sdb doesn't contain a valid partition table"? Any operating system on receiving such disk will not know what to do and so is forced to treat it as a raw disk (empty) if it is asked to make use this disk.
The whole process isn't complicated at all and you can reason it out.
To get successful result you should partition sdb by duplicate the partition boundary, to the exact cylinder number, of sda1 and sda2 onto sdb1 and sdb2 using cfdisk program, write the partition table and reboot the machine.
When you clone sda1 then dd can start from cylinder 1 and terminate at cylinder 6 because that is the starting and finishing point of both sda1 and sdb1. Similarly you do the same for sda2. The information will be read from cylinder 7 to 7830 of sda and transferred to the exact position in sdb. You should realise by now the scheme has to produce a mirror image of sda onto sdb and that is the reason why the cloned XP must boot because nothing has been altered.
All operating systems including XP do not check the spare hard disk capacity. On the first boot-up of xp it will detect the recorded hard disk ID no longer matches the cloned disk. As XP permit an upgrade of the hard disk it will amend the record and demand a reboot to finalize the change. XP will behave normally after the first reboot.
Last edited by saikee; 06-29-2007 at 08:05 PM.
-
Hi Guys, newbie chatting:
Using Ubuntu, now up to 6.06 but have a partition problem..
This looks like a good thread....may I?
The HDD has no other OS and was 120G - I set up the home space and swap-file (abt 700MB as they recommend), leaving 56G spare which I hoped to format FAT32 so it could be shared with a Win98SE-PC which I use for photos and other stuff. What appears in gparted is it claims the 56G is unused and not accessible - so I've looked for a way to format it, but it's not obvious and I'm wary that I could destroy the whole installation.
- Any photos I have saved appear in the main partition under /home . . . .
So sorry if this is vague but this current PC (here) is a Compaq running Win2000, so I can'r run the Ubuntu set-up and just type what I see.
When I first installed Ubuntu 5.10 - all my files were in the /home partition - indeed I don't think I realised there was a swap-partition, yet I expect it was there, as I just let Ubuntu do whatever it liked. It was a blank HDD.
The great thing
The great thing about Ubuntu - IMHO- is that "in time, everyone will use it" - so by getting you experts to check it out, the non-computer types ((the mainstream)) will just use it out of the box and since Gnome looks close to "Windows" - who will care?.....but you guys can check-out what Ubuntu are up to and prevent any silly departures from standard practice.
Dell is now shipping with Ubuntu and this has to be good news, but I wonder how it will work, since Dell has some Hardware Quirks (so I understand), so that users can't up-date (sorry mess-up) their PC without buying Dell-approved parts....will we get to understand the subtle difference between a PC and a Dell? Is it the IRQ's etc?
I wonder....this is a Compac Deskpro EN and it thinks my keyboard is a US-english so I have to remember to use 'at' sign instead of 'quote' -rather confusing, but easy enough. Compaq also have some user no-go issues compared with a standard PC-clone....er, I understand.
Bye-
P.S. thanks for all the stuff on backing-up an instalation Saikee - great idea since HDD's are "probably@ the most unreliable part of a PC, being mechanical and subject to very tight precision. It's a pity I can't upgrade the Mbd without MS giving me their permission....grrrrr.
-
jl_harry12,
If you have hard disk space and find no operating system can use it then the most likely reason would be all 4 primary partitions ( or 3 plus one extended partition) have been used up. In such a case your hard disk space is a "dead space".
Ubuntu and Fedora families like to take over the entire disk, or whatever left behind, and use separate partitions for /boot, /home etc to install the Linux. Thus it is possible that you have no more primary partition left or the end of the extended partition has been blocked by another primary.
You need to plan ahead with number of partitions. It is worth to remember
(a) Only a MS system need to reside in a primary partition because its MBR searches only an "active" primary partition to boot.
(b) Linux never needs a partition "active" or "bootable" so all its partitions can be logical.
(c) You can keep growing in the number of logical partitions inside an extended partition, 59 for a Pata disk and 11 for a Sata but the trend is to stick with the latter.
(d) Apart from swap you can put any Linux in "one" partition which is a lot easier to boot, resize, move, maintain and ultimately migrate.
(e) You can reorganize all the partitions for a Linux but if you move the /boot you may need to restore the MBR of the boot loader.
For advice can you post here the output of
-
Again saikee, thanks for all the tips and advice. I totally understand why the last test did not work being that I was trying to copy the entire image. Going into this I knew absolutely nothing about any of this stuff, but now on Monday I feel confident that I can get this working. I totally understand the need now for all the partitions to be copied over and in the exact order as shown on the source drive in order for windows not to complain. I'll be trying this first thing at work on Monday. The only thing I'm worried about is the whole "No Space Left on Device" error I was getting even back when I was DDing just a partition rather than the entire drive. Well anyways I'll give it a shot how you explained it in the last two posts of yours and I'll post back with the results!
-
Hi Saikee, typing in fdisk|-|l (where | [pipe] is a space) results in a non-event, I tried other variations and this was the best response:
(Ubuntu is trying to help me) Usage: fdisk [-b SSZ] [-u] DISK Change partition table
fdisk -l [-b SSZ] [-u] DISK List partition table(s)
fdisk -s PARTITION Give partition size(s) in blocks
fdisk -v Give fdisk version
Here DISK is something like /dev/hdb or /dev/sda
and PARTITION is something like /dev/hda7
-u: give Start and End in sector (instead of cylinder) units
-b 2048: (for certain MO disks) use 2048-byte sectors
(ends here with some user-name mumbo) -so I think you were directing me to item 2, but either I'm not typing it correctly or the spaces are wrong- or I should not be in Terminal - oddly it didn't ask for my root password, but I'd only just logged-on.
[[This reply using Ubunntu6.06/Firefox. On my old 400MHzPC with just 256k and a HDD that is dedicated to Linux - this is the very one with the "unusabale" 56G.]]
-My understanding is that I have formatted correctly the swap file (abt 700MB) and the main ubuntu (/home) file (abt 50G)....making two partitions....so something was not obvious to me 'cause I left the other 56G unusable! - but that would only be the third partition, unless Ubuntu has sub-divided the /home partition.......let me check in gparted.....(goes away) . ... .
sorry this has not been found... found Device Manager though (required permission)-and it shows the HDD as IDE device master
*Maxtor6y120L0
*Volume
*Volume(swap)
*/home
*/
(this confirms the 120G, I think)....* represents an icon for the drive.
When these are highlighted in turn the Right-hand window shows details like Blockdotdevice Blockdorisunderscorevolume - but it's a very long list and I can't see anything really obvious. + I can't copy it either it seems.
Sorry about the Fdisk and my inability to find gparted.
Is the command-line not the same for Ubuntu as you are used to, or is it my interpretation....perhaps?.
Last edited by jl_harry12; 07-01-2007 at 03:21 PM.
-
In Ubuntu you have to
Just copy and paste the command in the web onto your terminal.
Ubuntu restricts ordinary users using system commands by not obeying them. It is an irritation. You can activate the root user account by
and while in root type
and supply a password twice. Thereafter in future you can work as root formally by command
and forget prefixing every system command with "sudo"
-
I am cloning a 500Gb Sata and this is the speed
Code:
root@slax:~# fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 12158 97659103+ 7 HPFS/NTFS
/dev/sda2 12159 36473 195310237+ 7 HPFS/NTFS
/dev/sda3 36474 48755 98655165 5 Extended
/dev/sda4 48756 60801 96759495 83 Linux
/dev/sda5 36474 36595 979933+ 82 Linux swap
/dev/sda6 36596 37811 9767488+ 83 Linux
/dev/sda7 37812 39027 9767488+ 83 Linux
/dev/sda8 39028 40243 9767488+ 83 Linux
/dev/sda9 40244 41459 9767488+ 83 Linux
/dev/sda10 41460 42675 9767488+ 83 Linux
/dev/sda11 42676 43891 9767488+ 83 Linux
/dev/sda12 43892 45107 9767488+ 83 Linux
/dev/sda13 45108 46323 9767488+ 83 Linux
/dev/sda14 46324 47539 9767488+ 83 Linux
/dev/sda15 47540 48755 9767488+ 83 Linux
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 12158 97659103+ 83 Linux
/dev/sdb2 12159 60801 390724897+ 5 Extended
/dev/sdb5 12159 60801 390724866 c W95 FAT32 (LBA)
Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 1 15808 126977728+ 15 Unknown
/dev/sdc2 15809 29184 107442720 15 Unknown
/dev/sdc3 29185 42560 107442720 15 Unknown
/dev/sdc4 42561 60801 146520832+ 5 Extended
/dev/sdc5 42561 43776 9767488+ 83 Linux
/dev/sdc6 43777 44992 9767488+ 83 Linux
/dev/sdc7 44993 46208 9767488+ 83 Linux
/dev/sdc8 46209 47424 9767488+ 83 Linux
/dev/sdc9 47425 48640 9767488+ 83 Linux
/dev/sdc10 48641 49856 9767488+ 83 Linux
/dev/sdc11 49857 51072 9767488+ 83 Linux
/dev/sdc12 51073 53504 19535008+ 83 Linux
/dev/sdc13 53505 55936 19535008+ 83 Linux
/dev/sdc14 55937 58368 19535008+ 83 Linux
/dev/sdc15 58369 60801 19543041 83 Linux
root@slax:~# date
Sun Jul 1 17:00:02 GMT 2007
root@slax:~# dd if=/dev/sdc of=/dev/sdb bs=32768
date
15262080+1 records in
15262080+1 records out
500107862016 bytes (500 GB) copied, 7826.59 s, 63.9 MB/s
root@slax:~# date
Sun Jul 1 19:11:05 GMT 2007
root@slax:~#
2.17 hours for cloning a 500Gb hard disk with altogether 44 partitions but only 14 partitions filled with Linux. This is a specially arranged Sata disk which normally allows only 15 partitions by Linux. The source disk is a Western Digital while the target disk is from Samsung. Both disks got 60801 cyclinders so it is an exact match when clone the whole disk.
63.9Mb/s is the fastest cloning speed I have seen. I am doing it on a Abit AW9D-Max mobo, with 975x chipset, an Intel E6700 CPU and 2Gb of ram, expecting it flies a bit. The software I used was Slax 6.0.0.
I am using the distros inside the cloned disk to post the reply.
Last edited by saikee; 07-01-2007 at 04:42 PM.
-
Additional INFO
It's possible I may have slightly confused the issue - as I'm not finding the details I reported earlier in gparted., it was some while ago, but today I tried to find what I did . . . . . . . . .
The information came in Disk Manager
Today, it shows a HDD 114.5G (=my 120G drive) having three partitions:
Highlighting them in turn gives the details, the three are:-
Partition 1
Partition 5
Swap partition
Only Partition 5 (/dev/hda5)Filesystem "extended3"... is inacceible "Access path None" if I click on "changwe" it shows what looks like the whole file system and offers a new mount point - but I'm reluctant to click on one that's already working and my only other option is to "create new folder".
This reply is after the one relating to attempting to "fdisk" followed by l-Llist (I'm guessing), why I cannot enter it correctly beats me.....bad fingers?
-
The "l" in the command "fdisk -l" is a small "L".
This is the most useful command to any user wanting to know his/her hard disk because every partition in every hard disk will be displayed like the one in Post #52.
When a disk starts to go bad some partitioning tools will gradually distance them away from the trouble disk by refusing to have anything to do with it. "fdisk" is Linux is the last one to abandon your disk and so it is your last line of defence.
Last edited by saikee; 07-01-2007 at 04:39 PM.
-
Let's say the curiosity has got the better of me when you guys want to clone a Vista partition only from a big disk into a smaller disk. So I investigated to see what the fuss was all about.
Here is the setting of one of the PC I got. It has 150+ systems inside and Vista is in the hdc1 in a 500Gb Pata disk.
To clone it I pulled out the original hda and inserted a spare disk of 300Gb. All my hard disks are in caddies which I can use internally or externally in any master or slave position. To replicate the reported difficulties I booted up the machine with a Ubuntu Live CD as this is the only that causing problems.
First I always checked the geometry of each disk, before that I activated the root user account by "sudo su" ( at the later part I "sudo" every system command to show it can be done as another alternative to get root privilege in Ubuntu).
Code:
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
ubuntu@ubuntu:~$ sudo su
root@ubuntu:/home/ubuntu# fdisk -l
Disk /dev/hda: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 7 56196 de Dell Utility
/dev/hda2 * 8 7295 58540860 7 HPFS/NTFS
Warning: omitting partitions after #60.
They will be deleted if you save this partition table.
Disk /dev/hdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdc1 * 1 3315 26623123+ 7 HPFS/NTFS
/dev/hdc2 3315 6354 24410767+ 93 Amoeba
/dev/hdc3 6354 9393 24410767+ 93 Amoeba
/dev/hdc4 9393 60801 412939342+ 5 Extended
/dev/hdc5 9393 10001 4883728+ 83 Linux
/dev/hdc6 10001 10609 4883728+ 83 Linux
/dev/hdc7 10609 11217 4883728+ 83 Linux
/dev/hdc8 11217 11825 4883728+ 83 Linux
/dev/hdc9 11825 12433 4883728+ 83 Linux
/dev/hdc10 12433 13041 4883728+ 83 Linux
/dev/hdc11 13041 13649 4883728+ 83 Linux
/dev/hdc12 13649 14257 4883728+ 83 Linux
/dev/hdc13 14257 14865 4883728+ 83 Linux
/dev/hdc14 14865 15473 4883728+ 83 Linux
/dev/hdc15 15473 16081 4883728+ 83 Linux
/dev/hdc16 16081 16689 4883728+ 83 Linux
/dev/hdc17 16689 17297 4883728+ 83 Linux
/dev/hdc18 17297 17905 4883728+ 83 Linux
/dev/hdc19 17905 18513 4883728+ 83 Linux
/dev/hdc20 18513 19121 4883728+ 83 Linux
/dev/hdc21 19121 19729 4883728+ 83 Linux
/dev/hdc22 19729 20337 4883728+ 83 Linux
/dev/hdc23 20337 20945 4883728+ 83 Linux
/dev/hdc24 20945 21553 4883728+ 83 Linux
/dev/hdc25 21553 22161 4883728+ 83 Linux
/dev/hdc26 22161 22769 4883728+ 83 Linux
/dev/hdc27 22769 23377 4883728+ 83 Linux
/dev/hdc28 23377 23985 4883728+ 83 Linux
/dev/hdc29 23985 24593 4883728+ 83 Linux
/dev/hdc30 24593 25201 4883728+ 83 Linux
/dev/hdc31 25201 25809 4883728+ 83 Linux
/dev/hdc32 25809 26417 4883728+ 83 Linux
/dev/hdc33 26417 27025 4883728+ 83 Linux
/dev/hdc34 27025 27633 4883728+ 83 Linux
/dev/hdc35 27633 28241 4883728+ 83 Linux
/dev/hdc36 28241 28849 4883728+ 83 Linux
/dev/hdc37 28849 29457 4883728+ 83 Linux
/dev/hdc38 29457 30065 4883728+ 83 Linux
/dev/hdc39 30065 30673 4883728+ 83 Linux
/dev/hdc40 30673 31281 4883728+ 83 Linux
/dev/hdc41 31281 31889 4883728+ 83 Linux
/dev/hdc42 31889 32497 4883728+ 83 Linux
/dev/hdc43 32497 33105 4883728+ 83 Linux
/dev/hdc44 33105 33713 4883728+ 83 Linux
/dev/hdc45 33713 34321 4883728+ 83 Linux
/dev/hdc46 34321 34929 4883728+ 83 Linux
/dev/hdc47 34929 35537 4883728+ 83 Linux
/dev/hdc48 35537 36145 4883728+ 83 Linux
/dev/hdc49 36145 36753 4883728+ 83 Linux
/dev/hdc50 36753 37361 4883728+ 83 Linux
/dev/hdc51 37361 37969 4883728+ 83 Linux
/dev/hdc52 37969 38577 4883728+ 83 Linux
/dev/hdc53 38577 39185 4883728+ 83 Linux
/dev/hdc54 39185 39793 4883728+ 83 Linux
/dev/hdc55 39793 40401 4883728+ 83 Linux
/dev/hdc56 40401 41009 4883728+ 83 Linux
/dev/hdc57 41009 41617 4883728+ 83 Linux
/dev/hdc58 41617 42225 4883728+ 83 Linux
/dev/hdc59 42225 42833 4883728+ 83 Linux
/dev/hdc60 42833 43441 4883728+ 83 Linux
Disk /dev/sda: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 5099 40957686 7 HPFS/NTFS
/dev/sda2 5100 6315 9767520 93 Amoeba
/dev/sda3 6316 6923 4883760 83 Linux
/dev/sda4 6924 24792 143532742+ 5 Extended
/dev/sda5 6924 7531 4883728+ 83 Linux
/dev/sda6 7532 8139 4883728+ 83 Linux
/dev/sda7 8140 8747 4883728+ 83 Linux
/dev/sda8 8748 9355 4883728+ 83 Linux
/dev/sda9 9356 9963 4883728+ 83 Linux
/dev/sda10 9964 10571 4883728+ 83 Linux
/dev/sda11 10572 11179 4883728+ a9 NetBSD
/dev/sda12 11180 11787 4883728+ 83 Linux
/dev/sda13 * 11788 12395 4883728+ 83 Linux
/dev/sda14 12396 23916 92542401 1c Hidden W95 FAT32 (LBA)
/dev/sda15 23917 24792 7036438+ 83 Linux
Warning: omitting partitions after #60.
They will be deleted if you save this partition table.
Disk /dev/hdd: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdd1 1 3039 24410736 af Unknown
/dev/hdd2 3040 6078 24410704+ b5 Unknown
Partition 2 does not end on cylinder boundary.
/dev/hdd3 6078 9117 24410830+ b5 Unknown
/dev/hdd4 * 9118 48641 317476530 5 Extended
/dev/hdd5 9118 9725 4883728+ 83 Linux
/dev/hdd6 9726 10333 4883728+ 83 Linux
/dev/hdd7 10334 10941 4883728+ 83 Linux
/dev/hdd8 10942 11549 4883728+ 83 Linux
/dev/hdd9 11550 12157 4883728+ 83 Linux
/dev/hdd10 12158 12765 4883728+ 83 Linux
/dev/hdd11 12766 13373 4883728+ 83 Linux
/dev/hdd12 13374 13981 4883728+ 83 Linux
/dev/hdd13 13982 14589 4883728+ 83 Linux
/dev/hdd14 14590 15197 4883728+ 93 Amoeba
/dev/hdd15 15198 15805 4883728+ 83 Linux
/dev/hdd16 15806 16413 4883728+ 83 Linux
/dev/hdd17 16414 17021 4883728+ 83 Linux
/dev/hdd18 17022 17629 4883728+ 83 Linux
/dev/hdd19 17630 18237 4883728+ 83 Linux
/dev/hdd20 18238 18845 4883728+ 83 Linux
/dev/hdd21 18846 19453 4883728+ 83 Linux
/dev/hdd22 19454 20061 4883728+ 83 Linux
/dev/hdd23 20062 20669 4883728+ 83 Linux
/dev/hdd24 20670 21277 4883728+ 83 Linux
/dev/hdd25 21278 21885 4883728+ 83 Linux
/dev/hdd26 21886 22493 4883728+ 83 Linux
/dev/hdd27 22494 23101 4883728+ 83 Linux
/dev/hdd28 23102 23709 4883728+ 83 Linux
/dev/hdd29 23710 24317 4883728+ 83 Linux
/dev/hdd30 24318 24925 4883728+ 83 Linux
/dev/hdd31 24926 25533 4883728+ 83 Linux
/dev/hdd32 25534 26141 4883728+ 83 Linux
/dev/hdd33 26142 26749 4883728+ 83 Linux
/dev/hdd34 26750 27357 4883728+ 83 Linux
/dev/hdd35 27358 27965 4883728+ 83 Linux
/dev/hdd36 27966 28573 4883728+ 83 Linux
/dev/hdd37 28574 29181 4883728+ 83 Linux
/dev/hdd38 29182 29789 4883728+ 83 Linux
/dev/hdd39 29790 30397 4883728+ 83 Linux
/dev/hdd40 30398 31005 4883728+ 83 Linux
/dev/hdd41 31006 31613 4883728+ 83 Linux
/dev/hdd42 31614 32221 4883728+ 83 Linux
/dev/hdd43 32222 32829 4883728+ 83 Linux
/dev/hdd44 32830 33437 4883728+ 83 Linux
/dev/hdd45 33438 34045 4883728+ 83 Linux
/dev/hdd46 34046 34653 4883728+ 83 Linux
/dev/hdd47 34654 35261 4883728+ 83 Linux
/dev/hdd48 35262 35869 4883728+ 83 Linux
/dev/hdd49 35870 36477 4883728+ 83 Linux
/dev/hdd50 36478 37085 4883728+ 83 Linux
/dev/hdd51 37086 37693 4883728+ 83 Linux
/dev/hdd52 37694 38301 4883728+ 83 Linux
/dev/hdd53 38302 38909 4883728+ 83 Linux
/dev/hdd54 38910 39517 4883728+ 83 Linux
/dev/hdd55 39518 40125 4883728+ 83 Linux
/dev/hdd56 40126 40733 4883728+ 83 Linux
/dev/hdd57 40734 41341 4883728+ 83 Linux
/dev/hdd58 41342 41949 4883728+ 83 Linux
/dev/hdd59 41950 42557 4883728+ 83 Linux
/dev/hdd60 42558 43165 4883728+ 83 Linux
root@ubuntu:/home/ubuntu#
I then used the cfdisk program in terminal mode "cfdisk /dev/hda" to delete the existing hda1 and hda2 and receated a new hda1 with 3315 cylinders, same size as hdc1.
Here I actually ran into difficulty as I had resized Vista previously to a size less than a full unit of a cylinder and the sector size is now different even though the number of cylinders are identical in both hda1 and hdc1. Since hda1 is slightly larger I thought it would do.
I then rebooted to have the partition table written formally.
After the reboot here is the history of my cloning steps (marked blue).
Code:
ubuntu@ubuntu:~$ sudo fdisk -l
Disk /dev/hda: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 3315 26627706 7 HPFS/NTFS
Warning: omitting partitions after #60.
They will be deleted if you save this partition table.
Disk /dev/hdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdc1 * 1 3315 26623123+ 7 HPFS/NTFS
/dev/hdc2 3315 6354 24410767+ 93 Amoeba
/dev/hdc3 6354 9393 24410767+ 93 Amoeba
/dev/hdc4 9393 60801 412939342+ 5 Extended
/dev/hdc5 9393 10001 4883728+ 83 Linux
/dev/hdc6 10001 10609 4883728+ 83 Linux
/dev/hdc7 10609 11217 4883728+ 83 Linux
/dev/hdc8 11217 11825 4883728+ 83 Linux
/dev/hdc9 11825 12433 4883728+ 83 Linux
/dev/hdc10 12433 13041 4883728+ 83 Linux
-------------output of fdisk -l truncated, for deatils see above-----------
ubuntu@ubuntu:~$ date
Sun Jul 1 21:28:59 UTC 2007
ubuntu@ubuntu:~$ dd if=/dev/hdc1 of=/dev/hda1 bs=32768
dd: opening `/dev/hdc1': Permission denied
ubuntu@ubuntu:~$ sudo dd if=/dev/hdc1 of=/dev/hda1 bs=32768
date
831972+1 records in
831972+1 records out
27262078464 bytes (27 GB) copied, 469.004 seconds, 58.1 MB/s
ubuntu@ubuntu:~$ date
Sun Jul 1 21:37:26 UTC 2007
The 27 Gb Vista partition was cloned in 7.82 minutes.
The block size 32768 times 831972 records gives 27,262,058 Mb which is the size of my Vista.
The cloned copy has only one partition but its original copy has 63 partitions (Linux only lists up to the 60th as you can see from the warning messages above). I was sure of Vista would complain this time.
Quite rightly on booting the cloned copy, by pulling out all other disks, Vista reported
Windows fails to start. A recent hardware or software change might be the cause. To fix the problem.
(1) Insert installation disc and restart your computer.
(2) Choose language settings, and then click "next"
(3) Click " Repair your computer"
Well I did exactly that (described as Task B7 in the last link of my signature) to get Vista MBR restored and am replying this thread in Vista. Vista did demand a reboot as I had stated earlier. I checked the copy and it is still marked "Windows is activated". There is no need for a re-activation.
I hope you guys have a bit of more confidence in Linux now. Not bad for cloning a Vista system under 8 minutes using just a Linux Live CD. It is just one line of command with dd telling the computer what is the input device, the output device and the data transfer size.
It is my experience if I clone Vista in a whole disk I wouldn't need to restore its MBR at all.
Last edited by saikee; 07-01-2007 at 07:35 PM.
-
Hi Saikee, reply to No. 54....
I guessed that was lowercase L and tried it each way I could - I'm really susrprised if you suspect the drive may be faulty as it was brand-new about 2 years ago and has been treated gently and hardly used. When firing up Ubuntu.... it's fine and has given no cause for concern.....I'll try again and attempt to give you a listing.
[[Incidently I tried that Part-magic (.iso ) download following their rules for Nero Express and now I'm the proud owner of a Live-boot CD ....I wondered as they suggested it would take 5mins to burn and mine was about half minute, but that's speed for u.]]
- - - I'm wondering if I'm giving Ubuntu the right permission? - since I don't appear to have to say
su
- perhaps that's why it won't l=List?
+Will try that angle too.
Last edited by jl_harry12; 07-02-2007 at 10:28 AM.
-
jl_harry12 ,
I am really surprised that you still report a problem of doing "fdisk -l".
In Post #55 there are two boxes showing two different methods of getting root privilege in Ubuntu
The first one I demonstrated with
Code:
ubuntu@ubuntu:~$ sudo su
root@ubuntu:/home/ubuntu# fdisk -l
You can see the prompt changed immediately to the root user here.
In the second I did
Code:
ubuntu@ubuntu:~$ sudo fdisk -l
They all work perfectly as the Post shows.
Is my explanation in Post #51 not sufficient?
I am not suspecting your drive going bad but just to show "fdisk-l" could only fail if the disk is not readable. Your problem here is Ubuntu needs to see the root privilege up front before releasing the content of "fdisk -l" to you, so supply the red bits.
-
Hey saikee, before I try this again, I was wondering if you think I should use the Skip argument to skip over the first two blocks so the old MBR does not DD over to the new drive. Also should I use the skip argument when doing the second DD (the second partition) so it skips over the first partition, or does it just start where the last partition ended?
Example ( Learn the DD command: Post 14 ):
"But, if you wish to partition the target first, and skip the MBR on both drives, you can still have a smaller target than source drive. Here is the command to skip the MBR, thereby keeping intact different disk geometries.
dd if=/dev/sda of=/dev/sdb seek=1 skip=1 conv=notrunc,noerror."
Any advice for using the skip (or seek I don't really know the difference) when DDing two partitions would be great!
Thanks.
Last edited by jonathansmith68; 07-02-2007 at 11:22 AM.
-
jonathansmith68 ,
If you look at the 2nd boxed blue area of Post #55 you will see I did not need to use "skip" because I was dd a partition hdc1.
The example you quoted is to dd the whole disk sda.
I never tried the "skip" parameter but I would only use it if
(1) The target sdb1 and sdb2 have been partition to the exact sizes as the source partitions sda1 and sda2, including the partition type numbers.
(2) The whole 80Gb source disk sda is cloned into the 40Gb target disk sdb. dd is expected to abort the operation after passing the 40Gb mark but since the partition table in the 1st block isn't clone the transfer should be error free even dd report the target out of space.
(3) Command I would use would be
Code:
dd if=/dev/sda of=/dev/sdb bs=32768
That seems technically possible to me but I have never tried it this way.
The approach I would do with Item (1) above satisfied would be
Code:
dd if=/dev/sda1 of=/dev/sdb1 bs=32768
dd if=/dev/sda2 of=/dev/sdb2 bs=32768
I recommend before you execute the dd command do a final check to ensure the sda is indeed the input or source disk with 80 Gb.
Last edited by saikee; 07-02-2007 at 01:16 PM.
-
Awesome, I really appreciate with all the help you are giving me saikee. One last thing. I noticed in post #55 you specifically defined the Id on the newly partitioned hda, to 7, to match hdc. I looked through all the options in cfdisk a few times and did not find the options to change the Id?
Edit: Nevermind, it appears that the Id is set by itself!
I will be starting the DD process now using the DD commands stated in your last post.
So far after doing a "fdisk -l" I get the following output:
"Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 6 48163+ de Dell Utility
/dev/sda2 * 7 3830 30716280 7 HPFS/NTFS
Disk /dev/sdb: 40.0 GB, 40000000000 bytes
255 heads, 63 sectors/track, 4863 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 6 48163+ de Dell Utility
/dev/sdb2 * 7 3830 30716280 7 HPFS/NTFS"
I will post my results!
Last edited by jonathansmith68; 07-11-2007 at 03:36 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|