Author Topic: Linux Command Needed  (Read 9594 times)

Mjolinor

  • Full Member
  • ***
  • Posts: 227
    • View Profile
Linux Command Needed
« on: February 14, 2006, 05:42:58 am »
Can someone please give me the exact command to copy the microdrive to a CF in the CF slot such that when I take the microdrive out and replace it with the CF all that I have will be there as though no change has taken place.

I guess it will be something like

cp -R /dev/hda1 /mnt/cf

but I'm not sure and I can't test it until I've swapped it out so would appreciate a concrete answer to save me trying then swapping back and forward.

How shuold I partition / format it?

It's a 3000 with PdaXrom.
« Last Edit: February 14, 2006, 05:55:18 am by Mjolinor »

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Linux Command Needed
« Reply #1 on: February 14, 2006, 10:46:46 am »
Are you talking about removing the internal microdrive?

If so, I don't know where it's mounted. Can you list the output of 'mount'?


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

Mjolinor

  • Full Member
  • ***
  • Posts: 227
    • View Profile
Linux Command Needed
« Reply #2 on: February 14, 2006, 11:09:18 am »
Yes. I intend to remove the microdrive and replace it with a 2Gb CF card.

root@192.168.0.6's password:
# mount
rootfs on / type rootfs (rw)
/dev/root on /media/realroot type jffs2 (rw)
/dev/hda1 on / type ext3 (rw)
/proc on /proc type proc (rw)
none on /dev type tmpfs (rw)
none on /dev/pts type devpts (rw)
/dev/hda1 on /mnt/user type ext3 (rw)
none on /proc/bus/usb type usbdevfs (rw)
#

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Linux Command Needed
« Reply #3 on: February 14, 2006, 11:45:59 am »
Hmm, I'd expected it to be a bit clearer than that (not your fault though).

Can you also list the output of 'df' which should indicate which of the mount points is on the HDD from their sizes.

On the other hand, someone with one of these machines might know that info?


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

Mjolinor

  • Full Member
  • ***
  • Posts: 227
    • View Profile
Linux Command Needed
« Reply #4 on: February 14, 2006, 12:22:42 pm »
# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hda1              3936428   1353376   2383092  36% /
/dev/hda1              3936428   1353376   2383092  36% /
none                     12288        36     12252   0% /dev
/dev/hda1              3936428   1353376   2383092  36% /mnt/user
#



Makes not much sense to me
« Last Edit: February 14, 2006, 12:24:49 pm by Mjolinor »

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Linux Command Needed
« Reply #5 on: February 14, 2006, 02:13:25 pm »
I wouldn't suggest using dd because the geometry will be different, what I would suggest is that you backup the Microdrive contents by whatever means you like, take it out and using a Linux box tar off the contents then create your file systems on the new device and tar them back using that same Linux system. Then fit the new device with the file systems that have been prepped on the Linux box.

Make sure you use the p flag when tarring back though because you want to preserve userids and permissions etc.
« Last Edit: February 14, 2006, 02:14:41 pm by iamasmith »
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Linux Command Needed
« Reply #6 on: February 15, 2006, 06:09:16 am »
I would boot into DB mode and then copy from there

mkdir /mnt/hdd
mount /dev/hda1 /mnt/hdd
tar cvf - /mnt/hdd/* | tar xvf - -C /mnt/cf
« Last Edit: February 15, 2006, 06:12:03 am by Meanie »
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Linux Command Needed
« Reply #7 on: February 15, 2006, 06:46:20 am »
Quote
I would boot into DB mode and then copy from there

mkdir /mnt/hdd
mount /dev/hda1 /mnt/hdd
tar cvf - /mnt/hdd/* | tar xvf - -C /mnt/cf
[div align=\"right\"][a href=\"index.php?act=findpost&pid=114872\"][{POST_SNAPBACK}][/a][/div]

Actually you may mean this , the f flag and - are superfluous when doing this and you probably don't want to pipe in the verbose output of tar in the tar creation stage.

tar -c /mnt/hdd/* | tar -xpv -C /mnt/cf

Note that the p option is quite important too
« Last Edit: February 15, 2006, 06:47:24 am by iamasmith »
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card