yashsingh1/xdaforums huggingface dataset:
[Nook Color General] fattire:
If I understand you right, it *DOES* work if you boot off SD but nothing you do seems to get it to boot from emmc.

If this is correct, my guess is the geometry for the partition table on your emmc is screwed up, which may result in correct partitions but no boot. The underlying geometry (before any partitions are created) must be set up correctly on OMAP machines such as the nook.

You can read more about that stuff here. If you are booted into an "emergency" SD card, you can use fdisk to format /dev/block/mmcblk0 to the correct geometry, and then create the partitions one at a time, with a vfat partition as your /boot partition (p1). Then put mlo, u-boot, uImage, uRamdisk, uRecImg, and uRecRam in /boot (p1) and you should have a bootable system.

You can look at this as a learning opportunity.

The other potential solution-- and it sounds like maybe you tried this-- is to "dd" an existing emmc image right to /dev/block/mmcblk0 -- effectively creating a full clone of a system that exists, along with its geometry and partitions.

The challenge there is that the 8-gig emmc and say, an 8-gig sd card, are the same size. So how do you fit an 8 gig image of a working emmc onto an 8-gig SD card of identical size-- after all you need to fit an OS to boot off of onto the SD too. One solution is to use a 16gb SD, but an easier one may be to have a compressed emmc image and then uncompress and dd simultaneously.

A third solution may be to "live clone" your SD by dding straight from the booted SD (a la "if=/dev/block/mmcblk1 of=/dev/block/mmcblk0") to the emmc. A little goofy, but might work.

One final solution is to dd a smaller image, like a 2 gig image, to your emmc. Once you have the geometry set, you may be able to then expand/resize the partitions per numerous guides here to use the whole 8-gigs.

Again, I hope this all make sense. Read the link above about SD/MMC formatting for OMAP3. Your nook is an OMAP3621, so you gotta get that geometry right, otherwise it won't boot. Luckily, the instructions on using fdisk are pretty good.

More info:

your emmc: /dev/block/mmcblk0

your sd: /dev/block/mmcblk1

the partitions you created are at:

/dev/block/mmcblk0p1 == /boot

/dev/block/mmcblk0p5 == /system

etc

/boot, /rom, and /media are of type "vfat"

/system, /data, and /cache are of type "ext4"

/factory (p3) isn't used by cm7

partition 4 is just there to allow you to create partitions 5-8

Good luck! If nothing else, you're going to learn a lot.
[Nook Color General] majorpay:
I had a "similar" problem last night. Phiremod install, trying to go back to another ROM, and the whole thing crapped out on me. Couldn't boot into anything but CWR, and even a full restore didn't fix it. It turned out to be a corrupted MISC partition along with the EXT4 file system phiremod uses.

I wasn't the one who performed the final fix, but I can tell you that it's fixable if your issue is the same. I suspect the difference in you not being stuck in CWR as opposed to me is that you didn't have CWR installed physically on the device?
[Nook Color General] thereddog:
Yes, I have CWR on an SD card to boot from. I needed my NC for an interview today so I booted CM7 from another SD card

Fattire, all those commands can be done through CWR?
[Nook Color General] majorpay:
Right. So that's why yours isn't caught in a CWR boot loop and just goes blank, whereas mine was. Mine was installed on the physical device, not the SD Card.
[Nook Color General] martian21:
You will need ADB which can be used when you are booted into CWM.
[Nook Color General] fattire:
Cyanogenmod 7 includes fdisk in /system/xbin/fdisk.

So you have a few options:

(1) As mentioned, you can use adb (get it free from the Android SDK)-- this allows you to type commands into your device from your computer. So in this scenario you'd boot off the SD card while the nook is plugged into your computer. After you boot, you can type "adb shell" and, assuming adb is set up properly, you should now be typing commands into the phone at the # prompt.

(2) OR, you can boot into clockworkmod recovery (on your SD, since your emmc is down) and then mount the /system partition from the menu, then use ADB to type commands exactly as described above.

(3) FINALLY, you can boot into cm7 on SD as in (1), but then run the Terminal Emulator app. You'll see that again, you can type right into the phone (via the soft keyboard) and do your stuff that way.

Good luck!
[Nook Color General] thereddog:
I'm afraid this is a bit over my head... Is there pre-made scripts I could simply run?
[Nook Color General] thereddog:
I got ADB running and this is what my current partitions are (I think)

# fdisk /dev/block/mmcblk0
fdisk /dev/block/mmcblk0

Command (m for help): p
p

Disk /dev/block/mmcblk0: 7944 MB, 7944011776 bytes
255 heads, 63 sectors/track, 965 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 * 1 15 120456 c Win95 FAT32 (LB
A)
/dev/block/mmcblk0p2 16 74 473917+ 83 Linux
/dev/block/mmcblk0p3 75 197 987997+ 83 Linux
/dev/block/mmcblk0p4 198 247 401625 c Win95 FAT32 (LB
A)

So it looks like I need to create the other 3 partitions... right? What are the proper commands to do so?
[Nook Color General] thereddog:
ADB should be able to detect my Nook while booted into CWR, right? I've been trying a few things (to no avail) and now I can't even get ADB to see my Nook

I am in need of serious help
[Nook Color General] fattire:
Yes, you should be able to use adb with cwr...
[Nook Color General] fattire:
So here's the wiki description basically:

And here's more detail. Something like this anyway might work.

It's been a few months so I can't remember with absolute certainty whether I have the filesystems exactly right for partitions 3 and 8... but 3 isn't used at all by cm7 and 8 is just /emmc storage... so you should be good to go. Someone will correct me if I'm wrong no doubt. You can also check /init.encore.rc on a cm7 update.zip to see which file systems are used when the partitions are mounted.

It looks as though someone may have made some scripts to do this for you. I haven't tested or even looked at these. I found them with a google search for "mkfs nook" -- mkfs (make filesystem) is the basic command you use to create the file systems, though there are a few variants (mke2fs, mke2fs.ext2, etc.)

If you've gotten the geometry part right, you can either try the above scripts (assuming they'll partition from scratch) or continue using fdisk to partition according to the chart above.. be aware that the "logical partition" (ext4) is used to extend the devices past four.. it's something like this: (bad picture)

/dev/block/mmcblk0p...
|
__________________|___________________
| | | |
| | | |
| | | |
1 2 3 4
|
___________|____________
| | | |
5 6 7 8

Hope you're learning a ton! The time you spend getting this back up and running is well invested-- you're getting to know the ins and outs of not only the nook but of the countless millions of linux devices around the world. Keep going!
[Nook Color General] thereddog:
Strange, because that is not the case

adb devices does not list anything
[Nook Color General] thereddog:
I got ADB running again after reinstalling, and I recreated all partitions as needed. I flashed a CM7 nightly, but I'm pretty sure I need to write something to the first three partitions...

~ # fdisk /dev/block/mmcblk0
fdisk /dev/block/mmcblk0

Command (m for help): p
p

Disk /dev/block/mmcblk0: 7944 MB, 7944011776 bytes
255 heads, 63 sectors/track, 965 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 * 1 9 72261 c Win95 FAT32 (LB
A)
/dev/block/mmcblk0p2 10 18 72292+ c Win95 FAT32 (LB
A)
/dev/block/mmcblk0p3 19 56 305235 83 Linux
/dev/block/mmcblk0p4 57 935 7060567+ 5 Extended
/dev/block/mmcblk0p5 57 114 465853+ 83 Linux
/dev/block/mmcblk0p6 115 236 979933+ 83 Linux
/dev/block/mmcblk0p7 237 281 361431 83 Linux
/dev/block/mmcblk0p8 282 935 5253223+ c Win95 FAT32 (LB
A)
[Nook Color General] thereddog:
I found an old CWM backup from March on my computer and attempted to restore it. It seemed to go fine, but the NC still didn't boot
[Nook Color General] thereddog:
What do I need to write to each partition in order to boot? I tried flashing update-nc-stock-1.2-signed.zip but that doesn't work either
[Nook Color General] thereddog:
Since I reformatted all my partitions, I am able to write to the EMMC without error. I used the CM7 SD installer to install the latest CM7 nightly to my SD card then attempted to dd the image back to the Nook

C:\Users\Kris>adb shell
# dd if=/dev/block/mmcblk1 of=/dev/block/mmcblk0
dd if=/dev/block/mmcblk1 of=/dev/block/mmcblk0
/dev/block/mmcblk0: write error: I/O error
81+0 records in
80+0 records out
40960 bytes transferred in 2.035 secs (20127 bytes/sec)

This happened pretty quick, so I know the entire SD image wasn't copied over to the EMMC. So either I didn't do it right or dd doesn't work that way
[Nook Color General] fattire:
Hmmm... that I/O error may mean there's something physically wrong with the emmc.... but that said, it was a good thing to try. You can try adding bs=1M to the end of that dd and see if it does anything.

Here are the 4 files you minimally need on your /boot to start cm7. You can get these from the latest cm7 update.zip:

/boot/mlo -- the pre-bootloader

/boot/u-boot -- the bootloader

/boot/uImage -- the kernel for cm7

/boot/uRamdisk -- the ramdisk loaded by the kernel.

If you want clockwork, you'll need to add:

/boot/uRecImg -- clockwork's kernel

/boot/uRecRam -- clockwork's ramdisk.

Assuming a regular boot, the startup procedure looks like this:

On the screen, you should see the following..

mlo loads -- nothing

u-boot loads -- if you have enough battery you see the CM logo, otherwise you see a message about plugging in the nook

kernel loads-- you see the android skateboard guy.

That may help figure out where it's failing.

Also, shortly after the kernel loads, you should be able to use "adb logcat" to watch the process of Android booting.

Good luck!
[Nook Color General] fattire:
You should be able to copy those four files simply by getting the lastest cm7, unzipping it on your pc, then once you boot into your bootable SD card, do:

COMPUTER> adb shell
# mkdir /data/bootmountpoint
# mkdir /data/systemmountpoint
# mount /dev/block/mmcblk0p1 /data/bootmountpoint
# mount /dev/block/mmcblk0p5 /data/systemmountpoint
# exit
COMPUTER> adb push mlo /data/bootmountpoint/
COMPUTER> adb push u-boot /data/bootmountpoint/
COMPUTER> adb push uImage /data/bootmountpoint/
COMPUTER> adb push uRamdisk /data/bootmountoint/
COMPUTER> adb push my/path/to/sdcard/system /data/systemmountpoint/

that should copy everything into /boot and /system on your emmc.

If you want to copy the system from your running SD card rather than the computer, it would be something like:

COMPUTER> adb shell
# cp -rf /system/* /data/systemmountpoint/
[Nook Color General] thereddog:
First, thank you for sticking with me to help

The 4 files needed to boot, I need to write them to /dev/block/mmcblk0p1 correct?

Do I used dd or adb push?
[Nook Color General] thereddog:
I have CM7-138 nightly, it doesn't have a uImage or uRamdisk file at the root
[Nook Color General] fattire:
those files should be in blk0p1 correct.

Do not use dd-- in fact if you had a bad "dd" from earlier you should restore it to a "stable" condition.

you can use adb push to push the files from your computer to your emmc.

You can also use cp filename if shelled into your device (booted from SD) a la "cp filename /place/on/sd/filename /data/mountpoint/where/you/want/it/to/go/on/emmc" assuming you've done a "mount /dev/block/mmcblk0p1 /data/mountpoint" first.
[Nook Color General] fattire:
On the update.zip they may be called something like "kernel" and "ramdisk.img" if I remember correctly. They just need to be renamed.

Otherwise, you can find the files in the /boot partition of the SD card you're booting off of. At least the uImage will be good. You probably will want another uRamdisk.

Another way to do it-- if you can get mlo, u-boot, uRecImg and uRecRam (in other words, the files you need to boot into clockwork on your emmc), you could then boot into clockwork mod on your emmc and just use clockwork to install cm7 the rest of the way.

Good luck.
[Nook Color General] thereddog:
OK, so within the CM7-139 nightly zip, I extracted the system folder and the 4 files (MLO, u-boot.bin, ramdisk.img, and kernel)

I renamed ramdisk.img to uramdisk.img and kernel to uimage.

I'm able to make the directories and mount them, but now when I attempt to adb push, CMD says I/O error
[Nook Color General] fattire:
I/O error is really looking like a hardware issue. Can you type "dmesg" to see if there is any indication of what the error is? "dmesg" is a message from the kernel.

Also-- you DID recreate the geometry/partitions after you tried to dd previously, right?

you can test whether or not the emmc is broken by just writing zeros to the partition, a la:

# cat /dev/zero > /path/to/where/you/mounted/emmc0p1/filename

It should eventually fill up the drive with "filename" and give you a ran-out-of-space error.. if you get an io error you should maybe look at what the error is in dmesg.

Just an idea...
[Nook Color General] fattire:
Also, can you be REALLY explicit in how you're trying to push? Like show me every command you're doing etc.. what are you pushing to... you want to make sure it's a MOUNT of the emmc:

on the device:

# mkdir /data/mount
# mount /dev/block/mmcblk0p1 /data/mount
# exit
COMPUTER> adb push u-boot.bin /data/mount/

correct?
[Nook Color General] thereddog:
That's exactly what I've tried:

C:\Users\Kris>adb push u-boot.bin /data/mount/
failed to copy 'u-boot.bin' to '/data/mount//u-boot.bin': I/O error

Now, with the cat/dev/zero commands... would you be more specific on how to execute them?
[Nook Color General] DizzyDen:
If you are using the exact commands he's typing then you would use:

# cat /dev/zero > /data/mount/filename
[Nook Color General] fattire:
Yeah, this would write zeros into the file ("filename") until your partition was entirely filled up. The goal was to see if you were going to continue getting IO errors or what.

I am not encouraged by these I/O errors. I/O btw is "input/output" and usually indicates some kind of issue with the media or media-reading device-- scratched CDs would give you that or bad sectors on a hard drive...

It could also be caused by trying to read an area of a device that isn't accessible for some reason, or if you've got a bad driver. If your SD card has errors on it, I suppose that might account for the issue as well.

When you format most hard drives and overwrite it with zeros it usually finds bad blocks and marks them as bad so that they aren't used. I'm not sure how it works with the emmc though. I figured though it would be an interesting experiment to try to zero everything out...

The big question, that I have yet to see answered, is what does "dmesg" tell you when you get those errors? It may help to figure out what KIND of errors they are.
[Nook Color General] thereddog:
I tried this again and got everything to transfer over!

I rebooted without the SD card but it doesn't do anything still.... :(

Does CM7 need a blank SD card to boot with?
[Nook Color General] fattire:
CM7 doesn't need any blank SD to boot. All four files are in p1?
[Nook Color General] thereddog:
What are the commands to check?
[Nook Color General] fattire:
Well you mount p1 with

mount /dev/block/mmcblk0p1 /data/mountpoint

then

cd /data/mountpoint

and

ls -la

you should make sure that the following files are there:

mlo

u-boot

uImage

uRamdisk

uRecImg

uRecRam

If you boot w/o the sd and still don't see anything at all (such as the yellow/green "Cyanogenmod" logo from u-boot) then something is still wrong...
[Nook Color General] thereddog:
C:\Users\Kris>adb shell
~ # mount /dev/block/mmcblk0p1 /data/mountpoint
mount /dev/block/mmcblk0p1 /data/mountpoint
mount: mounting /dev/block/mmcblk0p1 on /data/mountpoint failed: No such file or directory
~ # mount /dev/block/mmcblk0p1 /data/boot
mount /dev/block/mmcblk0p1 /data/boot
mount: mounting /dev/block/mmcblk0p1 on /data/boot failed: Device or resource busy
~ #
[Nook Color General] thereddog:
Holy crap... after I ran the commands above, I rebooted (with the CWR SD card still in) and it booted to the stock "n" screen!

It froze though. Especially weird since I've been pushing files from the latest CM7 nightly..... :confused: :confused:
[Nook Color General] thereddog:
I think it was because I modified commands writing to the EMMC

This is exactly what I used:

COMPUTER> adb shell
# mkdir /data/boot
# mkdir /data/system
# mount /dev/block/mmcblk0p1 /data/boot
# mount /dev/block/mmcblk0p5 /data/system
# exit
COMPUTER> adb push mlo /data/boot/
COMPUTER> adb push u-boot.bin /data/boot/
COMPUTER> adb push uImage /data/boot/
COMPUTER> adb push uRamdisk.img /data/boot/
COMPUTER> adb push C:\Users\Kris\system /data/system/

This allowed my Nook to boot on its own! It showed the green CM logo, then the lowercase N logo and froze there.

I then flashed the latest nightly zip using CWR and rebooted to a full functional Nook!

I am so thankful for your help, I can't believe how much of a pain in the ass this was :)
[Nook Color General] thereddog:
I am never using CWR to format /boot ever again
[Nook Color General] fattire:
I love happy endings :)
[Nook Color General] thereddog:
I got lazy and was tired of typing bootmountpoint and systemmountpoint over and over so I just used boot and system.

That seemed to do the trick. Now I hope when the ICS AOSP code is released I won't have to do this all over again!
[Nook Color General] fattire:
Yeah you coulda used b and s.. the name of the mountpoint doesn't matter...

Oh and seriously, congrats. You totally brought your machine back from as ****ed as it can get. And hopefully learned a ton too.
[Thunderbolt Accessories] leoingle:
Anybody come across a car charger that is high current like the HTC wall charger?
[Thunderbolt Accessories] Mustang02:
Most car chargers are classified as "rapid".
[Thunderbolt Accessories] efity:
Anything designed to charge an iPad (2.1A versus the typical 1A) will give you plenty of juice. I use the Scosche reVIVE II with Pandora, Bluetooth, and GPS Navigation all on and still have enough power to positively charge my battery.

Fair warning, though, this will cause the phone to get real hot (I've had the overheating warning lights flash twice so far), so make sure you have plenty of ventilation around the phone, keep it out of the sun, etc etc.
[Thunderbolt Accessories] worwig:
Any charger that is at least 1 amp. will do. The phone 'pulls' a max of around 0.85 amps. No need for more then 1 amp.

If it has a replaceable cable, it must be the heaviest gauge, shortest cable, that you can use. I have seen long cheap thin cables that drop over a volt, and the Thunderbolt charges really slowly.

The charger or cable have to state that they for rapid charging. To rapid charge, you need to have the USB D- and D+ lines shorted. If that are not shorted, the Thunderbolt limits the charge current to around 0.35 amps. thinking it is connected to a PC. If they are shorted, letting the Thunderbolt know it can be rapid charged, you get up there around 0.85. You can easily modify the charger for high rate if it is good for at least an amp.

And in the end is heat. Heat and lots of it. It will damage the battery. So put it out of the sun and in cool air like near a vent.
[Thunderbolt Accessories] ddgarcia05:
Motorola Rapid Charger on Amazon is the best. I bought two.

http://www.amazon.com/Motorola-Vehi...Q9CA/ref=sr_1_1?ie=UTF8&qid=1309959388&sr=8-1

Review off Amazon
[Thunderbolt Accessories] kr0n1c:
I've been contemplating buying this one, but I'd like to ask you if it charges your battery with navigation+music going? I have a usb charger in my truck, and with both of those going it just manages to keep my battery level where its at, sometimes losing a % or two.
[Thunderbolt Accessories] ddgarcia05:
From what I've read in the past here on XDA and on the reviews for the charger (on amazon) you shouldn't have a problem. The second review for the charger on amazon states that the reviewer was looking for a charger which actually charged his phone will using GPS and that he found it. It's a very well built charger and cheap. It's made my Motorola and sold by Amazon so buy with confidence.
[Thunderbolt Accessories] KZIWarrior:
It does indeed charge. I've had it since my original Droid and was concerned when I updated to the TB but it will charge the TB no matter what you're doing (I've had Nav running while on a phone call with BT and searching the internet and it still showed it was charging). Just be prepared for your phone to get HOT!! Great charger.
[Thunderbolt Accessories] mike.s:
Actually, the phone will pull more than 850 mA. You're probably basing that on using a battery monitor, which only shows the flow of current into/out of the battery. I've seen 800 mA into the battery at the same time I have display, GPS and a phone call going, which is definitely more than an additional 50 mA. It wouldn't surprise me if the phone can take advantage of something more than 1A, since I see a battery drain of more than 200 mA with all of that going when not on the charger.
[Thunderbolt Accessories] Turnyface:
I have that Motorola charger and am a heavy GPS user. It charges the battery as if it were plugged into the wall. You'll be very satisfied.
[Thunderbolt Accessories] worwig:
No, that was measured at the 5 volt power supply, based upon a lab power supply. I did a lot of experimenting when I developed the charger and phone mount for my motorcycle. And to get the 850ma from the power supply, I used a very short, maybe 8 inch, USB cable, and a charge voltage close to 5.3 volts. With 5 volts at the power supply, it would only pull about 650ma from the power supply. That was due to the voltage drop in the USB cable. With the 5.3 volts at the power supply, I was getting close to an actual 5 volts at the Thunderbolt. I never measured the current at the battery, but I could see it being a bit more then the 850ma in, if there were a switch mode supply in there.

Though I like the Battery Monitor widget as a rough guide, I never tested to see if the battery current and the battery monitor are accurate.
[Thunderbolt Accessories] happimeal:
Does anyone know if the included HTC ac adapter and cable will charge faster than using your pc with the included USB cable?
[Thunderbolt Accessories] worwig:
Absolutely.

A PC USB port is limited to under 500ma. The Thunderbolt appears to to limit PC USB draw to about 350ma. I haven't measured the actual current in the HTC charger, but it is a high current charger, and charges my Thunderbolt very quickly. Battery Monitor widget shows high battery charge rates. I suspect it is getting near the max rate up near 1 amp.
[Thunderbolt Accessories] dpham00:
HTC charger states 5V/1A on the charger itself.
[Thunderbolt Accessories] dpham00:
You can use the Palm car charger for $3.75+tax, free shipping. it is 5V/1A, same rating as the HTC wall charger.

Go here for 25% off

http://www.wireless.att.com/cell-ph...otion/accessories.jsp?source=EC0A0011600jtl10

Add product here, must add to cart to see 25% discount.

http://www.wireless.att.com/cell-ph...027&q_sku=sku4720234&q_manufacturer=&q_model=

Also, if so inclined, you can lop the top off of the charger so that you can use any usb cable (ipod, iphone, anything)
[Thunderbolt Accessories] worwig:
That doesn't mean much. That is the MAX the charger can output. The amount that the Thunderbolt will pull varies. If it thinks it is plugged into a USB, it will be less then 500ma. even if the charger is capable of 10 amps.
[Thunderbolt Accessories] dpham00:
i have used the Palm car charger, checking with bmw, it shows around 850ma, same as on my htc charger.