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

Search This thread

aarons510

Senior Member
Mar 28, 2012
72
9
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.
 

racks11479

Senior Member
Jan 2, 2011
990
748
Fresh Meadows
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.

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
 
Last edited:

aarons510

Senior Member
Mar 28, 2012
72
9
Won't "diskutil partitionDisk ..." wipe out all volumes on disk?

[See previous post!]
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.
 
Last edited:

aarons510

Senior Member
Mar 28, 2012
72
9
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.