SD Card Formatting - Windows Mobile Development and Hacking General

Hi everyone,
I need to Format a SD Card (programatically ), and I havn't got the foggiest on where to start, I mean, do I need to build the whole structure on the card myself, or is there some API level I can go to to do the job.
Can anyone help me out here?

I just completed that from my linux box
I did this from my linux box to get set up for linux on the HTC apache and was listing all the gory details.
Code:
fdisk /dev/sdb //after verifiing itis correct device
p //print out partition table
d //delete existing partition if not 32M fat 16
n //new partition
p //primary
1 //number
<cr> //Accept default of first cylinder
+32M //make it 32M in size
t 6 //change it to fat16 type
n //create another partition
p //chose primary, even though it is callet ext3
2 //number it 2
<cr> //accept default
<cr> //to use rest of stick
t //set it's type
2 //select second partition
83 //type is linux (ext2 or ext3)
w // write table or you get to do it again
Unplug it and count to 5, plug it back in and cd /dev and "ls -al |grep sd"
it will probably be in a differnt location.
mkdosfs /dev/sdc1 //format the FAT16 partition In gentoo, this was in dosfstools'
mkfs.ext3 /dev/sdc2 //format the linux partition
//create a pair of mount points and mount them
cd /mnt
mkdir MiniSDDos
mkdir MiniSDLinux
mount /dev/sdc1 /mnt/MiniSDDos
mount /dev/sdc2 /mnt/MiniSDLinux
transfer rd,zimiage,default.txt and gnuharet-200603042123.exe to dos partition

Related

Apps2Sd + Hero

So I did a wipe on my phone and installed Hero. Whenever I try to install an app it says "insufficient storage". I only have 9Mb available in my internal memory.. why is it so little?
I just formatted my 4Gb sdcard to Fat32 and ran sdsplit and got the following::
Code:
$ su
# lucid -s
/data/app is not linked
/data/app-private is not linked
/data/data is not linked
/data/dalvik-cache is not linked
/system/media is not linked
-------------------------
-------------------------
2.0K /system/sd
# du -s /sdcard
16 /sdcard
# df /data
/data: 91904K total, 82108K used, 9796K available (block size 4096)
# /data/sdsplit -fs 3600M
--------------------------------------
+You have chosen to perform the following actions:
.BACKUP /sdcard contents to /data
.CONFIGURE system to mount EXT2 partition
!WARNING! Do NOT do this on JF1.5 builds!
.REPARTITION sdcard: 3600M FAT / EXT2
!WARNING! Will DELETE data on sdcard!
.MAKE FAT32 and EXT2 filesystems
.RESTORE /data to sdcard
ARE YOU SURE YOU WANT TO PROCEED? y/N
y
--------------------------------------
+Checking validity of mkdosfs
1+0 records in
1+0 records out
1 bytes transferred in 0.001 secs (1000 bytes/sec)
--------------------------------------
+Checking validity of mke2fs
--------------------------------------
+Backing up /sdcard to /data
--------------------------------------
+Backing up and Updating /system/init.rc
--------------------------------------
+Backing up and Updating /system/etc/mountd.conf
WARNING: /system/etc/mountd.conf backup /system/etc/mountd.conf.orig already exists!
Do you want to overwrite it? y/N
y
--------------------------------------
+Partitioning sdcard
--------------------------------------
+ Blank out the 4 first blocks of the sdcard so that mountd does not try to remount it on fdisk write preventing a kernel partition table re-read.
4+0 records in
4+0 records out
2048 bytes transferred in 0.006 secs (341333 bytes/sec)
--------------------------------------
+ Wipe partition table and create FAT32 3600M/EXT2 partitions
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that the previous content
won't be recoverable.
The number of cylinders for this disk is set to 125632.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that the previous content
won't be recoverable.
The number of cylinders for this disk is set to 125632.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): Command action
e extended
p primary partition (1-4)
Partition number (1-4): First cylinder (1-125632, default 1): Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-125632, default 125632):
Command (m for help): Selected partition 1
Hex code (type L to list codes): Changed system type of partition 1 to b (Win95 FAT32)
Command (m for help):
Disk /dev/block/mmcblk0: 4116 MB, 4116709376 bytes
4 heads, 16 sectors/track, 125632 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 109864 3515640 b Win95 FAT32
Command (m for help): Command action
e extended
p primary partition (1-4)
Partition number (1-4): First cylinder (109865-125632, default 109865): Using default value 109865
Last cylinder or +size or +sizeM or +sizeK (109865-125632, default 125632): Using default value 125632
Command (m for help): Partition number (1-4): Hex code (type L to list codes):
Command (m for help):
Disk /dev/block/mmcblk0: 4116 MB, 4116709376 bytes
4 heads, 16 sectors/track, 125632 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 109864 3515640 b Win95 FAT32
/dev/block/mmcblk0p2 109865 125632 504576 83 Linux
Command (m for help): The partition table has been altered!
Calling ioctl() to re-read partition table
--------------------------------------
+Creating FAT32 Filesystem
opening /dev/block/mmcblk0p1
/dev/block/mmcblk0p1: 7017536 sectors in 877192 FAT32 clusters (4096 bytes/cluster)
MBR type: 11
bps=512 spc=8 res=32 nft=2 mid=0xf0 spt=7031280 hds=0 hid=0 bsec=7031280 bspf=6854 rdcl=2 infs=1 bkbs=2
--------------------------------------
+Creating EXT2 Filesystem
mke2fs 1.41.3 (12-Oct-2008)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
126480 inodes, 504576 blocks
25228 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67633152
62 block groups
8192 blocks per group, 8192 fragments per group
2040 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
--------------------------------------
+Mounting FAT Filesystem
Usage: mount [-r] [-w] [-o options] [-t type] device directory
--------------------------------------
+Mounting EXT2 Filesystem
Did not find ext2.ko, (normal on JF1.5)
Usage: mount [-r] [-w] [-o options] [-t type] device directory
--------------------------------------
+You should now have a FAT partition on /sdcard and an EXT2 partition on /system/sd. If things worked, you should see an entry for /sdcard and /system/sd below:
--------------------------------------
+Restoring /data/sdcard to /sdcard
cp: cannot create directory '/sdcard/.footprints': Read-only file system
Permission setting errors are normal on a FAT system
===ERROR: restore failed!

[fix new sdcard] little Solution (Partitioning)

hi
I have two 8GB class4 memory card but when I'm just a partition're doing very bad work
Android is reset
apps are broken
High and low speed is
And ...
But when a 2GB partition, I just work very well
Benchmarking partition is much better!
no more problem in android!
So I decided two partitions 2 and 6 GB and the second partition so I just do mount
Method:
1- Memory partitioning (first partition 2gb fat32)
2- copy android in first partition & run it
3- in android terminal type:
Code:
ls /dev/block/m*
or adb
Code:
adb shell ls /dev/block/m*
result like this:
Code:
/dev/block/mmcblk0
/dev/block/mmcblk0p1
/dev/block/mmcblk0p2
/dev/block/mmcblk0p3
Partition testing can be yours for the mount
1- make a folder (not in /sdcard & /mnt/sdcard)
Code:
mkdir /mnt/sd2
now test (for fat32): (just change mmcblk0p2)
Code:
mount -t vfat -o fmask=0000,dmask=0000,rw,flush,noatime,nodiratime /dev/block/mmcblk0p2 /mnt/sd2
(for ext2)
Code:
mount -t ext2 -o noatime,nodiratime /dev/block/mmcblk0p2 /mnt/sd2
Now the partition should be on the /mnt/sd2 mounted
and you can mount in boot
backup /init
open init and past mount cammand below this line :
Code:
PATH=/sbin:/system/sbin:/system/bin:/bin:/system/xbin:/system/xbin/bb:/data/local/bin
now we have auto mount partition
but we have one problem! we should link /mnt/sd2 > /mnt/sdcard
Who s the solution?
interesting idea. will try out.

Resize sdcard partition on mac

I am trying to resize the sdcard partition on the bootable cm7 sd card image. I am able to resize it using Windows and Linux, but haven't found an easy way to do it via Mac OS using the built in sdcard reader. Does anyone know how to accomplish this?
Have you tried disk utility?
Sent from my NookColor using XDA
I have. It doesn't allow me to change the size of the last partition on the card.
You can use the Sudo command to format your card on the mac from the command line. Just type Type sudo or su -
fdisk /dev/sda
mkfs -t vfat /dev/sda1
That should format your card. Just partition with fdisk. Be sure to choose the whole device (/dev/sdc), not a single partition (/dev/sdc1).
fdisk is started by typing (as root) fdisk device at the command prompt. device might be something like /dev/hda or /dev/sda.
To check the list of devices available type fdisk -l
The basic fdisk commands you need are:
p – Print the partition table.
n – Create a new partition.
d – Delete a partition.
q – Quit without saving changes.
a – Make a partition bootable.
w – Write the new partition table and exit.
Changes you make to the partition table do not take effect until you issue the write (w) command. Here is a sample partition table:
Disk /dev/sdb: 64 heads, 63 sectors, 621 cylinders
Units = cylinders of 4032 * 512 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 184 370912+ 83 Linux
/dev/sdb2 185 368 370944 83 Linux
/dev/sdb3 369 552 370944 83 Linux
/dev/sdb4 553 621 139104 82 Linux swap

Android Batch File to Partition SD Card [11 Jun 2012]

Android Batch File to Partition SD Card
This batch command file invokes the /sbin/parted and /sbin/tune2fs tools hosted by ClockWorkMod (CWM) Recovery 5.0.2.0 to control partitioning of your SD card for a variety of purposes, some of which are listed below.
It is a good idea to review the command line options and parameters of the parted and tune2fs tools: On your phone (for example, via computer-enabled ADB or terminal emulator), get root and enter:
# /sbin/parted --help
# /sbin/tune2fs --help
I decided to make this a separate thread for a number of reasons:
Streamline the process of making room for second ROM in a dual boot configuration (see http://forum.xda-developers.com/showthread.php?t=1651356 ). These commands can theoretically be rolled into a flashable zip to almost fully automate a dual-boot install of fixed ROMs, e.g. CM9 and CM7.
My Dual Boot threads have “sensory overload” written all over them
The amount of material presented here is probably enough to warrant a separate thread
This is an Android-friendly alternative to GParted/MiniTool. For example there is no need to pull SD card, partition and reinsert. Of course, GParted has the pleasant GUI and gives you a chance to review your changes before committing, whereas the Android “parted” tool is highly utilitarian.
Batch commands are quickly and easily modified to create/remove/adjust partitions. The general consensus is that for large files, ext3 R/W speeds are faster than those of FAT32. And ext3[4] is more stable and can handle files exceeding the maximum 4GB allowed by FAT32.
Batch commands are easily modified to perform customizations other than dual boot
Some users may wish to host their entire system on SD card: ROM, music, pictures, movies etc.
Some users may wish to return their SD cards to a traditional single-boot state by running a subset of these batch commands
That said, I strongly advise that you NOT run these commands UNLESS you are comfortable with ALL of the following:
1. /sdcard (FAT32) and ALL subdirectories copied to /emmc/sdcard-backup. Ask yourself: Do I have enough space left on my 10GB emmc partition to host a full backup of /sdcard? AND, will there be enough room on the /sdcard filesystem to restore this backup AFTER downsizing my SD card's FAT32 partition?
2. Any existing ext* partitions of SD card are blown away, for example those generated by a previous dual boot zip install. In other words, you lose /system, /cache and /data from an existing sdcard-based ROM.
3. You MAY lose all data on your (backed-up) FAT32 partition depending on what boundaries were used for resizing.
Note that I do not include a command to push /emmc/sdcard-backup back onto SD card. That is because:
There may not be enough room on /sdcard after a FAT32 downsize, and
There may be a data conflict when flashing a different dual boot configuration as opposed to an updated one. But at least there is a full backup of /sdcard FAT32 --- assuming emmc has enough room to host it.
Presently there is no logic to detect the storage limits of the /emmc and /sdcard filesystems. I will leave that to you.
SO... if for ANY reason you are NOT comfortable with the potential changes outlined above, I recommend that you please STOP HERE and consider researching this topic further until you are comfortable.
For those willing and able to give this a try, I strongly recommend first performing an ADB-assisted run (i.e. with a computer hosting Android SDK Platform Tools) using an SD card with at least 4GB open (to be safe) AND with enough room on emmc to host a FULL backup of your entire /sdcard filesystem (/sdcard and all its subdirectories).
Fully charge your battery! CWM draws a lot of current, even if nothing else is running.
Boot phone to CWM
Connect phone to computer
Launch ADB shell to access phone
# adb shell (can do this on any ADB-enabled machine)
Get root (enter “su” at phone shell command prompt) and copy/paste/enter each and every command (those not prefixed by "echo") in your computer's command window:
Code:
#! /bin/sh
echo "Android batch script to create ext partitions for SD card-based ROM"
echo
echo "First unmount all filesystems of primary (emmc) ROM"
umount /system > /dev/null 2>&1
umount /cache > /dev/null 2>&1
umount /data > /dev/null 2>&1
echo
echo "Mount external (sdcard) and internal (emmc) memory"
mount /sdcard > /dev/null 2>&1
mount /dev/block/mmcblk0p18 /emmc > /dev/null 2>&1
echo
echo "Create sdcard-backup directory on emmc with current date and time"
echo "Recommend delete any unnecessary backups of sdcard at this point"
bkdir="sdcard-backup-`date +%d-%b-%Y-%H%M%S`"
mkdir /emmc/$bkdir > /dev/null 2>&1
echo
echo Backup directory: /emmc/$bkdir
echo
echo "Press ENTER to continue..." ; read
echo
echo "Backing up contents of sdcard FAT32 to emmc"
cp -a /sdcard/* /emmc/$bkdir/
echo
echo Done...
ls -ld /emmc/$bkdir
echo
echo "Unmount internal and external memory"
umount /emmc > /dev/null 2>&1
umount /sdcard > /dev/null 2>&1
echo
echo "Show existing partition map of SD card"
parted /dev/block/mmcblk1 print
echo
echo "Press ENTER to continue..." ; read
echo
echo "Delete any existing ext* partitions and show results"
parted /dev/block/mmcblk1 rm 4 > /dev/null 2>&1
parted /dev/block/mmcblk1 rm 3 > /dev/null 2>&1
parted /dev/block/mmcblk1 rm 2 > /dev/null 2>&1
parted /dev/block/mmcblk1 print
echo
echo "Press ENTER to continue..." ; read
echo
echo "Resize START/STOP values MUST be expressed in MB"
echo "Downsize FAT32 and generate new ext2 partitions"
echo "Resize START/STOP values MUST be expressed in MB!"
echo "This example shows TYPICAL repartitioning of 16GB card..."
parted /dev/block/mmcblk1 resize 1 4.194 10700
parted /dev/block/mmcblk1 mkpartfs primary ext2 10.7GB 11.1GB
parted /dev/block/mmcblk1 mkpartfs primary ext2 11.1GB 11.8GB
parted /dev/block/mmcblk1 mkpartfs primary ext2 11.8GB 13.9GB
echo
echo "Upgrade from ext2 to ext3"
tune2fs -j /dev/block/mmcblk1p2
tune2fs -j /dev/block/mmcblk1p3
tune2fs -j /dev/block/mmcblk1p4
echo
echo "Review changes"
parted /dev/block/mmcblk1 print
echo
echo "Press ENTER to continue..." ; read
echo
echo "Final review. Mount SD card ROM filesystems"
mount /dev/block/mmcblk1p2 /system > /dev/null 2>&1
mount /dev/block/mmcblk1p3 /cache > /dev/null 2>&1
mount /dev/block/mmcblk1p4 /data > /dev/null 2>&1
echo
echo "Show used and available space (in MB) on all mounted filesystems"
df -m
echo
echo "Unmount SD card ROM filesystems"
umount /system
umount /cache
umount /data
echo
echo "Remount emmc ROM /cache (CWM mounts this by default)"
mount /cache > /dev/null 2>&1
echo
echo "Done. Can now (if necessary) wipe /cache and /data for primary ROM and flash dual boot zip"
echo
And now ... here are unedited results of a successful batch run made on 11 Jun 2012 at 1630 PDST
Code:
~ # sh /tmp/part-sdc.sh
Android batch script to create ext partitions for SD card-based ROM
First unmount all filesystems of primary (emmc) ROM
Mount external (sdcard) and internal (emmc) memory
Create sdcard-backup directory on emmc with current date and time
Recommend delete any unnecessary backups of sdcard at this point
Backup directory: /emmc/sdcard-backup-11-Jun-2012-233034
Press ENTER to continue...
Backing up contents of sdcard FAT32 to emmc
Done...
drwxrwxrwx 16 root root 8192 Jun 11 23:36 /emmc/sdcard-backup-11-Jun-2012-233034
Unmount internal and external memory
Show existing partition map of SD card
Model: SD SU16G (sd/mmc)
Disk /dev/block/mmcblk1: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 4194kB 10.7GB 10.7GB primary fat32 lba
2 10.7GB 11.1GB 395MB primary ext2
3 11.1GB 11.8GB 707MB primary ext2
4 11.8GB 13.9GB 2097MB primary ext2
Press ENTER to continue...
Delete any existing ext* partitions and show results
Model: SD SU16G (sd/mmc)
Disk /dev/block/mmcblk1: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 4194kB 10.7GB 10.7GB primary fat32 lba
Press ENTER to continue...
Resize START/STOP values MUST be expressed in MB
Downsize FAT32 and generate new ext2 partitions
Resize START/STOP values MUST be expressed in MB!
This example shows TYPICAL repartitioning of 16GB card...
Information: You may need to update /etc/fstab.
Information: You may need to update /etc/fstab.
Information: You may need to update /etc/fstab.
Information: You may need to update /etc/fstab.
Upgrade from ext2 to ext3
tune2fs 1.41.6 (30-May-2009)
Creating journal inode: done
This filesystem will be automatically checked every 30 mounts or
0 days, whichever comes first. Use tune2fs -c or -i to override.
tune2fs 1.41.6 (30-May-2009)
Creating journal inode: done
This filesystem will be automatically checked every 30 mounts or
0 days, whichever comes first. Use tune2fs -c or -i to override.
tune2fs 1.41.6 (30-May-2009)
Creating journal inode: done
This filesystem will be automatically checked every 30 mounts or
0 days, whichever comes first. Use tune2fs -c or -i to override.
Review changes
Model: SD SU16G (sd/mmc)
Disk /dev/block/mmcblk1: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 4194kB 10.7GB 10.7GB primary fat32 lba
2 10.7GB 11.1GB 395MB primary ext3
3 11.1GB 11.8GB 707MB primary ext3
4 11.8GB 13.9GB 2097MB primary ext3
Press ENTER to continue...
Final review. Mount SD card ROM filesystems
Show used and available space (in MB) on all mounted filesystems
Filesystem 1M-blocks Used Available Use% Mounted on
tmpfs 408 0 408 0% /dev
/dev/block/mmcblk1p2 353 8 326 2% /system
/dev/block/mmcblk1p3 632 16 582 3% /cache
/dev/block/mmcblk1p4 1874 32 1742 2% /data
Unmount SD card ROM filesystems
Remount emmc ROM /cache (CWM mounts this by default)
Done. Can now (if necessary) wipe /cache and /data for primary ROM and flash dual boot zip
~ #
All you brave testers out there, please let me know if you see anything amiss. Thanks!
Disclaimer
Standard disclaimers apply. In short, I am not responsible for any harm you or your phone may incur by using any or all of this material.
Enjoy.
References
http://androidos.in/2009/11/manually-partition-sd-card-for-android/
http://www.gnu.org/software/parted/manual/html_chapter/parted_2.html
http://linux.die.net/man/8/tune2fs
Successfully Installed Dual Boot After Running Batch SD Card Partitioner
Shortly after running Android Batch SD Card Partitioner, I successfully flashed Dual Boot Zip v1.4: http://forum.xda-developers.com/showthread.php?t=1651356 featuing AOKP+Aroma_37a (emmc) and CM7 RC3 (sdcard)
don't know if that is the correct place
Hello,
Thanks for your patch, I am facing an issue with my Atrix (Orange UK), I have scrued up my internal storage, here I have posted once a Question but got no reply from nobody (POST).
Am I right to ask here, or is it wrong place too
Thanks and Thumbs up for the nice work
Ammar
Arwany said:
Hello,
Thanks for your patch, I am facing an issue with my Atrix (Orange UK), I have scrued up my internal storage, here I have posted once a Question but got no reply from nobody (POST).
Am I right to ask here, or is it wrong place too
Thanks and Thumbs up for the nice work
Ammar
Click to expand...
Click to collapse
Hello Ammar,
Please see my answer here: http://forum.xda-developers.com/showthread.php?p=27311205#post27311205
I hope this helps
sendust7

[Q] Plz help unbricking my nook

I have formatted my nook via minitool partitiion manager accidentally... The only backup i have is a 79mb image file i made with roadkil diskimage and reading the threads, i am realising this is not a good backup... indeed i tried restoring this backup via roadkil diskimage but my nook still cannot boot. it says "install failed"
So I am following the instructions here: http://forum.xda-developers.com/showthread.php?t=2104145 and http://forum.xda-developers.com/showthread.php?t=2004630 in the hope of recovering my nook but I am stucked/unsure for some steps... here are the steps i followed in detail below with questions in red:
I made a backup of my nook disk using dd (this tutorial http://forum.xda-developers.com/showthread.php?t=1142983)
But my backup image is 2,000,683,008 bytes instead of 1958739968 bytes as noted in http://forum.xda-developers.com/showthread.php?t=1142983
Is this a problem?
My nook disk looks like this in minitool partition manager:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I used partition recovery to check for my deleted partitions with the following settings
Scanning Range : Full Disk
Full scan
It detected the following partitions... (I don't see the Factory partition and which partitions should I recover?)
I was thinking about recovering the following checked partitions:
Below is how it looks like (I haven't apply changes yet) but this does not match the partitions described in http://nookdevs.com/Nook_Simple_Touch_stock_partition_table
How do i copy the partitions and which partitions should i copy to my sdcard?
Do i need the file Nook Simple Touch Glowlight Image (without Rom partition): goo.gl/W4OYy (280.74mb) from http://forum.xda-developers.com/showthread.php?t=2104145 (The link does not work anymore)
I am stuck now... i don't want to continue without proper guidance... i don't want to mess up... Please take a look at my questions and guide me what to do next. thx in advance
First recover the /rom partition.
16 Meg is the correct size.
Copy all the files to someplace safe.
Make it read-only, burn a CD, whatever.
Make sure that you have sane files.
It would be best if you restore the partition table using nookpart.sh
You need to either use a Linux system and noogie or else get Clockwork Mod Recovery and ADB working and use that shell.
ok thx i have been able to recover the ROM partition. I restored it and save it an sd card. then i wrote the Nook Simple Touch Glowlight Image (without Rom partition) to the internal storage... it have all the partitions. I restored the ROM partition and it booted fine...
only issue i have now is the NST does not recognise the storage/NOOK partition as pointed out in http://forum.xda-developers.com/showthread.php?p=48019675#post48019675
I have run nookpart.sh and here's the result: Does not seem that it has corrected my partition table:
/dev/block/mmcblk0p2 39 46 15360 c Win95 FAT32 (LB
A)
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(9, 175, 39) logical=(38, 0, 1)
Partition 2 has different physical/logical endings:
phys=(11, 153, 14) logical=(45, 63, 32)
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3 47 141 194560 83 Linux
Partition 3 has different physical/logical beginnings (non-Linux?):
phys=(11, 185, 47) logical=(46, 0, 1)
Partition 3 has different physical/logical endings:
phys=(35, 242, 15) logical=(140, 127, 32)
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4 142 926 1607680 f Win95 Ext'd (LB
A)
Partition 4 has different physical/logical beginnings (non-Linux?):
phys=(35, 242, 16) logical=(141, 0, 1)
Partition 4 has different physical/logical endings:
phys=(236, 24, 44) logical=(925, 127, 32)
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5 142 285 294896 83 Linux
/dev/block/mmcblk0p6 286 405 245744 c Win95 FAT32 (LB
A)
/dev/block/mmcblk0p7 406 525 245744 83 Linux
/dev/block/mmcblk0p8 526 926 821232 83 Linux
Command (m for help): 3: unknown command
Command Action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): Command (m for help): 1: unknown command
Command Action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): No free sectors available
Command (m for help): e: unknown command
Command Action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): Command (m for help): 9: unknown command
Command Action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): No free sectors available
Command (m for help): e: unknown command
Command Action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): Command (m for help): 2: unknown command
Command Action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): No free sectors available
Command (m for help): e: unknown command
Command Action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): Command (m for help): 4: unknown command
Command Action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): No free sectors available
Command (m for help): e: unknown command
Command Action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): Command (m for help): 5: unknown command
Command Action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): No free sectors available
Command (m for help): e: unknown command
Command Action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): Command (m for help): 9: unknown command
Command Action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): Partition number (1-8): Hex code (type L to list codes):
Command (m for help): Partition number (1-8): Hex code (type L to list codes):
Command (m for help): Partition number (1-8): Hex code (type L to list codes):
Command (m for help): Partition number (1-8):
Command (m for help):
Disk /dev/block/mmcblk0: 2000 MB, 2000683008 bytes
128 heads, 32 sectors/track, 954 cylinders
Units = cylinders of 4096 * 512 = 2097152 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 38 77808 c Win95 FAT32 (LB
A)
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 0, 33) logical=(0, 1, 1)
Partition 1 has different physical/logical endings:
phys=(9, 175, 38) logical=(37, 127, 32)
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 39 46 15360 c Win95 FAT32 (LB
A)
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(9, 175, 39) logical=(38, 0, 1)
Partition 2 has different physical/logical endings:
phys=(11, 153, 14) logical=(45, 63, 32)
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3 47 141 194560 83 Linux
Partition 3 has different physical/logical beginnings (non-Linux?):
phys=(11, 185, 47) logical=(46, 0, 1)
Partition 3 has different physical/logical endings:
phys=(35, 242, 15) logical=(140, 127, 32)
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4 142 926 1607680 f Win95 Ext'd (LB
A)
Partition 4 has different physical/logical beginnings (non-Linux?):
phys=(35, 242, 16) logical=(141, 0, 1)
Partition 4 has different physical/logical endings:
phys=(236, 24, 44) logical=(925, 127, 32)
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5 142 285 294896 83 Linux
/dev/block/mmcblk0p6 286 405 245744 c Win95 FAT32 (LB
A)
/dev/block/mmcblk0p7 406 525 245744 83 Linux
/dev/block/mmcblk0p8 526 926 821232 83 Linux
Command (m for help): The partition table has been altered.
Calling ioctl() to re-read partition table
fdisk: WARNING: rereading partition table failed, kernel still uses old table: D
evice or resource busy
#
Click to expand...
Click to collapse
I have the same problem!
yeahman45 said:
ok thx i have been able to recover the ROM partition. I restored it and save it an sd card. then i wrote the Nook Simple Touch Glowlight Image (without Rom partition) to the internal storage... it have all the partitions. I restored the ROM partition and it booted fine...
only issue i have now is the NST does not recognise the storage/NOOK partition as pointed out in http://forum.xda-developers.com/showthread.php?p=48019675#post48019675
I have run nookpart.sh and here's the result: Does not seem that it has corrected my partition table:
Click to expand...
Click to collapse
I have the same problem... I have a nook simple touch and I wrote in it a nook simple touch glowlight backup image, is that the problem?
The phrase "install failed" is still appearing.
i HAVE BEEN LOOKING FOR A SIMPLE TOUCH BACKUP IMAGE.
OHH PLEASE.. i THINK i'M CLOSE to recover it!
marya.a said:
I have the same problem... I have a nook simple touch and I wrote in it a nook simple touch glowlight backup image, is that the problem?
The phrase "install failed" is still appearing.
i HAVE BEEN LOOKING FOR A SIMPLE TOUCH BACKUP IMAGE.
OHH PLEASE.. i THINK i'M CLOSE to recover it!
Click to expand...
Click to collapse
what nook simple touch glowlight image did you write onto it?
1) Do you have a backup?
2) First thing to do before making any change is to backup, Use this guide to make a proper backup : http://forum.xda-developers.com/showthread.php?t=1142983
How did you exactly got the "install failed" problem?
I know that link, but it doesnt work right know, my nook is bricked.
I wrote a nook sp glowlight backup that I found in a forum from here. It has around 79 mb (http://forum.xda-developers.com/showthread.php?t=1836188&page=4) and I know I need a 1.82gb backup.
Well, my problem is---> I deleted all paritions from my nook when I was rooting it. I have two backups but any of these works. The first one I made has 79mb (as the file I downloaded from this page) but I think I made it in wrong way; and a second one wich has 1.82gb I think I had made it AFTER I deleted the partitions, because it has anything. But, as I told you, I've made a lot of tries with noogie, and the file I downloaded is the only one that works....so when I wrote the file of the link, the "install failed" appears.
What can I do?
The only solution I see now is: find out a COMPLETE nook sp backup, but I have read that the "complete backups" of 1.82gb have personal information about the reader or something like that, and one wants to share it.
What do u know about it?
marya.a said:
I know that link, but it doesnt work right know, my nook is bricked.
I wrote a nook sp glowlight backup that I found in a forum from here. It has around 79 mb (http://forum.xda-developers.com/showthread.php?t=1836188&page=4) and I know I need a 1.82gb backup.
Well, my problem is---> I deleted all paritions from my nook when I was rooting it. I have two backups but any of these works. The first one I made has 79mb (as the file I downloaded from this page) but I think I made it in wrong way; and a second one wich has 1.82gb I think I had made it AFTER I deleted the partitions, because it has anything. But, as I told you, I've made a lot of tries with noogie, and the file I downloaded is the only one that works....so when I wrote the file of the link, the "install failed" appears.
What can I do?
The only solution I see now is: find out a COMPLETE nook sp backup, but I have read that the "complete backups" of 1.82gb have personal information about the reader or something like that, and one wants to share it.
What do u know about it?
Click to expand...
Click to collapse
1) First thing to do before making any change is to backup, Use this guide to make a proper backup : http://forum.xda-developers.com/show....php?t=1142983
2) Then, with minitool partition manager, use partition recovery (full scan) to recover your partitions especially the ROM partition (the essential partition). Copy the ROM partition to an unallocated space on your harddrive or usb drive.
3) Follow this guide http://forum.xda-developers.com/show....php?t=2104145 for more details, it works!
I have been able to fix my problem with nook partition not mounted correctly.. but i have one issue remaining.... I can mount my /system folder as writable via adb shell... it remains read only.. so i have to use root explorer to move my files into that folder... I am trying to replace the .ttf for unicode support but i often get boot issues when doing so... sometimes my nook does not boot anymore if i had replaced fonts in the /system/fonts ..... any idea? (I didn't have this problem before withe the exact same files i am replacing)
@marya.a
ur only problem that u must have ROM partitions files .... then everything else is fine ..... cuz u just need an nook Image (my last update since i was here the partitioning if NSTwG same as NST) and empty all partitions from any files .... then copy ur Uniq ROM Partition files to ur ROM partition now on ur nook .... get 1.2.1 update ....Re-zipped it with they way u unzipped ...... use CWM .... install the Re-zipped update .... and done ur nook is work
Remember ... the Important files on nook only ROM files ... cuz is unique and if u lost it .....u wont able use wifi and u can just cuz ur nook only with no wifi
Good Luck
@yeahman45
try get another image 1st and then try it and if not workin with u try last thing check (Bad sector on ur internal memory).... Renate is best in Partitioning/mounting nook partition .... she already did that for me once "Big THX to her " , w8 her replay
good luck
yeahman45 said:
I have run nookpart.sh and here's the result: Does not seem that it has corrected my partition table:
Click to expand...
Click to collapse
Unfortunately, there are no good, standardized scripting disk partitioners.
The only thing we have in busybox and CWR is fdisk.
That is interactive.
You can feed it a response script.
The problem is that if anything gets out of sync it will plow ahead with wrong responses.
Unfortunately, that's what your log is showing.
nookpart.sh assumes that all partitions have been deleted.
You must first delete all the partitions manually. (This does not delete any file data.)
Code:
fdisk -C 934 -H 128 -S 32 /dev/block/mmcblk0
Type p to display the current state of things.
Type d and then the partition number to delete it.
Type w to write your changes and exit.
Then try running nookpart.sh again.
Note: Just to be clear, if you are restoring a full (~1.9GB backup) then the partition tables are in the backup.
There is no need to configure the partitions in that case.
yeahman45 said:
I can mount my /system folder as writable via adb shell... it remains read only..
Click to expand...
Click to collapse
Huh? That's confusing. Which way did you mean?
Code:
mount -o rw,remount /dev/block/mmcblk0p5 /system
yeahman45 said:
I am trying to replace the .ttf for unicode support but i often get boot issues when doing so.
Click to expand...
Click to collapse
Huh? The Nook is already fully UTF-8.
Do you mean adding the glyphs for some language?
Which files are you trying to replace?
Are you doing this over ADB or in a file manager?
Safest way: Use ADB, use the stop command to shut down the Android subsystem, copy the files, then use the reboot command.
Renate NST said:
Unfortunately, there are no good, standardized scripting disk partitioners.
The only thing we have in busybox and CWR is fdisk.
That is interactive.
You can feed it a response script.
The problem is that if anything gets out of sync it will plow ahead with wrong responses.
Unfortunately, that's what your log is showing.
nookpart.sh assumes that all partitions have been deleted.
You must first delete all the partitions manually. (This does not delete any file data.)
Code:
fdisk -C 934 -H 128 -S 32 /dev/block/mmcblk0
Type p to display the current state of things.
Type d and then the partition number to delete it.
Type w to write your changes and exit.
Then try running nookpart.sh again.
Note: Just to be clear, if you are restoring a full (~1.9GB backup) then the partition tables are in the backup.
There is no need to configure the partitions in that case.
Click to expand...
Click to collapse
yup i have already succeeded in re-creating the partitions thx! i deleted the partitions(using create partition table in GParted) and run your script and it's ok now! thx!
problem now is :
I cannot mount my /system folder as writable via adb shell... it remains read only.. so i have to use root explorer to move my files into that folder... I am trying to replace the .ttf for unicode support but i often get boot issues when doing so... sometimes my nook does not boot anymore if i had replaced fonts in the /system/fonts ..... any idea? (I didn't have this problem before withe the exact same files i am replacing)
I used glownooter previously(before my bricking story lol) and was able to mount /system and add files to it with no issues...but this time(after having recovered from my bricking story) i rooted with nook manager... do you think it's related to the rooting methods or my partitions are still not ok?
Renate NST said:
Huh? That's confusing. Which way did you mean?
Code:
mount -o rw,remount /dev/block/mmcblk0p5 /system
Huh? The Nook is already fully UTF-8.
Do you mean adding the glyphs for some language?
Which files are you trying to replace?
Are you doing this over ADB or in a file manager?
Safest way: Use ADB, use the stop command to shut down the Android subsystem, copy the files, then use the reboot command.
Click to expand...
Click to collapse
yup i am using mount -o remount,rw /system in shell, even used su but the system remains readonly.. no idea why...
trying to add fonts with chinese support.. since i can't push it via adb, i am using root explorer to replace the ttf files... but sometimes it freezes my nook and it does a bootstuck... cannot reboot... I had it two times, one i pasted a font and my nook freezed and another one when i tried to move an apk to system/app ... first time i solved bootstuck by restoring the system/fonts with original.. second time it did not worked.. i had to do a dd restore image... and root again...
Some infos
using grep:
# mount | grep system
mount | grep system
/dev/block/mmcblk0p5 /system ext2 rw,errors=continue 0 0
trying to push a font
adb push Y:\nook\fonts\Caecilia.ttf \system\fonts
failed to copy 'Y:\nook\fonts\Caecilia.ttf' to '\system\fonts': Read-only file system
edit: tried booting with noogie and replace my fonts on linux but i got some weird error : Error splicing file: no space left on device... i have deleted the whole fonts folder and pasted an original stock backup, still getting that error : Error splicing file: no space left on device (although i should have plenty of space as i have deleted the /fonts folder) ... and my nook does not boot anymore once again...
edit2: please help i am getting desperate... my nook does not boot anymore again after i have replaced the fonts with it.. is it a problem with my partition? what are the commands i need to run to see if everything's ok with my partition.. should i try another root method .. i bought the nook to offer it as a gift to someone who reads chinese.. that's why i am trying to install chinese fonts on it before giving it. Did i messed up with the partitions permanently when i deleted all the partittions?
Check how much space you have:
Code:
df
/system: 285583K total, 216938K used, 68645K available (block size 1024)
Check the mount (again):
Code:
mount
/dev/block/mmcblk0p5 /system ext2 rw,errors=continue 0 0
Check the permissions:
Code:
ls -l /
drwxr-xr-x root root 2012-12-22 10:21 system
ls -l /system
drwxr-xr-x root root 2013-03-19 20:18 fonts
Check writing a file:
Code:
cd /system/fonts
echo Hello > hello.txt
cat hello.txt
Hello
where should i execute these commands? in linux via noogie? whenever i put something in /system via noogie and linux, my nook does not boot anymore ... is that normal?
I have rooted once again using glownooter vs nookmanager this time and i am now able to push to the /system folder! finally lol ... i suppose nookmanager did not root it properly.. will stick with glownooter for now but i miss nook mod manager and its patches (any idea how to apply them with glownooter?)
Problem again! It does not boot again .. but last time i was stuck at "Reading forever", now it gets past this screen and when showing the progress dots, the dots move but the screen flashes each time and this cycle goes on forever.. any idea? is this normal that i get these booting issues when replacing fonts in /system/fonts???
edit: do i get adb with cwm? where's the settings for enabling adb in cwm?
Your Nook should re running in Nook alright before you start trying to change fonts.
You should have ADB running.
As you probably know, it's not normal for the dots to flash and restart.
You need ADB and logcat to see what it doesn't like.
It will tell you what the problem is.
I have never tried noogie with Linus or Nookmanager or Glownooter or Modmanager.
ok thx so adb should run even at boot time? i just need to connect it via usb? adb is not detecting it atm

Categories

Resources