Anon0, how about first posting:
And please identify the source partition and the destination drive.Code:sudo fdisk -lu
Anon0, how about first posting:
And please identify the source partition and the destination drive.Code:sudo fdisk -lu
Sure let's say source is /dev/sdb1 as follows:
While target is /dev/sda as follows:Code:Disk /dev/sdb: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x2fee2fee Device Boot Start End Blocks Id System /dev/sdb1 166015710 234436544 34210417+ fd Linux raid autodetect
Code:Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0xe545ed40
Do you want the destination partition to start at the beginning of the sda drive? I ask because the source partition sdb1 actually starts about 85 GB into the sdb drive. If you would like the destination partition to start at the beginning of the sda drive, how about doing:
That should create an unformatted partition on your sda drive exactly the same size as the sdb1 partition (about 34 GB). Then reboot, and post the new output of:Code:echo '63,68420835,fd,*' | sudo sfdisk --no-reread -fuS /dev/sda -N1
And if that shows your new sda1 partition OK, you can copy the sdb1 partition to sda1 with:Code:sudo fdisk -lu
Let me know how that goes or if you run into problems.Code:sudo apt-get install dcfldd sudo dcfldd if=/dev/sdb1 of=/dev/sda1 statusinterval=10 bs=10M conv=notrunc
thanks caljohnsmith. I actually tried parted again and got it to create the partition in the middle, just to test things out (it's interactive so it's less cryptic). This time it worked because last time I forgot a simple arithmetic: the end sector should be starting position + size of the source partition - 512 bytes, since the starting sector is a part of the partition. Also I noticed that 1GB=10^9 not 1024^3 here.
If you make a boot disk with g4l, it will give you all the infos you need on that partition.
Bookmarks