Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: athouston on July 10, 2010, 09:52:59 PM

Title: Cloning TC installation (Solved)
Post by: athouston 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?

Title: Re: Cloning TC installation
Post by: jur 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.
Title: Re: Cloning TC installation
Post by: athouston 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??
Title: Re: Cloning TC installation
Post by: althalus on July 11, 2010, 02:06:07 AM
try -r for recursive.
Title: Re: Cloning TC installation
Post by: ^thehatsrule^ on July 11, 2010, 03:10:15 AM
-a or equivalent should be used
Title: Re: Cloning TC installation
Post by: curaga on July 11, 2010, 03:23:56 AM
Copy everything over, and install a bootloader to the new card; nothing more complicated. :)
Title: etc
Post by: athouston 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??
Title: Re: Cloning TC installation
Post by: solar_sea 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 /)
Title: Re: Cloning TC installation
Post by: athouston 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??
Title: Re: Cloning TC installation
Post by: curaga 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)
Title: Re: Cloning TC installation
Post by: athouston 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??
Title: Re: Cloning TC installation
Post by: athouston 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.
Title: Re: Cloning TC installation
Post by: curaga 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.
Title: Re: Cloning TC installation
Post by: athouston 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.
Title: Re: Cloning TC installation
Post by: althalus on July 11, 2010, 05:38:43 AM
-a or equivalent should be used
Yes, my bad, was somewhat preoccupied earlier this afternoon.