Author Topic: Swap 32gb Cf For Microdrive  (Read 14704 times)

ArchiMark

  • Administrator
  • Hero Member
  • *****
  • Posts: 1830
    • View Profile
Swap 32gb Cf For Microdrive
« on: April 01, 2008, 11:20:15 pm »
Decided to take the plunge and got a new 32GB A-Data CF Card today....

 

Want to do this swap the right way and hopefully easy way....

I assume that I can 'clone' my current Debian EABI setup on my existing 6GB microdrive over to the new 32GB CF card, right?

Would this be the right way to do it?

1) Format new 32GB card and make 2 partitions; ext3 (/dev/hdc1 /mnt/cf)  and a small swap (512MB on /dev/hdc2 /mnt/cf2).

2) Copy over current microdrive debian contents on hda2 over to new ext3 partition on 32GB CF card  by doing:

Code: [Select]
#dd if=/dev/hda2 of=/dev/cf
* Note: hda1 on my existing microdrive is my swap partition.

So, is this correct way???

Thanks!

Mark
« Last Edit: April 01, 2008, 11:24:22 pm by ArchiMark »
Silicon Valley Digerati - * Please see my Mini Laptops For Sale Listing *
Cosmo Communicator / One-Netbook One Mix Yoga 3S (Win 10/Manjaro 18)
Banana Pi Zero UMPC/Armbian
MacBookPro
Sold: C3200/N900/OQO/N5/Dell Mini9/Netwalker/UMID M1/

adf

  • Hero Member
  • *****
  • Posts: 2807
    • View Profile
    • http://
Swap 32gb Cf For Microdrive
« Reply #1 on: April 02, 2008, 03:06:04 am »
Quote from: ArchiMark
Decided to take the plunge and got a new 32GB A-Data CF Card today....

 

Want to do this swap the right way and hopefully easy way....

I assume that I can 'clone' my current Debian EABI setup on my existing 6GB microdrive over to the new 32GB CF card, right?

Would this be the right way to do it?

1) Format new 32GB card and make 2 partitions; ext3 (/dev/hdc1 /mnt/cf)  and a small swap (512MB on /dev/hdc2 /mnt/cf2).

2) Copy over current microdrive debian contents on hda2 over to new ext3 partition on 32GB CF card  by doing:

Code: [Select]
#dd if=/dev/hda2 of=/dev/cf
* Note: hda1 on my existing microdrive is my swap partition.

So, is this correct way???

Thanks!

Mark

Oooooo Nooooo.  How fast is it?  Was it priced reasonably?
I've never moved stuff with dd like that--I'd have tried tar, but only on fa,iliarity, not on the belief that tar would be a better way to do it.  You are probably right.
**3100 Zubuntu Jaunty,(working on Cacko dualboot), 16G A-Data internal CF, 4G SD, Ambicom WL-1100C Cf, linksys usb ethernet,  BelkinF8T020 BT card, Belkin F8U1500-E Ir kbd, mini targus usb mouse, rechargeble AC/DC powered USB hub, psp cables and battery extenders.

**6000l  Tetsuized Sharprom, installed on internal flash only 1G sd, 2G cf

tux

  • Sr. Member
  • ****
  • Posts: 438
    • View Profile
    • http://
Swap 32gb Cf For Microdrive
« Reply #2 on: April 02, 2008, 04:05:52 am »
 @Archimark: I think that your cloning progedure needs some input from someone who has tried it. Possibly ZDevil or some of the others who have tarred up filesystems might be able to give some good advice here about using their methods.  

@adf: Archimark is talking about using and A-Data card. I remember you posting about major problems getting Debian to work on your transplanted A-data card.  Did you solve those problems?

Cheers
« Last Edit: April 02, 2008, 04:07:08 am by tux »
3200 aka BigZ, swapped in 16GB Sandisk Extreme III CF, Cacko 1.23 full,  new SDHC >2GB module,
SL860 Cacko 1.23 full, new SDHC >2GB module,
6000L SharpRom 1.12 + Tetsu kernel,
5500 TKC home on SD x 2 (with SD>1GB),
Archos PMA30 with OPEN PMA (Giraffe),
Nokia 770 (Hackers Edition)
Nokia 800 (ITOS 2008), 4GB SDHC x 2
Asus eeepc 4G (black), with 1GB ram, dual boot Xandros on SSD with Ubuntu Lucid Lynx on 16 GB SDHC,
Tmobile G1 Android (black), with Cyanogen's  Firerat's MTD script and Amon Ra Recovery 1.7.0
Tmobile HTC Wildfire.. rooted and on Cyanogen's 7.3 nightly Rom
Kopi/Kapi on everything bar the phone and the Nokias, there is a beta for the nokias...

All the above are retired

Samsung Note 8 N5110
Samsung Note N7105
FBreader on the lot!

ArchiMark

  • Administrator
  • Hero Member
  • *****
  • Posts: 1830
    • View Profile
Swap 32gb Cf For Microdrive
« Reply #3 on: April 02, 2008, 09:29:08 am »
Quote from: adf
Oooooo Nooooo.  How fast is it?  Was it priced reasonably?
I've never moved stuff with dd like that--I'd have tried tar, but only on fa,iliarity, not on the belief that tar would be a better way to do it.  You are probably right.

I'm not sure how fast it is....but it was priced very reasonably I though from SuperMediaStore.com....

$149.99 for the 32GB CF and $69.99 for a 16GB SDHC Card....

 

Quote from: tux
@Archimark: I think that your cloning progedure needs some input from someone who has tried it. Possibly ZDevil or some of the others who have tarred up filesystems might be able to give some good advice here about using their methods.  

Sounds like a good idea, tux.....

ZDevil,  where are you???.... or anyone else....

 


Cheers
Silicon Valley Digerati - * Please see my Mini Laptops For Sale Listing *
Cosmo Communicator / One-Netbook One Mix Yoga 3S (Win 10/Manjaro 18)
Banana Pi Zero UMPC/Armbian
MacBookPro
Sold: C3200/N900/OQO/N5/Dell Mini9/Netwalker/UMID M1/

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Swap 32gb Cf For Microdrive
« Reply #4 on: April 02, 2008, 05:44:32 pm »
Quote from: ArchiMark
Decided to take the plunge and got a new 32GB A-Data CF Card today....

no, you definitely don't want to use "dd" to copy a file system between different types of media unless you guarantee the number of blocks in the partition is the same or larger on the target.

anyway, "cat" is faster - it uses more buffering!

the best way to copy a filesys is like this:

cd /mnt/partition1
tar cf - | (cd /mnt/partition2 ; tar xf - )

tar will copy all files and devices, preserve the datestamps and protections etc.

if you were l33t, you could probably also do it with cpio but I'm too lazy to look it up.

so, just partition the CF appropriately. oh, do NOT use ext3, the journalling will kill the card faster.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

ArchiMark

  • Administrator
  • Hero Member
  • *****
  • Posts: 1830
    • View Profile
Swap 32gb Cf For Microdrive
« Reply #5 on: April 02, 2008, 06:41:30 pm »
Quote from: speculatrix
Quote from: ArchiMark
Decided to take the plunge and got a new 32GB A-Data CF Card today....

no, you definitely don't want to use "dd" to copy a file system between different types of media unless you guarantee the number of blocks in the partition is the same or larger on the target.

anyway, "cat" is faster - it uses more buffering!

the best way to copy a filesys is like this:

cd /mnt/partition1
tar cf - | (cd /mnt/partition2 ; tar xf - )

tar will copy all files and devices, preserve the datestamps and protections etc.

if you were l33t, you could probably also do it with cpio but I'm too lazy to look it up.

so, just partition the CF appropriately. oh, do NOT use ext3, the journalling will kill the card faster.

Thanks for your help with this, speculatrix!!

Will report back after I try this out...

 
Silicon Valley Digerati - * Please see my Mini Laptops For Sale Listing *
Cosmo Communicator / One-Netbook One Mix Yoga 3S (Win 10/Manjaro 18)
Banana Pi Zero UMPC/Armbian
MacBookPro
Sold: C3200/N900/OQO/N5/Dell Mini9/Netwalker/UMID M1/

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Swap 32gb Cf For Microdrive
« Reply #6 on: April 03, 2008, 03:10:23 pm »
Quote from: speculatrix
[snipped]
oh, do NOT use ext3, the journalling will kill the card faster.
This may not be true in practice, as argued in this article, which in a way also applies to CF disks: http://wiki.eeeuser.com/ssd_write_limit
And given that my Z with 16GB vs. my Eee PC with 4GB ...
« Last Edit: April 03, 2008, 03:51:19 pm by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

ArchiMark

  • Administrator
  • Hero Member
  • *****
  • Posts: 1830
    • View Profile
Swap 32gb Cf For Microdrive
« Reply #7 on: April 03, 2008, 06:32:25 pm »
Quote from: ZDevil
Quote from: speculatrix
[snipped]
oh, do NOT use ext3, the journalling will kill the card faster.
This may not be true in practice, as argued in this article, which in a way also applies to CF disks: http://wiki.eeeuser.com/ssd_write_limit
And given that my Z with 16GB vs. my Eee PC with 4GB ...

Thanks for that info/link....sounds reassuring as I have a feeling I won't be using my Z in 25 years....

 
Silicon Valley Digerati - * Please see my Mini Laptops For Sale Listing *
Cosmo Communicator / One-Netbook One Mix Yoga 3S (Win 10/Manjaro 18)
Banana Pi Zero UMPC/Armbian
MacBookPro
Sold: C3200/N900/OQO/N5/Dell Mini9/Netwalker/UMID M1/

adf

  • Hero Member
  • *****
  • Posts: 2807
    • View Profile
    • http://
Swap 32gb Cf For Microdrive
« Reply #8 on: April 04, 2008, 02:32:51 am »
Quote
@adf: Archimark is talking about using and A-Data card. I remember you posting about major problems getting Debian to work on your transplanted A-data card. Did you solve those problems?

No, I went to pdaxii13.  I am hoping the sharpbootloader method will work, though.
**3100 Zubuntu Jaunty,(working on Cacko dualboot), 16G A-Data internal CF, 4G SD, Ambicom WL-1100C Cf, linksys usb ethernet,  BelkinF8T020 BT card, Belkin F8U1500-E Ir kbd, mini targus usb mouse, rechargeble AC/DC powered USB hub, psp cables and battery extenders.

**6000l  Tetsuized Sharprom, installed on internal flash only 1G sd, 2G cf

ArchiMark

  • Administrator
  • Hero Member
  • *****
  • Posts: 1830
    • View Profile
Swap 32gb Cf For Microdrive
« Reply #9 on: April 04, 2008, 02:35:44 pm »
Quote from: speculatrix
anyway, "cat" is faster - it uses more buffering!

I just realized that I don't see 'cat' below in your instructions???

Also, I thought that 'cat' is for just viewing the content of a file?


Quote
the best way to copy a filesys is like this:
Code: [Select]
cd /mnt/partition1
tar cf - | (cd /mnt/partition2; tar xf - )

tar will copy all files and devices, preserve the datestamps and protections etc.

So, just want to make sure I understand this correctly for my situation of copying my hda2 partition with Debian EABI (hda1 is my swap partition) on it over to new partition on 32GB CF card....

So, here's the existing and new setups:

 Existing 6GB Microdrive
hda1 is Swap Partition
hda2 is Debian EABI Partition

New 32GB CF Card
cf1 will be new Debian EABI Partition
cf2 will be new Swap Partition

Code: [Select]
cd /mnt/cf1
tar /mnt/hda2 - | (cd /mnt/cf1; tar xf - )

Does this look right?

Thanks!
Silicon Valley Digerati - * Please see my Mini Laptops For Sale Listing *
Cosmo Communicator / One-Netbook One Mix Yoga 3S (Win 10/Manjaro 18)
Banana Pi Zero UMPC/Armbian
MacBookPro
Sold: C3200/N900/OQO/N5/Dell Mini9/Netwalker/UMID M1/

iwantprogress

  • Newbie
  • *
  • Posts: 14
    • View Profile
Swap 32gb Cf For Microdrive
« Reply #10 on: April 04, 2008, 04:59:40 pm »
rsync also works and is faster if you need to redo.
what i have: hplx, debian desktop.

what i want: sl-c3200-ish with flush-ish wireless ip to desktop and preferably slightly updated other specs.  nice pims, gnu- or xemacs, unix shell tools, an apt-get-ish feed, and some type of disk encryption.  i do not want a phone.

why: linux (necessary), thumb typable (critical), smallish, lightish, reliable, big open source ecosystem.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Swap 32gb Cf For Microdrive
« Reply #11 on: April 04, 2008, 05:58:20 pm »
Quote from: ArchiMark
Quote from: speculatrix
anyway, "cat" is faster - it uses more buffering!

I just realized that I don't see 'cat' below in your instructions???

Also, I thought that 'cat' is for just viewing the content of a file?

no, you could do, for example, "cat /dev/hda > /dev/hdb" to clone an entire hard drive

Quote
So, here's the existing and new setups:

 Existing 6GB Microdrive
hda1 is Swap Partition
hda2 is Debian EABI Partition

New 32GB CF Card
cf1 will be new Debian EABI Partition
cf2 will be new Swap Partition

Code: [Select]
cd /mnt/cf1
tar /mnt/hda2 - | (cd /mnt/cf1; tar xf - )

Does this look right?

Thanks!

you're missing a dot

cd /mnt/hda2
tar cf - . | (cd /mnt/cf1 ; tar xf - )


you cd into the source directory so that when you do the tar the current directory is the "root" of all the files; the "-" in the tar command outputs the stream to stdout; the stream is piped into a separate shell (the brackets) which starts in the destionation directory and unpacks the incoming stream from stdin.

the same trick works over an ssh session.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

ArchiMark

  • Administrator
  • Hero Member
  • *****
  • Posts: 1830
    • View Profile
Swap 32gb Cf For Microdrive
« Reply #12 on: April 04, 2008, 07:49:39 pm »
Quote from: speculatrix
Quote from: ArchiMark
Quote from: speculatrix
anyway, "cat" is faster - it uses more buffering!

I just realized that I don't see 'cat' below in your instructions???

Also, I thought that 'cat' is for just viewing the content of a file?

no, you could do, for example, "cat /dev/hda > /dev/hdb" to clone an entire hard drive

Quote
So, here's the existing and new setups:

 Existing 6GB Microdrive
hda1 is Swap Partition
hda2 is Debian EABI Partition

New 32GB CF Card
cf1 will be new Debian EABI Partition
cf2 will be new Swap Partition

Code: [Select]
cd /mnt/cf1
tar /mnt/hda2 - | (cd /mnt/cf1; tar xf - )

Does this look right?

Thanks!

you're missing a dot

cd /mnt/hda2
tar cf - . | (cd /mnt/cf1 ; tar xf - )


you cd into the source directory so that when you do the tar the current directory is the "root" of all the files; the "-" in the tar command outputs the stream to stdout; the stream is piped into a separate shell (the brackets) which starts in the destionation directory and unpacks the incoming stream from stdin.

the same trick works over an ssh session.

THANKS for the explanation/clarification, speculatrix!!

Think I got it now....

 
Silicon Valley Digerati - * Please see my Mini Laptops For Sale Listing *
Cosmo Communicator / One-Netbook One Mix Yoga 3S (Win 10/Manjaro 18)
Banana Pi Zero UMPC/Armbian
MacBookPro
Sold: C3200/N900/OQO/N5/Dell Mini9/Netwalker/UMID M1/

ArchiMark

  • Administrator
  • Hero Member
  • *****
  • Posts: 1830
    • View Profile
Swap 32gb Cf For Microdrive
« Reply #13 on: April 05, 2008, 08:30:08 pm »
Quote from: iwantprogress
rsync also works and is faster if you need to redo.

Thanks for your suggestion too, iwantprogress, didn't know about rsync....

Just googled it and found the rsync website....sounds interesting....

 
Silicon Valley Digerati - * Please see my Mini Laptops For Sale Listing *
Cosmo Communicator / One-Netbook One Mix Yoga 3S (Win 10/Manjaro 18)
Banana Pi Zero UMPC/Armbian
MacBookPro
Sold: C3200/N900/OQO/N5/Dell Mini9/Netwalker/UMID M1/

ArchiMark

  • Administrator
  • Hero Member
  • *****
  • Posts: 1830
    • View Profile
Swap 32gb Cf For Microdrive
« Reply #14 on: April 07, 2008, 11:21:03 am »
OK, tried the 'cat' approach and here's what I get:

Code: [Select]
#cat /dev/hda2 > /dev/hdc1
#df
Filesystem   1K-blocks   Used                    Available  Used%      Mounted   on
/dev/hda2      5589680       1317484        3988248  25%      /
tmpfs      31180           0        31180    0%      /lib/init/rw
udev      10240         80        10160    1%      /dev
tmpfs      31180           4        31176    1%      /dev/shm
/dev/hdc1      5184312     -25616124    30516488     -     /mnt/cf1

#cd /mnt/cf1
EXT3-fs error (device hdc1): ext_readdir: bad entry in directory #2: directory
entry across blocks - offset=0, inode=4294967295, rec_len=65536, name_len=255
 

So, should I just try the other way or did I do something wrong???

 

Thanks!
« Last Edit: April 07, 2008, 11:28:12 am by ArchiMark »
Silicon Valley Digerati - * Please see my Mini Laptops For Sale Listing *
Cosmo Communicator / One-Netbook One Mix Yoga 3S (Win 10/Manjaro 18)
Banana Pi Zero UMPC/Armbian
MacBookPro
Sold: C3200/N900/OQO/N5/Dell Mini9/Netwalker/UMID M1/