[Q] Partitioning Question - Nook Color Q&A, Help & Troubleshooting

I have a question that is more android-in-general than Nook specific. I am trying this out on my Nook first, as it is an unbrickable device, before tinkering with my target device (a phone). My phone also does not have Clockworkmod recovery support, so a bricked device would be fatal.
I am attempting to increase the memory available for installed apps. My phone has limited space, but a bunch of pre-installed junk that I thought I might be able to get rid of in order to make more space for more apps. Knowing that simply deleting these pre-installed apps from the /system folder does really nothing, I set about making and editing an image file from the /system partition, then reflashing this image back to phone. As I am trying this on the Nook first, here is what I did:
1. Adb into the Nook and dd the system partition to a system.img file on the sd card.
2. Copy the system.img file to my desktop and mount the image.
3. Edit the image, removing the LiveWallpapers.apk file (a hefty ~3M file), then save the result back out as a new system.img.
4. Copy the new system.img to the sd card, then adb back into the Nook and dd the system.img from the sd card back to the system partition.
Everything appeared to work fine. The Nook boots, runs fine, and the LiveWallpapers.apk file is nowhere to be seen. Problem is, there is no difference in the available memory on the device.
In retrospect, I suppose I should not have expected there to be a difference. I am under the impression that the system partition is a read-only partition, and that extra space on this partition is not available for installation of apps. I am guessing that in order to increase the memory available, I would need to resize the data partition.
So, ultimately, my question is whether or not this is correct. Do I need to resize the data partition in order to actually get more memory available for apps, or is there an easier way? If I would need to resize the partition, how would I go about doing this, and would I need to take this extra space away from the system partition (the extra memory would need to come from somewhere, I imagine). I would envision removing bloatware from the system partition, shrinking that partition as I would no longer need that much space, and giving that extra memory to the data partition. Bear in mind that I need to do all of this through adb as I will not have Clockworkmod recovery on my target device.
Alternatively, I could be out my gourd and none of this makes any sense. Feel free to let me know if this is the case.
Thanks!

You've got it right.
The Nook emmc has partitions for boot, rom, system, data, and media. Originally data was 1g and media (/emmc under CM7) was 5g, newer models have reversed this. Data is where apps and their data go.
There are threads here about repartitioning newer Nooks with lots of good discussion. It sounds like you are capable (or want to be capable) of creating a custom partition scheme; there's enough info there for you to do that.
Experimenting with an 8g SD card might be a good place to get familiar with the tools. The "size-agnostic" installer will use a pre-partitioned SD if it finds one IIRC.
Good luck!
Sent from my NookColor using xda premium

xdajunkman said:
I have a question that is more android-in-general than Nook specific. I am trying this out on my Nook first, as it is an unbrickable device, before tinkering with my target device (a phone). My phone also does not have Clockworkmod recovery support, so a bricked device would be fatal.
...
Click to expand...
Click to collapse
I just wanted to re-iterate the importance of what you said here.
I have sent several people off to buy Nook Colors who were interested in developing for android, for this very reason.
Nothing else you can get your hands on ( to my knowledge ) is as safe of a dev-tool as the Nook Color, because of the first boot to sd-card.
It doesn't matter what you do to it, at the end of the day you'll have a working device unless you throw it down the stairs or something.
Bonus points for running an sd-install directly, because when you hose it you just reflash a new microsd card.
Can't reformat the card because windows only reads the boot partition? No problem - if you still have your Nook Color with it's stock software just boot it up and pop the microsd card in. The B & N software in the Nook Color will just format the card, without a care in the world for any existing partition schemes or whatnot.
You're on the right track for what you're trying to do, as the previous poster has pointed out, so just wanted to give you another vote of confidence letting you know you're doing all the right things for all the right reasons.

Thanks for the replies!
You know, I actually did the repartition of my Nook using the CWR zip file. I hadn't thought to go look through the original thread for the manual instructions. As you pointed out, I found the directions here:
http://forum.xda-developers.com/showpost.php?p=13971291&postcount=110
The only problem is that his instructions require that you boot from the SD card in order to manipulate your interal memory. This is fine and good on the Nook, but not possible with my phone. Any idea what would happen if I tried to repartition the internal memory while booting from the internal memory? Seems that this would not be possible....or at least wrought with peril. I think that my phone can boot into a fastboot mode, but have not tried that...anyone know if this would help?
Perhaps I am just playing with fire here and need to settle for cramped memory space on my phone. I am just too accustomed to my 5GB of available app space on my Nook.
Thanks again.

Well, after some more Googling, I think I might abandon the repartitioning bit. I think I am likely to brick my phone, even though I think I could do it manually on the Nook. In addition, it appears that many phones are set up so that the kernel resets the internal memory partitioning on boot....so I might also need to mess with the kernel to get this to stick. This is beyond my skill set and really not worth my turning my phone into a paperweight.
I thought of a bit of a workaround, however. As I can extract and edit the image of the system partition, I will simply install the apps that I will eventually want on my phone on my Nook instead, extract the apk's from the Nook, then insert them into the system image file from my phone. Reflashing the system image then puts these apps into the system partition instead of the data partition, effectively saving me hoards of space on my data partition. A bit laborious, but for several core apps that I know I will want and that are memory hogs, I think it will be worth it.
Anyone see any problem with this approach?

Related

[Q] CM7 SD Boot - Can you expand EXT4

I've had a lot of success creating a bootable CM7 using the size agnostic preparation instructions. (Here) I want to keep the Nook at stock, for a variety of reasons. Anyway, I created a very nice installation on a 16gb uSD card and did a lot of work setting up LP+ and my hundred-odd android apps. (I also have an Evo 4G). I was fortunate enough to get a 32gb uSD at a great price and want to move my installation over to that. The most successful by making an image with the Win32DriveImage and flashing that back to the 32gb uSD card, which leaves a large area of un-partitioned space. I've tried a couple downloaded tools but have been unsuccessful. Is there a command I can use in Terminal Emulator to to do that? I know I can use the agnostic procedure to start from scratch, but I'd really hate to do that.
The only thing that would make starting over is if someone can point me to instructions that would allow me to have an installation that boots from uSD and has fully functional CWR and Rom Manager. I love how it works on my EVO to download and install updates with a couple clicks. (Everything I've tried there seems to mess with the core Nook).
Thanks a lot!
Rob
Use Minitool Partition Wizard, or another windows partition manager to expand the last storage partition.
LBN1 said:
Use Minitool Partition Wizard, or another windows partition manager to expand the last storage partition.
Click to expand...
Click to collapse
Thanks for the suggestion. I tried a few partition managers and run into the same problem including with MiniTool. It will start the process of expanding or copying and expanding in one step, but it will eventually say "file system error" just before it finishes. It suggests repairing the file system, but none of the tools can do this with the ext4 partition. Still trying though. Gonna give the Acronis partition manager a whirl.
bitbearmi said:
Is there a command I can use in Terminal Emulator to to do that? I know I can use the agnostic procedure to start from scratch, but I'd really hate to do that.
Click to expand...
Click to collapse
You can edit partitions with fdisk from the terminal emulator. I suggest googling, it's a pretty old school tool and isn't very friendly. You should easily be able to resize your "sd" partition with that. Actually more accurately you should be able to delete that last partition and then create a bigger one in it's place. won't keep your data, but you can just copy it over to your computer and resize, then copy back.
Another option would be gparted which comes with basically every live linux cd ever. That one can actually do true resizes and should handle ext4 partitions easily (it is a linux file system after all)
bitbearmi said:
The only thing that would make starting over is if someone can point me to instructions that would allow me to have an installation that boots from uSD and has fully functional CWR and Rom Manager. I love how it works on my EVO to download and install updates with a couple clicks. (Everything I've tried there seems to mess with the core Nook).
Click to expand...
Click to collapse
You don't need to start over. Get a new uboot.bin for your cards boot partition from here.
Then get the clockwordmod kernel and ramdisk from the zip at the end of this post. Put the uImage and uRamdisk on the sd card as uAltImg and uAltRam.
Now when you choose sd:alternate from the boot menu it will boot you into clockwork.
Thank you so much. I think that will do the trick.
..rob
ylixir said:
You don't need to start over. Get a new uboot.bin for your cards boot partition from here.
Then get the clockwordmod kernel and ramdisk from the zip at the end of this post. Put the uImage and uRamdisk on the sd card as uAltImg and uAltRam.
Now when you choose sd:alternate from the boot menu it will boot you into clockwork.
Click to expand...
Click to collapse
OK. All is well and the dual-boot solution is super-convenient. But I'm a little perplexed as to how to work with CWM in this environment. Ideally I'd like this to work just as it does on my EVO, Rom Manager lets me know there is a new version, I select it, it downloads asks if an want Gapps and backup (yes please) then it does its thing. Maybe that is way too much to ask. If so, then the main things I need to know are how to instal an updated build that I download separately? Do I just copy it to the root of the boot partition.
Sorry for being such a n00b with the nook. Its funny but I'm much more confident messing with my phone, which if bricked, is pretty catastrophic. (LOL)
The instructions for updating CM7 for the agnostic build is in the OP's post for that build.
"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."
Also, Easeus Partition Manager is supposed to be able to resize partitions w/o destroying data. YMMV, of course. I used it to extend ext 4 but prior to putting anything there.
Didn't have any luck with easus either, but ended up using a gparted boot which worked great. Normally I would use recovery nandroid to backup the rom before installing the updated, but when I did that by booting into alternate, I ended up backing up the nook rom to the root partition, so I think the safest thing to do is to use win32diskmanager to image the entire sd card.
ylixir said:
You don't need to start over. Get a new uboot.bin for your cards boot partition from here.
Then get the clockwordmod kernel and ramdisk from the zip at the end of this post. Put the uImage and uRamdisk on the sd card as uAltImg and uAltRam.
Now when you choose sd:alternate from the boot menu it will boot you into clockwork.
Click to expand...
Click to collapse
So, just to make absolutely sure, if I already have CM7 installed on an SD card, which I've been using as a daily driver, installing apps, downloading Kindle books, PDFs, and the like, but I want to put CWMR onto the SD card, the steps you outlined should be OK?
NOTE: I know, I know, if I'm confused I probably shouldn't be screwing around with things...But the size-agnostic SD CM7 method was so bloodless that I thought the other stuff would be pretty easy to do. For whatever reason, adding stuff like the OC kernel and CWMR has been a little confusing.

[Q] Unable to sideload to sd card...help please?

Hi,
First off if this is answered I am sorry.
I did a lot of searching and was unable to see the answer to this...
I am running CM7.1 off uSD. Install went well, and have no issues. That being said, I am unable to find out where on the card to sideload books. I have booted into CM7.1, turned on USB storage, and have 2 drives appear in win: MYNOOK and CM7 SDCARD. I used the size agnostic image, and it appears that there is only the single partition on the card, and in file explorer, it shows the correct card size for memory, but only the single partition.
The only folders appearing on the card are:
.android_secure
Android
LOST.DIR
I tried to manually copy the books, media, etc. folders into a My Files folder on this drive, without success.
There is no other partition to repartition (shouldn't have to do that with size agnostic?). I have no problem loading books into the MYNOOK book folder, which I assume is the internal device memory.
Here is my question. How/where do I sideload books to use the storage on the uSD card? Do I have to create the folders somewhere? If so where?
My goal is to utilize the storage available on the card, but be able to read the titles in the stock software. Is it possible to do this without rooting, or do I need to root for any reason to access the right folders on the card for storage?
THANK YOU ALL!!
klewlessnoob said:
I tried to manually copy the books, media, etc. folders into a My Files folder on this drive, without success.
Click to expand...
Click to collapse
In what way was it not successful? Did the files copy and just can't find them with a reader? If so which reader?
The book I transferred over was not found in the stock software when I opened my library. Is there somewhere specific I am supposed to place it on the card for the Nook to see it? Thanks!
For the stock reader, I think you must use the 1gb area of the internal memory drive, which shows up as a separate drive on your PC when you plug it into the computer. When you are in CM7 and connect to the pc, cancel when it tries to install a device for the NC. Check the notifications on the NC, you need to click a button to enable copying files from your pc, and take care to properly safely remove/eject before disabling that and disconnecting the cable from your pc. Better to get a separate reader and install it from the market (e.g., Cool Reader). You can also install the Nook app from the market, but then books need to go within (possibly in a specific subdir) of the "Nook" folder on SDCARD.
So there is no way to use the card memory to store books if I want to use the stock reader??
Should there have been a "NOOK" folder created on the SD card as part of the CM7 process? Is that a file that the user needs to create? If so, does it go in the same partition as the CM7, as that is the only partition my machine is able to see?
thanks again
Hopefully you'll get more input on this, but I think the point of keeping the Nook stock available (aside from not voiding your warranty) relates to use of B&N books. However you can eject your CM sd card and use another sd card if you want more space for user media for use with the stock app. I thought the media drive was the 1gb area, but now I'm not so sure because on mine the MYNOOK disk is much smaller.
When you are in the stock firmware... you are seeing the boot partition of the uSD...
You can write the boot partition... resize it... then run the installer...
I have done it in the past... set up a 2GB boot partition... then setup the ROM on uSD. You then have a 2GB partition you can use when in stock.
Thanks for the info. I am a bit confused by your suggestion, can you please offer a bit more?
By writing the boot partition, then resizing it, does that mean I can resize now, after I have already set everything up? If so, what do you mean by the installer? Or do you mean I have to wipe the card and start over? If that is the case (start over) do you mean wipe the card, create a small partition for the boot to install on? Would that requre the use of an image that is not size agnostic?
Either way, how do I get the file structure in place on the non boot partition for the nook to see files that are saved there?
Thanks again for any help you can provide!
I have never had luck resizing it after it has been booted in the Nook and all the partitions created...
I have written the size agnostic image to the card... resized the only partition created at that point... then put the ROM on it and booted it in the nook so the installer script (size agnostic recovery) can do the partitioning and install the ROM.
For the question of getting the file structure... I'd have to ask how you wrote the files on the uSD... were you CM or stock?
I had always planned on running cm from the card, so when I wrote the files to the card, I was stock.
If I follow what you are saying, then steps for me to try at this point would be:
1. Reformat card
2. Write the disk image to the card
3. Shrink the single partition on the card (where the image is)
4. Add the CM ROM to same partition as the image
5. Install card and boot device
If this sounds right, I have 2 questions.
What size should the partition be for the image and CM ROM, maybe 2GB?
Will the Nook "see" the non-CM partition and create the file structure for saving files on the 2nd partition at some point? In my searches I saw that in early versions, there was a requirement that the 4th partition on the card be expanded to use for storage, won't I only have 2 at this point?
Thanks again so much for the help!
When you write the image to the card... it will only be about 114 MB.... you will probably want to increase the size to avoid any possible size issues later (with ROM's getting larger)
If you plan to use the stock nook ROM as well as CM7... you will probably want 2 GB boot partition... otherwise if you plan to only run CM7 you probably only want about 250 MB.
You can modify vold.fstab on the stock ROM to use partition 4 of the SD for its SD use... then you could avoid the 2 GB boot partition.
What happens when you use VG's SASD... the boot image is about 114 MB... when you boot it in the nook it creates partitions 2, 3 and 4... 2 and 3 are ext3 partitions, partition 4 is fat... partition 4 is the one set for sdcard in the ROM booted from SD...
This is why you can modify stock vold.fstab to point to partition 4... then both ROM's will be putting stuff on the same partition for "SD Card"
I think I follow that, but my issue is that currently I am unable to see partition 2,3 or 4 which I think is part of my problem.
When I set up the card, I used the SASD method, and all I can see in both win explorer and partition software is the single partition on the card. Should there also be partitions 2,3, and 4? Do I have to do something to make those partitions viewable?
I am not comfortable enough with my skill level to attempt to modify the stock vold.fstab file on the device, and was hopeful that by properly setting up the card, I would be able to keep stock as is, and use the card to multipurpose, ie run cm7 on part and use the remaining space on card to store books to be read in stock firmware. I am still hoping to do that....thanks
As far as only seeing partition 1.... that is a limitation of Windows.
By following the advice pertaining to starting over and increasing the size of the Boot partition immediately after writing the image... before doing anything else... you can provide more space for the stock ROM to use on the SD... it will use partiton 1 (the boot partition) without the other modifications to vold.fstab
ok, confused again
If I start over, write image, then resize that partition with the image, am I going to use the "rest" of the card, NOT in that partition to use with storage? OR am I going to resize the partition with the image to be big enough to use as the partition to put books on?
If it is the former, don't I again run into the problem of how to find the other partitions, or will I create them when resize the first partition after writing the image?
Thank you!
You will only ever see the first partition of the sd card when booting from the stock OS. Also with the card inserted in a usb flash card reader on Windows you can only mount the first partition as a drive letter. But you can see and resize partitions with contiguous unallocated space using MiniTools Partition Wizard.
OK thats good to know. Do you know if the SASD install should have created other partitions when I installed to the card? The reason I ask is that even in Partition Wizard, I am still only able to see the 1 large partition with everything in it.
If I start over again, will I need to use the wizard to create partitions first, then write the image to the resized 2 GB first partition, or should I write image to card, resize the first partition? If the latter, will resizing the first partition autmatically force the other partitions to be seen? I am not sure of this option, as I can't see where in the process the other partitions are created? Is this part of the process when CM7 boots?
Thanks!
Write the image. Safely remove from pc. Reinsert to pc. Use minitool partition to resize the (only, at that point) partition to the size you want. Use Apply in minitool software. Quit minitool and resume with the card setup.
does the minitool at that point (resizing) create the other partitions, or will the card setup do that? Do I have to do anything else to the other partitions to make them visable to the stock nook so that they can be used to access books while in stock os?
The card setup will create the other partitions. The stock os is never going to see anything but the 1st partition. You would need a terminal emulator or rooted file explorer installed in the stock os in order to mount another partition.
If that is the case, that stock os will never see anything other than the 1st partition, then there really is no way to accomplish what I am trying to do, correct?
In other words, put CM7 on the card, then when I want to use stock, boot into stock and have the reader find books saved on the card?

Delete WebTop Partition

Hi, I'm rocking the latest CM7 nightly, which doesn't support WebTop, so I have a 1GB+ partition just taking up space of my precious storage (which is very limited since I only have a 2GB SD card for now). I just read this article, could this be used to get rid of the webtop partition (and possibly shrink the /data as well)?
+1
Sent from my MB860 using XDA
nm, was thinking erase and not deleting the partition.
CaelanT said:
nm, was thinking erase and not deleting the partition.
Click to expand...
Click to collapse
Yeah, I saw it in the update email, lol
even deleting the partition, the memory of it won't be relocated to anywhere else, DONT DO THAT IF YOU ARENT A DEVELOPER WHO KNOWS WHAT IS DOING! =)
Sent from my MB860 using Tapatalk
You need to be able to edit the partition tables somehow, deleting the webtop partition and expanding the sdcard partition. Not sure how we can get a utility on the phone to do it. Id imagine it would be best to do it from a recovery so you wouldn't be using the internal storage partition while trying to do it. I don't think any simple and easy solution exists for this.
Sent from my MB860 using XDA App
I'm not a dev, but I'm quite knoelegable in general stuff (like partition maps, filesystems, etc) and a fast learner. That said, your right on that I probably shouldn't just go out and try it, and since I don't want to lose my little baby to a hardbrick, I was never planning on trying anything out. I posted the link to see if anyone had tried that method on an Atrix, or if someone knoelegable (or with a bunch of high end smartphones lying around) could try. I also must admit I haven't really read the thread & post linked in the article: I have a very busy week and this isn't something to do in a rush.
I'm also interested in this. I'll be following this thread to see if a solution comes up.
Silly suggestion: how about taking the card out and hooking it up with a proper PC. Copy the contents out of it to a temporary location. Then reformat the card to the full capacity and then re-copy all the items back in after. Reformat may have some issues if you are using Windows to try and rid of the EXT partition, but there are plenty of Partitioning programs out there that will kill it (including the native command prompt one called Diskpart).
bchliu said:
Silly suggestion: how about taking the card out and hooking it up with a proper PC. Copy the contents out of it to a temporary location. Then reformat the card to the full capacity and then re-copy all the items back in after. Reformat may have some issues if you are using Windows to try and rid of the EXT partition, but there are plenty of Partitioning programs out there that will kill it (including the native command prompt one called Diskpart).
Click to expand...
Click to collapse
We are talking about the internal storage (which is not removable as far as I know), not the MicroSD card.
adriangb said:
We are talking about the internal storage (which is not removable as far as I know), not the MicroSD card.
Click to expand...
Click to collapse
The OP: "Hi, I'm rocking the latest CM7 nightly, which doesn't support WebTop, so I have a 1GB+ partition just taking up space of my precious storage (which is very limited since I only have a 2GB SD card for now). I just read this article, could this be used to get rid of the webtop partition (and possibly shrink the /data as well)?"
Notice the SD card comment..
bchliu said:
The OP: "Hi, I'm rocking the latest CM7 nightly, which doesn't support WebTop, so I have a 1GB+ partition just taking up space of my precious storage (which is very limited since I only have a 2GB SD card for now). I just read this article, could this be used to get rid of the webtop partition (and possibly shrink the /data as well)?"
Notice the SD card comment..
Click to expand...
Click to collapse
Yes, but the webtop partition is on internal storage (unless you are using webtop2sd).
Sent from my MB860 using XDA App
bchliu said:
The OP: "Hi, I'm rocking the latest CM7 nightly, which doesn't support WebTop, so I have a 1GB+ partition just taking up space of my precious storage (which is very limited since I only have a 2GB SD card for now). I just read this article, could this be used to get rid of the webtop partition (and possibly shrink the /data as well)?"
Notice the SD card comment..
Click to expand...
Click to collapse
That was only to point out a possible reason for which I would want to do this, since I probably wouldn't care too much about 1GB of internal storage if I had a 32GB SD card.
U can format the partition by fastboot erase webtop command but other then that u cant use that space for other purposes and as far as i can tell there are certain number of partitions in atrix system (ever one is for some specific thing).
SO my suggestion is DO not completely delete the partition insted make it so small (as small as possible) and reallocate all of the free space to system partition (where user and preinstalled apps are installed. this way no natural order of flashing and backup will be disturbed and we will get extra space for applications and stuff.
Possible problems (unable to flash SBF through RSDlite) {Who flash thins via RDS now any ways ?}
if flashed rom with webtop (bluer bassed ROMs) then there is strong possibility that webtop partition so small unable to flash webtop causing aborted flasing process.
xateeq said:
U can format the partition by fastboot erase webtop command but other then that u cant use that space for other purposes and as far as i can tell there are certain number of partitions in atrix system (ever one is for some specific thing).
SO my suggestion is DO not completely delete the partition insted make it so small (as small as possible) and reallocate all of the free space to system partition (where user and preinstalled apps are installed. this way no natural order of flashing and backup will be disturbed and we will get extra space for applications and stuff.
Possible problems (unable to flash SBF through RSDlite) {Who flash thins via RDS now any ways ?}
if flashed rom with webtop (bluer bassed ROMs) then there is strong possibility that webtop partition so small unable to flash webtop causing aborted flasing process.
Click to expand...
Click to collapse
True, I hadn't thought of that. CWM flashs could probably work fine, or be modified to do so, but sbf I don't know, and sbf is useful to recover from a softbrick (I had to do so once, I don't remember th exact circumstance thou).
Some dev who knoes what he is doing would have to check this and see if there is a possible workaround (like the one you gave).
Sent from my MB860
in soft brick u can access fastboot so no need to flash SBF just flash recover and from it mount storage as a mass storage on pc and copy rom and flash. i do it all the times.
last time i used rsd was to flash unlock bootloader sbf.
xateeq said:
in soft brick u can access fastboot so no need to flash SBF just flash recover and from it mount storage as a mass storage on pc and copy rom and flash. i do it all the times.
last time i used rsd was to flash unlock bootloader sbf.
Click to expand...
Click to collapse
Yeah, I know, I don't remember what tje exact circumstance was, but maybe I just had the sbf laying around, it's irrelevant to the thread anyways (as is this post). I was just trying to point out that it's just better if we can keep the sbf fladhing capibility, even if it's only to be able to return it under warranty (althou I'm pretty sure you can also flash stock ROMs under CWM, granted someone made a zip out of it).
Maybe there is a way of tricking the phone into thinking the webtop partition is an sd card after it's re-formatted. Like formatting it into a fat32 partition and have some command to mount it.
i will never use webtop, its just some space useless to me =[
i have found a purfect solution to webtop extras space problem.
BUY A BIGGER CAPACITY MEMORY CARD
Every thing els dont have to change, give developers some time they will find some webtop replacement and we r gona love it.

[Q] Re: "Dualboot Mirage CM7 / ICS CM9 Image": can't resize sdcard volume.

This question probably belongs in the thread "[ROMS]NEW! Dualboot Mirage CM7 / ICS CM9 Image for SDcard [3/26]", except that I can't post there yet.
I was able to create a working dual boot card per the instructions. However, I could not make a working card that made use of all 16 GB of my card, rather than just the <4GB size of the image file. The card still worked when I used fdisk on my Mac to increase the size of the last, 'sdcard', partition to fill up the available space. However, that did not increase the capacity of the FAT volume in that partition, leaving the extra space still unavailable.
After saving the files from that volume, I then used the Mac's Disk Utility to erase the partition and re-create it as a FAT partition using all the available space. Once I did that, unfortunately, the Nook would then not recognize anything on the SD card and would only boot into the Nook's own ROM.
As an alternative, I tried leaving the existing partitions alone and editing the MBR with fdisk to create a new partition using the available space, which I then formatted as a FAT partition with Disk Utility. Again, the Nook would no longer recognize the SD card and would only boot into its stock ROM.
I actually tried the above with two 16GB SD cards, a SanDisk Class 4 and a Samsung Class 10, and with two Nooks. Moreover, I tried a number of manipulations of the MBR, mostly to make it identical to the original one except for necessary size changes. Nothing worked to get a card that would boot and use the full 16 GB. I'll admit I haven't tried everything, such as trying to resize to something less than the full 16GB, but I've put so much time into this already that I don't want to do any more until I get some feedback.
aarons510 said:
This question probably belongs in the thread "[ROMS]NEW! Dualboot Mirage CM7 / ICS CM9 Image for SDcard [3/26]", except that I can't post there yet.
I was able to create a working dual boot card per the instructions. However, I could not make a working card that made use of all 16 GB of my card, rather than just the <4GB size of the image file. The card still worked when I used fdisk on my Mac to increase the size of the last, 'sdcard', partition to fill up the available space. However, that did not increase the capacity of the FAT volume in that partition, leaving the extra space still unavailable.
After saving the files from that volume, I then used the Mac's Disk Utility to erase the partition and re-create it as a FAT partition using all the available space. Once I did that, unfortunately, the Nook would then not recognize anything on the SD card and would only boot into the Nook's own ROM.
As an alternative, I tried leaving the existing partitions alone and editing the MBR with fdisk to create a new partition using the available space, which I then formatted as a FAT partition with Disk Utility. Again, the Nook would no longer recognize the SD card and would only boot into its stock ROM.
I actually tried the above with two 16GB SD cards, a SanDisk Class 4 and a Samsung Class 10, and with two Nooks. Moreover, I tried a number of manipulations of the MBR, mostly to make it identical to the original one except for necessary size changes. Nothing worked to get a card that would boot and use the full 16 GB. I'll admit I haven't tried everything, such as trying to resize to something less than the full 16GB, but I've put so much time into this already that I don't want to do any more until I get some feedback.
Click to expand...
Click to collapse
Well you're missing just one step after fdisk. If Disk Utility is failing at it you could try terminal:
First you need to find out where your /sdcard is being mounted at. Use "diskutil list" to find out
Once you find out where it's being mounted (eg. /dev/disk4s7). You will then need to unmount the volumes before you can format it.
Code:
$ diskutil unmountDisk /dev/disk4s*
$ diskutil partitionDisk "/dev/disk*" 1 MBRFormat "MS-DOS FAT32" "sdcard" "*M"
Replace * with the actual values needed. You might need "sudo" to perform the format command. Make sure you're formatting the correct mount point or else you might end up wiping your system. But if you were able to use fdisk, I'm sure you have a good understanding of terminal.
Haven't tried it myself. But it should(might) work.
-Racks
Won't "diskutil partitionDisk ..." wipe out all volumes on disk?
racks11479 said:
[See previous post!]
Click to expand...
Click to collapse
When I type
Code:
diskutil partitionDisk
in Terminal to get usage info, I see, inter alia, the following:
Code:
(Re)Partition an existing disk. All volumes on this disk will be destroyed.
But that is clearly not what I want to do. Am I missing something?
Updated update:
I have tried, several times and on both SD cards and both Nooks, diskutil eraseVolume, a presumably more powerful version of the erase option in Disk Utility. I tried one or another of the commands:
Code:
diskutil eraseVolume MS-DOS sdcard /dev/disk4s7
diskutil eraseVolume 'MS-DOS FAT32' sdcard /dev/disk4s7
on cards that were booting, but with the small sdcard partition or the small volume on the enlarged partition. I also tried at least one of those commands on a card that was already not working after modification. In all cases, the commands ran without error but produced a non-booting card. Changing the 'ob' partition id back to 'oc' with fdisk didn't help, nor did any restoration of the original fdisk MBR info.
In sum, the only change that I have been able to make to a card as originally written from the image without making it unbootable was to enlarge the sdcard partition while leaving the sdcard volume untouched, and therefore not using most of the capacity of the partition.
Some more general but related questions.
Since I've got your attention, Racks, let me ask a few questions whose answers might help me and others understand what is going on here and what might go wrong with this and other Nook Color boot setups. Of course, also please point out where anything I think I know is, in fact, wrong.
1) I understand that the firmware boot code on the Nook first looks for something on an inserted SD card to boot from. It seems it looks for a file named u-boot.bin on the first partition of the inserted card to which to transfer control. Does it also check other things on the card before transferring control to u-boot.bin? Does it look at the file MLO? Does it look at the partition labeled sdcard, or at any other partition, before doing so?
2) Presuming that it does transfer control to u-boot.bin, what does the latter check before either booting from the (default) ROM on the card or, if the Home button is being held down, going to the interactive boot dialogue? My experience has been that, when using one of my 'non-working' cards, the Nook goes quickly to the ROM on internal memory without showing any visible signs of doing anything else first. In other words, it 'knows' that it can't boot from a ROM on the sdcard before actually trying to do so.

[Q] Different partition sizes in CM7 SD installer

Hi. Did my usual +3 hours googling but came empty handed.
Could size-agnostic CM7 SD installer script be modified so that /Data partition is set to 2Gb instead of 1Gb? I know that I can always do the "move to SD" routine but Android keeps bugging me that I`m out of space even when I have 170Mb free on /data. And also moving apps back and forth from internal to SD somehow wrecked my system process. As a result I now have constant rebooting of the launcher as my only Android experience. Uninstalling recent apps did not work. Neither did freeing up space on SD and denying root to all apps that previously asked for it.
zuzka said:
Hi. Did my usual +3 hours googling but came empty handed.
Could size-agnostic CM7 SD installer script be modified so that /Data partition is set to 2Gb instead of 1Gb? I know that I can always do the "move to SD" routine but Android keeps bugging me that I`m out of space even when I have 170Mb free on /data. And also moving apps back and forth from internal to SD somehow wrecked my system process. As a result I now have constant rebooting of the launcher as my only Android experience. Uninstalling recent apps did not work. Neither did freeing up space on SD and denying root to all apps that previously asked for it.
Click to expand...
Click to collapse
If you are willing to start from scratch you can burn the image again to the SD, but don't put any zips in it. Boot and let the script create the new partitions. Then put the card back in the PC and use Mini-Tool Partition Manager to shrink partition 4 (sdcard) and grow partition 3 (data) That program will handle the ext partition (3) as long as there is no data written to it yet. You can get that program free on the internet. Do a Titianium backup of your apps and data and restore later.
Edit: Now after thinking about it, you may be able to doctor your existing card. Partition 4 is fat so you can shrink it with data in it. Take the space off the front. Then I think the program will let you grow partition 3 into the empty space even with data already in it. It is just trying to move it with data does the program balk. Windows does not know how to read ext. Of course if you are running linux, just use gparted to do everything.
Yes, you could do that or you could use a program like easeus partition manager and move the partitions around after the first boot of the card.
Edit (while typing): It looks like you might be talking about an internal installation in which case you don't need to use size agnostic SD installer. Just repartition the internal the way you want it (there are threads for this) then flash your CM7.
Edit 2: beat out by leapinlar while editing 1
JP
Thanks for the idea of repartitioning prior to installing CM7. I`ll also try to repartition SD the way it is now- with data. I was concerned that /data partition is unmountable under Ubuntu when /boot and /system can be read without problems.
Hi again. I`ve managed to srink /sdcard partition under Windows and sort of grow /data partition under Ubuntu LiveCD (gparted froze right after doing its magic).
Boot loop on my Nook stopped as free space on /data increased from 175Mb to 1.2Gb. So I guess I wont be doing a fresh install at the moment.
Question is, exactly how much free space does CM7 need on /data partition? In a real world?
(at ~200Mb it starts bugging me about free space but overall Android stays stable)
zuzka said:
Question is, exactly how much free space does CM7 need on /data partition? In a real world?
(at ~200Mb it starts bugging me about free space but overall Android stays stable)
Click to expand...
Click to collapse
Original Nook Color had 1GB for data. B&N upped it to 5GB on the new Nook Colors. I personally would make it 2GB unless you are going to be adding some really big apps.
Sent from my Nook Color running ICS and Tapatalk

Categories

Resources