[ROM][CM7] [v1.3] Size-agnostic SD Card image and CM7 installer for SD Cards.

Search This thread

dweezilz

Member
Feb 28, 2008
25
0
that did it. I had to rename those files back to their original name and now it boots...got market, etc...! Nice. Not sure what happened though.
 

verygreen

Senior Member
Feb 13, 2011
1,305
2,637
TN
linuxhacker.ru
EDIT 2: Okay, by explicitly installing Superuser and Busybox from the Market, I can get ROM Manager to install CWR with no errors, but I still can't seem to get into recovery mode, or at least if I do, it doesn't seem to think it needs to install anything. Bummer...
If you are not using v1.1 installer, did you update u-boot.bin? The u-boot.bin in the first image is not recovery-enabled it seems.
 
Last edited:

verygreen

Senior Member
Feb 13, 2011
1,305
2,637
TN
linuxhacker.ru
For some reason after following this I always go back to the installer with the penguin. I removed the cm7 nightly zip but it still goes. I saw it install the apps though the first time. I did notice that I did NOT have a file called uRecRamdisk, it was named uRecRam. I named that one uRamdisk. Could that be the issue? Should I rename the bak's, back to their previous file names? Any help would be appreciated.

Yes, you need to rename .bak back if you do not update with the cm7 nightly zip because the gapps package does not contain the new kernel.
Best of all to do this is to upgrade to v1.1 then you can boot into "recovery" which will install all the stuff you throw into first partition as long as the naming in conforming to expected values (outlined in the first post).
 
  • Like
Reactions: Techienana

SCWells72

Senior Member
Feb 12, 2011
558
100
If you are not using v1.1 installer, did you update u-boot.bin? The u-boot.bin in the first image is not recovery-enabled it seems.

I actually did use the v1.1 installer but then restored a TitaniumBackup of apps & settings from the previous installer to get my apps and settings moved over. I downloaded the u-boot.bin from the first post and there are differences, so I put that on and tried again. Still no luck. Any other thoughts?
 

verygreen

Senior Member
Feb 13, 2011
1,305
2,637
TN
linuxhacker.ru
I actually did use the v1.1 installer but then restored a TitaniumBackup of apps & settings from the previous installer to get my apps and settings moved over. I downloaded the u-boot.bin from the first post and there are differences, so I put that on and tried again. Still no luck. Any other thoughts?

Hm, I verified that the new u-boot works. It was kind of tricky to enter recovery mode and I managed to do it not from a first try, but it's definitely possible.
(after you have uRecRam and uRecImg properly named unlike what v1 did)

If you mean that after you rename the uRecImg and uRecRam to uImage and uRamdisk and then try to install something that is not full nightly update you cannot get into the android until you restore old uImage and uRamdisk, this is supposed to happen since the installer does not know where to get the proper kernel image and ramdisk if not supplied by the installed packages.
 
  • Like
Reactions: SCWells72

SCWells72

Senior Member
Feb 12, 2011
558
100
If you mean that after you rename the uRecImg and uRecRam to uImage and uRamdisk and then try to install something that is not full nightly update you cannot get into the android until you restore old uImage and uRamdisk, this is supposed to happen since the installer does not know where to get the proper kernel image and ramdisk if not supplied by the installed packages.

Aha! Breakthrough! I didn't realize I had to rename that direction to get it to pick up the new build. I'm golden now! Thanks for bearing with an Android newb!
 

FrayAdjacent

Senior Member
Dec 22, 2010
244
23
Austin Texas
Awsome work.

Having SERIOUS difficulty getting into recovery to get the Market loaded. Out of about 20-30 reboots, I got it in (what I think is) recovery once. It went to the 'android _ ' prompt and blinked there for about 10 minutes. Then I powered it off and started it back up the 'normal' way. Went back to the same prompt. Kept doing it until I removed the gapps....zip from the boot partition.

I have not been able to get it back into recovery since. I've re-downloaded the gapps zip file, deleted it from the SD card and copied it back over a couple times.

Also ADB from my Windows box doesn't work. Device Mangler shows the composite ADB device, but ADB from the command line never sees the Nook.



As a suggestion, Green, perhaps update the utility to not only unpack/install CM7, but have it also install the gapps zip from the SD card at the same time?
 

verygreen

Senior Member
Feb 13, 2011
1,305
2,637
TN
linuxhacker.ru
Having SERIOUS difficulty getting into recovery to get the Market loaded. Out of about 20-30 reboots, I got it in (what I think is) recovery once. It went to the 'android _ ' prompt and blinked there for about 10 minutes. Then I
It's not a recovery.
The same installer thing with a penguin would constitute recovery mode.
You really need to hold power and N button all together and then keep holding for a second or two after the "Touch the future of reading" message,
then release the power button (or the unit would poweroff).

As a suggestion, Green, perhaps update the utility to not only unpack/install CM7, but have it also install the gapps zip from the SD card at the same time?

It will work as in even on the first install it would unpack everything including the gapps if you put it there.
In my experience if you put gapps together with the initial install image, the boot will fail (will just sit at the ANDROID_ screen) and the traces look like it's due to gapps unable to register or something due to wifi not setup.

If your ADB does not recognize nook, make sure you added the nook device id to known devices list, check the wiki for instructions.
 
  • Like
Reactions: FrayAdjacent

FrayAdjacent

Senior Member
Dec 22, 2010
244
23
Austin Texas
Well, I got ADB working. Missed a step. RIF failure on my part.

Also re-read this thread and went through it with the 1.1 version of the utility and booting with the renamed uImage and uRamdisk. Worked like a charm!

Now all I need is a faster uSD card. Class 6 is still slow!
 

DizzyDen

Senior Member
Feb 7, 2011
1,301
567
NC does not play well with Class 10, according to the reports. Class 6 is as fast as it gets at the moment....
Never had a problem with class 10 cards myself...

Some information regarding 16 gig SD's with this message... may help figure out what's going on with them....

Worked perfect on my class 10 8 gig card....

When trying on class 10 16 gig card went through with one error not seen on 8 gig card:
Code:
Partitioning the card ...

The number of cylinders for this disk is set to 1946.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Done partitioning, creating filesystems


Went through everything else just fine until:
Writing superblocks and filesystem accounting information

Sat there eternally...
hard power off then power on...
goes through extracting with some errors in /tmp/backuptool.sh's not existing...
Sat at Android_ eternally.. nothing could get past this

Can get into recovery... just not boot CM7.
 

verygreen

Senior Member
Feb 13, 2011
1,305
2,637
TN
linuxhacker.ru
When trying on class 10 16 gig card went through with one error not seen on 8 gig card:
Code:
Partitioning the card ...

The number of cylinders for this disk is set to 1946.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Done partitioning, creating filesystems
This is harmless.

Went through everything else just fine until:
Writing superblocks and filesystem accounting information

Sat there eternally...
hard power off then power on...
Ok, this is the problem. If formatting failed, the script does not check the status (and mount too).
So then the mount fails too, the unpacking happens to ramdisk.
Then when you reboot, your /system partition is not populated.
Also on next reboot the script blindly assumes that if the partition is really there, it must be suitably formatted already and does not reformat it.
Can you insert this sdcard into a computer now and format second partition with mkfs.ext4 (also 3rd just in case).
(hm, now that I think about it, there were two mkfs, for /system and /data,
which one hung?)
after that boot into "recovery" with the full CM .zip present. and it'd should be able to mount the freshly formatted stuff and unpack there.
[/quote]

goes through extracting with some errors in /tmp/backuptool.sh's not existing...
these are normal.
 

cybertimber2007

Senior Member
Oct 31, 2007
313
69
It might indeed be a problem.
Code:
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
I've noticed in other threads people reporting that 16gb cards didn't work. Kernel issue?
 

verygreen

Senior Member
Feb 13, 2011
1,305
2,637
TN
linuxhacker.ru
It might indeed be a problem.
Code:
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
I've noticed in other threads people reporting that 16gb cards didn't work. Kernel issue?
I don't have 16g card myself.
Can you boot into emmc, insert 16g card and try mkfs.ext4 on 2nd and 3rd partitions of the sd card, then see what kernel messages do you get if any?
 
  • Like
Reactions: silentbushido

cybertimber2007

Senior Member
Oct 31, 2007
313
69
I don't have 16g card myself.
Can you boot into emmc, insert 16g card and try mkfs.ext4 on 2nd and 3rd partitions of the sd card, then see what kernel messages do you get if any?
Unfortunatley I don't have one either.
Btw, seems my post edit didn't save, but I mean to word it as "the problem might be at boot time", though I thought those issues were only for really old kernels and such. I'll try to get my hands on a 16gb if I can and test it out though, since I know what you are talking about ;)
 
Last edited:

DizzyDen

Senior Member
Feb 7, 2011
1,301
567
I will do more testing as you asked when I get home this evening... I was just trying to provide you as much information as I could as to what I was seeing as it went through its process.

However, to answer the question as to which mkfs failed... I didn't see either one fail.

Will try the 16 gig test again tonight and try to take a pic of the screen when it is in the eternal hang up... you will be able to see all the text on the screen that way... IF the pic comes out good enough.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 165
    Due to popular demand I have created a size-agnostic SDCard CM7 installer.
    Also allows to install unmodified CM7 builds on SD card.

    Current version: 1.3

    Grab the installer image here:
    http://crimea.edu/~green/nook/generic-sdcard-v1.3.img.gz
    it's a ~9M image that would unpack into ~130M disk image.

    Also note - not all SD cards are created equal. Here is a thread of interest is you have not bought one yet: http://xdaforums.com/showthread.php?p=12964262
    Short version: buy Sandisk-branded class 4 microSD cards.

    Write the image on your SD card. I tested with 2G, 4G and 8G cards and all worked.
    Any uSD card of 1G or bigger in size should work if it is recognized by your nook.
    Write on Windows by using WinImage and on Linux/MacOS X by using dd (to the entire device, not one of the partitions. The device name should not have any numbers at the end. The command is something like dd if=/somewhere/generic-sdcard.img of=/dev/sdX bs=1024k)

    After done with writing, eject and then re-insert the uSD card into your computer.

    Download a CM nightly build from here http://download.cyanogenmod.com/?device=encore (It is recommended to choose -87 nightly or later. If you plan to use prior version for initial install, stick with installer 1.2.1 for a different u-boot version)

    Or just use your own update-cm-*-KANG-signed.zip file that is produced if you do your own builds.
    The image would correctly detect unmodified CM7 builds and would make necessary adjustments to make them work on SD card.

    Put the file to the SD card (there is only one partition). Don't change the name of the file.

    unmount the uSD card and insert it into the nook.
    Boot from this SD card. It'll boot and will update you on progress.
    When it's done, it'll power off.

    That's it, you now have CM7 on your SD card.

    How to install market and gapps:
    After you have booted into the CM7 on SD card for the first time and set up wifi access (important!)
    Go to http://wiki.cyanogenmod.com/index.php?title=Latest_Version and at the end there is a table with various google apps versions. Get the one suitable for your cyanogen version (CM7 is the latest for now). The file is named gapps-....zip
    shutdown your nook and take the SD card out, insert it into your computer.
    Copy the gapps-... file to the SD card on the first partition (titled boot) without changing the file name.
    Insert the uSD card back into the NOOK and boot into "Recovery mode" (hold nook N key and then press and hold power until the "Loading..." message appears and then disappears with screen going blank. Release power button, then press it again and hold for ~5 seconds, the bootloader "Loading..." message should be on the screen for three seconds or so before you release power button, keep holding N button until screen blanks again. If the screen went off while you were holding the power key, that means you were holding it for too long).
    Alternatively if you do not want to fight the timing, boot normally into Android, then from desktop hold power key until a poweroff menu appears, In the poweroff menu choose "reboot", in the next menu choose "recovery" and press "OK". The nook would reboot straight into recovery.

    How to update to a new build:
    put the new build you want to try on the first partition. (the name must be update-cm-*.zip or cm_encore_full*.zip or just update-*.zip)
    Boot from the SDcard in the recovery mode (see above) and the new snapshot would be installed.
    The partition layout would be preserved, filesystems are NOT reformatted, so your data should be safe.

    Installing other stuff:
    Booting in recovery mode would install all files that are named "update-..." and end with .zip The files would then be deleted! Most of the packages should work, but I only tested a subset and not entire syntax of updater script is implemented. Certainly format and delete are not implemented.

    OC Kernel installation instructions:
    Starting with v1.2.1 there are no special instructions, install normally as described above.

    Partition layout for the SD cards depends on size:
    Less than 600M - unsupported.
    up to 1G cards gets: system of ~300M and data of the rest of space. No FAT partition
    2G cards (more than 1G up to 1800M) gets: 300M system, 612M data, rest is FAT sdcard
    more than 2G cards gets: 460M system, 975M data, rest is FAT for sdcard.

    How to update if you already installed using older version of the installer and don't want to reinstall (understandably):
    • Get update zip from http://crimea.edu/~green/nook/update-genimage-1.3.zip
    • Put the zip file as is onto the first partition of your sdcard..
    • reboot into recovery (triggered by the keys, the reboot into recovery does not work yet).
    • The new version would be installed and you are done.
    • You can combine this installation together with updating to .32 kernel in one step. Just put the update-cm file and the update-genimage-1.3.zip to the first partition. Make sure there is still at least 1M of space left!

    Changes in 1.3
    • Install u-boot.bin and MLO loaders if provided.
    • Fixed a problem that led to overwrite of recovery kernel if a nightly was installed more than once)
    • (only in full image) updated u-boot to ignore BCB as that was a common source of problems. (that's why this version is not recommended for initial install with older nightlies, those don't provide a more correct u-boot for later operations. It's fine to do the update from older installer release, though)

    Changes in 1.2.1
    • Really fixed dalingrin kernel packages installation
    • A bit more robust handling of install scripts

    Changes in 1.2
    • Updated to new u-boot from B&N 1.2 update
    • Ability to obey BCB in eMMC (allows reboot into recovery from CM7)
    • Hopefully simplified the timing to trigger recovery boots from keyboard
    • Added support for Dalingrin's kernel update packages

    The v1.1 version that is known good to work with 2.6.29 kernel releases is located at http://crimea.edu/~green/nook/generic-sdcard-v1.1.img.gz
    20
    I thought I would share something that I finally figured out. I have been trying to find a way to mount the sd card boot partition without removing the card or booting to emmc. I wanted to do this so that I could download the nightly on the nook and put it directly in the boot partition. I figured out a way and it works great.

    Use a root file manager to create a new folder in /data. I called mine sdboot. Then create a blank text file. I named mine 19mountsdboot (with no .txt on the end!). Then I put the following text in it and saved it:

    #!/system/bin/sh
    # mount SD boot partition
    busybox mount -t vfat /dev/block/mmcblk1p1 /data/sdboot;

    Copy that new file to the /etc/init.d folder using your root file manager. Change the permissions to match the other files there. Now reboot the nook.

    When finished booting, you should be able to use your root file manager to go to /data/sdboot. And you should see your boot files there. (Don't mess with them.)

    Now you can copy the nightly zip there. Then reboot to the verygreen recovery and your nightly should install.

    All this without taking the card out or booting to emmc or hooking up to your PC. And it should stay that way even after flashing new nightlies to the sd.

    Edit: I attached the file here in case people were having trouble getting it right. Just unrar and put in the /etc/init.d folder and change permissions. You still need to create the folder in /data first.

    EDIT 2: I just modified the file to automatically create the directory and mount it. Just unrar and put the file in /etc/init.d folder and fix permissions. No need to create the new folder. Or better yet, I created a flashable install zip that does everything for you. You only need to flash it once (for SD installs). It will survive flashing of new SD nightlies. It can also be flashed to emmc and will mount the SD boot partition, but only if an SD install SD is in the slot. It will recognize an ordinary SD and not try to mount the SD boot partition. However, if you want to keep this on emmc, reflash after every emmc nightly flash.

    EDIT 3: Just found a problem with the install zip. Needed to have the permissions set properly. Should be all fixed now. Use the rev. 1 zip

    EDIT 4 (6-13-12): Added Rev 2 of the script and install zip. Rev 2 adds a symlink to the root directory so that 'sdboot' shows up in the root directory as well as in /data/sdboot. You can manually install the script to the /system/etc/init.d folder. Just unrar it and put it in that folder and set the permissions to execute. If you do not feel comfortable manually installing the script, put the zip in the boot partition and reboot to recovery and it will install it automatically for you. And you do not have to re-flash again after a new ROM flash. (If you previously had installed a prior version to /data/local/init.d, manually remove it before you flash the new version. If you don't you will have two copies on your system and that sometimes causes Root Explorer to lock up.) This version works great to direct download your new zip to sdboot with the new Goo Manager. Just change Goo Manager's download directory to /sdboot/ and it will put it on your boot partition.
    13
    Updated SD image for CM9/CM10

    [Update 10-17-12] Updated installation instructions for putting CM9/CM10 on SD have been posted here. And updated image to Rev 5 to fix an issue with installing CM10.

    [Update 8-21-12] Rev 4 of image and boot files attached.

    I updated the image and boot files to better accommodate CM10 and JellyBean gapp zips and provide bigger /data partitions for larger sized SD cards. The boot partition is now 300MB so the larger CM10 and JB gapps zips will fit. And now all SD cards 8GB and larger will have a 2GB /data partition to accommodate more installed apps. Thanks DizzyDen for that suggestion.

    [Update 6-13-12] Rev 3 of image and boot files attached.

    When updating Rev 2, somehow the duplication fixes got removed. Rev 3 restores the duplication fix along with the naming fixes.

    [Update 5-09-12] Rev 2 of image and boot files attached (Replaced with newer version).

    A pending change that the CM team is implementing will adversely affect verygreen SD users. They are changing the naming standard for new nightlies. They will no longer be naming the files starting with update-. That means the existing install script will no longer recognize or install a new nightly when it is copied to the boot partition. Users must rename the file to start with update- if they want the existing install script to work.

    In order to assist users I have modified the install script to now also install nightlies if they begin with the new standard (cm-). I also added to the script the ability to recognize the new prefix (diff_) that is used by the new Goo Manager program to make an incremental update to an existing ROM. (Edit: The new script will continue to recognize and install zips beginning with update- to provide backward compatibility.) I have attached new rev2 files (replaced with newer version) that are to be used as described in the original post below.


    --------

    I have made new boot files for SD install users. They have been modified to fix the Google App duplication issue with CM9 and Google Apps. The revised script in these files will look to see if you have installed the Google versions of Calendar, Gallery, and QuickSearchBox. If you have them installed it will remove the versions that come with ICS/CM9 so that two versions of those apps will no longer show in your system.

    I have attached two files.

    The first is a revised generic image file for use if you have never set up your SD. It has the new boot files in it. It also has the larger partition so that the CM9 nightlies will fit. Just follow the instructions in the first post of this thread to learn how to install it.

    The second file is the revised boot files themselves. This is for use if you have already set up your SD and you just want the new scripts to fix the duplication issue. To install these files, just go to your boot partition and rename two files, uRecImg and uRecRam. Just add .bak to each file. The attached file is a rar containing the new files. Just unrar and copy the two files to the boot partition to replace the files you renamed earlier. The next time you install a nightly, the script will do its checking and remove the duplicates if necessary.

    Enjoy
    7
    I uploaded the v1.2 update and updated the first post.
    Check the "recovery boot" instructions, they are changed and I believe together with the updated u-boot binary the triggering of it should be easier (even with older u-boot binary updated sequence of events is probably more robust).

    For those who want to upgrade I provide update zip that would do the updating, no need to replace files by hand anymore.
    I tested the upgrade and it works. Also supported is simultaneous u-boot upgrade + update to .32-kernel based image from dalingrin.

    The new image with 2.6.29 kernels is untested! But it might still work, i guess.

    Enjoy.
    4
    Just to let everyone know, I've uploaded a fixed version of this install image that will work better with Ice Cream Sandwich builds -- it'll no longer require you to flash sneakpeek1 first, and you won't have to rename the gapps. It's available for download in the Ice Cream Sandwich Nightlies thread. Huge thanks to Verygreen for helping me get it fixed.