Tiny Core Linux
General TC => General TC Talk => Topic started by: hitsware on July 17, 2012, 10:53:19 PM
-
I tried just copying all the files and the clones wouldn't boot ...
Some kind of 'iso' maker ?
-
Hi hitsware
You could use the tc-install.tcz utility on the new thumb drive. That will make it boot-able. Then delete the files
and directories on it. Finally, copy the contents of the drive you wish to duplicate. Once you have done that,
future backups are just a matter of copying files. If you have a CD, it has the install utility on it, and you can
just boot and run tc-install from that.
-
Thanks Rich,
I'm starting over since I accidently copied my working
USB stick back onto itself rendering it unbootable.
I don't have the CD.
I now have a bootable 'current' version on the stick.
I used XP, Core2Usb, and the downloaded iso
After I add my extentions, is there a way to make
an iso of the resultant stick ?
Will Core2Usb then install that on a new stick ?
Or am I missing some simpler approach ?
I don't quite understand your answer above.
-
Hi hitsware
OK, try this:
1. Boot from your thumb drive
2. Plug in the destination thumb drive and mount it.
3. dd if=/mnt/BootedThumbDrive of=/mnt/DestinationThumbDrive bs=512 conv=fsync
4. Wait for it to finish.
The thumb drives should be the same size.
-
> 1. Boot from your thumb drive
> 2. Plug in the destination thumb drive and mount it.
Leave the drive I booted from in ?
> 3. dd if=/mnt/BootedThumbDrive of=DestinationThumbDrive bs=512 conv=fsync
(in terminal ?) ' dd if=/mnt/sdb1 of=sdc1 bs=512 conv=fsync '
> 4. Wait for it to finish.
> The thumb drives should be the same size.
-
Hi hitsware
Yes, leave the drive you booted from in, that's where the dd command will be copying from.
Yes, execute the command from a terminal.
-
Didn't work ............ I got a help-screen describing the process but not the process ....
Unless that's what you knew I'd get ? ........
-
Hi hitsware
No, I didn't expect you to see a help message. I don't have any spare thumb drives to try this myself, so bear
with me. Try this for step three instead:
dd if=/mnt/BootedThumbDrive of=/mnt/DestinationThumbDrive bs=512 skip=0 seek=0
sync
-
Your of= path is incomplete!
-
Hi tinypoodle
Doh! I read the command he posted and missed that little detail, though it wasn't his fault, it was mine. The
examples I posted omitted /mnt in the of= field. I will correct my previous posts.
-
Note that path errors with dd could potentially lead to significant data loss disaster.
-
Hi tinypoodle
Absolutely correct. That's why I originally suggested the somewhat round about way of using the tc-install utility.
I don't like offering the dd command for that very reason, but since he had trouble understanding my first
suggestion, I decided to take a chance.
-
Is there a wiki article or something ?
Seems it would be a common procedure.
I'm having a problem finding a Windows isomaker
even though I thought I had one (but tossed it)
I'd rather do it from TCL for the practice though.
Can I download the tc-install and proceed without
the CD ?
-
Hi hitsware
Can I download the tc-install and proceed without the CD ?
Yes you can.
-
OK
I used
dd if=/dev/sdb1 of=/dev/sdc1
It worked even though I aborted after it ran and ran
I just need to learn how to limit the bytes ...........
-
dd will copy sector by sector, regardless if sectors are zero.
-
Yea. I got it ! ........... :)
dd count=62500 if=/dev/sdb1 of=/dev/sdc1
-
Uhmm...
That looks random, no?
-
512 bytes is default block size
TCL is ~ 20M so far
32M should give enough for expansion (I'll have to keep track)
512 * 62500 = 32M
-
Hi hitsware
It will take a while, but I would let the dd command run to completion. Your original thumb drive is fully formatted.
By letting dd finish, your destination thumb drive will also be fully formatted. You can probably speed up the
process by running it like this:
dd if=/dev/sdb1 of=/dev/sdc1 bs=1M
sync
The dd command should terminate on its own when it reaches the end of the drive. Once the cloned drive is
setup, you can speed up the process the next time you wish to update the clone by doing:
rm -fr /dev/sdc1/*
cp -a /dev/sdb1/* /dev/sdc1
sync
-
Hi hitsware
It will take a while, but I would let the dd command run to completion. Your original thumb drive is fully formatted.
By letting dd finish, your destination thumb drive will also be fully formatted. You can probably speed up the
process by running it like this:
dd if=/dev/sdb1 of=/dev/sdc1 bs=1M
sync
The dd command should terminate on its own when it reaches the end of the drive. Once the cloned drive is
setup, you can speed up the process the next time you wish to update the clone by doing:
rm -fr /dev/sdc1/*
cp -a /dev/sdb1/* /dev/sdc1
sync
If I format the drive before copying to it
will that have the same outcome ?
-
Hi hitsware
If I format the drive before copying to it will that have the same outcome ?
Yes, as long as you make the drive bootable before copying your files. This should do that:
dd if=/dev/sdb1 of=/dev/sdc1 bs=512 count=1
-
I'm copying everything from the source which is already bootable.
-
Hi hitsware
The cp command is not enough to make the destination drive bootable.
-
It worked ........
The original is from downloaded iso
(via XP) ......... installed to USB via ' core2usb '
Now (knock on wood) if I do dd
I get a real clone ...... (bootable since it's a clone)
-
Hi hitsware
That's not much of a dd command in your last post.
-
dd bs=8G if=/dev/sdb1 of=/dev/sbc1
-
No way!
If any, make that "bs=512"
-
512 is default ........... Rich says 1M
What's the significance of ' block size ' ?
There probably is an upper limit though .....
-
Hi hitsware
As the help screen for dd states:
Read and write N bytes at a time
So if bs=512 then dd reads 512 bytes then writes 512 bytes then reads 512 bytes writes 512 bytes ..... until done.
What it does with bs=8G, especially if you don't have that much RAM, I don't know.
When writing to a USB drive, internally, it also works in blocks. To perform a write, it first copies that block to some
internal RAM, erases that block, modifies the RAM with the new values, and finally writes the contents of the RAM
back to that block. The upshot of this is, if the USB drive uses a block size of 4K for example, and you are writing
512 bytes at a time, you MIGHT wind up writing the same block eight times. This would wear out the device faster
and have a negative impact on writing speed. I say MIGHT because if the device is smart enough, it may wait a
brief period of time before writing the data to see if any more data is coming in for that block. No, I don't know how
to determine what the natural block size of a USB drive is. I picked 1M because I read somewhere that current
devices can have block sizes of 128k or possibly 256K.
-
Duh .........
Well (for now) I'll just keep the 'default' 512
The 8G was a sorta joke ha-ha :)
I've thought about the wear on the drive.
Have you ever wore one out ?
Or known anyone that has ?
-
Hi hitsware
I've never worn one out.
-
Me neither. But I haven't really used them alot.
I might build a mini-itx with nothing except RAM
and USB. Then if you used 1 drive like a HD, I
suppose it might (eventually) go bunk.........
-
Why not build the USB then use ezremaster to build an ISO with tc + extensions as desired. ?
-
Why not build the USB then use ezremaster to build an ISO with tc + extensions as desired. ?
' dd ' precludes having to add ' ezremaster ' ...........
-
Ok but ezremaster is just too easy and would have saved you all the grief, it is the method I use every day. But so long as you got it sorted I guess.
-
What it does with bs=8G, especially if you don't have that much RAM, I don't know.
RAM wouldn't be my only concern, but the fact that neither the source nor the target would be of exact size of 8GB when passing such to dd.
-
Ok but ezremaster is just too easy and would have saved you all the grief, it is the method I use every day. But so long as you got it sorted I guess.
I looked at it but it was Greek to me :(
Besides, I'm trying to keep extentions to the minimum.
-
I understand, I usually install ezremaster as Ondemand and never include it (or it's dep's) in a remaster for that reason. In reality it's simpler than ABC, just following the prompts. If you ever get the urge to find a simpler method to build your ISO's exactly the way you want them and have used it a couple of times, I don't think you'll ever look back..
Having used it daily to make small ISO's each tailored for very specific requirements, I can vouch for it's simplicity and effectiveness.
-
I might yet try it. I did have one of my copies fail to boot ..... ?????????
-
I build ISO's in Virtual Machines configured exactly as needed in just a few minutes so it can't be that hard, (with tcz's installed "inside initrd apps on boot" but you might want to select another option, personal tcz's and backups, settings etc) then use ezremaster to make an ISO which can by deployed to any USB thumb drive. There's plenty of help here if needed when configuring a remaster. Don't let it be Greek, it's fairly self explanatory, if you mess up the first one, build another.. ;)