Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
hd copy with dd
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
morodoch
Guru
Guru


Joined: 22 Sep 2005
Posts: 523
Location: England

PostPosted: Sun Dec 11, 2005 11:09 pm    Post subject: Reply with quote

The -x means "stay in this filesystem", so I think cp -ax will do the trick. It'll copy symlinks as symlinks - it should make your new filesystem identical to the old - permissions, everything.
_________________
Well, the Sister was right. You boys could use a little churching up. Slide on down to the Triple Rock, and catch Rev. Cleophus. You boys listen to what he's got to say.

-- Curtis
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Thu Dec 22, 2005 5:14 pm    Post subject: Reply with quote

and it doesnt work !
what I did :
partition the new HD with the same FS as the old one
create new partitions with fdisk

old disk
Quote:
grenada ~ # fdisk /dev/hda

The number of cylinders for this disk is set to 1245.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/hda: 10.2 GB, 10248118272 bytes
255 heads, 63 sectors/track, 1245 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 7 56196 83 Linux
/dev/hda2 8 70 506047+ 82 Linux swap / Solaris
/dev/hda3 71 1245 9438187+ 83 Linux

Command (m for help):

new disk grenada ~ # fdisk /dev/hdb
Quote:

The number of cylinders for this disk is set to 16383.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/hdb: 8455 MB, 8455200768 bytes
16 heads, 63 sectors/track, 16383 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 112 56416+ 83 Linux
/dev/hdb2 113 1120 508032 82 Linux swap / Solaris
/dev/hdb3 * 1121 16383 7692552 83 Linux

Command (m for help):


the new partitions arent exactly the same size as the old ones - all a bit bigger, icouldnt get it to partition them to exactly the same size

I then dd copied existing -> new

as the new hdb3 is smaller than the old hda3 I cp -ax'd the files across.( dd runs out of space !)

ive reset the jumper on the new HD to master, disconnected the old one, plugged the cable into the new HD and on boting it the BIOS doesnt detect it.

however, when its mounted as a slave its detected by dmesg

Code:
grenada ~ # dmesg |grep hdb
    ide0: BM-DMA at 0xe000-0xe007, BIOS settings: hda:DMA, hdb:DMA
hdb: WDC AC28400R, ATA DISK drive
hdb: max request size: 128KiB
hdb: 16514064 sectors (8455 MB) w/512KiB Cache, CHS=16383/16/63, UDMA(33)
hdb: cache flushes not supported
 hdb: hdb1 hdb2 hdb3
grenada ~ #


so what has gone wrong ?
_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
morodoch
Guru
Guru


Joined: 22 Sep 2005
Posts: 523
Location: England

PostPosted: Thu Dec 22, 2005 5:45 pm    Post subject: Reply with quote

Quote:
ive reset the jumper on the new HD to master, disconnected the old one, plugged the cable into the new HD and on boting it the BIOS doesnt detect it.


Do you mean the BIOS can't see it at all, or just can't boot from it? If it can see it, but not boot from it, the most likely reason is that you haven't copied the MBR across, or run grub/lilo/... on the new disc?
_________________
Well, the Sister was right. You boys could use a little churching up. Slide on down to the Triple Rock, and catch Rev. Cleophus. You boys listen to what he's got to say.

-- Curtis
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Thu Dec 22, 2005 7:04 pm    Post subject: Reply with quote

the bios doesn't detect it and thinks there is no HD
But just dd'ing the boot partition should have copied over grub etc (shouldn't it) ?
_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
morodoch
Guru
Guru


Joined: 22 Sep 2005
Posts: 523
Location: England

PostPosted: Thu Dec 22, 2005 9:48 pm    Post subject: Reply with quote

Quote:
But just dd'ing the boot partition should have copied over grub etc (shouldn't it) ?


Yes & no :)

Yes it copies over the settings, but you still have to make the MBR boot the setup.

Did you install grub to the MBR first time, or to the install partition?
_________________
Well, the Sister was right. You boys could use a little churching up. Slide on down to the Triple Rock, and catch Rev. Cleophus. You boys listen to what he's got to say.

-- Curtis
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum