LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   HDD Duplication... (https://www.linuxquestions.org/questions/linux-general-1/hdd-duplication-266938/)

PenguinPwrdBox 12-16-2004 02:08 AM

HDD Duplication...
 
I have two hdd's in one machine, as follows:

/dev/hda1
30G
reiserfs
extra drive (backup)

/dev/hdb1
approx 512M
mounted at /boot
ext2fs

/dev/hdb5
approx 1G
linux swap

/dev/hdb6
approx 74G
reiserfs
mounted as root

I am trying to copy 3G worth of system files from hdb6 to hda1. The goal here, is that I can add an entry to lilo so that I can boot with either disk as my root drive. The reason being is that I need to use resize_reiserfs to shrink the size of hdb6's partition, and create a windows-readable partition using mtools with the newly created space. This can only be done, though, if hdb6 is not mounted. Live CD is not an option here.

I have tried dd, and got an input output error. dd dropped 1 record. I'm not sure if that was the exception, and it halted, or if there is more to it. The specific command I used was:
Code:

dd if=/dev/hdb6 of=/dev/hda1
I should also note, that I have tried just a normal copy+paste in a file manager, and it hangs at either /dev or /proc. Why is this? I understand that it may create a loop, especially when it gets to /dev/hda (being that I am writing to /dev/hda) How would you create the block devices on the new drive? Anyone seen any good info on the specifics of this?

Is this correct? Any suggestions?

TIA!!!

JunctaJuvant 12-16-2004 07:18 AM

This is probably a silly question, but are you logged in as root when you try the dd thing? Allright, that probably didn't help much :)
On the other hand, I have found linux-on-a-floppy utilities like tomsrtbt of inestimable value in these situations. Perhaps you could try something like PAUD, for your situation?
Hope this helps.

JJ

tredegar 12-16-2004 08:02 AM

PPB,

Try this thread:

http://www.linuxquestions.org/questi...hreadid=224324

kevinalm 12-16-2004 04:25 PM

It is very difficult to duplicate a running linux partition, and simple to dup one that is not running, as you have found out. In particular, /dev and /proc cause major problems while active, but cp trivially when inactive. That's why a live cd (or an alternate linux boot) are _highly_ recommended.

>>Oh, the reason for the hang? Well, when /dev is active, it's not so much a filesystem as it is a collection of control and data ports for your hardware (via the associated drivers). But when inactive it is just an inert filesystem.
/proc is a series of files that display system info while active. Some of this is constantly changing so you will get a hang. When inactive /proc is empty. Just a single dir.


All times are GMT -5. The time now is 01:10 PM.