![]() |
Re: Cloning OS to SD Card: Simplified instructions
After some research I don't think ext2 is a good choice for SD card partition Type. And ext3 is catastrophic. Ext2 tends to wear off the card with great speed, even with SD cards automatic anti-wear off protections.
Google on the topic and you will see it for yourself. Also Ext2 isn't very optimized for lots of small files. Neither in speed, nor size. ReiserFS should be far better choice. It has a big edge over ext in terms of small files handling (the devs behind reiser stress quiet often on that). It is much more self repairing (I got lots of errors when running e2fsck on the SD card from time to time). It handles wearing off much better. The only bottleneck I can think of now is the 32MB used for metadata. That's it. Even on empty filesystem you have 32MB used with metadata. On the other hand with 2GB cards costing $20 32MB is not that much. Only two changes are required. - Change bootmenu.conf to use reiserfs as parameter for partition type - Provide ReiserFS support in kernel (either module or built-in) I tried it, partitioned with reiserfs, modified bootmenu, cloned / and compiled kernel with reiserfs built-in. Boot time seemed a little bit faster compared to ext2 and also it seemed to use about 5-10% less space. I have just to work out one problem, causing the tablet to hang for a while after loading the blue bar and to restart, which happened on a few occasions and then provide alternative instructions. |
Re: Cloning OS to SD Card: Simplified instructions
I can include reiserfs kernel module in bootmenu installer so no custom kernel would be needed and we have more choices by default. Personaly I think ext3 or 2 is not so bad but still reiserfs might be good to try. Please report how it goes with reiserfs and how stable it is.
Also feel free to post links to proofs of 'catastrophic' nature of ext[23] filesystems :-) IMO anything is far better than plain FAT which is the default for memory cards and manufacturers still give lifetime warranty for that. Also most devices (cameras, PDAs,..) cannot afford write caching at all (due to possible data corruption on crash or drained battery) so cards should be manufactured with that in mind. I know for sure that all PalmOS based PDAs do not use any write caching at all so FAT table and data blocks is updated with every VFSFileWrite call. ext2 or 3 filesystem mounted with asynchronous writes is heavens compared to that behaviour. |
Re: Cloning OS to SD Card: Simplified instructions
Quote:
|
Re: Cloning OS to SD Card: Simplified instructions
Right now I am on the Windows box at work, so can't do much, but when I get home I will experiment with one ext2 and one reiserfs filesystem. Comparing disk space usage, speed, resources usage, etc.
|
Re: Cloning OS to SD/MMC Card: Simplified instructions
Quote:
I have just purchased a 4-gig SDHC card and have again re-cloned my OS onto it. (My last such cloning was on a 2-gig SDHC card.) But in this instance, I've discovered a possible pitfall for the unwary (such as myself). The instructions in the following site referenced in step 5 by Milhouse state as follows: umount /media/mmc1 sfdisk /dev/mmcblk0 This will prompt you to give a partition size for each partition; we'll make 2 partitions. The first will be FAT16 (type 6) - the partition we see when we connect the 770 to a computer with USB. The second will be our boot partition, where our home directory is stored. I have a 2 gig MMC and used the following layout. Note, the 15000 refers to cylinders, each of 32 KB, so 15000 cylinders is 480 MB. So the first partition goes from 1 to 15000 with a partition type 6, or VFAT. The second goes from 15001, to the end fo the disk, so it's about 1.5 gb. The third and fourth partitions are empty. /dev/mmcblk0p1: 1,15000,6 /dev/mmcblk0p2: 15001,, /dev/mmcblk0p3: /dev/mmcblk0p4: As Milhouse's instructions state, the intent (and result) is for the clone to be installed on /dev/mmcblk0p2, and by following the above instructions, the clone will find it certainly has plenty of space there! In my first try, about 3.5 gigs! (I'd wanted it to have only the intended .48 gigs.) So, I had to reverse those recommended numbers by giving mmcblk0p1 "15001 ,," and mmcblk0p2 "1,15000,6". I found myself flying by the seat of my pants here (I'm no Linux expert) but to my surprise (and relief) it worked. I may in fact be completely in error here -- but if so, I've at least ended up with a properly (for me) partitioned card. |
Re: Cloning OS to SD Card: Simplified instructions
Correct, the partition sizes quoted in that wiki page are just one possible example (in this case appropriate for a 2GB card split 0.5GB + 1.5GB), and the figures will be inappropriate for a larger or smaller card.
When you run sfdisk, it will state how large each cylinder is on your card - on my Transcend 4GB card, each cylinder is 32768 bytes. Given that information, you can determine how many cylinders you need for a 3.5GB partition by dividing (3.5 * 1024 * 1024 * 1024) by 32768 - this calculation tells me my first partition would be "0,114688,6" and my second partition "114689,," (ie. all remaining space to be used by the second partition). Alternatively, you can specify the "-uM" parameter when you use sfdisk so that you can then specify the partition sizes in terms of megabytes instead of cylinders, eg. to create a 3.5GB partion #1 with the remaining space* in partition #2, use the following: #sfdisk /dev/mmcblk0 -uM /dev/mmcblk0p1: 0,3500,0C /dev/mmcblk0p2: 3500,, /dev/mmcblk0p3: /dev/mmcblk0p4: Note: I've used a partition type of 0C on the first partition as this will create a FAT32 partition. When formatting the first partition for VFAT, use "mkfs.vfat /dev/mmcblk0p1 -F 32" if you want a FAT32 filesystem. * Your 4GB card is unlikely to be 4GB in size as memory card manufacturers tend to use 1000 bytes to a K and 1000KB to a MB notation (rather than 2^10 or 1024 notation). Typically a "4GB" memory card will have between 3.7GB and 3.8GB usable space, which means that if you specify 3.5GB of space for the first partition you'll only have ~0.3GB (or less) space remaining for partition 2, in which case adjust the size of your first partition down by the amount of difference between your real card size and 4GB ie. if your card size is 3.8GB, use a figure of 3.3 (ie. 3.5 - 0.2) to calculate the cylinders, or 3300 when specifying the partition sizes in MB. |
Re: Cloning OS to SD/MMC Card: Simplified instructions
Quote:
I imagine that sfdisk still states that parititon #1 is Linux and partition #2 is FAT16 even though they've been formatted with the FAT and Linux (ext2) respectively. |
Re: Cloning OS to SD/MMC Card: Simplified instructions
Quote:
You may (or may not) though have misunderstood what I perceived to be my earlier dilemma. Partition 1, which is intended to be the FAT data storage partition, was being limited to roughly .5 GB's, while Partition 2, on which the clone resides, was given all the rest of the card memory available, in my case roughly 3.5 GB's. I was thus losing all the useful data memory for which I purchased the larger capacity card. In my earlier dual-boot cloning with my 2 GB card, which I had in my external slot (not the internal slot that currently houses my 4 GB card), I again followed your instructions precisely, but this partition dichotomy didn't seem to occur. (If it had, the Partition 1 data space would again have been limited to .5 GB and the Petition 2 clone space to an unnecessarily large 1.5 GB. But I don't recall that that was the case (unless I didn't notice it, which I doubt). I recall having had an approximate Petition 1 data space of 1.5 GB. So, I don't know what happened in this latter 4 GB card attempt. (I've since reformatted my former 2 GB card, so I can't now check that to be sure.) I hope I'm making myself sufficiently clear here. If I'd been formatting a 1 GB card, nothing would have mattered, as both partitions would have been the same size. Anyway, many thanks for your response and thinking this through with me. Regards, Jim |
Re: Cloning OS to SD Card: Simplified instructions
Hi Jim
I understood you - the wiki page you followed is using a 2GB card and the figures it proposes for the partitions will create a 0.5GB FAT partition #1 (15000 cylinders * 32768 per cylinder is roughly 468MB), and all of the remaining space (~1.5GB) is allocated to partition #2, which is where the cloned OS resides. Essentially, the wiki page partition sizes are overkill as I don't think anyone really needs more than 0.5GB for the cloned OS partition (IMHO), and the wiki page doesn't allow for any variance in card size. If you follow my instructions above, you should be able to calculate the correct figures to enter into sfdisk and create more appropriately sized partitions for your needs. By far the easiest way to create the partitions will be to specify the partition size in MB, and assuming you only want one large FAT partition and the remaining space to be used for the cloned OS I would suggest you use one of the following examples as input to sfdisk (it should be fairly obvious how to adjust the figures to suit your tastes should you want a smaller OS partition - just increase the size of the first partition! :)): 1GB Card (~0.8GB real size - partition 1: 0.3GB, partition 2: ~0.5GB): Code:
#sfdisk /dev/mmcblk0 -uMCode:
#sfdisk /dev/mmcblk0 -uMCode:
#sfdisk /dev/mmcblk0 -uMCode:
#sfdisk /dev/mmcblk0 -uM |
Re: Cloning OS to SD Card: Simplified instructions
Milhouse: Your latest instructions for resolving this problem seem clear and excellent, a praiseworthy characteristic of all your contributions to this forum. Fortunately, however, my fumbling resolution to my difficulties as reported a bit earlier in this thread have achieved substantively the same outcome as you propose for the 4GB card, and as I've already loaded up data on the FAT portion of the card, I'll just let matters stand as at present. However, for others who are perhaps encountering the same problem from the wiki as I did, your new solutions should really simplify things for them.
On my earlier cloning of my 2 GB card, which following your instructions was highly successful -- I've now remembered the reason for that (which I had momentarily forgotten when sending off my previous message referring to the 2 GB card). For that cloning, I hadn't used the wiki instructions for partitioning but instead had partitioned my card using gparted. But for the 4 GB card, I'm currently away from home and didn't have my usual ready access to gparted. Anyway, problem solved, for myself and I assume as well as for similarly affected others, and again my many thanks. Regards, Jim |
rely boot from card?
how do i find out if it rely haw booted from memory card, can i sey it on mount? or do it exist other command i can us?
// Sorry About My Spelling I´m Dyslectic \\ |
Re: Cloning OS to SD Card: Simplified instructions
how can I modify your script to work with the external card? I plan to exchange my current N800 because I think the internal card slot doesn't work (it freezes and reboots constantly when I put a card in it) but I still wanna clone things as is and run from the external card before I do anything else...
|
Re: Cloning OS to SD Card: Simplified instructions
Mil, try to use your magic script again, and this time has some problems. I am now stuck at 7: wget http://..............
error statement -sh: wget: not found. Any suggestions where to look? Thanks, bun |
Re: Cloning OS to SD Card: Simplified instructions
Mil, problem solved. I went to maemo.org and re-install wget, everything is fine now, ./nupgrade.sh 3 is cooking, it should cook for 38 min, then it will be just right............ thanks
bun |
Re: Cloning OS to SD Card: Simplified instructions
Well, it is done, but still boot from flash. I forget to do step 6. I subsitute with this,
chroot /mnt/initfs cal-tool --set-root-device ask:mmc2 and does not seem to work. There is error statement though. OK, I will try step 6 and see how it goes. I do not want to install any progs on flash, that is why I want to clone to MMC as my first project. I inserted a 4G SD on the ext slot, it was recognize immediately, thank god. Edit: mission accomplished, booted from MMC2:o bun |
Re: Cloning OS to SD Card: Simplified instructions
Quote:
|
Re: Cloning OS to SD Card: Simplified instructions
Before I recently simplified my N800 to boot from my internal slot in addition to flash, I had set up my N800 to boot from both my internal and external slots, so as to be able to run KDE on one and OpenBox Rox on the other. Fanoush's bootmenu flashing application (initfs_flasher) gives a sample bootmenu.conf detailing just how to boot from either internal or external card. I suggest you search this out and get back to me (or better Fanoush) with any further queries. Good luck.
|
Re: Cloning OS to SD Card: Simplified instructions
I followed the instructions and, from what I can tell, I did it right, everything is copied, but the boot menu didn't work... any suggestions?
Everything else seems to be good... NOTE: not sure, but I could either be booting straight to flash or straight to mmc... not sure though. |
Re: Cloning OS to SD Card: Simplified instructions
Quote:
bun |
Re: Cloning OS to SD Card: Simplified instructions
AdonusX: Check out this other thread for instructions to someone currently having the same problems you are: http://www.internettablettalk.com/fo...4&goto=newpost
|
Re: Cloning OS to SD Card: Simplified instructions
the problem comes at the end when you use init_flash... most of us, when presented with a "yes/no" question in linux are so used to typing "y" as a response...and it is ACTUALLY necessary to type "yes" not just a y... after that, I got my boot menu and everything! Now I am good to go, I think...
NOTE: I just checked my memory details and (if my memory serves me correctly, I am supposed to have roughly 500mb of overall space, but) I am listing 33.8mb used and 139.7mb free... that doesn't seem right... |
Re: Cloning OS to SD Card: Simplified instructions
Quote:
The memory is about right, OS + some apps about 280 MB + 140 + 34 = 454 MB which is what .45 G is about. bun |
Re: Cloning OS to SD Card: Simplified instructions
Howdy all,
Thanks to these great instructions, I cloned OS2007 to my internal 8GB SD card w/o problems. I did deviate a bit and formatted the card to one ext3 partition which raises some questions: 1. Why create the split partition scheme (small ext/large vfat)? Is there a reason I'd want to keep some storage VFAT? I have no windows box to be concerned with. 2. I'm at a point where a redo is no hassle. Should I create a swap partition? |
Re: Cloning OS to SD Card: Simplified instructions
Quote:
http://www.internettablettalk.com/fo...8256#post88256 |
Re: Cloning OS to SD Card: Simplified instructions
VFAT is usually retained for Windows compatability, also the NIT will only auto-mount a VFAT partition but if you have no need for Windows compatability and don't care for VFAT storage (for music, video etc.) then there's nothing to stop you from using the entire card as ext2/3 storage. To keep things simple though it might be easier to create a tiny VFAT partition and use the remaining space for ext2/3 - this way most guides and the NIT itself will work as expected.
As for the swap partition - it can be made to work, but I'm not sure there's much if any benefit over the existing swap file. The device might crash if the card containing the swap partition is removed (not tested this, just suspect that's what will happen!). :) |
Re: Cloning OS to SD Card: Simplified instructions
Thanks Milhouse, both for the reply and your simplified instructions for this process. And of course kudos to Fanoush and everyone else too :)
My external card is formatted as ext3 also. I finally got around the no automount issue by creating an init.d script that mounts it to /media/mmc1 after all other boot scripts are run...no matter what I tried, mounting it from fstab failed: fstab: /dev/mmcblk1p1 /media/mmc1 ext3 defaults 0 0 will allow me to manually mount the card (as root), but it does not mount automatically... fstab: /dev/mmcblk1p1 /media/mmc1 ext3 rw,auto,exec,user 0 0 fails altogether. No matter I guess, the init.d script works :) I hope the cloning procedure works w/o much changing when chinook becomes available! Jeff |
Re: Cloning OS to SD Card: Simplified instructions
when cloning the OS, are there any benefits to formatting the SD card as ext3 instead of ext2?
|
Re: Cloning OS to SD Card: Simplified instructions
Quote:
|
Re: Cloning OS to SD Card: Simplified instructions
Just FYI, the help displays fine (i.e. it falls back to english) with the n800 in spanish.
I'm using the latest firmware but it should work equally well with the previous one (since the only change was the kernel). |
Re: Cloning OS to SD Card: Simplified instructions
Oops, my last message was for the maemo mapper 2.0 thread. Sorry.
|
Re: Cloning OS to SD Card: Simplified instructions
Quote:
Code:
#!/bin/shQuote:
BTW, if anyone has access to some beta 2008 firmware (N810 and/or N800) I would be interested in initfs image or at least full list of files (cd /mnt/initfs ; ls -lR) and output of cat /mnt/initfs/linuxrc (i.e. whole linuxrc file). |
Re: Cloning OS to SD Card: Simplified instructions
What do I get by living on the Sardine bleeding edge? Anything better / more usable then regular OS2007? (what in regards to OS2008?)
And, sorry.. I did not understand from the section "Steps 5 and 6 are optional and may be performed in order to upgrade the freshly cloned OS 2007 (not OS 2006 or OS 2007HE) to the Sardine bleeding edge test distribution o 5 - Enter chroot gaol prior to upgrading cloned OS on memory card o 6 - Initiate Sardine operating system upgrade of cloned OS on memory card" if I have to start the freshly cloned OS then perform those steps or if I still have to do 5 and 6 when running "regular" internal memory OS.. |
Re: Cloning OS to SD Card: Simplified instructions
Quote:
Quote:
|
Re: Cloning OS to SD Card: Simplified instructions
[QUOTE=Milhouse;93706]Not a lot right now as Sardine has been "broken" for several weeks meaning it's not possible to boot from the MMC oncer Sardine has been applied.[QUOTE]
Ok, so basically it's better to wait OS2008 to be ready even if this means 2-3 weeks, I guess :( |
Re: Cloning OS to SD Card: Simplified instructions
I've updated the "nupgrade.sh" script to include OS2008 support for steps 0 through 4 - I haven't tested Sardine upgrades yet on OS2008 and don't advise it for now!
To install e2fsprogs and wget in OS2008 see this post from Fanoush. |
Re: Cloning OS to SD Card: Simplified instructions
Thanks Milhouse. Funny thing was last night the nupgrade wasn't working (well unavailable i got a 404 error in wget). Now it does great
|
Re: Cloning OS to SD Card: Simplified instructions
Has anybody ported a full version of Tar?
I'm getting the following error; Quote:
|
Re: Cloning OS to SD Card: Simplified instructions
Quote:
deb http://elkins.org/packages chinook main |
Re: Cloning OS to SD Card: Simplified instructions
Quote:
bun |
Re: Cloning OS to SD Card: Simplified instructions
Quote:
|
| All times are GMT. The time now is 09:20. |
vBulletin® Version 3.8.8