SD Card Basics and rooting/CM - Nook HD, HD+ Q&A, Help & Troubleshooting

Introduction I wanted to put this into a thread since there are multiple questions about the same topics here. I'm simplifying here, Verygreen and others could give you a lot better detail. But if you are confused about some of the directions in other threads, this may help.
For most purposes, the SD card is treated as a simulated hard disk. So much of the control and terminology used is the same as HD.
For the Nook HD/HD+, the easiest (and so far only) way to access control of the machine is through an SD card. This is because the bootloader will check the SD card and boot an acceptable OS it finds there. So for now at least, ALL CM versions for these Nooks will be booted off the SD card. For those familiar with flashing their phones, it is no different except all ROMs will reside on the SD card. The internal memory, called EMMC (or internal SD) is available for use with these ROMs as of 12/28 releases so it isn't wasted, and data (not programs) you want available from both Stock and CM can be placed there.
ROMs are placed into memory with a program generically called Recovery. This is a small OS which can provide access to memory, update ROMs, wipe memory partitions, make backups of your ROM, provide access to partitions from your computer via ADB, etc. The version that we are using here is called Clockwork Mod (CWM). You will need to load this into the boot sectors of your SD card.
Burning CWM In order for the bootloader to load this program, the exact placement of bits in the SD memory is critical. So instead of copying this program over to the SD card, you must burn an 'image'. This is an exact replica of the specific bits mapped to correct sectors of the SD card. The term is usually 'burn' an image. To burn an image from Windows, the recommended program is Win32DiskImage (http://sourceforge.net/projects/win32diskimager/) but other "image writing" software will work.
When you write an image, your SD card will contain a partition exactly the size of the image you just wrote. A partition is a formatted and ready to use portion of a hard disk or something simulating a hard disk like your SD card. In windows, you might have seen instances where multiple partitions are allocated to different drive letters (e.g. C: and D: ) both on the same physical device. In Unix or Android, partitions are often known by names such as /system or /sdcard. However, native Windows installs are only able to see the first partition of a SD card. Therefore, if you write a 500MB image to a 32 GB card, at that point in time only 500MB is usable and 31.5GB is no longer available. For the CM10 installs on this thread, the rest of the card is automatically partitioned as new drives for the ROM and DATA and so becomes available (linux/android don't have the partition disabilities of Windows).
If you are using Leapinlars' CWM zips to root, etc, you can simply copy the files over after writing the image. There is room in the imaged partition for these files. IF you are using Verygreen's CM10, and possibly others, you can't copy the files over as the CWM partition is too small to start with. After the CM10 SD boots in the Nook, it will create partitions to use the rest of memory. But these new partitions are not easily accessible with Windows. This is why Verygreen's instructions include using ADB to push the zip file to the /sdcard partition.
Partitions For those writing CWM images for update zips (e.g. http://forum.xda-developers.com/showthread.php?t=2062613), you will either want to use a smallish (e.g. 4G) SD card or repartition the card after you are done. The images by Leapinlar are large enough to load a few zip files for flashing in addition to the CWM program and a couple of backups (sometimes called 'nandroids'). But if you want to access the rest of the card, you'll need to repartition. The main reason you would want to do this is to return your 32GB card to full size, either with or without CWM on it; simply reformating on windows will not restore the unused data. For this, you will need to use a partitioning tool like Easeus (http://download.cnet.com/Easeus-Partition-Master-Home-Edition/3000-2248_4-10863346.html) or Minitool (http://www.partitionwizard.com/download.html). Note, this is generally NOT needed by the instruction sets on these fora, but is just provided as information, or if you wish to return to SC card to an initial state.
Copying files to partitions For the Nook HD/HD+, you must have the boot partition in the first partition of the SD card. This will NOT be the /data partition or the /sdcard partition. Therefore, you need a way to write to these partions on the CM builds. The easiest way is to boot CWM and use your computer to write to the these partitions via Android Debug Bridge (ADB). The process is boot to CWM, then go to mounts and storage, mount the /sdcard, THEN adb with CWM running and copy the zip over. ADB is a command shell that can execute commands on a remote android machine. Leapinlar's tips thread http://forum.xda-developers.com/showthread.php?p=34168454#post34168454 gives a lot of detail about setting it up and getting it to run. If you are using Windows, there is a way (Update: this does work to see the sd card partition on CM10 SDs) to see all partitions on a SD card. See this tutorial: http://forum.xda-developers.com/showthread.php?t=1585572. When done properly, you should be able to write your zips directly to the /sdcard partiton of the sd card (if that sounds confusing, please reread all that stuff above.) Note, there are partitions formated in unrecognized formats which are NOT seen with this method.
SD Formats SD cards are 'formatted' in different ways, just like hard disks. Formatting refers to data structures and directory structures used to keep track of files on a hard disk. In fact, any hd format can be used, but the typical format (data/directory structure) on smaller SD cards is FAT32. These are limited to a max filesize of 4GB and are fully compatible with Windows XP. For the larger cards, they often come formatted to a new format called exFAT (extended FAT). These allow larger files but are not native to Windows XP. However, a driver is available from M$ that will support exFAT. Because it is unexpected, you will get an error talking about the likely damage to your hardware if you proceed when writing an image to the exfat formatted SD card. You can ignore the error, the image is written bit for bit correctly.
Lastly to completely reboot the Nook HD/+, you need to hold the power button down for 10 seconds ignoring all prompts. Then hold it down again until it turns on.
I hope this is helpful. Please feel free to post comments and corrections below if I've made any mistakes and I'll update the op. I'll also try to answer questions if you have them.

Related

[HELP]Apps/Data on SD: Switching to new SD card

Is it possible if I installed apps/data on SD card to switch to another card and install apps/data on it? I removed my current card and my phone stopped working. I will take help from anyone who has it.
if you want to, you should be able to copy everything to a backup folder and upload to another sd card. you need to do this in linux cause windows does not natively read ext2 partitions. shut down your phone, remove the micro sd card, put in your computer, copy everything to the backup folder, then re-partition your new (hopefully bigger) micro sd card. put back in the phone and boot it up. i have never tried this, but it should work, just as long as you have the ext2 partition the system can read from. good luck.
I agree fully with corp769. In addition, two important things to remember are:
* ext2 must be the second (primary) partition
* you must preserve UNIX access permissions by copying apps and data directories with cp -rp ! That's the reason apps on SD doesn't work without repartitioning.
* you must use a separate card reader, you cannot do this while the card is plugged into your G1. (Unless you can do some fancy mounting/unmounting stuff on the phone, that is. It's certainly easier and safer to use a card reader).
I too have never tried this, but it should work.
creid2352 said:
Is it possible if I installed apps/data on SD card to switch to another card and install apps/data on it? I removed my current card and my phone stopped working. I will take help from anyone who has it.
Click to expand...
Click to collapse
i did this on linux from a 2G card to a new 8G card .. my partitions are named so i utilize naming to distinguish one partition from the other:
make two folders on your linux desktop .. "SDD1" and "SDD2" .. the FAT32(sdd1) can be click-and-drag to the desktop folder .. the EXT2(sdd2) needs to be run inside Terminal to retain the permissions (unless someone know a better way)
ie: sudo cp -a /media/sdd2/* /home/LucidREM/Desktop/SDD2
then switch cards
ie: sudo cp -a /home/LucidREM/Desktop/SDD2/* /media/sdd2
obviously substitute your name for mine unless you call yourself "LucidREM"
In the exact same process when you have an error nfs :
In linux with the card reader
unmount both vfat and ext2 partitions and type :
fsck -p /dev/yourext2partition.
fsck.vfat -p /dev/yourfatpartition
that's how I manage to recover 2 MicroSD card
If you want to go the GUI route - go grab a copy of the GParted Live distribution. Put that on bootable media (whatever your case may be, USB or CD/DVD) then boot into GParted and use the GUI to copy and paste the partitions over. GParted will do a consistency check and fix any errors in both partitions first, then copy over into the new SD card.
Thanks a lot for the help everyone. I will give this a shot when I get home. Appreciate all the quick responses.
no prob man, just let us know if it works for you or not.
If you don't have linux, is there a program for windows or mac I can use to do this? Thanks
legaleye2005 said:
If you don't have linux, is there a program for windows or mac I can use to do this? Thanks
Click to expand...
Click to collapse
Yes download Wubi (which is like Linux in a box, and can be installed in like 10 minutes and ready to use and removed like a normal program) or download Paragon Partition Manager 9 Trial Version, it must be version 9 not 10. I recommend Wubi however, much easier, and who knows, you might fall in love with it like I did.
I tried the LucidREM instructions and it is looping on startup.
Is there a different way to do this?
Simplest Method
Just in case people still want to know how to change SD cards (ext partition and all), which I suspect will happen a lot since the 16GB cards are going to start dropping in price soon, here's the simplest and best way I know how to do it. I have done this a bunch of times without any issues. I've even used this to go from a G1 to a myTouch (with minor compatibility changes, of course). But simply changing/upgrading SD cards is a breeze.
First thing's first. You will need bart.sh which can be found here: http://forum.xda-developers.com/showthread.php?t=562292. If you are using a myTouch or simply don't want to bother typing commands, use Amon_RA's wonderful recovery menus with bart.sh already built in. The Nexus One version can be found here (http://forum.xda-developers.com/showthread.php?t=611829) but there are links to the recovery menus for the G1, myTouch, Hero, etc. on that page.
You will need to be familiar with how bart.sh works and this is way beyond this post. There is a ton of information on the bart.sh thread. So here are the steps that need to be done.
1) Run bart.sh, either in recovery console or via recovery menu, to backup your entire ext2/3/4 partition (as well as nandroid for simplicity).
2) Back up the fat32 portion of your SD card as you normally would by mounting your SD card to your computer. Make sure that this includes the new bart.sh backup which should be located in the bart folder in the root of you SD card.
3) Partition your new SD card using the method of your choice. Amon_RA's recovery menus have an easy and painless method for this but you can use parted or any other method you choose. If you use your device to partition your new SD card do NOT boot your phone after you partition the card. You will want to finish Step 4 first. Amon_RA's recovery allows you to mount your SD card from recovery to help you complete Step 4 if you do not have a SD card reader.
4) Using Amon_RA's recovery menu or an SD card reader copy the fat32 partition, which includes your bart.sh backup, from your PC to the fat32 partition of your newly partitioned SD card. From the recovery menu, restore your bart.sh backup.
5) Voila. You now have all of your partitions moved to a new SD card.
This process can be simplified into one sentence. Do a bart.sh backup and restore it to the new SD making sure the SD card has the proper partitions and that you don't forget about the fat32 partition. The above is just a list showing the proper order so that you don't lose any data during the process.

move apps to new sd card?

i searched and my eyes hurt from being on this forum for the last few hours. i just got a new sd card that i partitioned using the parted method, and also flashed my g1 with CM 4.0.1. Realized that my new card doesnt have the apps from my old card. How do i transfer the files from one sd card to another? They both have ext3 partitions. I have an sd card reader, but i also have adb. Just need the easiest way. thanks
freaklt1z said:
i searched and my eyes hurt from being on this forum for the last few hours. i just got a new sd card that i partitioned using the parted method, and also flashed my g1 with CM 4.0.1. Realized that my new card doesnt have the apps from my old card. How do i transfer the files from one sd card to another? They both have ext3 partitions. I have an sd card reader, but i also have adb. Just need the easiest way. thanks
Click to expand...
Click to collapse
The easiest way is to clone the old sdcard to the new one and then readjust the partitions (if necessary). This works easiest if that the new sdcard is at least as large as the new one (you got a bigger one, right?).
You can do this either using usb to your computer, or by using a dedicated card reader (preferred). If using the phone as the card reader, you MUST BE SURE that NONE of the card partitions are mounted on the phone and then either way proceed as follows;
Connect the phone_with_old_card or old_card to your computer (must be LINUX/BSD/other_unix -- use a livecd if necessary).
Check the output of the 'dmesg' command to determine the device file, i.e. sd?. You need to know '?' and substitute that character throughout the rest of the instructions. Note: if you see, for example, 'sdb1', 'sdb2', then you are looking for 'sdb' which represents the ENTIRE DISK -- the numbers represent the partitions within the disk and are of no interest at this point.
As root (or other member of group 'disk') run the following:
dd if=/dev/sd? of=/some/place/with/enough/space/sdcard.img
When it finishes, swap in the NEW card (be sure to unmount if it automounts), check the output of 'dmesg' again (though unlikely, it could assign a different device file), and run the following;
dd if=/some/place/with/enough/space/sdcard.img of=/dev/sd?
The new card has now been cloned and will work as the old card, BUT, if the new card is LARGER than the old, the additional space will not yet be accessible....
To increase the accessible space, use a program called 'gparted'. Most livecds should have this installed, or you can google for 'gparted' and download their livecd. Use gparted to move/expand your partitions as you desire, then you'll be done.
Note: in the unlikely event that the new card is SMALLER than the old one, run gparted FIRST to shrink the partitions on the card such that they are SMALLER than the partitions THAT YOU CREATED on the new card, then use the dd command to copy PARTITION to PARTITION (i.e. use 'dd if=/dev/sd?1 of=...', etc.), then rerun gparted to adjust the filesystem sizes within the partitions.

Does my ext3 partition need to be formated in Linux?

A while back ago I purchased a Disc with all kinds of recovery and maintenance programs for all versions of Winders from a company called "Spotmau". One of the uitlities in BootCare is a great partitioning program called Partition Genius, that enables you to move, shrink, add/subtract partitions without having to wipe entire drive. Specifically, I am able to modify an SD Micro card without having to flip the non-removable bit.
My question is, should I just leave the new ext3 or ext4 partition as such or should I go ahead and format it in Linux? The program has the ability for this.
This is a bootup CD so you'll work in a non-winders environment but it does the trick really good.
G1, on AT&T
CyanogenMod 4.2.13
16GB Sandisk SDHC.
Just use the recovery image in my sig, no need to have a card reader or anything extra on the computer.
Filp the non-removable bit?
Non-Removable bit
I was taught that a PC will not partition an SD card or a USB flash drive because it is addressed as a removable drive. By flipping this "Non-Removable Bit", the PC, and any partitioning program will now recognize the USB or SD card as a permanent or fixed drive. I tried a program that was published by Lexmark but I didn't get any results. I did, however, accomplished to partition any USB or SD card with Partition Genius which is a bootable program.
Diode
Oh yeah, thanx for your recovery image, highly appreciate it.
L8Tr 4 Now.

Easily and quickly resize your SD Cards FAT 32 Partition

To quickly resize the FAT32 Data (ie music extra large data files etc) portion of any of the bootable SD cards use the following steps:
1. Create your SD Card from the Image.
2. Download and install Easeus Partion Master from Download.com
3. Close out file manager and any other active programs before starting Easeus.
4. Start Easeus, it will boot up and it will show the SD with the four partitions.
5. If your SD card has room that is unclaimed part of it will be gray and labeled unformated.
6. If it has room, right click on the last partition of the sd card and choose Resize/Move.
7. Now simply drag the end of the partition so that it extends the box to include as much of the unformated drive space as you want it to.
8. Hit Apply. Here is the rub, Easeus tries to save the data on that particular partition while extending/expanding the drive. I don't believe this is guaranteed so please backup anything you want to keep. But know that it is possible it might make the transition just fine.
9. Exit the program, you're done!
I've tried this and Easeus doesn't show any of the SD partitions. I've tried two different cards (an 8GB and a 16GB) on two different computers. Any suggestions? I posted this issue in another thread but nobody responded.
Bad reader?
Yeah, Partition Master only shows the first partition for me. I may try to pick up a different reader to see if that's the issue.
EDIT: I picked up another SD card reader over lunch and it also just shows the first partition. Is there some magic to showing all of the partitions on the card?
RE-EDIT: Scratch that...Windows only mounts the first partition as a drive letter but Partition Master shows all partitions properly. Cool!
So how do you access it
So you are correct and this works. My question is how do you access the SD card. If I pull it out and use a reader, windows only sees the boot sector. When I am booted autonooter 3.0 Rooted, put in the SD card and then plug into a computer it only sees the internal memory and the boot sector on the SD. When I connect it to the computer while booted in Honeycomb I do not see any drives.
Have you figured out how to load files on to this expanded area. I would love to try and play ripped DVDs on Honeycomb.
I'm able to resize the fat32 partition, but I would like to resize the internal memory so that I have more space for apps on my SD running honeycomb. Anyone find a work around for that?
Thanks

[Q] Migrating Froyo install from 4GB uSDHC to 8GB uSDHC?

I have Nookie Froyo installed on a 4GB uSDHC and picked up a faster 8GB uSDHC. I'd like to migrate my "stable" install to the 8GB so that I can use the 4GB for experimental stuff such as Honeycomb (at least until that becomes stable enough to take over as primary). I'm not sure exactly how to do this, though.
It seems like I should be able to put the 4GB card in my PC and pull a raw image using WinImager, then write that to the 8GB card and use a partitioning tool to stretch the last partition out to fill the space, but that only seems to image the boot partition, not everything.
Any help is greatly appreciated, both how to copy the image to another card and how to resize the partitions to take advantage of the additional storage after doing so (if necessary).
I looked for other threads on this topic but couldn't find anything clear enough to follow, but feel free to point me at existing documentation if it already exists.
Clone thread. See general. Maybe two weeks ago..
Sent from my HTC Desire using XDA App
Thanks, Sam. Okay, so I found the following thread that I assume is the one you mean:
http://forum.xda-developers.com/showthread.php?t=943164
I still don't quite follow, though. So when I insert the 4GB Froyo SD card into my computer I only see the ~117MB root partition even in utilities like Partition Master. I can instead use your utility to explicitly mount partitions 1-4 when the NC itself is connected to the PC, and I can use Win32DiskImager to read images of those partitions, but I'm not sure how to write those to my 8GB SD card.
Someone else mentions "packing your boot, system, data and sdcard partitions into a .img file", but I'm not sure how to do that. Is that as simple as catting all four files into a single image? Doesn't seem like that would preserve the partition information, though...
Do I just reformat the 8GB SD card, create partitions of the respective sizes in Partition Master, and then write the individual partition images?
Like I said...still confused here. Thanks in advance for any additional info!
For what it's worth, I was able to do this quite easily by purchasing a new SD card reader in which EASEUS Partition Master could see all partitions on my SD card, then using its "Copy Disk" wizard to copy the entire 4GB SD card to the 8GB SD card, and finally resizing the last partition to fill the card. Worked like a charm!

Categories

Resources