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 threadsI'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 :
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.