PDA

Bekijk de volledige versie : Harddisc exchange



jbaesner
23-04-2007, 11:43
I would like to exchange my 2,5" disc of 4GB (you're right, 4GB!) with a new drive.

What are the steps required to update the disc.

I'm running the Oleg firmware...

wengi
23-04-2007, 12:09
Depends on your installation.

If there is only data on the disc: Simply change it.
If using ipkg on /opt with the HDD: Good question. I think you will have to reinstall the whole ipkg stuff. let me know if you try it :rolleyes:
Swap on HDD shouldn't be a problem.

wengi

al37919
24-04-2007, 06:25
I think it is not needed to reinstall everything. It should be enough just to copy everything from old drive to a new one.

To do this you have to mount the new one (if it is not automounted) to let say /mnt . And then :
cp -r /opt/* /mnt

Just do not use samba or so, as you can loose correct file permissions.

After copying check that new drive is mounted in /opt , if necessary adjust post-boot

jbaesner
25-04-2007, 12:15
No, not just data, but also the ipkg stuff...

Will the wl-hdd boot, if I exchange the drive? Do I have to setup the partitions before the exchange, or do I have to do it later with the booted wl-hdd?

wengi
25-04-2007, 14:30
If you want to copy all the ipkg data, which is possible, you have to connect both discs to a device (PC or whatever) understanding ext3.
Partition and format new drive, copy data and put new drive into WL-HDD.

I think it should also be possible to connect the new drive with usb (you need an external case) to the WL-HDD, partition, format, copy the data and change the drives.

wengi

al37919
25-04-2007, 15:02
I think it should also be possible to connect the new drive with usb (you need an external case) to the WL-HDD
this is what I meant. I have written my post not clear enough.

In principle, there is no problem just to copy ipkg data. The only thing is that you have to maintain file correct permissions and symbolic links. That is why you should not just copy to windows and back. However, you can make a trick (in this case you don't need usb case):

tar cf /opt/opt.tar /opt
As a result you will get a single tar-file which contains the content of your hdd. Save it on your computer (in this case it doesn't matter is it windows or whatever else), exchange the drives, copy it back, and type:

tar xf /opt/opt.tar
It will restore everything in correct form.
If there is not enough space for full disk copy you can perform it in several steps, like:
tar cf /opt/bin.tar /opt/bin
etc.
Of course, first you have to fdisk new disk, create swap, format it etc. RTFM :)