Is it possible to run stock image of sd? - Nook Color General

Sorry if there is a thread like this somewhere but I couldnt locate. I was wondering if there is a stock 1.1 image we can run off sd. The only real reason I want to keep the stock image is I have some kids book that dont work through the app. So I would like to be able to boot froyo from internal for the speed when I am using and boot stock off sd when my kid wants to play with it. Thanks in advance

Possible? Yes. Has anybody bothered to do it yet? Nope. The demand just isn't there for the amount of work required.
There's a froyo + stock dual boot available though. You get to choose at boot up whether to load stock or froyo. Look in the dev section of the forums for the thread on how to do it.

From what I've read you should just be able to decompile the uRamdisk, and recompile it after editting the init.rc file, mapping mmcblk0p5 and mmblk0p6 to mmcblk1p2 and mmcblk1p3. Then just dd mmcblk0p5 to mmcblk1p2 (you may need to shrink it depending on the size of your sd card) and copy the new uRamdisk and uImage to the boot partition of the sd card. I assume the u-boot.bin from any of the other sd card builds would work, alongside the same partition layout

Thanks for the replies yeah I get the lack of demand issue. I just wish the nook app had support for those books. Guess I will just setup the dual boot on emmc and if I read up some more and get brave try to get it done myself.
Sent from my LogicPD Zoom2 using XDA App

Very easy to do..
-Enter adb shell and enter 'busybox fdisk /dev/block/mmcblk0 -l' to print partition layout.
-Reproduce layout on the sdcard, with gparted/easeus. Don't forget the boot flag on first partition. You can extend media partition to use the remaining sdcard space.
- use my USB mass storage utility and mount each internal partition
- make tars/zips of every partition content.
- extract tars to SD partitions.
- then, as said above, edit init.rc (if you're too lazy, i can post one here, takes 2 mins to do)
- insert and boot..
Sam
Sent from my HTC Desire using XDA App

Related

Possible to put stock image on sd card

I am on rooted 1.1 v2 and everything works great. The only thing missing is the in store reading free books for an hour a day. I was wondering if I could boot stock BN image on sd card when I am in the BN store, so I could get the in store feature?
I have been reading a lot and many people with 1.1 v2 cannot get access to the free one hour reading. I am a newbie, so alot of android dev forum is a little over my head.
If anyone knows of another way to get in store reading, I would appreciate the help.
Not a bad question. In theory i bet its possible. Id love to have an sd for stock use....
Sent from my Nook Color (zoom2) using Tapatalk
I just want it for in store reading.
Why no one has thought of this before I have no idea, but its a Great Idea, Count me in if they can come up with this, maybe some high and mighty dev will come by and hear our pleas.
It would be great to have the Free Reading and to get books on free book Friday, Also i think they have in-store coupons.
therealguppy said:
Why no one has thought of this before I have no idea, but its a Great Idea, Count me in if they can come up with this, maybe some high and mighty dev will come by and hear our pleas.
It would be great to have the Free Reading and to get books on free book Friday, Also i think they have in-store coupons.
Click to expand...
Click to collapse
I believe it was tried previously, but there's things in the stock ROM that have hard coded reference points to parts of the system (if memory serves). The person trying to do this early on gave up for that reason. I could be wrong, but I think this was in mid December.
I was getting ready to ask this question when I found your thread. I really hope something like this does pop up in the Dev section - I'll use my nook daily with a custom froyo rom, but it would be nice to be able to use the stock image off a SD when I stop into a B&N.
Well, in theory it's quite easy to do. Read the entire post before attempting the trick.
As usual, I'm not responsible if your NC starts speaking Flemish. Be careful with your Internal partitions!
Requirements: stock on internal, gparted, maybe my UMS utility (DEV), an SDCard (8GB at least, to be safe), a few minutes.
Partition an SDcard following stock layout.
You can partition the SD by using gparted. Create a new partition table, then create the partitions. Then apply. Don't forget to use "round to cylinder" and always leave a 1mb space at the beginning of each partition (except boot). Or else, you'll end up with corrupt partitions, writing over one another. Partition size can be changed, just make sure they're big enough..
Make sure the first partition has the bootable/boot flag.
To print the layout, use ADB command "fdisk /dev/block/mmcblk0 -l".
Or search for the layout in dev forum.
Layout looks like this (by heart, so check):
(Primary: )
p1: boot = FAT32 ~70 MB
p2: rom = FAT32 ~70 MB
p3: factory = ext2 ~??MB (this can left at 1mb, its a recovery partition, no use here)
p4: extended (not a partition strictly speaking, it's an extension)
(Logical: )
p5: system = ext2 ~470MB
p6: data = ext3 ~900MB (this can be bigger, app data storage)
p7: cache = ext3 ~350MB
p8: media = media FAT32 ~5GB (this can use all the remaining space, as big as you can/wish: media storage, books, films)
Then, you'll need to copy partition contents onto the SDCard's newly created partitions.
The easyiest way of doing it is by making .tar files of internal partition contents and extracting the files onto the SD partitions.
To create the tar files:
- either use <tar XXX.tar *> adb command on each partition, make sure you compress the actual content, not the container folder (i.e tar system content and not system, the * in the command stands for all content). Then pull the tar file. Delete it afterwards from internal!
- OR, probably more user friendly, use my USB mass storage utility found in DEV, mount each partition and create tar files with your usual UI (Ubuntu, Windows, OSX).
Copy every tar file onto your PC.
Tar files of internal partitions aren't all mandatory, all depends on if you want to make a complete backup of running stock rom, or if you just want the general stock rom on an SD. For instance, cache and media can be ignored, if you just want a general version. If you want to backup your media, tar media as well.
Then, extract each file onto the corresponding partition of you partitioned SD. Delete .tars afterwards from SD partitions.
THEN: download attached file, erase uRamdisk from you SD's boot partition and replace it with the one in the attached zip file (rename SD-STOCK-uRamdisk to uRamdisk). Without this step, your SD will boot from system and data internal partitions.
This uRamdisk has adb activated, so you should be able to push files to the SD once booted. Some internal commands won't work though (i.e, mount). You'll have to install busybox and root (su) the system, well if that's your goal that is.
Then insert the SD and boot.
In theory, this should boot up to stock from SD.
I could be missing something, it's late here, and I haven't tried any of this.
Beware: recovery, even from SD, will affect the internal partitions! Maybe it's best you delete uRecRam and uRecImg from your SD's boot (NOT INTERNAL!).
NB: you need to edit vold.conf. See second page of this thread.
Note: you could also use 'dd' command instead of making tars, but you'd end up with huge .img files.
PS: If you have no way of accessing your SD partitions once they're created, use the following command from ADB while booted from working internal system, with SD inserted in NC:
echo /dev/block/mmcblk1 > /sys/devices/platform/usb_mass_storage/lun0/file
Click to expand...
Click to collapse
This last command should open every SD partition in you PC's explorer.
Sam
I don't see the point in asking a question if you're not interested in the answer...
Sent from my HTC Desire using XDA App
samuelhalff said:
I don't see the point in asking a question if you're not interested in the answer...
Sent from my HTC Desire using XDA App
Click to expand...
Click to collapse
I for one appreciate it, but missed that reply. I'm going to need to stockpile some microSD cards for all these various things to try .
I tried these instructions and it boots to the initial setup screen. I can see broadcasting AP's, but unfortunately I can't get it to connect any WiFi hotspot.
It appears to associate, sits at obtaining IP, but eventually gives up.
ADB connects and I was able to look at dmesg, but nothing stands out.
I went back to the eMMC and registered, exported /data, imported it to the SD card, and was able to bypass registration. However, it still doesn't connect to WiFi.
Only point that is probably worth noting is that I used a 2GB SDCard and here's what my mount output looks like:
mount
rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
/dev/block/mmcblk1p2 /rom vfat rw,sync,noatime,nodiratime,uid=1000,gid=1000,fmask=0117,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,errors=remount-ro 0 0
/dev/block/mmcblk1p5 /system ext2 ro,errors=continue 0 0
/dev/block/mmcblk1p6 /data ext3 rw,nosuid,nodev,noatime,nodiratime,errors=continue,data=ordered 0 0
/dev/block//vold/179:17 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,
shortname=mixed,utf8,errors=remount-ro 0 0
Click to expand...
Click to collapse
Any ideas?
Success
I could follow the instruction and made a 8gb stock bootable micro sd card. Only problem I can see is it mounts the boot partition of sd card as "/sdcard" and creates few folders like "B&N Downloads", "My Files". Is there any way to disable the sd card mount.
If anyone is interested in getting a copy of the sd card I can upload.
pbcal said:
I could follow the instruction and made a 8gb stock bootable micro sd card. Only problem I can see is it mounts the boot partition of sd card as "/sdcard" and creates few folders like "B&N Downloads", "My Files". Is there any way to disable the sd card mount.
If anyone is interested in getting a copy of the sd card I can upload.
Click to expand...
Click to collapse
I'm interested in it, or at least a "dummies guide" to doing this via a Windows PC..
I mean, as I read samuelhalff's post, it looks like it should be relatively easy to follow, but I have a few questions...
I see things like creating the partitions on the SD using gparted (which appears to be a linux command) so I don't know if I can maybe use EASEUS in Windows do do it? And am I reading it correctly, that TAR is a command I can run from inside an ADB SHELL? (i.e. type ADB Shell, then TAR)
I'll upload it tonight and post the link.
pbcal said:
I'll upload it tonight and post the link.
Click to expand...
Click to collapse
only reason that might not be a good idea is copyrights... not sure what if any might make it against the rules here, or something B&N would frown upon... then again, I guess its no worse than the .ZIP image in the recovery threads?
In any case, Thank you!!! I do appreciate it!
pbcal said:
I could follow the instruction and made a 8gb stock bootable micro sd card. Only problem I can see is it mounts the boot partition of sd card as "/sdcard" and creates few folders like "B&N Downloads", "My Files". Is there any way to disable the sd card mount.
If anyone is interested in getting a copy of the sd card I can upload.
Click to expand...
Click to collapse
I eagerly await this...and thank you for the work. I would use this as a dual-boot SD card with my daily-use ROM installed to internal memory. There are fairly easy-to-follow directions here on xda that will allow us to dual boot your SD card and internal memory. If you choose to boot from internal memory, then the SD card just becomes your external storage. No SD card swapping needed to go between your daily OS and the B&N stock. Very cool.
Thanks again.
You're welcome..
Sent from my Desire HD using XDA App
I'd love to get this as well. I had a 1.1 rooted stock which didn't give me the free hour in the store laast weekend. Sort of bummed as I heard it worked for some people.
Dan
Sent from my NookColor using Tapatalk
As I mentioned above, this would be great for dual-booting from eemc and sd card. I messed around with this a bit this evening and got it working nicely with one of the old Honeycomb images. The instructions for setting up dual boot are here:
http://forum.xda-developers.com/showthread.php?t=947698&highlight=dual+boot
I did have to mess around with the SD card a bit as once you boot from the internal memory, it is the first partition of the SD card that is used as your SD storage. Most SD card images have this as a very small boot partition with the fourth partition the larger SD card partition. I used a free program called Parted Magic to move the second, third, and fourth partitions over and expand the first partition into the unused space, creating a 5GB boot partition. I then put the multi-boot files from the thread above into the large boot partition. Worked like a charm - when booting from the SD card, Honeycomb used the fourth partition as the SD card storage space. When booting from internal memory, CM7 (the ROM I have installed to internal memory) used the 5GB boot partition as the SD card storage space.
Eageraly awaiting someone to build this and post an image file. I will admit that I am not smart enough to carry out the lengthly and excellence directions posted by samuelhalff.
Here is the link for the image. You will need a 8 GB or higher SD card.
Sorry for the large file. It has all partitions with stock data except data, cache and media.
Post your results / issues.
[COLOR="Red"][B]Removed[/B][/COLOR]
Click to expand...
Click to collapse
To avoid having /sdcard mounted on boot, you need to edit /system/vold.conf :
Code:
volume_sdcard {
## This is the direct uevent device path to the SD slot on the device
media_path /devices/platform/mmci-omap-hs.1/mmc_host/mmc0
partition 8
media_type mmc
##mount_point /sdcard
mount_point /media
ums_path /devices/platform/usb_mass_storage/lun0
}
volume_sdcard2 {
## Currently points to internal eMMC, assumes eMMC is formatted as FAT32
media_path /devices/platform/mmci-omap-hs.0/mmc_host/mmc1
media_type mmc
##mount_point /media
mount_point /sdcard
ums_path /devices/platform/usb_mass_storage/lun1
}
Add "partition 8" in the sdcard section.
Explanation: see, media is set to partition 8 of internal. That's right. But here, sdcard will mount automatically the first sdcard partition (boot), as partition isn't set. You need to manually set it mount partition 8 (sdcard)..
Sam

Newbie Customized Nookie Froyo question

Went from stock then rooted NC then Flashed with Customized Nookie Froyo 0.6.8 CWR for eMMC Update (2/25) works geat but if I format a sdcard then put files on it (transfer from comp to NC) when I shutdown then turn on it will be stuck on the future of reading screen but if i boot with no sdcard it boots fine.What did I do wrong?Flash?The Way I transferred files to sdcard?TIA.
How did you reformat the card? Sounds like you didn't wipe out all the partitions (i.e. a boot partition still exists). Try using a dedicated USB card reader and format via Windows/Linux instead of formatting via the Nook.
doing that know just read the guide .I dont remember if i formatted in froyo or not but Im formatting in windows then adding files .Do the files have to have a certain structure or can be folders just added to root of sdcard
Ok formatted in windows still hangs at the future of reading screen
Make sure you format in windows. You can then add whatever files you wish to either a media folder of sorts or the root of the sd.
I reformat my sd cards in my DX.
Sent from my DROIDX using XDA Premium App
Go into Control Panel -> Administrative Tools -> Computer Management. In the tree on the left, click Disk Management. Find your SD card and make sure there is only one partition on it that takes up the whole disk. It should look like the screenshot I've attached.
If there are other partitions (or Volumes) right-click each of them and click Delete.
Thanks fixed it with this and figured out i could do a clean install after formatting system/boot/data/cache runs great
Sent from my Nook Color (zoom2) using Tapatalk

[Q] Format SD card to ext2

I bought new SD card i want to wipe my phone completely and install Darkys Rom. I formated my new SD card to ext2 in Ubuntu but my phone didn't recognize the file system. Then i used Clockwork to format my (external) SD card and what i did i formated my internal SD card. I'm completely failed. Can somebody give me step by step tutorial how to format external SD Card to ext2 or ext4. Also i would like to know if i will be able to copy data under windows when the phone is connected through USB.
Thank you
Sorry for my English
Hi! Please tell me why do you want to format your SD card to ext2 or ext4? There is no need for that. Just format it tu FAT and that's it. If you want to apply lagfix then do it under recovery with the lagfix option under advanced features.
Greets from Croatia.
DanXo said:
Hi! Please tell me why do you want to format your SD card to ext2 or ext4? There is no need for that. Just format it tu FAT and that's it. If you want to apply lagfix then do it under recovery with the lagfix option under advanced features.
Greets from Croatia.
Click to expand...
Click to collapse
I would like to have option to transfer bigger files than 4GB.
+1
how do I format my external SD card to ext2? I have Samsung Captivate. I got Cygwin, since I use Windows. Does anyone know what commands to type in cygwin?
I want to put files larger than 4GB on my card as well.
I think this will be useful for a lot of people.
I found a thread http://android.modaco.com/content/h...an-i-bind-mount-e-g-system-sd-xxx-sdcard-xxx/
But I am a noob in Linux, and it would be GREAT to have step by step commands I would have to type in to format my external SD card, while its in the phone, etc
Possible problem I see is that the phone might not recognize external card if its ext2/3/4 . We might have to have small FAT32 partition on there as well? Or may be Froyo has that ability...
I'm looking into doing this myself, in my case so I can use symlinks to copy apps "data" folders (not the "data" partition, but the folders in /mnt/sdcard where apps put different things) onto the larger, external sdcard. It seems like it could be possible, just need to make sure the /etc/fstab file is updated properly, and of course make sure your kernel has the ext2 and/or ext4 modules loaded and running (which you probably will if you have a lagfix installed). I will play with this and post back my results here...
I have been looking for this myself for a while aswell, but on 4 different kernels and CWM v2.5 and CWM v3.0, I couldn't find any option on how to change the ext. SD to Ext4. If anyone knows how to then please post it here!
Sent from my GT-I9000 using XDA Premium App
So, progress report...
Still no success in this matter, although I have learnt a bit today about Android's internal workings. After backing up my system with CWR, I first tried formatting my ext sd card with gparted on my computer. Bad choice... Even though no config files were stored in it as far as I could tell, Android "panicked" and decided to restore all my configs to default, severely crippling my system and making a lot of apps force close when I restarted the phone.
At that point I thought, since it is now broken, might as well play with it So the next thing I tried was formatting my internal sd card (only the vfat partition that gets mounted in /mnt/sdcard) to ext2, but this time using the "busybox mke2fs" command, on the terminal emulator on the phone. This seemed to be successful, and I could read and write to the new ext2 partition, although for some reason, I got the feeling that apps kept resetting their settings (not sure what caused this, didn't really looked into it much). So once that was up and running, I decided to modify the /etc/fstab file, like I would do in a normal linux environment, to automount this partition on boot, as ext2.
At this point I rebooted the phone, but hmm... Android converted the partition back to vfat. Not good. This leads me to believe there must be some kind of "recovery" commands run on startup, in case the system detects the partition is not the default file system, or something along the lines of that. At this point it got kinda late, so I decided to document my progress, restore (which thankfully left my phone the way it was at the beginning of the day) and call it a day.
So, things that I still need to find out:
1) How does the system convert the partition back to vfat on startup and how could I avoid it from doing it? Maybe by having a small vfat partition to fool it into thinking all is good and normal?
2) When I had my partition as ext2, I couldn't see it on my computer when connected via USB (I'm on a linux system so the fs being ext2 is not a problem). Wonder why...
3) If I had a small vfat partition, how would I go about mounting the ext2 partition on the same mount point after the system checks the vfat one? Maybe by binding it? Gotta look into that as well.
4) Finally, have to check why the apps couldn't maintain their settings after a certain amount of time (for example, if I opened terminal emulator and changed the colors, these would stay if I closed and opened the app again right away, but if I closed it for a while, say half an hour, and opened again, it would be back to default...)
I'm on a Galaxy S btw. If anyone has any insight on any of these matters, would be much appreciated!
Any progress? Would really like to use +4 GB files.
morow said:
I would like to have option to transfer bigger files than 4GB.
Click to expand...
Click to collapse
It is immpossible because of hardware limitations of the SD card And often if the file is big it just fail!
Hristov1 said:
It is immpossible because of hardware limitations of the SD card And often if the file is big it just fail!
Click to expand...
Click to collapse
Not true, read the rest of the thread before u post! Its not a hardware limitation, its because Android uses fat32 as filesystem.
hello everyone,
I just wanted to check to make sure that there is no solution for this 4gb limitation with Android yet? I too have been looking for something besides resizing files.
thanks
uki
I have ext2 on my external 32GB SDCard, just formatted it on my PC and put it in the phone, working without any problems. I just watched a full length 720p movie with DTS sound on my phone without having to re-encode the mkv
I'm using CM7.1 on my phone which auto-mounts the SDCard even with ext2. It won't work on stock ROM, but any kernel that has ext2 support should be able to read ext2-formatted cards but they might not auto-mount the sdcard.
On my PC I had to install a ext2 file system driver (google ext2fsd) for Win7 to be able to read the card when attaching the phone to the PC.

Need help rebuilding emmc

Ok fellas, my nook color has been out of commission for over 2 months. I can boot from sd but not from internal emmc.
Sam has been helpin me but it has been difficult due to him being in a different part of the world. From what i've been told my emmc is corrupt and my partitions need to be rebuilt or formatted.
I have tried the different fixes here and still i am stuck on the N screen.
I am trying to return my NC to stock form.
I will let Sam chime in also. I know there are a lot of talents on this forum and pretty sure this can be fixed.
Thanks everyone..
Sent from my SGH-T959 using XDA App
Hi,
As Wendell said, I've tried helping him with his corrupt emmc.
The problem is:
The emmc semms to be corrupt, or at least some sectors of it. Wendell cannot return it, because it boots to CWR. That's the strange part, though the disk seems totally corrupt, it still seems to be able to boot. I guess some sectors and still working. But I don't know of any way to find out which..
This is what I know so far:
The internal emmc generally returns I/O error when trying to use fdisk or parted.
But, somehow, depending on the bs and count, I can dd /dev/zero to it.
Even after having dd zeros to it, it still seems to boot to internal CWR. So, the dd isn't working. Still don't know why, or how to remedy to it.
If someone could give us a clue or two here, it would be very much appreciated. I must admit I'm really no HDD expert..
Thanks!!
Sam
http://nookdevs.com/Flash_back_to_clean_stock_ROM
Have you guys tried this? Or has an internal EMMC rom been flashed?
Any idea how the partition became corrupt? Did you dual-boot?
Partition became corrupt after flashing a couple of the very first OC kernels. Not sure if thats what caused it but wouldn't boot past N screen. Since then i have been trying to fix it by doing the several fixes to no avail and possibly damaging the emmc even more.
Sent from my SGH-T959 using XDA App
fprice02 said:
http://nookdevs.com/Flash_back_to_clean_stock_ROM
Have you guys tried this? Or has an internal EMMC rom been flashed?
Click to expand...
Click to collapse
Please correct if I'm wrong but i think i need the stock recovery for this method. Unfortunately, the stock was replaced with CWR and now i cannot even get rid of CWR off the internal. If I could do it again, I would not place CWR on internal but rather run it off sd. I installed CWR via rom manager because the sd method was not yet available.
Try option number 3 in the thread I made in the general forum. the clockworkmod recover + stuck at " " screen. Flashing cwm via rom manager can cause corrupted /boot partition
Sent from my Vortex using Tapatalk
Woot , thanks for your response.
I have tried those methods to no avail. I can currently boot into CWR via 'home+N' but here is the crazy part, I cannot use the zip that sam made to remove CWR from emmc or even try to update to 3.0.1.0 via the CWR zip. My CWR on the emmc will not budge at all.
Sam, has even tried to erase my emmc totally from being able to boot to CWR just so I can get it looked at by B&N but CWR will not budge.
Excuse my ignorance, but will linux run off the sd card on the nook?
What about using something like GParted? Perhaps the USB bootable image on the sd card might work?
I know you are all trying to help. But please keep in mind that there aren't any obvious answers here. The emmc is corrupt. You can't flash anything to it.. and as I already stated, parted won't work either, it returns I/o error.
The only strange thing is that the nook still boots.. I can't understand that as the emmc lacks any partition table.
We need someone with hdd repairing experience. None of the answers found on existant threads will help Wendell..
Thank you.
Sam
Sent from my Desire HD using XDA App
samuelhalff said:
The only strange thing is that the nook still boots.. I can't understand that as the emmc lacks any partition table.
Click to expand...
Click to collapse
The boot may be from real hardware/non-eemc rom.
I know you said it's a emmc error - but have you tried to flash back to stock using CWM off of the SD with thecubed's MonsterRoot pack?
Yes
Sent from my SGH-T959 using XDA App
I'm sure you have tried this... but just in case...
Can you fdisk the partitions... then dd image img files to it?
I don't know if you will have any way of saving mmcblk0p2 and 3 to save your device specific information.
I believe sam has already tried
Sent from my SGH-T959 using XDA App
Here is what i would try.
First thing, get a cwm sd card setup that is bootable and has a decent amount of space so you can backup your emmc. The cwm sd card will allow us to adb in, but not worry about having any emmc partitions mounted (booting to a full android image would want at least the mmcblk0p2 partition mounted).
Make sure you have adb setup and working, so you can adb in once you've booted into cwm from the sd card. Make sure you know how to use adb pull and adb push to get files onto and off of the device easily.
Boot from the card, adb shell into the device. make sure when you are doing dd commands you are pulling from and writing to image files in a directory on the sd card, not on the emmc. you probably shouldn't even have any emmc partitions mounted at all.
Note: dd and bzip2 are both on the cwm 3.0.10 ramdisk, dunno about the earlier versions
I'd make a backup image of your emmc just in case things go from bad to worse:
Code:
dd if=/dev/mmcblk0 | bzip2 -9 > backup.img.bz2
This will take a while.
Now you'll need a MBR from someone with a stock partition table (i'm dual booting so mine probably won't work, otherwise i'd make one for you). Any volunteers?
Code:
dd if=/dev/mmcblk0 of=mbr.img bs=512 count=1
Once you have this file, just dump the image onto your emmc.
Code:
dd if=mbr.img of=/dev/mmcblk0
once you have a working partition table, you should be on your way to using the standard recovery techniques peppered throughout the forums.
btw, this won't fix any corruption in the extended partition table, that would take a little more effort (i'd have to read up on where/how that info is saved). Also obviously if it's a hardware problem rather than just corrupted data you have more problems than this will fix.
p.s. cwm loading witch a corrupt partiton table isn't that weird imho. the bootloader has barely over 400 bytes to load up the boot file and hand things off, it's probably not taking a close look at the partition map when it does this.
I know am probably being a stupid noob...have you tried the 8 failed boots?
Sent from my NookColor using Tapatalk
wendellc said:
Woot , thanks for your response.
I have tried those methods to no avail. I can currently boot into CWR via 'home+N' but here is the crazy part, I cannot use the zip that sam made to remove CWR from emmc or even try to update to 3.0.1.0 via the CWR zip. My CWR on the emmc will not budge at all.
Sam, has even tried to erase my emmc totally from being able to boot to CWR just so I can get it looked at by B&N but CWR will not budge.
Click to expand...
Click to collapse
Again..probably being a noob...are the file permissions set as ro? Mayhaps you need to change permissions?
Sent from my NookColor using Tapatalk
Lol.
Thanks for all your input.
DD and fdisk return i/o error. DD only works if I use i.e 1M as BS.
It seems there isn't any partition table on the emmc.
I guess some sectors are dead. The idea would be to identify which ones and erase them.
Although simply being able to remove the bootloader would allow Wendell to bring it back to the shop..
Maybe someone has a clue as to how to delete completely the first X sectors of emmc..?
Thanks.
Sent from my Desire HD using XDA App
samuelhalff said:
Lol.
Thanks for all your input.
DD and fdisk return i/o error. DD only works if I use i.e 1M as BS.
It seems there isn't any partition table on the emmc.
I guess some sectors are dead. The idea would be to identify which ones and erase them.
Although simply being able to remove the bootloader would allow Wendell to bring it back to the shop..
Maybe someone has a clue as to how to delete completely the first X sectors of emmc..?
Thanks.
Sent from my Desire HD using XDA App
Click to expand...
Click to collapse
Did you read my post? It is exactly telling you how to replace the first sector of the emmc. you can source it from /dev/zero with a bs=512 and a count=1 if you really wanna wipe the bootloader, but better would be just getting it working yeah? all our nooks have the same partition map (unless we are dual booting) and that map is stored on the first sector. My instruction tell how to pull the first sector with dd, and how to push it back on. notice i'm accessing the mmc directly? not the partitions? so unless his hardware is bad (or the extended partition is corrupt too) then my instructions will work. He just needs a copy of the first sector of a working nook. I'd put mine up but i'm not sure it would work, i have two extra partitions from stock. It probably wouldn't matter, but i'm not 100% sure on that, so i'd rather it be someone else that makes the image from a nook with a stock partition map (the contents of the partitions can be whatever, as long as they are all in the same place as stock).
Hi,
Thanks. Yes, I read your post. dd, for some reason, only works if I set bs to at least 1M. I don't have the NC, but maybe Wendell could confirm that.
Wendell: go to "adb shell" and type [dd if=/dev/zero of="/dev/block/mmcblk0" bs=512 count=1] without the [].
Please confirm that this returns an I/O error.
But for some reason, using 1M or greater as bs works, but the bootloader still isn't erased.. it still boots to CWR..
I'm pretty sure all the I/O error i've had mean that there's a hardware failure.. But that's my opinion, nothing more..
Thanks.

Can we repartition to make swap?

I've been thinking about this for a few days now. Then, today, xda posted an article on repartitioning the Xperia to gain some advantage. So it seems like a good time to pose this question for us HD+ owners.
This a "feasibility study" question. I'm not a developer. I can hardly hack my way though Mint, let alone the HD+. I'm asking if the following possible?
(If yes, maybe a nice developer will do it for us? )
Can we shrink and repartition the /factory partition in the HD+ (as they shrink partitions in the Xperia) and use the leftover space as /swap?
Background
I've been reading leapinlar's excellent treatises on the partition structure in the HD+ (see Item 16) and how the /factory partition, meant for automatic disaster recovery, doesn't do us much good if you've installed a custom ROM and a custom recovery. (See all of Item A12.)
Among other things, the /factory partition contains an image of the stock B&N ROM. Which will cause bootloops if triggered when you're running CM.
But, if I understand it correctly, the /factory partition isn't a total waste. It duplicates some important data from the /rom partition (devconf), which could come in handy IF you put the stock recovery back on in an attempt to fix your HD+. (Then it could rebuild the /rom partition if it had become corrupted.)
So, as it stands now, /factory is 448 MB that's mostly useless to us. Can't we put it to good use? Like /swap? Or direct zRAM to it?
Leapinlar has already created some repartitioning tools, as has the Xperia dev now. So I'm hoping a lot of the hard work has been done already.
Proposal
(I apologize in advance is my terminology isn't exactly correct.)
Is it possible to:
1) remove the factory.zip from the /factory partition and then shrink the partition to accommodate only the /rom backup files. (I'm thinking that all factory zips are the same size, so once the new smaller partition is calculated, it ought to be the same for everyone's HD+);
2) create a new partition from the left over space, calling it (new) partition #11;
3) format partition #11 as swap
4) easily tell CM 10 or CM 11 to use the /swap? I'm hoping this can be done with just a init.d script. (Maybe an fstab tweak too?)
5) Or perhaps dedicate #11 for zRAM, as a kernel developer has done with useless space in the Galaxy Tab 2. In essence, we'd have almost 1.5GB of RAM.
Feasible? Yes/No? I realize that dinking with partitions can damage my HD+. It's a risk I'm willing to take.
I'm not going to get involved with this, I'm just going to add a warning. The partition structure for the HD/HD+ is different than the Nook Color and most other devices. The NC and other devices like SDs use DOS partitioning. The HD/HD+ is like the Nook Tablet that uses GPT partitioning. The two partitioning schemes are not compatible. So don't try to use my tools in the NC forum. If you want to know more about GPT partitioning on the Nook Tablet and get some tools, search the Nook Tablet forum.
Sent from my BN NookHD+ using XDA Premium HD app
leapinlar said:
The partition structure for the HD/HD+ is different than the Nook Color and most other devices. The NC and other devices like SDs use DOS partitioning. The HD/HD+ is like the Nook Tablet that uses GPT partitioning. The two partitioning schemes are not compatible.
Click to expand...
Click to collapse
Good to know! Now we have more data than we had before.
Looks like a lot of the work has been done already
So, I found this thread in the xda forums all about nook tablet partitions. They even talk about resizing! (Or at least, about making a different size /userdata partition.)
There is also this here about repartitioning Nook partitions.
Looks like parted would be easier for what I'm looking to do, shrink the /factory partition and create a new partition.
I read here that I can use a live Linux CD to mount the factory.img. From there, I presume I can delete the factory.zip and create a new image?
I'm not a linux geek, but I presume I need to be on a live Mint CD to use parted in ADB? (Update: Apparently I am to use the Android SDK for ADB in Windows. Downloaded already. Am climbing the steep learning curve.)
First half of Step 1, Done
Well, it took longer than it should have, but I made a new, smaller factory7.partition.img file. It's 1 MB.
I started by booting a Mint 16 Live CD.
Then I mounted the OEM factory partition image I made beforehand using the dd command, per leapinlar's instructions. (See his Item 16.)
Code:
sudo mount -o loop partition7.factory.img {some.folder}
That image contained 4 zips: factory,zip; fsck.zip; rombackup.zip; romrestore.zip.
Dummy me, I tried deleting the factory.zip inside the mounted image. It occurred to me later that that would be like trying to delete a file from a mounted CDROM's iso image. Can't be done.
So I copied the 4 zips to a new folder. Then I could deleted factory zip, which was 433.3 MB.
That left less than 1MB for the other 3 zips.
If there's an elegant way of modifying an .img and resaving it, I couldn't find it. (I spent a lot of time with mkfs.yaffs2. But this .img was not a yaffs.(Didn't pass a "sanity check" when I tried to mount the new .img I had made with mkfs.yaffs2.)
So I brute forced an imaging solution by copying the 3 copied zips to a 1MB ext4 partiton on a USB stick. (I made the partition with gparted and used chmod 777 to clear permissions in the partition.)
Then I made an image of the new 1MB partition using the dd command. In my case
Code:
sudo dd if=/dev/sdd2 of=new.partition7.factory.img
(I probably don't have the leading /'s right here. Am truly hacking my way through all this. I'm sure most of you could do this whole project in a few minutes.)
So now I have a shiny new 1MB custom factory image just wating to be used.
Update: I think I'll redo this, and leave 4 zips, in case the recovery mechanism is looking for a "factory.zip" I'll made a dummy file and archive it, calling it "factory.zip."
The next task is to get ADB working, delete the original large partition7 in the HD+, create a new 1MB partition7 in its place, and then restore my new image to partition 7 using the dd command in reverse.
After that, then to create partition11 out of the unallocated 432MB and format that as swap.
Update: It occurs to me that I will have to backup partitions 8, 9, and 10 with dd. Then I'll have to destroy them, recreate them in new locations, and then restore them. Fortunately, an xda developer has already written the instructions on how to do all this.
I see that CM 10 supports swapon, so I'm hoping it will be downhill after the partition work. I'm hoping CM will automagically find the new swap partition, once I enable swap.
If you know different, I'd appreciate hearing from you. Will using swap in this memory burn the memory out quickly?
Better yet, swap file instead of swap partition
So, I was thinking more about this idea and how I'd have to destroy and recreate p8, p9 and p10 to make a new swap partition at p11. Aside from that being a lot of work and more prone to errors with all those operations, a new p11 would never get TRIM'd by the OS.
So now the plan is to reduce /factory (p7) to 1MB and increase /system (p8) by 443 MB. Then I'll put a swap file in /system.
Only have to work on two partitions that way and /system gets TRIM'd. (Or at least Lagfix will trim it.)
Whatdaya think?
I suppose it's easy enough to put a swap file in /data to get a feel if there's any performance gain from swap in eMMC. Someone wanna show me the code to do this? (I've read about how to create a swap file. Not sure how to mount it at emmcblk10.) Never mind, Found it on xda! Am currently running 500MB swap on /data to see what it's like.
PMikeP said:
So, I was thinking more about this idea and how I'd have to destroy and recreate p8, p9 and p10 to make a new swap partition at p11. Aside from that being a lot of work and more prone to errors with all those operations, a new p11 would never get TRIM'd by the OS.
So now the plan is to reduce /factory (p7) to 1MB and increase /system (p8) by 443 MB. Then I'll put a swap file in /system.
Only have to work on two partitions that way and /system gets TRIM'd. (Or at least Lagfix will trim it.)
Whatdaya think?
I suppose it's easy enough to put a swap file in /data to get a feel if there's any performance gain from swap in eMMC. Someone wanna show me the code to do this? (I've read about how to create a swap file. Not sure how to mount it at emmcblk10.) Never mind, Found it on xda! Am currently running 500MB swap on /data to see what it's like.
Click to expand...
Click to collapse
I guess this is a dumb question, but if you can put a swap file in /system and /data, why can't you delete the factory.zip from /factory and put the swap there? Why create a new partition?
Sent from my BN NookHD+ using XDA Premium HD app
leapinlar said:
I guess this is a dumb question, but if you can put a swap file in /system and /data, why can't you delete the factory.zip from /factory and put the swap there? Why create a new partition?
Click to expand...
Click to collapse
First, I'm abandoning my bright idea. Turns out that swap is slow (even on eMMC) and possibly destructive to the eMMC with all the writes. (Hmmm . . . I wonder how many writes /cache gets compared to a swap file? (IOW, would a swap file be any more destructive than cache is?))
There were 1 second pauses every now and then, presumably while swapping when I had a swap file mounted in /data. Even tho I could get more free memory with a swap file than with zRAM, zRAM is much faster. And since zRAM is supported by the OS, it's the path of least resistance for me.
But to answer your question, it's not a dumb question. I'm a dumb user.
First, I don't know how to mount the /swap on the /factory partition. Can it be done? I don't see /factory in root explorer when running. Whereas I can see /system and /data. (So, to use Windows talk, it seems like /factory is "hidden" when running the OS?) By the same token, I don't know if I can delete the factory.zip from /factory in situ. If it can be done, it probably requires ADB and fastboot (?). But I haven't learned about those yet. So I'd have to use my new image trick, from my post above, to "delete" factory.zip from /factory.
Second, even if I could mount a swap in /factory, I don't think I'd want to. (Although I agree it's be a lot easier (and less dangerous) than deleting and recreating partitions.) I don't think /factory gets TRIM' by the OS. And I presume I would want it TRIM'd every now and then or else the swap would get slower over time than it already is.
I notice that Lagfix offers to trim /system and /data (and /cache). But not /factory. As above, if /factory is not visible during operation of the OS, that would be one reason why Lagfix doesn't trim it.
Or it could simply be that Lagfix doesn't see the need to trim /factory. Since /factory is supposed to be static, there wouldn't be any reason for Lagfix (or CM) to trim it.
Whether /factory can be trimmed with the fstrim command while running, I don't know.
Anyway, my idea for swap wasn't such a good idea. So I've abandoned the idea.
It still bugs me, as an engineer who compulsively tries to optimize everything, to carry that wasted 443 MB around in /factory.
I don't think we need an extra 443 MB in /system or /data. (Or /cache.) But if we ever do, we know where to find it.
/factory is not automatically mounted in stock or CM. So to get access to it you would need to mount it with a script command. And I would assume you need script commands to set up /swap so that should not be a problem. But /factory is formatted fat32 and /data and /system are ext4 so that might interfere too.
And manual trim commands can be run to trim the mounted /factory. You don't need the app lagfix to do it.
But I agree, I'm not really sure you gain anything with swap on this device.
Edit: as PMikeP pointed out to me in a PM, I was mistaken. /factory is ext4, not fat 32. Thanks for the correction. That should make it easier.
Sent from my BN NookHD+ using XDA Premium HD app

Categories

Resources