Supporting alternative filesystems (ext, NTFS, others) in your external SD - Galaxy S I9000 General

Update: The SD card I'm using for this is brand new and it is showing corruption sometimes. I think that the SD card is broken but I'm not sure. While I am debugging this I will not give more details to avoid other's damage. In the meantime, if someone is interested and wants to take the risk, please PM me.
------
In summary, this is a method to mount from the PC a sd-ext formatted partition on the SD card inside the phone.
The linux kernel inside Android can potentially understand ext2/3/4, NTFS and other advanced filesystems, but you have to mount them manually to see their data within the phone. That is a hassle, but it can be solved if you are root. However, if you connect your phone to your PC with this setup the alternative filesystems in the external SD card cannot be seen from the PC.
I did not find in Internet how to solve the latter issue, but I figured it out. So here I will explain how:
see the ext4 partition within the phone <-- this is not new!!
see the ext4 partition by connecting the phone to a Linux PC <-- these are the news!!
I do not have a lot of time now to explain the steps in detail. I will update the post later, but basically:
- Using Ubuntu and gparted, I formatted my external SD card with 2 partitions: first one small (32MiB) FAT to satisfy Android and second one big (~16GiB) ext4 where my data remains. This assures that the FAT filesystem cannot grow above the 32MiB limit.
- Then, with Ubuntu and fdisk I deleted (yeah!) the partition table and created a new partition table that says that the FAT filesystem occupies the entire SD card space. This step is the important, it means that the whole card will be exported from the phone when connected to a PC (since the partition table says that there is only one big partition for the whole SD card). However, due to the small size format in the first step the FAT partition cannot grow above the 32MiB mark (where the ext4 filesystem still resides).
- With this setup you can still access the ext4 data (it will not be touched by FAT accesses!!) using mount and the loop device, both from within the phone and from a PC with Linux (if you have another OS, maybe you can use a VM with Linux).
More or less, that's all without the details. I'll update this post later with a step-by-step guide.

Thanks to share that information...

You are welcome. It is a pity that my SD card is not working properly with my phone (it works Ok in the PC). I think that it is a kernel (Froyo) problem so I planned to upgrade to Gingerbread before doing more tests. But right now I have no time...

Related

Problems with Linux Swap partition

So I've been trying to partition my stock 1GB sd card with the 3 partitions required: FAT32, Ext2 (or 3), and Linux Swap, but everytime I do it, my phone says the sd card is unreadable. Why is this? To get my phone to re-recognize my sd card, I have to re-format my entire sd card to new. I am able to partition it witht the first 2 partitions, but when I add the Linux Swap, I end up with the same issue. Is there something I am doing wrong? I am making the Linux Swap partition about 32mb and leaving about 2-3mb free (unallocated). I am using Wibu Linux for Windows and GParted to do the partitioning. Please help, and thanks in advance.
You could try GParted Live...
that worked for me... Be sure to make both the FAT32 and Ext2/3 partitions PRIMARY PARTITIONS.
Also, go ahead and make the first two partitions and leave enough space for a 32MB linux-swap partition but don't create it yet. Or make the partitions one at a time to see if you problem lies w/ one of the steps.
Not completely familiar with Wubi linux, seems to be an odd build to me. Try the Gparted live distro, I think you'll be pleased with the results.
Good luck!
There is NO NEED to make a separate partition for swap. Just create an empty FILE of the size that you want and mkswap it, i.e. 'dd if=/dev/zero of=/mountpoint/swapfile count=64000; mkswap /mountpoint/swapfile' to make a 32MB swap file. Note count=64000 -- thats 64000 blocks with default block size of 512 B, 64000x512B = 32MB. Then just mount the swap as normal; 'swapon /mountpoint/swapfile'.
** There is no performance difference.
** Best to put it in your ext2 filesystem since it won't be unmounted when you want to mount the fat partition as a usbdisk.

SD card lost with message "Removed SD card" after update to cyanogenmod

Did not get any help in cyanogenmod thread, so creating a separate thread here.
I am in trouble. After I updated my ROM to cyanogenmod 3.6.7.2 (with his recovery image 1.3.1 and latest radio) I get a message saying: "Removed SD Card" in the notification and I am getting force closes in apps which access sd card.
Why did it remove my sd card? I have the following partition structure"
c (formatted fat32) 2GB - this is what used for upgrading the radio and rom.
83 (formatted ext4) 6GB
c (formatted fat32) 7GB
82 (mkswapped) whatever left off from 16GB card.
Is this structure causing the issues? I used Linux 2.6.30 and e2fsprogs 1.41.7 to format ext4 and dosfstools 3.0.2 to format fat32 FSs.
I ran fix_permissions from recovery console because I was getting FCs in powermanager (which logs files on SD card).
Also, if I boot into the recovery console, I can mount /sdcard and it automatically mounts the first fat32 partition on /sdcard. I can 'fdisk -l' and see all my partitions are there. So, its not a hardware issue. Some sort of chicken&egg because of apps2sd.
I just mounted the partition2 (which is ext4) in recovery console and I can see there are "app app-private dalvik-cache lost+found" folders on it. So, it looks like normally initialized.
Does anybody know what's going on here? Appreciate your help!
It's the same response you've been getting in the other section.
Try backing up your data on your computer, and completely formatting your card to fat32.
From there, instead of making the partitions on the computer, use the Recovery Console (accessed from Cyano's Recovery) and re-create the partitions as you like.
Ok, I delete the 3rd and 4th partitions, and it seems to be working fine now. So, it seems like there is an assumption about the partition structure in the code somewhere.
devsk said:
Ok, I delete the 3rd and 4th partitions, and it seems to be working fine now. So, it seems like there is an assumption about the partition structure in the code somewhere.
Click to expand...
Click to collapse
So you are all good now?
What exactly did you do? Just remove the 3rd & 4th partition, without formatting?
akapoor said:
So you are all good now?
What exactly did you do? Just remove the 3rd & 4th partition, without formatting?
Click to expand...
Click to collapse
Yeah, I just removed the 3rd and 4th partitions from recovery console and the card is recognized and working fine. Now, I need to find out why is it hard coded like that.
It seems like something doesn't like more than 3 partitions on the SD card. I now have 3 partitions with 'c' (fat32), '83' (ext4) and 'c' (fat32) codes and it seems to work fine.
An ext partition of more than 1.5gb can cause problems
Most roms will not work with the way you had it set up (at least not well)
They follow a 3 partition scheme as such
FAT32 > EXT > SWAP
B-man007 said:
An ext partition of more than 1.5gb can cause problems
Most roms will not work with the way you had it set up (at least not well)
They follow a 3 partition scheme as such
FAT32 > EXT > SWAP
Click to expand...
Click to collapse
I've heard this repeated elsewhere but nobody ever actually says what the problem is with partitions greater than 1.5gb. I'm very curious to know, because I haven't noticed anything wrong.
Except that /sdcard won't automount if my sd card has 4 partitions defined on it. As soon as I mark the 4th one empty and reboot, it's fine again. But that has nothing to do with the size of the ext fs on partition 2. Something with vold is funky, because I can mount /sdcard manually from adb.

[Gparted] Nook Simple Touch resize partitions non-destructive

!! Important: Make a backup of your Nook device first !!
Resize partitions
1. Download Gparted LiveCD
2. Extract onto FAT / FAT32 USB memory stick or burn to CD-ROM
3. If on a USB memory stick, run \utils\win32\makeboot.bat from the memory stick.
Do NOT run makeboot from a hard disk!
4. Boot computer from USB device into Gparted
5. Connect your Nook running Noogie of a Micro USB card (this will make the partitions visible to Gparted).
6. Resize the last partition (nr 8) labelled "data" (= Barnes & Nobles content)
Make sure to move the partition to the far right.
7. Move the next-to-last partition (nr 7) labelled "cache" without resizing it.
8. Extend the next-to-next-to-last partition (nr 6) labelled "nook" (Side loaded content) to fill the gap.
9. Remove USB cord, Micro USB card and boot your Nook.
10. In Settings you can inspect the amount of storage space.
I received errors when the partitions were about to be moved on the disk.
I changed the partitioning resize to field where it says "Align to:" from "MiB" to "Cylinder". After a 2nd attempt and doing each partition individually all worked out well.
For those only with Windows, download Gparted LiveCD iso image and use virtualbox to boot from it. It still worked well.
Edit: I successfully repartitioned two of my Nook Simple Touch using the method above + virtualbox + Gparted LiveCD iso.
Surprisingly, the size of partitions in my two NST were slightly different, suggesting that the physical size and location of partitions don't matter as long as their order and type in the partition table are as expected and the size is big enough to hold files there. I resized and moved the last three partitions as I wanted several times and made sure they work well.
Factory reset, upgrade to 1.2.1 (this seems to require the cache partition to be big enough to hold the firmware update file: something like 128MB worked for me), rooting all worked well with resized partitions. I ended up shrinking the cache partition down to 32MB and the data partition to 128MB, reserving 1.11GB for the side-loaded contents. I'm sure the system partition can also be shrunken, but I didn't go that far.
Why a live cd? Does installing gparted to whatever linux flavor you're using not work?
I don't use linux on my PC... only on hacked router & nas.
Goggles2114 said:
Why a live cd? Does installing gparted to whatever linux flavor you're using not work?
Click to expand...
Click to collapse
So dump Noogie on a microsd card run noogie and while noogie's running plug nook into pc? Do you just plutg it in and it does everything auto, or does something in noogie need to be run? Does this work on a nook touch glow?
Sorry to sound so dense but rooted using NookManager.
Edit more to the point it's throwing up an error when trying to move sdb8 around. It shrank fine just won't move. Not sure why. Not getting any useful error messages. Just 'can't have overlapping partitions.'
Odd. I was able to move it twice and get it to behave. Yet do the same n one move and Nothing. Apologies for the rinning Log just. Meh. The rest of the partitions resized in one step. sdb8 was the one that needed two steps.
Aaaand Success. Showing up as having 913MB free as opposed to like 212 or whatever.
Edit: now I'm getting a constant 'low space' warning from nook (understandable.) And installing apps is hit/miss on if they'll actually install. Keeps claiming space issues.
Query. Do apps install to the BnN partition or where?
Good to hear another success story. In my case I squeezed all the way to 1.45GB for the side-loaded contents. boot/rom/system/cache/data partitions are shrunken, and factory partition is busted. I had to use fdisk instead of GPartED to completely recreate the partition table, though.
I think, apps are installed to the data partition (the 8th one) under /data/app. Before being installed it's downloaded to cache partition (the 7th one). In my case I gave 16M for cache and 128M for data. If you are low on the data partition and have some space left on the system partition, you can move apps from /data/app to /system/app.
Goggles2114 said:
So dump Noogie on a microsd card run noogie and while noogie's running plug nook into pc? Do you just plutg it in and it does everything auto, or does something in noogie need to be run? Does this work on a nook touch glow?
Sorry to sound so dense but rooted using NookManager.
Edit more to the point it's throwing up an error when trying to move sdb8 around. It shrank fine just won't move. Not sure why. Not getting any useful error messages. Just 'can't have overlapping partitions.'
Odd. I was able to move it twice and get it to behave. Yet do the same n one move and Nothing. Apologies for the rinning Log just. Meh. The rest of the partitions resized in one step. sdb8 was the one that needed two steps.
Aaaand Success. Showing up as having 913MB free as opposed to like 212 or whatever.
Edit: now I'm getting a constant 'low space' warning from nook (understandable.) And installing apps is hit/miss on if they'll actually install. Keeps claiming space issues.
Query. Do apps install to the BnN partition or where?
Click to expand...
Click to collapse
What's the point of doing all this?
You gave a list of instructions, but not the goal they achieve.
L_R_N said:
What's the point of doing all this?
You gave a list of instructions, but not the goal they achieve.
Click to expand...
Click to collapse
Which post are you referring to?
Troute said:
Which post are you referring to?
Click to expand...
Click to collapse
.c0.'s original post.
His instructions describe how to use gparted to resize the partitions on the NST to make full use of the memory available after you have rooted it. I've used gparted before so maybe they were clearer to me than to others but the thread title was the main clue.
Troute said:
His instructions describe how to use gparted to resize the partitions on the NST to make full use of the memory available after you have rooted it. I've used gparted before so maybe they were clearer to me than to others but the thread title was the main clue.
Click to expand...
Click to collapse
I kind of thought that Nook's internal 2GB flash is already sanely formatted (i.e. most space is dedicated to the partition that is mounted at /media). If that is not the case, then that should be noted in the first post. It would also be cool if it said exactly how much space each partition has (I think i saw these partitions back when i've used Noogie to make initial backup of my device, but i don't remember the details), and how much space you would gain, and on which partition (and where it is mounted).
L_R_N said:
I kind of thought that Nook's internal 2GB flash is already sanely formatted (i.e. most space is dedicated to the partition that is mounted at /media). If that is not the case, then that should be noted in the first post. It would also be cool if it said exactly how much space each partition has (I think i saw these partitions back when i've used Noogie to make initial backup of my device, but i don't remember the details), and how much space you would gain, and on which partition (and where it is mounted).
Click to expand...
Click to collapse
Thanks! i did the work 880MB for side loaded content now!!!
on one of my NST i had an issue resizing the FAT32 partition and i had to format it to make it work.
Other than that all went ok!
Thanks
How to maximize RAM available for apps
I found this easy to read table here.
I doubt that I will ever download books from B&N. I want to minimize the space for that. I infer that I should minimize partition 8 that gets mounted to \data. Is there a practical / actual minimum for this?
I see that anything I copy in from my PC over USB is going into media. 100MB should be more than I need. I could put in an SD card for this sort of thing if it grows.
My question is, which partition do I want to increase to make the maximum available to apps downloaded from the google marketplace?
If an application requires a minimum of 512 MB of RAM, which partition(s) do I need to set >= 512?
New additional question: Upon some further research, I see that you can use sd cards for swapfiles to increase system RAM up to a maximum of 4GB. Does anyone know if it is possible to use this built-in storage for the same purpose?
.c0. said:
!! Important: Make a backup of your Nook device first !!
Resize partitions
1. Download Gparted LiveCD
2. Extract onto FAT / FAT32 USB memory stick or burn to CD-ROM
3. If on a USB memory stick, run \utils\win32\makeboot.bat from the memory stick.
Do NOT run makeboot from a hard disk!
4. Boot computer from USB device into Gparted
5. Connect your Nook running Noogie of a Micro USB card (this will make the partitions visible to Gparted).
6. Resize the last partition (nr 8) labelled "data" (= Barnes & Nobles content)
Make sure to move the partition to the far right.
7. Move the next-to-last partition (nr 7) labelled "cache" without resizing it.
8. Extend the next-to-next-to-last partition (nr 6) labelled "nook" (Side loaded content) to fill the gap.
9. Remove USB cord, Micro USB card and boot your Nook.
10. In Settings you can inspect the amount of storage space.
I received errors when the partitions were about to be moved on the disk.
I changed the partitioning resize to field where it says "Align to:" from "MiB" to "Cylinder". After a 2nd attempt and doing each partition individually all worked out well.
Click to expand...
Click to collapse
I have a little (maybe big?) problem. Can't partition with Gparted Live, as gparted scans my /dev/sdb (nook) infinitely. If I plug out my nook, other partitions (in my case: /dev/sda) become visible and ready. Looks like my nook hangs gparted. Tried on 2 different PCs and no effect. Tried different version of Gparted Live (i486 & amd64) - still nothing.
Of course noogie is inside the nook unit, ready and steady. Already made a backup of (non-rooted) device, plus partitions are visible in Minitool Partition Wizard on Windows 7.
What to do in this situation? Is Linux the only safe way to repartition device? Or maybe Minitool would be as effective and safe?
If Linux is the only way to go, how to make nook visible to Gparted?
Please, experts.
DJ Athlon said:
I have a little (maybe big?) problem. Can't partition with Gparted Live, as gparted scans my /dev/sdb (nook) infinitely. If I plug out my nook, other partitions (in my case: /dev/sda) become visible and ready. Looks like my nook hangs gparted. Tried on 2 different PCs and no effect. Tried different version of Gparted Live (i486 & amd64) - still nothing.
Of course noogie is inside the nook unit, ready and steady. Already made a backup of (non-rooted) device, plus partitions are visible in Minitool Partition Wizard on Windows 7.
What to do in this situation? Is Linux the only safe way to repartition device? Or maybe Minitool would be as effective and safe?
If Linux is the only way to go, how to make nook visible to Gparted?
Please, experts.
Click to expand...
Click to collapse
If Gparted doesn't work for you, I'd highly recommend Minitool Partiton Wizard - it's what I used to partiton my Nook. Nice, easy UI, too.
Yeah, I often work with Minitool, but is it as safe as Gparted when it comes to nook?
DJ Athlon said:
Yeah, I often work with Minitool, but is it as safe as Gparted when it comes to nook?
Click to expand...
Click to collapse
Yeah, it is. Just make sure to make a Noogie backup before repartitoning.
Sorry for bugging you, but can't shrink userdata(ext3). What to do? Delete that partition and re-create it or...?
DJ Athlon said:
Sorry for bugging you, but can't shrink userdata(ext3). What to do? Delete that partition and re-create it or...?
Click to expand...
Click to collapse
Yes, delete and recreate is the way to go.
Please, people, help me
Write step to step guide for work with Minitool Partiton Wizard
I want to free the reserved space for B&N books of my NST ver. 1.2.1
The device is already rooted.
I installed Minitool Partiton Wizard on my PC, but after connecting it thru USB cable with my Nook, it only see "official" 240MBs.
Cannot find other around 750 MB reserved storage for B&N books ?
What to do
Explain to me, please

ICS Device Encryption and SDCARD Impact

Damnit.. My company required encryption of the data on my Nexus S when I was testing ICS Beta with Email / Exchange.
Went ahead and encrypted the device.
Then, I wanted to install ICS Combo Beta 11, so I formatted /system /data /boot and tried to install from /sdcard/*.zip.
No luck.
Clockworkmod recovery cannot mount /sdcard anymore.
Wanted to try and format it, but the clockworkmod tries to mount it first, before formatting
HELP!
I'm stuck with only recovery now and no way to get the update package installed
Is there a way to install from zip via the command line?
You should be able to use fastboot to load the rom on your device. I haven't tried it this way before but it should work:
Code:
fastboot update rom.zip [-w if you want to erase data too]
Give it a spin.
The SDCard not being able to be mounted has been covered a few times but I can't recall the proper fix by heart - search around and you'll definitely get some results that can help you with that.
Greetz
Sounds like it's busted.
Sent from my Nexus S using xda premium
Can you still enable USB Mass Storage in recovery? Try reformat the SD from your desktop?
Si_NZ said:
Can you still enable USB Mass Storage in recovery? Try reformat the SD from your desktop?
Click to expand...
Click to collapse
Thought about that, but what filesystem? FAT32?
Sure
Greetz
I had the same problem with one of the first ICS betas.
Formatting to FAT32 on my Mac was not enough, I had also to reformat under Android. Hope, you backed up your data
dr911 said:
I had the same problem with one of the first ICS betas.
Formatting to FAT32 on my Mac was not enough, I had also to reformat under Android. Hope, you backed up your data
Click to expand...
Click to collapse
Definately backed up..
This was a real scare.. I couldn't mount or format from clockworkmodrecovery. All I had was the adb shell and the builtin /sbin commands.
LUCKILY I found this article;
http://forum.cyanogenmod.com/topic/...mmcblk0++mkfs++ext2__fromsearch__1#entry56396
It didn't exactly match what I was experiencing, but the key was the parted program.
Using it, I was able to reformat my media (partition 3) and am now able to repush things to it.
Stupid sdcard encryption..
Reinstalling ICS Beta 11 now
Blood pressure slowly decreasing.. damn that was a nightmare
So some lessons learned;
DON'T try to partition your SDCARD from clockworkmod or Windows or Mac. The USB storage presented to your computer is a single partiton from you mmcblk0 sd storage. If you partition it, you've got a partition inside a partition which will only make sense to your windows/mac system. Inside of Android, the partition is essentially corrupted and it won't mount.
Formatting from Windows only makes it appear to be working.. in reality you've created a second partition and it's corrupted from the Android point of view.
parted is the only way to fix it. from parted do mkfs type fat32 partiton 3 (media) that will reformat the partition correctly and give you access from Android and external USB hosts.
That's weird...
People have been able to format the SD as ext4 on a desktop using Ubuntu for example. I don't understand how that is different to mkfs.ext4 vs mkfs.vfat. I mean why am I confined to formatting on the phone itself? I'm really confused now.
On a side note. What you experienced is totally expected if you think about it carefully. It's like you have just lost the key to open your SD content by wiping the phone, of course it can no longer be mounted. But I'm not sure why it cannot be simply formatted in CWM.
nauckwj said:
Formatting from Windows only makes it appear to be working.. in reality you've created a second partition and it's corrupted from the Android point of view.
Click to expand...
Click to collapse
That means, I should check my SD Card, which I formatted under OSX with Disk Utility?
Maybe I'll do it next time I flash a new ROM, because for now it works fine.
nauckwj said:
Blood pressure slowly decreasing.. damn that was a nightmare
Click to expand...
Click to collapse
Yeah, I had a similar situation a few weeks after I got my beloved NS when I tried Whispercore. The hole NS got encrypted and formatting the system partition in CWM didn't work, but what I read it was luckily due to a problem with the CWM version. Flashing a newer Version of CWM solved the problem. First I was dying!
So, when I encrypted with ICS and got this problem I calmed down much faster
Si_NZ said:
That's weird...
People have been able to format the SD as ext4 on a desktop using Ubuntu for example. I don't understand how that is different to mkfs.ext4 vs mkfs.vfat. I mean why am I confined to formatting on the phone itself? I'm really confused now.
On a side note. What you experienced is totally expected if you think about it carefully. It's like you have just lost the key to open your SD content by wiping the phone, of course it can no longer be mounted. But I'm not sure why it cannot be simply formatted in CWM.
Click to expand...
Click to collapse
My problem was I used the Windows fdisk partitioning utility to repartition my /sdcard partition. That was part of the problem. I did also read how some people were repartitioning the /sdcard partition, which is kind of weird. I can understand why someone might want to reformat it as an ext4 filesystem, but why would you want to partition a partition?
The /sdcard partition is actually the third partition on your mmcblk0 device. If you partition it, most utilities will fail to recognize it as a valid media device anymore, because they expect to be able to read the filesystem data structures when they mount it. These won't exist if a partition table is sitting at the beginning of the blocks.
I couldn't reformat from within CWM because it first tries to mount the partition. if it fails to mount, CWM won't reformat it. Only way to reformat it was with parted, unless you have a working system installation.
Last night I was also able to reformat it from within ICS. Had to do a full factory-wipe from within ICS, then it indicated the sdcard was no longer valid and asked me if I wanted to reformat it. Once I said yes, all was back to normal.
Fun fun

[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.

Categories

Resources