New IT forum Follow us on Twitter
17 May 2012, 03:48:44 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: EFIKA MX reviewed in Linux User & Developer issue 104
 
   Home   SHOP Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Clone SD card, U boot, multi-boot  (Read 3480 times)
six
Newbie
*
Posts: 4


« on: 14 November 2009, 01:35:09 am »

Hi,

First, I would like to thank you for your support. This forum is an excellent idea

I have several newbies questions  related to SD card.

Question 1 : Cloning the ubuntu SD card

I received my plug with ubuntu on SD Card (lets call it the Master card) and it works quite well. But, as i'm a paranoid, i would like to backup this card.
I have a lot of old 4GB SD Cards (PNY class 4) and i would like to use them. The problem is that none of them are greater than the 4GB Kingston provided.

In a first attempt. I first try to copy with dd and fsck to deal with errors. The system works for a minute but was very unstable. That was obviously a bad idea.

In a second attempt, i use partimage to backup the Master card. I also use cpio to copy the content of the second partition.
On the destination card i clone the first partition, create a second ext3 partition and copy the content of cpio archive.
This seems to works for the 3 hours i play with the plug. But suddenly the system becomes Read-Only.  I was forced to reboot.
The Read-Only issue occurs from time to time since then. Needless to say : it's very annoying, especially during an "apt-get install" session.
According to you, is this related to the procedure i used ? Or to the quality of the SD Card ? Or to the configuration ?

Have you any suggestion or should i buy a 8GB card ? I also tried clonezilla without much success.

Question 2 : How to create a new sd card from installer ?
I would also like to know how to create a new Master card via the installer (http://www.openplug.org/plugwiki/index.php/SheevaPlug_Installer). From what I understand it is necessary to reinstall u-boot via the plug. Is there any script to directly generate a new card directly ? I did not find any mention of that on plug forum.

Question 3 : Class of the SD card ?
Ultimately, i am planning to use a 16GB sd card. Class 6 are very expensive. Have you any experience of using class 4 ? The very short experience i have add

Question 4 : Debian, SD multi-boot ?
I'm planning to try debian and i've read with attention the http://www.newit.co.uk/forum/index.php/topic,98.0.html threads

I'm far from being familiar with u-boot. I try to read the manual but it gives me an headache (if you have any tutorial or links...). The documentation on openplug wiki is short.

This : http://www.linuxfordevices.com/c/a/Linux-For-Devices-Articles/Introduction-to-Das-UBoot-the-universal-open-source-bootloader/ was usefull to get the principle. For what i guessed, it is necessary to use mkimage (i did not find where it was located on the kit CD) to provides information on the linux image.
Of course the debian annotation and the ubuntu annotation are not the same. I would have to easy. It seems necessary to modify the environment to put that :

Code:
setenv bootargs_console console=ttyS0,115200
setenv bootargs_root 'root=/dev/mmcblk0p1'
setenv bootcmd_mmc 'mmcinit; ext2load mmc 0 0x0800000 /boot/uInitrd; ext2load mmc 0 0x400000 /boot/uImage'
setenv bootcmd 'setenv bootargs $(bootargs_console) $(bootargs_root); run bootcmd_mmc; bootm 0x400000 0x0800000'
saveenv

After reading some doc, i approximately understand the meaning of those lines.
I would like to give it a try. But before i was wondering if there is any possibility to save the actual u-boot environment to a usb key ?

Eventually i would like not to enter all these lines when i change the card. This implies a multi-boot like configuration.
I plan to use this methodology : http://www.openplug.org/plugwiki/index.php/Multi-Boot with bootargs_sd_ubuntu and bootargs_debian. Have you ever try this ?

Thank you for reading

May i suggest you to add http://computingplugs.com/index.php/Main_Page in the beginner guide. It was full of very usefull information. I've tried X11 and stuffs and that was running surprisingly well (before my system becomes read-only again)
Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #1 on: 14 November 2009, 11:45:59 am »

Hi,

First, I would like to thank you for your support. This forum is an excellent idea

Thank you. We don't want to compete with the plugcompter.org forum, which we consider to be an excellent resource, and it's probably best that the most important pieces of information relating to the SheevaPlug are available in one place, rather than spread around on different sites. But we recognise that many of our customers will have similar questions after (or before) purchase, and making that information available publicly benefits eveyone. Thank you for taking the time to sign up.

I have several newbies questions  related to SD card.

Question 1 : Cloning the ubuntu SD card

I received my plug with ubuntu on SD Card (lets call it the Master card) and it works quite well. But, as i'm a paranoid, i would like to backup this card.
I have a lot of old 4GB SD Cards (PNY class 4) and i would like to use them. The problem is that none of them are greater than the 4GB Kingston provided.

In a first attempt. I first try to copy with dd and fsck to deal with errors. The system works for a minute but was very unstable. That was obviously a bad idea.

In a second attempt, i use partimage to backup the Master card. I also use cpio to copy the content of the second partition.
On the destination card i clone the first partition, create a second ext3 partition and copy the content of cpio archive.
This seems to works for the 3 hours i play with the plug. But suddenly the system becomes Read-Only.  I was forced to reboot.
The Read-Only issue occurs from time to time since then. Needless to say : it's very annoying, especially during an "apt-get install" session.
According to you, is this related to the procedure i used ? Or to the quality of the SD Card ? Or to the configuration ?

Have you any suggestion or should i buy a 8GB card ? I also tried clonezilla without much success.

We don't know of a way of cloning an SD card directly from a plug that is configured to boot only from SD card. Once the card is mounted, you aren't going to be able to pull data off it in the same simple and straightforward way that you can with an unmounted card.

When I worked through the installation procedure for Meteohub, I noticed that their image file is a little smaller than the ones I was generating with our regular SD cards. It occurred to me that this might be a deliberate strategy designed to circumvent the problem that you have identified (of differing sizes).

Having said that, your "second attempt" procedure looks more suitable, but you didn't say how you "use partimage to backup the Master card". If you used a separate PC with a card reader, that sounds like a smart move. I haven't used partimage so I don't know if that usage is obvious and implied. You could clone your 4G card to an 8G card and if you were able to dynamically resize the second partition afterwards, you would be able to recover the extra space. (But if you couldn't (resize), you wouldn't (get the extra space back)).

Becoming read-only sounds like a filesystem error, where the filesystem is mounted as read only on account of identified errors. Presumably there is no log to explain why this occurred.

Question 2 : How to create a new sd card from installer ?
I would also like to know how to create a new Master card via the installer (http://www.openplug.org/plugwiki/index.php/SheevaPlug_Installer). From what I understand it is necessary to reinstall u-boot via the plug. Is there any script to directly generate a new card directly ? I did not find any mention of that on plug forum.

The installer uses the target SheevaPlug to copy a filesystem from a USB stick to SD card. Of course, that is exactly how we prepared your plug in the first place. In the middle step of the process, the plug is made to reboot and copy the relevant files to the device in the SD card slot. The size of the card is not significant; we've ued 1G, 2G, 4G and 8G cards. Since at the moment you can only boot from SD card, you can't simply pull out that single step from the installer. Again, see my final comments.

Question 3 : Class of the SD card ?
Ultimately, i am planning to use a 16GB sd card. Class 6 are very expensive. Have you any experience of using class 4 ? The very short experience i have add

I use a 4G class 2 for most of my tests, we sell class 6 as our "regular" cards, and we have some class 6 4G SLC cards that we can offer as a "premium" model. Since SLC cards are supposed to last around 10x as long, but ("only") cost 6x as much, they should be cost effective. I don't think we've used any class 4, but no reason why they woudn't work. How you approach the pricing issue is down to you; I think that we would all expect the prices of cards to drop, but when each of us asks how much we are prepared to pay now, we all have different answers.

Question 4 : Debian, SD multi-boot ?
I'm planning to try debian and i've read with attention the http://www.newit.co.uk/forum/index.php/topic,98.0.html threads

I'm far from being familiar with u-boot. I try to read the manual but it gives me an headache (if you have any tutorial or links...). The documentation on openplug wiki is short.

This : http://www.linuxfordevices.com/c/a/Linux-For-Devices-Articles/Introduction-to-Das-UBoot-the-universal-open-source-bootloader/ was usefull to get the principle. For what i guessed, it is necessary to use mkimage (i did not find where it was located on the kit CD) to provides information on the linux image.
Of course the debian annotation and the ubuntu annotation are not the same. I would have to easy. It seems necessary to modify the environment to put that :

Code:
setenv bootargs_console console=ttyS0,115200
setenv bootargs_root 'root=/dev/mmcblk0p1'
setenv bootcmd_mmc 'mmcinit; ext2load mmc 0 0x0800000 /boot/uInitrd; ext2load mmc 0 0x400000 /boot/uImage'
setenv bootcmd 'setenv bootargs $(bootargs_console) $(bootargs_root); run bootcmd_mmc; bootm 0x400000 0x0800000'
saveenv

After reading some doc, i approximately understand the meaning of those lines.
I would like to give it a try. But before i was wondering if there is any possibility to save the actual u-boot environment to a usb key ?

Eventually i would like not to enter all these lines when i change the card. This implies a multi-boot like configuration.
I plan to use this methodology : http://www.openplug.org/plugwiki/index.php/Multi-Boot with bootargs_sd_ubuntu and bootargs_debian. Have you ever try this ?

The u-boot configuration is best copied using copy & paste. You don't say whether or not you have interacted with U-Boot thus far. If not, be aware that it should be very simple. Use the serial interface, interrupt the boot at the point you see "Hit any key to stop autoboot:" Use "printenv". Use "help". Once you have taken a look around, it may begin to make more sense. You can tweak the environment variables and change them back again when they don't work. The installer uses Openocd to write changes to U-Boot and I don't know if there's anything that the installer does that you can't do manually.

The multi-boot strategy is sound, and frankly it is one that we should have looked at before we started selling the SD-boot configurations. Better late than never; my current project is to investigate the issues around multi-boot in order to see if we can avoid the problem (of cloning your SD card) that you are experiencing.

On the one hand, if a plug can boot from SD card (if a suitable, bootable card is inserted), then you have the system that you want. On the other hand, if you can boot to NAND, then insert an SD card and USB stick, and dd the SD card to USB stick, and then dd back again from USB stick to another SD card, well, we think that's handy. But it doesn't handle the issue of differing sizes of SD cards, whereby the image may not fit on to the target.

We are preserving the images that we are using, and because of the capacity issue we are trying to standardise on the cards that we use. We don't think, for example, that offering SD-booting (and multiboot) on differing sizes and classes of SD cards, Ubuntu / debian, slimserver pre-installed (or not), etc. is practical logistically. We could easily end up with at least 8, maybe 20-30 different configurations and even if we didn't confuse customers we certainly wouldn't find it easy to juggle the stock levels of every option. (We have stated that if anyone requires a particular configuration that they may contact us with specific details).

All this is by-the-by, and doesn't address the problem that you are trying to solve. How about you send us your smallest SD card, and we return it to you in a state that is suitable for booting? If you are able to clone that card successfully, then I think you have what you want (with regards to the first problem that you raised). Send an e-mail to info@newit.co.uk if you that sounds like a solution for you. Please write from the e-mail address that is associated with your purchase (ie either the e-mail address that shows in our ebay records or the address that you used when registering on the shop). Alternatively, we can transfer to you an image for a smaller card (1G or 2G); the compressed image is around 140M. If you can resize the second partition without damaging it, maybe that will solve the problem.

Since my current project is to prepare a new! improved! multi-boot SD card booting option, I am going to be treading similar ground to that covered in your question 4. And I don't have the answers yet. The instructions on the plugcomputer.org forum for using the installer are a little out of date, but it's possible to figure out how to use it, and it all begins to make sense quite quickly.

Thank you for reading

May i suggest you to add http://computingplugs.com/index.php/Main_Page in the beginner guide. It was full of very usefull information. I've tried X11 and stuffs and that was running surprisingly well (before my system becomes read-only again)

No problem. Hope my answers help, please ask again if you have follow-up questions.

I've added a link to computingplugs.com to the bottom of the "Getting started" post.
Logged
six
Newbie
*
Posts: 4


« Reply #2 on: 14 November 2009, 03:46:08 pm »

Thanks a lot for you super fast response.

Quote
Having said that, your "second attempt" procedure looks more suitable, but you didn't say how you "use partimage to backup the Master card". If you used a separate PC with a card reader, that sounds like a smart move. I haven't used partimage so I don't know if that usage is obvious and implied. You could clone your 4G card to an 8G card and if you were able to dynamically resize the second partition afterwards, you would be able to recover the extra space. (But if you couldn't (resize), you wouldn't (get the extra space back)).

I effectively use a second computer with an ubuntu hardy on it to copy the SD Card. Contrary to dd, partimage only copy what is necessary and compress the archive. It is definitively the best way of cloning a partition i know (http://www.partimage.org/Main_Page). The copy is therefore ultra fast. The drawback is that this software is not able of reducing the size of the partition.
There is also a pretended smarter version of dd called sdd but i didn't try it.

I give you more feedback; it may help someone.

First attempt (/dev/sdd = master card, /dev/sdc = cloning)

Code:
$six@ubuntu:  sudo su;
$six@ubuntu:  umount /dev/sdb; umount /dev/sdc;
$six@ubuntu:  dd if=/dev/sdb of=/dev/sdc bs=5k;
$six@ubuntu:  resize with gparted;
$six@ubuntu:  e2fsck ...
#then load into the plug

Second attempt :
Quote
$six@ubuntu: partimage -z1 -o -d save /dev/sdb1 ~/sheeva/boot_image.gz
#just to have a copy :
$six@ubuntu: partimage -z1 -o -d save /dev/sdb2 ~/sheeva/core_image.gz

#create the same partition than fdisk -l /dev/sdb apart from the size of /dev/sdc2 which is smaller :
$six@ubuntu: fdisk /dev/sdc
$six@ubuntu: partimage restore /dev/sdb1 ~/sheeva/boot_image.gz.000
$six@ubuntu: mkfs.ext3 /dev/sdb2
$six@ubuntu: mount /dev/sdb2 /mnt/clone

#Then i poweron the plug with the master sd card and follow theses instructions (http://plugcomputer.org/plugforum/index.php?topic=865.0)
$six@ubuntu: nc -lp 2345 >/mnt/clone/archive.cpio
#$BKUPIP = my ubutu computer ip
$six@sheevaplug : cd / && find . dev -mount | cpio -oc | nc $BKUPIP 2345
$six@ubuntu: cpio -id < cpio.archive

#then i boot the sheevaplug with the new cloned card.

size of boot_image : 2,5MB; core_image : 137MB;

I also use the lock button on the master card to be sure not to erase it.
There is a small distribution of linux which can be easiest to use called clonezilla : http://clonezilla.org/

This attempt seems to work but of course i had the read-only problem. The partition is mounted rw. I always try to write something with touch or cat < and that always work after the startup. But after one hour, the system always goes into this read-only states. I will pay more attention to the logs in the future.



Quote
All this is by-the-by, and doesn't address the problem that you are trying to solve. How about you send us your smallest SD card, and we return it to you in a state that is suitable for booting? If you are able to clone that card successfully, then I think you have what you want (with regards to the first problem that you raised). Send an e-mail to info@newit.co.uk if you that sounds like a solution for you. Please write from the e-mail address that is associated with your purchase (ie either the e-mail address that shows in our ebay records or the address that you used when registering on the shop). Alternatively, we can transfer to you an image for a smaller card (1G or 2G); the compressed image is around 140M. If you can resize the second partition without damaging it, maybe that will solve the problem.

It is very kind of you. I buy a Kingston 8GB card and expect to receive it Wednesday. These cards are very expensive here in France due to fees.
Nevertheless i don't give up with the 4GB cards.  It would be very kind, if you can transfer to me an image for a smaller card (1GB). It won't be a problem for me to resize it with gparted. I will send you a mail for that.



Quote
The u-boot configuration is best copied using copy & paste. You don't say whether or not you have interacted with U-Boot thus far. If not, be aware that it should be very simple. Use the serial interface, interrupt the boot at the point you see "Hit any key to stop autoboot:" Use "printenv". Use "help". Once you have taken a look around, it may begin to make more sense. You can tweak the environment variables and change them back again when they don't work. The installer uses Openocd to write changes to U-Boot and I don't know if there's anything that the installer does that you can't do manually.

Oh i play with it a little. It does look like Cisco IOS or similar small OS. I just don't want to brick my plug  Smiley

For the multiboot part i was thinking of something like that. One card with ubutu the second with debian :
Quote
setenv mainlineLinux yes
setenv arcNumber 2097
saveenv
reset

#config for debian
setenv bootargs_console1 console=ttyS0,115200
setenv bootargs_root1 'root=/dev/mmcblk0p1'
setenv bootcmd_mmc1 'mmcinit; ext2load mmc 0 0x0800000 /boot/uInitrd; ext2load mmc 0 0x400000 /boot/uImage'
setenv bootcmd_sd1 'setenv bootargs $(bootargs_console1) $(bootargs_root1); run bootcmd_mmc1; bootm 0x400000 0x0800000'
saveenv

#config for ubutu :
i do not have the config here but something like for debian
...
setenv bootcmd_sd1 ....


bootcmd=run bootcmd_sd1; run bootcmd_sd2; run bootcmd_nand


run bootcmd

For what i understand, if the debian card is inserted the boot sequence will be interrupted before the second instruction. Otherwise it will try to load the ubuntu configuration and then the nand.
Do you plan to provide debian configuration ? It might be interesting  for you if you sell preconfigured card with different systems on it and a multi-boot system.

Thank you again


« Last Edit: 14 November 2009, 04:02:19 pm by six » Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #3 on: 14 November 2009, 05:48:43 pm »

I'm only going to comment on a few points.

Thanks a lot for you super fast response.

Quote
Having said that, your "second attempt" procedure looks more suitable, but you didn't say how you "use partimage to backup the Master card". If you used a separate PC with a card reader, that sounds like a smart move. I haven't used partimage so I don't know if that usage is obvious and implied. You could clone your 4G card to an 8G card and if you were able to dynamically resize the second partition afterwards, you would be able to recover the extra space. (But if you couldn't (resize), you wouldn't (get the extra space back)).

I effectively use a second computer with an ubuntu hardy on it to copy the SD Card. Contrary to dd, partimage only copy what is necessary and compress the archive. It is definitively the best way of cloning a partition i know (http://www.partimage.org/Main_Page). The copy is therefore ultra fast. The drawback is that this software is not able of reducing the size of the partition.
There is also a pretended smarter version of dd called sdd but i didn't try it.

I give you more feedback; it may help someone.

First attempt (/dev/sdd = master card, /dev/sdc = cloning)

Code:
$six@ubuntu:  sudo su;
$six@ubuntu:  umount /dev/sdb; umount /dev/sdc;
$six@ubuntu:  dd if=/dev/sdb of=/dev/sdc bs=5k;
$six@ubuntu:  resize with gparted;
$six@ubuntu:  e2fsck ...
#then load into the plug

Second attempt :
Quote
$six@ubuntu: partimage -z1 -o -d save /dev/sdb1 ~/sheeva/boot_image.gz
#just to have a copy :
$six@ubuntu: partimage -z1 -o -d save /dev/sdb2 ~/sheeva/core_image.gz

#create the same partition than fdisk -l /dev/sdb apart from the size of /dev/sdc2 which is smaller :
$six@ubuntu: fdisk /dev/sdc
$six@ubuntu: partimage restore /dev/sdb1 ~/sheeva/boot_image.gz.000
$six@ubuntu: mkfs.ext3 /dev/sdb2
$six@ubuntu: mount /dev/sdb2 /mnt/clone

#Then i poweron the plug with the master sd card and follow theses instructions (http://plugcomputer.org/plugforum/index.php?topic=865.0)
$six@ubuntu: nc -lp 2345 >/mnt/clone/archive.cpio
#$BKUPIP = my ubutu computer ip
$six@sheevaplug : cd / && find . dev -mount | cpio -oc | nc $BKUPIP 2345
$six@ubuntu: cpio -id < cpio.archive

#then i boot the sheevaplug with the new cloned card.

size of boot_image : 2,5MB; core_image : 137MB;

I also use the lock button on the master card to be sure not to erase it.
There is a small distribution of linux which can be easiest to use called clonezilla : http://clonezilla.org/

This attempt seems to work but of course i had the read-only problem. The partition is mounted rw. I always try to write something with touch or cat < and that always work after the startup. But after one hour, the system always goes into this read-only states. I will pay more attention to the logs in the future.

Yes, I think I read about sdd. One of the things that frustrates us is the lack of information about progress when using dd; I gather that sdd improves this.

The procedures you are using look sensible to me. But, when your read only problem occurs, if the system cannot write to a log, there may be no log record for you to examine :-(



Quote
All this is by-the-by, and doesn't address the problem that you are trying to solve. How about you send us your smallest SD card, and we return it to you in a state that is suitable for booting? If you are able to clone that card successfully, then I think you have what you want (with regards to the first problem that you raised). Send an e-mail to info@newit.co.uk if you that sounds like a solution for you. Please write from the e-mail address that is associated with your purchase (ie either the e-mail address that shows in our ebay records or the address that you used when registering on the shop). Alternatively, we can transfer to you an image for a smaller card (1G or 2G); the compressed image is around 140M. If you can resize the second partition without damaging it, maybe that will solve the problem.

It is very kind of you. I buy a Kingston 8GB card and expect to receive it Wednesday. These cards are very expensive here in France due to fees.
Nevertheless i don't give up with the 4GB cards.  It would be very kind, if you can transfer to me an image for a smaller card (1GB). It won't be a problem for me to resize it with gparted. I will send you a mail for that.



Quote
The u-boot configuration is best copied using copy & paste. You don't say whether or not you have interacted with U-Boot thus far. If not, be aware that it should be very simple. Use the serial interface, interrupt the boot at the point you see "Hit any key to stop autoboot:" Use "printenv". Use "help". Once you have taken a look around, it may begin to make more sense. You can tweak the environment variables and change them back again when they don't work. The installer uses Openocd to write changes to U-Boot and I don't know if there's anything that the installer does that you can't do manually.

Oh i play with it a little. It does look like Cisco IOS or similar small OS. I just don't want to brick my plug  Smiley

I bricked my first one the same day that I received it. And then I unbricked it. (I made a typing error when setting some U-Boot variables; since then I've used copy & paste and the installer, although I'm still hit by plenty of surprises when trying out new configurations).


For the multiboot part i was thinking of something like that. One card with ubutu the second with debian :
Quote
setenv mainlineLinux yes
setenv arcNumber 2097
saveenv
reset

#config for debian
setenv bootargs_console1 console=ttyS0,115200
setenv bootargs_root1 'root=/dev/mmcblk0p1'
setenv bootcmd_mmc1 'mmcinit; ext2load mmc 0 0x0800000 /boot/uInitrd; ext2load mmc 0 0x400000 /boot/uImage'
setenv bootcmd_sd1 'setenv bootargs $(bootargs_console1) $(bootargs_root1); run bootcmd_mmc1; bootm 0x400000 0x0800000'
saveenv

#config for ubutu :
i do not have the config here but something like for debian
...
setenv bootcmd_sd1 ....


bootcmd=run bootcmd_sd1; run bootcmd_sd2; run bootcmd_nand


run bootcmd

For what i understand, if the debian card is inserted the boot sequence will be interrupted before the second instruction. Otherwise it will try to load the ubuntu configuration and then the nand.
Do you plan to provide debian configuration ? It might be interesting  for you if you sell preconfigured card with different systems on it and a multi-boot system.

Thank you again


Yes, we are looking at debian. Before we started selling the SheevaPlug we kind of had an idea about what kind of configurations people might want; now that we have some feedback from customers about how they are using their plugs, and some requests for specific options, we have a slightly better idea of what we think we should be doing. Multi-boot looks like a very good option (and I am still working on it). The problem that you are having can be substantially eliminated with multi-boot, and that is better for everyone.

OK, we'll see how things go with the image that we are sending you. Please let us know the outcome.
Logged
six
Newbie
*
Posts: 4


« Reply #4 on: 15 November 2009, 03:30:51 pm »

OK i'm writing that directly from the plug running X11 and firefox. It works surprisingly well.

I get your image and i would like to thank you again. Here is my feedback.

I test it on 2 cards (pny and dane-elec but i think those brands are typically french one).
The pny is not working at all. I have problem with superblock and even after solving that still writing errors during apt-get distupgrade.


The dane-elec (3945Mo) seems to perform better. Here is what i've done (on a second computer) :

Code:
#Erase the whole card :
six@ubuntu : umount /dev/sdc
six@ubuntu : dd if=/dev/zero of=/dev/sdc
#copy the image
six@ubuntu : dd if=image.img of=/dev/sdc
#resize it
six@ubuntu : gparted( or parted) ...

I test it with the plug since 2 hours.
I upgrade the plug (dist-upgrade) and install several soft without problem (joe, X11, firefox, ...)

For the pny card i have no idea.
Is the geometry of the card important ? I forgot about everything of my lecture on hardware. I noticed that the default geometry of the cards is different from the kingston one. But as far as i remember CHS is outdated now.
Could you tell me if your cloning procedure differs from mine?

Thank you again.

Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #5 on: 15 November 2009, 06:24:55 pm »

OK i'm writing that directly from the plug running X11 and firefox. It works surprisingly well.

I get your image and i would like to thank you again. Here is my feedback.

I test it on 2 cards (pny and dane-elec but i think those brands are typically french one).
The pny is not working at all. I have problem with superblock and even after solving that still writing errors during apt-get distupgrade.


The dane-elec (3945Mo) seems to perform better. Here is what i've done (on a second computer) :

Code:
#Erase the whole card :
six@ubuntu : umount /dev/sdc
six@ubuntu : dd if=/dev/zero of=/dev/sdc
#copy the image
six@ubuntu : dd if=image.img of=/dev/sdc
#resize it
six@ubuntu : gparted( or parted) ...

I test it with the plug since 2 hours.
I upgrade the plug (dist-upgrade) and install several soft without problem (joe, X11, firefox, ...)

For the pny card i have no idea.
Is the geometry of the card important ? I forgot about everything of my lecture on hardware. I noticed that the default geometry of the cards is different from the kingston one. But as far as i remember CHS is outdated now.
Could you tell me if your cloning procedure differs from mine?

Thank you again.


The 4G card that we originally supplied is SDHC. The replacement image was prepared on a 1G SD (not SDHC) card. Maybe the geometry is such that SD and SDHC are not interchangeable; wikipedia tells us that there is a switch from byte addressing to sector addressing.

So maybe the new image will work when dd'ed to an SD card, but perhaps not to an SDHC card?

I would have used the same procedure as you, so I can't add to or improve the method you outlined.
Logged
six
Newbie
*
Posts: 4


« Reply #6 on: 16 November 2009, 03:13:10 pm »

The configuration works perfectly on the cloned card.
For the pny i may have forgotten to errase the card with /dev/zero or it might be related to the quality of the card itself.
Many Thanks
Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #7 on: 16 November 2009, 04:36:58 pm »

Thank you for letting us know how things turned out.

We'll try to make sure that we have a library of suitable images in the event of similar issues in the future.
Logged
soulgazer
Newbie
*
Posts: 4


« Reply #8 on: 18 November 2009, 02:14:42 pm »

You can use dd to clone the SD card... There's a nice guide here: http://thesalmonfarm.org/blog/2008/01/16/how-to-make-a-backup-image-of-an-usb-stick-or-sd-card/.

I used it but had a minor problem. The created image was larger than the size of the other SD card used.

Might have something to do with the SD card grades. Original grade 6, backup grade 4. Might also have something to do with how they were prepared.

The clone is working fine though and now hosting my SqueezeServer running under ubuntu.

/soulgazer
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!