WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Cloning TC installation (Solved)  (Read 3554 times)

Offline athouston

  • Full Member
  • ***
  • Posts: 143
Cloning TC installation (Solved)
« on: July 10, 2010, 09:52:59 PM »
I now have a working TC on a hard drive with RAID array and lots of other stuff. I now want to replace the hard drive with a CF card. The card is formatted type 83 (mkfs.ext3) and mounted. Thanks to all who have helped get this far.

Can someone please suggest the easiest way to clone my existing system to the CF card so I don't have to rebuild the RAID array from scratch and re-install the extensions?

« Last Edit: July 11, 2010, 04:57:09 AM by athouston »

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: Cloning TC installation
« Reply #1 on: July 10, 2010, 10:15:51 PM »
How about just copying everything across as root, after booting to the cf and making sure tce folder is set up correctly from it and in the boot manager.

Offline athouston

  • Full Member
  • ***
  • Posts: 143
Re: Cloning TC installation
« Reply #2 on: July 11, 2010, 01:27:07 AM »
I am using cp -p to try and copy all files but it keeps coming up "omitting ...<directory name>". I am sudo su in terminal session. What am I doing wrong??

Offline althalus

  • Sr. Member
  • ****
  • Posts: 351
Re: Cloning TC installation
« Reply #3 on: July 11, 2010, 02:06:07 AM »
try -r for recursive.

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Cloning TC installation
« Reply #4 on: July 11, 2010, 03:10:15 AM »
-a or equivalent should be used

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Cloning TC installation
« Reply #5 on: July 11, 2010, 03:23:56 AM »
Copy everything over, and install a bootloader to the new card; nothing more complicated. :)
The only barriers that can stop you are the ones you create yourself.

Offline athouston

  • Full Member
  • ***
  • Posts: 143
etc
« Reply #6 on: July 11, 2010, 03:31:45 AM »
Thanks, I used both -a and -r.

I can see what my problem is - I don't properly understand the directory structure. Being a DOS man for 38 years I can't "see" the *nix structure.

eg.

root@box>cd /
root@box>ls
bin   etc    init  (and so on)

root@box>ls /mnt/hda1
boot lost+found tce tclocal

If I am at the root of my boot drive /dev/hda1 don't I see all the directories??

solar_sea

  • Guest
Re: Cloning TC installation
« Reply #7 on: July 11, 2010, 03:39:47 AM »
The root / - is just a tree's root in memory. You can mount (attach) disk drives wherever you want on it. In TC's normal case, the root / is in memory. Extensions that you install are stored on some drive. The drive is then attached somewhere on the system. (say /mnt/hda2). After then, every extension is a virtual disk image itself. They are also mounted at /tmp/tcloop, and symlinked from there in the main memory /.

It might sound like a mess, but it's a quite handy way of doing things.

(in other more or less normal distributions, a disk drive is mounted at /)
« Last Edit: July 11, 2010, 03:43:37 AM by solar_sea »

Offline athouston

  • Full Member
  • ***
  • Posts: 143
Re: Cloning TC installation
« Reply #8 on: July 11, 2010, 04:01:56 AM »
Does that mean that my hard drive /dev/hda1 is mounted somewhere other than at the root at bootup??

So what do I copy to where to "clone" my whole install to another drive??

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Cloning TC installation
« Reply #9 on: July 11, 2010, 04:06:33 AM »
# Assume hd is hda2 and cf is sda1

#mount /mnt/hda2 # (will be mounted automatically if it stores extensions)
mount /mnt/sda1
cd /mnt/hda2
sudo cp -a * /mnt/sda1
cd /
umount /mnt/sda1
#umount /mnt/hda2 # (if automounted, don't umount)
The only barriers that can stop you are the ones you create yourself.

Offline athouston

  • Full Member
  • ***
  • Posts: 143
Re: Cloning TC installation
« Reply #10 on: July 11, 2010, 04:18:54 AM »
OK. That works thank you.

I think I've still missed a point. Where do bin, etc, init, (et all) exist on the hard drive. Or is that the point - they don't - until you boot??

Offline athouston

  • Full Member
  • ***
  • Posts: 143
Re: Cloning TC installation
« Reply #11 on: July 11, 2010, 04:22:56 AM »
The next part of this question is - does the system store any relationship between the hard drive and the partition name anywhere. The reason being I have copied from hda1 to hdc1 and I am going to remove the hard drive (hda) that contains the original hda1 and replace it with the CF card (hdc) that orignally held hdc1. Physically the CF card will now be HDA.

I'm looking for what changes I need to edit to make that work - if any.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Cloning TC installation
« Reply #12 on: July 11, 2010, 04:30:35 AM »
I think I've still missed a point. Where do bin, etc, init, (et all) exist on the hard drive. Or is that the point - they don't - until you boot??
Yes. They exist in a packed form, inside tinycore.gz.

The next part of this question is - does the system store any relationship between the hard drive and the partition name anywhere. The reason being I have copied from hda1 to hdc1 and I am going to remove the hard drive (hda) that contains the original hda1 and replace it with the CF card (hdc) that orignally held hdc1. Physically the CF card will now be HDA.

I'm looking for what changes I need to edit to make that work - if any.
The only reference in TC is in the bootloader config file. Since it's going to be in the same slot as before, no config changes necessary.
The only barriers that can stop you are the ones you create yourself.

Offline athouston

  • Full Member
  • ***
  • Posts: 143
Re: Cloning TC installation
« Reply #13 on: July 11, 2010, 04:56:49 AM »
And I just proved that to myself. I swapped the drives over, booted from the cd, installed grub, grub'bed the CF card and rebooted.

I am learning so much it is truly excellent.

Thank you all for your assistance.

Offline althalus

  • Sr. Member
  • ****
  • Posts: 351
Re: Cloning TC installation
« Reply #14 on: July 11, 2010, 05:38:43 AM »
-a or equivalent should be used
Yes, my bad, was somewhat preoccupied earlier this afternoon.