Related
Hi. I'm trying to install linux onto my pda as im sick of windows mobile. I've managed to un-tar the Angstrom distro and the boot image file onto their correct partitions. This is how my partitions are set-up:
Disk /dev/mmcblk0: 2059 MB, 2059403264 bytes
4 heads, 16 sectors/track, 62848 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 * 1 610 19512 6 FAT16
/dev/mmcblk0p2 611 62848 1991616 83 Linux
I boot the SD-card and load linux. But i'm getting a kernel panic as follows:
VFS: Cannot open root device "mmcblk0p2" or unknown-block(0,0).
I don't know what to do! I'm really stuck and i cannot stand windows mobile 6, i really cannot. Could somebody really help me please.
Thanks people.
Welcome to forums
As we dedicate only to HTC devices, unless your device is listed on the Wiki
http://wiki.xda-developers.com/
Better try here:
http://www.pdastreet.com/forums/forumdisplay.php?f=12
So.. You've plugged your SD to your linux box and want to created aligned partitions with fdisk?
Follow exactly what I'm doing and your partitions will be MB aligned.
At the end you'll get a FAT32 partition for your data and an ext4 partition for data2xxxx scripts.
If you need more partitions, just adapt this tutorial to you needs.
I know some scripts or recoveries do this automatically so no need to remind me
I initially posted this in SuperNova ROM thread but it might worth a separate thread.
I've done this with an old 1GB usb key just to show you the commands, you'll have to adapt to your SD depending on it's size.
When I plugged the flash drive, it got recognized by my system as /dev/sde. It can be different on your system and once again you'll have to figure-out yourself the correct device.
Here as an example I'm splitting the flash drive in 2 partitions. 1st (512Mb) will be for the fat32 partition and will have to be formatted later. The rest is the future ext4 and is about 512MB too.
I'm gonna use 2 magic parameters with fdisk, in order to get 1024Kb clusters (2048x512 bytes) and align easily the partitions. 64 heads and 32 sectors should give 64x32=2048 so that is going to be my params here
Code:
fdisk -H64 -S32 /dev/sde
Command (m for help): p
Disk /dev/sde: 1054 MB, 1054605312 bytes
64 heads, 32 sectors/track, 1005 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sde1 * 1 1005 1028043+ 6 FAT16
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 3, 45) logical=(0, 7, 10)
Partition 1 has different physical/logical endings:
phys=(509, 63, 63) logical=(1004, 3, 32)
Partition 1 does not end on cylinder boundary.
So here I have an old partition on my key (sde1). I delete it first and check that there is no more partition on the drive.
Repeat the process if you have more than 1 partition on your SD.
Make sure that it's clean before proceeding to the next step.
Code:
Command (m for help): d
Selected partition 1
Command (m for help): p
Disk /dev/sde: 1054 MB, 1054605312 bytes
64 heads, 32 sectors/track, 1005 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
Empty! Great! The key is clean. Let's partition it now
Code:
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1005, default 1): 2
Last cylinder or +size or +sizeM or +sizeK (2-1005, default 1005): 512
Command (m for help): p
Disk /dev/sde: 1054 MB, 1054605312 bytes
64 heads, 32 sectors/track, 1005 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sde1 2 512 523264 83 Linux
Ok now I have a partition starting on cylinder 2 and 512Mb in size. If your SD is 16GB, you can use for instance a size of 15GB to leave 1GB for the ext4 partition.
That would give approximately 15x1024=15360 instead of 512. Got it?
Pay attention to the value below "End". Here it is 512 so I will use the next cylinder (513) for the 2nd partition:
Code:
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (1-1005, default 1): 513
Last cylinder or +size or +sizeM or +sizeK (513-1005, default 1005):
Using default value 1005
Command (m for help): p
Disk /dev/sde: 1054 MB, 1054605312 bytes
64 heads, 32 sectors/track, 1005 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sde1 2 512 523264 83 Linux
/dev/sde2 513 1005 504832 83 Linux
Now I have 2 partitions aligned to 1MB but declared as "linux". Let's change that to FAT32 for partition 1.
Code:
Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): c
Changed system type of partition 1 to c (W95 FAT32 (LBA))
Command (m for help): p
Disk /dev/sde: 1054 MB, 1054605312 bytes
64 heads, 32 sectors/track, 1005 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sde1 2 512 523264 c W95 FAT32 (LBA)
/dev/sde2 513 1005 504832 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks
That's all.
Now format 1st partition to FAT32 with this guide:
credits to kd8cgo
Code:
Making an aligned FAT32 format
Anyone can figure out alignment of the partition from many sources already posted on the web.
One thing I could not find was a guide on how to align that pesky FAT32 format so that each
cluster (allocation unit) is aligned inside the boundaries of erase blocks. Well, the Linux mkfs.vfat
utility has all the options we need to make this aligned format possible!
Please view this primer to FAT32 to get an idea of how the system is laid out on your disk.
You normally have the first sector in the partition which is your Volume ID, which sits in the
reserved space which is normally the first 32 sectors in the partition. This is followed
by (2) copies of the File Allocation Tables, which vary in length when created depending on
a variety of factors, including the chosen allocation unit size. The FAT size remains constant
after creation. Please keep in mind for this discussion the physical size of a sector, which is 512 bytes.
The Golden Nugget
We will be changing the reserved sectors from the default value of 32, to a number that
we will calculate from the reported size of the FAT tables after formatting. The goal will be to
make the FAT tables end right at a 128K boundary, so each cluster of the file system will fall
neatly within erase blocks on our disk!
First we will format our disk using FAT32 paying no mind to reserved sectors. This will
report to us our FAT size as so:
[email protected]:~$ sudo mkfs.vfat -F 32 -n UserData -s 32 -v /dev/sde1
mkfs.vfat 3.0.7 (24 Dec 2009)
/dev/sdd1 has 224 heads and 56 sectors per track,
logical sector size is 512,
using 0xf8 media descriptor, with 31309312 sectors;
file system has 2 32-bit FATs and 32 sectors per cluster.
FAT size is 7641 sectors, and provides 977937 clusters.
Volume ID is 40c250bd, volume label UserData .
The juicy bits are that 2nd to last line, it tells you the size on disk of 1 FAT table.
7641 sector FAT x 2 FATs x 512 bytes/sector = 7,824,384 bytes
The above formula shows you the exact amount of space the FAT tables are using at
the beginning of your disk. This number is not usually going to be evenly divisible by
128K (131,072 bytes) as you can see 7,824,384 / 131072 = 59.695 erase block sized
chunks. What we need to do is force the end of those FAT tables to end right at
60 blocks to do so we:
131,072 x 60 = 7,864,320 bytes in 60 erase blocks
7,864,320 - 7,824,384 = 39,936 bytes remainder
39,936 / 512 = 78 sectors remain
New reserved sector count for alignment = 78
Those are all the fundamentals required to align a FAT32 partition, so that
clusters on the disk fall in line with the erase blocks of the physical cell medium.
An example of the format command required:
sudo mkfs.vfat -F 32 -R 78 -n UserData -s 32 -v /dev/sde1
Breakdown:
sudo - super user privledges
mkfs.vfat - create a FAT file system
-F 32 - 32 bit FAT (FAT32)
-R 78 - Use 78 Reserved Sectors (instead of 32)
-n UserData - drive label, up to 11 characters
-s 32 - 32 sectors per cluster 32 x 512 - 16K allocation unit size
-v /dev/sdex - Device to format
Note: If you're getting a R=0, use 256 (256x512bytes=128Kb) as the minimum R value for FAT32 is 2.
Format 2nd partition with the following command, replacing xxx with your device
Code:
mke2fs -T ext4 -b 4096 -E stride=64,stripe-width=64,hash_alg=tea -O extent,^huge_file -m 0 -L userdata /dev/xxx2
You should be good to go now!
Reserved for later
thanks for this you absolute babe <3
Did you read post #7 by CitizenJohn a few posts below the original HOWTO: Increase write speed by 'aligning' FAT32
Tends to contradict the method posted by kd8cgo for Fat32
Presumably both methods can't be correct!
Of course I did. I read many posts about SSDs to come to this tutorial.
First of all I don't use the same geometry for creating partitions.
And so far this way of formatting has always been able to give me the best of all my flash memory based devices, SD and USB keys.
Have you tried both methods? Which of the two gave you the best results?
I'm gonna try it again, maybe I missed something the first time.
Of course if there is a proven better way to get even more from our flash drives and SDs, I'll gladly learn it and change the tutorial accordingly.
EDIT:
Posted atto results for both methods on a pretty old flash drive. Left is formatted with the post you mentioned and right is with the "standard" method.
Don't see much of a difference.
I have but quite a while apart, i didn't use any software to measure transfer speed but using a sd-card adapter according to Linux i get ~10Mbs sd-card to PC and ~8Mbs PC to sd-card with the method i mentioned can't imagine a class2 sd-card could get much faster
Damn just realized to PC was Fat partition to PC : To sd-card was to btrfs linux partition
The problem is that we don't know the actual erase block size of each flash drive.
And on top of that, fat32 has block sizes of 64K max. Max erase block size for SD is 256K but is usually less.
I also just tried both methods on a faster usb key (with write speeds up to 15Mb/s) and results are the same.
But each his own and if anybody can get a better data transfer rate with the 2nd method, please report all the details here.
No worries mate thanks for the TUT, the question came out of ignorance rather than any understanding of the methodology
ziggy1001 said:
No worries mate thanks for the TUT, the question came out of ignorance rather than any understanding of the methodology
Click to expand...
Click to collapse
Actually it was an interesting question.
We assume that for any device the erase block size is 128K
But the guy in your post is formatting also a usb flash thumb drive or an SD card.
If the erase block size of his flash drive is 16k, then his file was aligned
details:
8011776 / 131072 = 61.125 File "not aligned" according to him.
8011776 / 16384 = 489. Round number, file aligned.
To get even more speed, one has to use bigger fat32 blocks (up to 64k). But then each file will use blocks of 64Ko on the drive, even if it's real size is 1Ko !
Good compromises are 16 and 32Ko blocs.
... Or you can use GParted.
problem solved.
Terepin said:
... Or you can use GParted.
problem solved.
Click to expand...
Click to collapse
Could be a good idea but:
1/ Some people have reported issues with Gparted when aligning their partitions and even some 16GB SDs were not detected by the Desire after using Gparted. On the opposites, the phone could detect them by doing it manually.
2/ Unless I'm mistaken, Gparted is NOT optimizing the FAT32 formatting process nor the EXT4 one.
is there really a difference between Gparted live and your method ?
when you wipe your SDext with your recovery, does sdext returns to default value ?
t-minik said:
is there really a difference between Gparted live and your method ?
when you wipe your SDext with your recovery, sdext returns to default value ?
Click to expand...
Click to collapse
Yes there is: I don't think that Gparted is using 1024Ko cylinders.
But most of the time, choosing MB alignment is working to align partitions. However, it is not aligning the filesystem. And like I already said, some people reported issues, that's why I published this tutorial.
If Gparted is working for you, keep using it
yep, GP works ..... but I'm really curious
and what happens when wiping SDEXT ?
If you change -s to 128 does that give 64k block size?
sudo mkfs.vfat -F 32 -R 78 -n UserData-s 32 -v /dev/sde1
Well whatever it was transfer Fat32 to PC went from ~10Mbs to ~16Mbs
If you change -s to 128 does that give 64k block size?
sudo mkfs.vfat -F 32 -R 78 -n UserData-s 32 -v /dev/sde1
Well whatever it was transfer Fat32 to PC went from ~10Mbs to ~16Mbs
Click to expand...
Click to collapse
yep, s128 gives 64k blocks.
Did you calculate R78 with the given method?
Happy that you're getting higher speed, but usually this method goal is to increase write speed to the SD
Sent from my A70S using the XDA mobile application powered by Tapatalk
Does 4ext recovery does this aligned partitioning/formatting?
Great thread, Sibere.. Will modify my installation steps to point to this TUT than Sd formatter
Does 4ext recovery does this aligned partitioning/formatting?
Click to expand...
Click to collapse
According to the dev, it should. Didn't try myself though. but like Gparted, it won't optimze the FAT32 formatting part.
Sent from my A70S using the XDA mobile application powered by Tapatalk
LiooO said:
Does 4ext recovery does this aligned partitioning/formatting?
Click to expand...
Click to collapse
sibere said:
According to the dev, it should. Didn't try myself though. but like Gparted, it won't optimze the FAT32 formatting part.
Sent from my A70S using the XDA mobile application powered by Tapatalk
Click to expand...
Click to collapse
So according to your answer i can partiton SD card in 4Ext recovery or GParted and then just do Fat32 formatting according to your guide? Can someone confirm this pls?
Fully working nvflash(APX Mode) for Toshiba Folio 100
Working :
- bootloader (toshiba logo)
- fully working fastboot
issue :
- Blank MBR after flashing from fastboot
I'm working this based on [REQ] Toshiba folio 100 BCT and partition dumps Thread
And reference from Hacking the Toshiba AC100
I'm running this on Toshiba AS100 also known as Folio 100 wtih 8GB of internal storage
it should be working on 16GB version
files :
bootloader.bin --> Toshiba Folio 100 bootloader
busybox --> busybox v1.18.4
Fix-MBR.cmd --> Fix MBR after flashing from fastboot
folio100.xls --> my summary about partition table on folio 100 and ac100
new.bct --> downloaded form my folio 1000
NVFlash-Folio100.cmd --> all-in-one working nvflash and partition script
NVFlash.txt --> nvflash documentation
env.cmd --> start command prompt with adb,fastboot and nvflash support
flash.cfg --> i created this config file based on my summary
part.run --> parititon creation script
part.txt --> fdisk partition parameter
part-layout.txt --> Fdisk partition layout
Before you run NVFlash-Folio100.cmd you need to download CWM Recovery image from
Files needed :
1. cwm.img --> CWM Recovery
download from :
[RECOVERY][UPDATE] Unofficial port of ClockworkMod Recovery for folio100 - BETA
[recovery] CWM for Betelgeuse v0.3 - Now with USB support
note : extract the file until you got recovery.img,then rename it to cwm.img
2. boot.img --> Kernel image
3. system.img --> System partition image
4. recovery.img --> Recovery image
Download working ROM :
DISCONTINUED - [ROM][19-feb-2011] FolioMod v1.4 for Toshiba Folio100
Driver :
1. Toshiba Folio 100 ADB and Fastboot driver
This is standard Google USB Driver,i have modified some entries for working on Toshiba Folio 100
Download link
2. NVIDIA USB Boot-recovery driver also known as APX Driver
Download link
After you have all needed file double click NVFlash-Folio100.cmd
Connect your device using micro usb cable in APX mode
After finished flash from NVFlash your device will automatically boot to CWM Recovery
While CWM Recovery on standby menu,press any key to continue the script for partition and formating
After that just reboot your device.
If you just flashed your device using fastboot enter CWM Recovery and run Fix-MBR.cmd
Note :
APX mode --> On Toshiba boot screen press Power 4x then Vol- (if you have enter this mode,you need to full flash from NVFlash)
Fastboot mode --> On Toshiba boot screen press Power 3x then Vol-
Recovery mode --> On Toshiba boot screen press Power + Vol+
If you stuck on something just long press the power button,it will power off the device
if you're already flashed from NVFlash and unable to enter APX Mode,you need to disassembly your device.Disconnect cable from NAND and then power on the device.After it connected in APX mode,you can connect the NAND cable and flash it using NVFlash.
For disassembly reference Folio 100 Disassembly - Pictures
The NAND flash is connected using white short film cable.
Folio100-NVFlash-Final.zip download link
Thanks a lot! Great work!!!
what does it do?
Is it a Custom Rom or something else?
Crunon said:
what does it do?
Is it a Custom Rom or something else?
Click to expand...
Click to collapse
Fully working solution for bricked and corupted internal storage partition of Toshiba Folio 100.
Thanks so much.
I followed your guide and save my friend's table
need help please
nvramFolio stucks:
D:\temp\Folio100-NVFlash-Final>nvflash.exe --bct %bct% --setbct --bl %bl% --configfile %config% --odmdata 0x000c0075 --c
reate --go
Nvflash started
rcm version 0X20001
System Information:
chip name: t20
chip id: 0x20 major: 1 minor: 2
chip sku: 0x8
chip uid: 0x17006181434001d7
macrovision: disabled
hdcp: enabled
sbk burned: false
dk burned: false
boot device: emmc
operating mode: 3
device config strap: 0
device config fuse: 0
sdram config strap: 0
sending file: new.bct
- 4080/4080 bytes sent
new.bct sent successfully
command failure: bootloader download failed
Click to expand...
Click to collapse
How long do I have to wait? I wait 15min.
then I tryed this:
D:\temp\Folio100-NVFlash-Final>nvflash.exe --bl %bl% --configfile %config% --odmdata 0x000c0075 --create --go
Nvflash started
uid read failed
Click to expand...
Click to collapse
I used driver from the link and in both cases I had done a hard reset.
THX for help!
Miraculix666 said:
nvramFolio stucks:
How long do I have to wait? I wait 15min.
then I tryed this:
I used driver from the link and in both cases I had done a hard reset.
THX for help!
Click to expand...
Click to collapse
If the process have failed,you need to turn off your device and then turn it back on before starting a new process.that why you got this :
Code:
Nvflash started
uid read failed
"UID read failed" is the message after power down.
I assume an error while flashing the bootloader. right?
The history for the error was:
-ICS_r4 cwm_0.3_Betelegeuse (all fine)
-update cwm5. & ICS_alpha (internal sd missing in ICS, internal sd acsessible in cwm)
-trying format and wipe from fastboot and cwm
-internal sd missing in cwm
-flashing back to cwm 0.3 & ICS_r4 (internal sd missing)
-flashing cwm5. & ICS_alpha (internal sd missing)
-found out partition table is corrupted (no info at fdisk)
-tryed to fix that way http://forum.xda-developers.com/showthread.php?t=1470823&page=18 boot.zip)
-tryed to fix that way http://bb2k.org/folio100wiki/index...._.28included_in_the_TV-Dock.29_doesn.27t_work
from adb and then I had this
~ # mount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
~ # fdisk /dev/block/mmcblk0
fdisk /dev/block/mmcblk0
The number of cylinders for this disk is set to 1944064.
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)
Warning: invalid flag 0x00,0x00 of partition table 5 will be corrected by w(rite)
Command (m for help): p
p
Disk /dev/block/mmcblk0: 15.9 GB, 15925772288 bytes
1 heads, 16 sectors/track, 1944064 cylinders
Units = cylinders of 16 * 512 = 8192 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 129 32896 262144 83 Linux
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 32897 163968 1048576 83 Linux
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3 163969 164224 2048 83 Linux
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4 164225 1943360 14233088 5 Extended
Partition 4 does not end on cylinder boundary
Click to expand...
Click to collapse
-flashed update_createpart.zip (now only APX booting.)
I tryed:
D:\temp\Folio100-NVFlash-Final>nvflash.exe --bct new.bct --setbct --bl bootloader.bin --configfile flash.cfg --odmdata 0
x000c0075 --create --go
Nvflash started
rcm version 0X20001
System Information:
chip name: t20
chip id: 0x20 major: 1 minor: 2
chip sku: 0x8
chip uid: 0x17006181434001d7
macrovision: disabled
hdcp: enabled
sbk burned: false
dk burned: false
boot device: emmc
operating mode: 3
device config strap: 0
device config fuse: 0
sdram config strap: 0
sending file: new.bct
- 4080/4080 bytes sent
new.bct sent successfully
Click to expand...
Click to collapse
(stays at this point for a hour)
then I tryed:
nvflash.exe --configfile %config% --odmdata 0x000c0075 --create --format_all
Click to expand...
Click to collapse
and
nvflash.exe --bct %bct% --setbct --configfile %config% --odmdata 0x000c0075 --create
Click to expand...
Click to collapse
I made a reset after 15min in cause of no response.
should I disassemble? If yes, connecting nand with power on or
disconnect->on->off->connect->on->nvflash
Is it required that the power plug is connected?
If you intrested, i can guide you via gtalk.check my PM.
Here Full log of successful NVFlash-Folio100.cmd
folio dead
After programming with nflash I have a problem the folio will not start more ... Fix-MBR gives me this error log
connect your device in CWM Recovery
Premere un tasto per continuare . . .
28 KB/s (146 bytes in 0.005s)
The number of cylinders for this disk is set to 486016.
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): Changing display/entry units to sectors
Command (m for help): First sector (2645008-31105023, default 2645008): First sector (2645008-31105023, default 2645008): Value is out of range
First sector (2645008-31105023, default 2645008): Value is out of range
First sector (2645008-31105023, default 2645008): Value is out of range
First sector (2645008-31105023, default 2645008): First sector (2645008-31105023, default 2645008): First sector (2645008-31105023, default 2645008): Value is out of range
First sector (2645008-31105023, default 2645008): Value is out of range
First sector (2645008-31105023, default 2645008): Value is out of range
First sector (2645008-31105023, default 2645008): First sector (2645008-31105023, default 2645008): First sector (2645008-31105023, default 2645008): Value is out of range
First sector (2645008-31105023, default 2645008): Value is out of range
First sector (2645008-31105023, default 2645008): Value is out of range
First sector (2645008-31105023, default 2645008): First sector (2645008-31105023, default 2645008): First sector (2645008-31105023, default 2645008): Value is out of range
First sector (2645008-31105023, default 2645008): Value is out of range
First sector (2645008-31105023, default 2645008): Using default value 2645008
Last sector or +size or +sizeM or +sizeK (2645008-2645999, default 2645999): Last sector or +size or +sizeM or +sizeK (2645008-2645999, default 2645999): Value is out of range
Last sector or +size or +sizeM or +sizeK (2645008-2645999, default 2645999): Value is out of range
Last sector or +size or +sizeM or +sizeK (2645008-2645999, default 2645999): Last sector or +size or +sizeM or +sizeK (2645008-2645999, default 2645999): Value is out of range
Last sector or +size or +sizeM or +sizeK (2645008-2645999, default 2645999): Value is out of range
Last sector or +size or +sizeM or +sizeK (2645008-2645999, default 2645999): Last sector or +size or +sizeM or +sizeK (2645008-2645999, default 2645999): Value is out of range
Last sector or +size or +sizeM or +sizeK (2645008-2645999, default 2645999): Value is out of range
Last sector or +size or +sizeM or +sizeK (2645008-2645999, default 2645999): Last sector or +size or +sizeM or +sizeK (2645008-2645999, default 2645999): Value is out of range
Last sector or +size or +sizeM or +sizeK (2645008-2645999, default 2645999): Using default value 2645999
Command (m for help):
Disk /dev/block/mmcblk0: 15.9 GB, 15925772288 bytes
4 heads, 16 sectors/track, 486016 cylinders, total 31105024 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 2048 526335 262144 83 Linux
/dev/block/mmcblk0p2 526336 2623487 1048576 83 Linux
/dev/block/mmcblk0p3 2623488 2627583 2048 83 Linux
/dev/block/mmcblk0p4 2627584 31105023 14238720 5 Extended
/dev/block/mmcblk0p5 2628608 2644991 8192 83 Linux
/dev/block/mmcblk0p6 2646016 4743167 1048576 83 Linux
/dev/block/mmcblk0p7 4744192 4754431 5120 83 Linux
/dev/block/mmcblk0p8 4754448 31105023 13175288 83 Linux
/dev/block/mmcblk0p9 2627600 2628607 504 83 Linux
/dev/block/mmcblk0p10 2645008 2645999 496 83 Linux
Partition table entries are not in disk order
Command (m for help): The partition table has been altered.
Calling ioctl() to re-read partition table
" "
" Please reboot your device "
" "
folio is dead??
retry with full flash from NVFlash-Folio100.cmd
puppet13th said:
retry with full flash from NVFlash-Folio100.cmd
Click to expand...
Click to collapse
After another flash, log this message:
extraneo said:
After another flash, log this message:
Click to expand...
Click to collapse
when you're getting this :
Code:
waiting device to bootup . . .
press any key if the device have entered CWM Recovery . . .
unmount /cache from recovery
then continue that nvflash script
puppet13th said:
when you're getting this :
Code:
waiting device to bootup . . .
press any key if the device have entered CWM Recovery . . .
unmount /cache from recovery
then continue that nvflash script
Click to expand...
Click to collapse
Thanks for help but no change. same message.
Great guide and great tools.
Just one question: after I've run the NVFlash-Folio100.cmd, you say to run fixmbr. This throws an error message
connect your device in CWM Recovery
Press any key to continue . . .
28 KB/s (146 bytes in 0.005s)
The number of cylinders for this disk is set to 485840.
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): Changing display/entry units to sectors
Command (m for help): First sector (2627600-31093759, default 2627600): First se
ctor (2627600-31093759, default 2627600): Value is out of range
First sector (2627600-31093759, default 2627600): Value is out of range
First sector (2627600-31093759, default 2627600): Value is out of range
First sector (2627600-31093759, default 2627600): First sector (2627600-31093759
, default 2627600): First sector (2627600-31093759, default 2627600): Value is o
ut of range
First sector (2627600-31093759, default 2627600): Value is out of range
First sector (2627600-31093759, default 2627600): Value is out of range
First sector (2627600-31093759, default 2627600): First sector (2627600-31093759
, default 2627600): First sector (2627600-31093759, default 2627600): Value is o
ut of range
First sector (2627600-31093759, default 2627600): Value is out of range
First sector (2627600-31093759, default 2627600): Value is out of range
First sector (2627600-31093759, default 2627600): First sector (2627600-31093759
, default 2627600): First sector (2627600-31093759, default 2627600): Value is o
ut of range
First sector (2627600-31093759, default 2627600): Value is out of range
First sector (2627600-31093759, default 2627600): Using default value 2627600
Last sector or +size or +sizeM or +sizeK (2627600-2628607, default 2628607): Las
t sector or +size or +sizeM or +sizeK (2627600-2628607, default 2628607): Value
is out of range
Last sector or +size or +sizeM or +sizeK (2627600-2628607, default 2628607): Val
ue is out of range
Last sector or +size or +sizeM or +sizeK (2627600-2628607, default 2628607): Las
t sector or +size or +sizeM or +sizeK (2627600-2628607, default 2628607): Value
is out of range
Last sector or +size or +sizeM or +sizeK (2627600-2628607, default 2628607): Val
ue is out of range
Last sector or +size or +sizeM or +sizeK (2627600-2628607, default 2628607): Las
t sector or +size or +sizeM or +sizeK (2627600-2628607, default 2628607): Value
is out of range
Last sector or +size or +sizeM or +sizeK (2627600-2628607, default 2628607): Val
ue is out of range
Last sector or +size or +sizeM or +sizeK (2627600-2628607, default 2628607): Las
t sector or +size or +sizeM or +sizeK (2627600-2628607, default 2628607): Value
is out of range
Last sector or +size or +sizeM or +sizeK (2627600-2628607, default 2628607): Usi
ng default value 2628607
Command (m for help):
Disk /dev/block/mmcblk0: 15.9 GB, 15920005120 bytes
4 heads, 16 sectors/track, 485840 cylinders, total 31093760 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 2048 526335 262144 83 Linux
/dev/block/mmcblk0p2 526336 2623487 1048576 83 Linux
/dev/block/mmcblk0p3 2623488 2627583 2048 83 Linux
/dev/block/mmcblk0p4 2627584 31093759 14233088 5 Extended
/dev/block/mmcblk0p5 2628608 2644991 8192 83 Linux
/dev/block/mmcblk0p6 2646016 4743167 1048576 83 Linux
/dev/block/mmcblk0p7 4744192 4754431 5120 83 Linux
/dev/block/mmcblk0p8 4754448 31093759 13169656 83 Linux
/dev/block/mmcblk0p9 2627600 2628607 504 83 Linux
Partition table entries are not in disk order
Command (m for help): The partition table has been altered!
Calling ioctl() to re-read partition table
" "
" Please reboot your device "
" "
Press any key to continue . . .
Click to expand...
Click to collapse
I'm also getting "E: Can't mount /cache/recovery/command" and similar strings when CWM is running... At present, Folio100-NVFlash-Final is the only way I'm able to get the tablet working, and cannot install any other rom...
any advice on how/if this can be fixed?
yellowumbrella said:
Great guide and great tools.
Just one question: after I've run the NVFlash-Folio100.cmd, you say to run fixmbr. This throws an error message
I'm also getting "E: Can't mount /cache/recovery/command" and similar strings when CWM is running... At present, Folio100-NVFlash-Final is the only way I'm able to get the tablet working, and cannot install any other rom...
any advice on how/if this can be fixed?
Click to expand...
Click to collapse
I reported the same problem. NVflash contains a BUG??? ... perhaps it is better not to use it.
Well, it was/is my only option to get the tablet working at present. After my friend kicked it into apx mode, nvflash was the only solution (as far as I'm aware). And now if I try to flash other roms and fail, the only way to get the tablet working is to force apx and use nvflash...
Sent from my SGH-T849 using XDA
Hint : if you have entered CWM stage,the nvflash solution was working properly.
After that you need to create partition table for it
I have successfully done this for 8GB version.
Maybe the partition layout was diffrent between 8GB and 16GB.
I can try to help trought gtalk chat.
If you instrested , pm me.
Sent from my ST17i using Tapatalk
puppet13th said:
Maybe the partition layout was diffrent between 8GB and 16GB.
I can try to help trought gtalk chat.
If you instrested , pm me.
Click to expand...
Click to collapse
I have the same Problem with my 16gb Folio.
Recovery works, but thats all...
Can you poste the right way if it works with yellowumbrella?
I have a Samsung development board. After flash ICS images files into internal storage, at first time it can boot to android animation but failed to go to launcher; when i boot it again, it report 'NO MBR is found at SD/MMC', and can not be flashed. I use MMC command to create the partition and flash it, same error occurs. u-boot log is:
reading kernel device 0 Start 6144, Count 10240
mmc read 0 0x40008000 6144 10240
MMC read: dev # 0, block # 6144, count 10240 ... there are pending interrupts 0x00000008
error during transfer: 0x00008024
mmc read failed
-1 blocks read: ERROR
completed
reading ramdisk device 0 Start 16384, Count 10240
mmc read 0 0x41000000 16384 10240
MMC read: dev # 0, block # 16384, count 10240 ... there are pending interrupts 0x00000008
[ERROR] response timeout error : 00002104 cmd 18
mmc read failed
-19 blocks read: ERROR
completed
I have been try to build TWRP for SM-J737S today, finally i got it.
but when I flash it, It say to me "could not do normal boot invalid ramdisk length".
I wanted to fix it, but I couldn't get any information from google
No one may have mentioned it because it is too simple a matter for some people, but I need help with it.
please help me
Post your recovery.
We're not Carnac the Magnificent.
here's my recovery file
Your ramdisk looks ok, it spans from 11c5800 to 2005182.
You have a DTB from 2005800 to 20a0cac
In Android header type 0 (which you have) a DTB should be snuck in after the kernel.
Surely you meant Android header type 2?
Do you have your stock recovery?
I can't sure what is Android header type.
I think I need more study to find what i did wrong...
thanks for your help.
here's stock recovery
Your stock recovery is type 0 and has the dtb after the ramdisk too.
I guess that must be ok for your device, but it seems non-standard.
I'll take another look.
I'm still scratching my head.
In ye olde times pagesize (quantization on Android images) was 4096.
Then they became appalled at the waste of potentially 2048 bytes on a 30 Meg image.
So some folks changed the pagesize to 4096. (Savings!)
Then people decided to park non-header-referenced things after the image.
Oh, boy.
Like AVB0 signatures. These were quantized to 4096 even if the page size was 2048.
So now your (stock) image puts the DTB after the referenced parts of the image.
It's quantized to 2048 (the page size).
It also has this "DTBH" header that I've never seen before.
But we do find 5 (five) dtbs (just in case you want to load this on another model).
And after that in the stock image, we find (at a 2048 quantization) a "SEANDROIDENFORCESignerVer02".
Who the heck knows what that is.
Then there is the obvious issue: Youre recovery is over 32 MB.
Is the partition that big?
surely I need to chack partition size.
I'm trying to get root..
Code:
GPT fdisk (gdisk) version 0.8.4 Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk mmcblk0: 61071360 sectors, 29.1 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 52444E41-494F-2044-4D4D-43204449534B
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 61071326
Partitions will be aligned on 1024-sector boundaries
Total free space is 18365 sectors (9.0 MiB)
Number Start (sector) End (sector) Size Code Name
1 8192 16383 4.0 MiB 0700 BOTA0
2 16384 24575 4.0 MiB 0700 BOTA1
3 24576 65535 20.0 MiB 0700 EFS
4 65536 81919 8.0 MiB 0700 CPEFS
5 81920 90111 4.0 MiB 0700 m9kefs1
6 90112 98303 4.0 MiB 0700 m9kefs2
7 98304 106495 4.0 MiB 0700 m9kefs3
8 106496 108543 1024.0 KiB 0700 NAD_REFER
9 108544 124927 8.0 MiB 0700 PARAM
10 124928 190463 32.0 MiB 0700 BOOT
11 190464 268287 38.0 MiB 0700 RECOVERY
12 268288 272383 2.0 MiB 0700 DTBO
13 272384 452607 88.0 MiB 0700 RADIO
14 452608 453631 512.0 KiB 0700 PERSISTENT
15 453632 455679 1024.0 KiB 0700 MISC
16 455680 463871 4.0 MiB 0700 STEADY
17 463872 475135 5.5 MiB 0700 RESERVED2
18 475136 6422527 2.8 GiB 0700 SYSTEM
19 6422528 7454719 504.0 MiB 0700 VENDOR
20 7454720 7864319 200.0 MiB 0700 ODM
21 7864320 8478719 300.0 MiB 0700 CACHE
22 8478720 8499199 10.0 MiB 0700 HIDDEN
23 8499200 8540159 20.0 MiB 0700 OMR
24 8540160 8550399 5.0 MiB 0700 CP_DEBUG
25 8550400 8591359 20.0 MiB 0700 NAD_FW
26 8591360 61061119 25.0 GiB 0700 USERDATA
as you can see, RECOVERY partition is bigger then 38mb.
I have no idea what the problem is
Ok, looking around it seems like that error is just what it says.
There seems to be some hard limit on the size of ramdisks for recovery.
Code:
ramdisk 14,940,546
ungzipped ramdisk 34,343,936
I'm not sure if they mean the gzipped ramdisk or the ungzipped ramdisk (raw cpio).
You've got the kitchen sink in there.
How about getting rid of 99% of that terminfo junk?
You really want the Python stuff?
I tried to make ramdisk smaller today, but I failed.
I couldn't figure out which files were important and which ones weren't.
Actually, I'm used to using linux, but I know very little about Android system
Can you tell me what I should do or search?
@voskresenie
Well, here's a shot for you. I removed all the terminfo and Python stuff.
I had to manually extract the DTB and stick it on the end.
Give it a shot. It weighs in at less than 32MB
now it doesn't say "could not do normal boot invalid ramdisk length", but I can see black screen and irregularly flashing backlight.
is it possible that I solve the ramdisk size problem in the source code?
I think I need to change setting and rebuild TWRP..
Hmm, did you check to see if you had ADB?
Renate said:
Hmm, did you check to see if you had ADB?
Click to expand...
Click to collapse
adb doesn't work.
actually, windows says USB device recognition failure
It could be that I screwed up or that there was an actual problem in your TWRP build.
Are you testing this by fastboot boot recovery.img?
Or are you doing fastboot flash recovery recovery.img?
If you are doing the first one have you tried with the stock recovery image to make sure that works?
most of samsung devices don't have fastboot.
instead of fastboot, they have download mode.
I think the work that i do is play same role fastboot flash recovery recovery.img
It probably looks like separating partitions by file name.
If I use a name other than recovery.img or boot.img, the flash fails.
Did I mention that I hate Samsung and wouldn't take one if you gave it to me?
I did mention that the stock has some custom signature at the end.
Try booting the stock recovery file that you posted like you are trying to boot your TWRP. Does it work?
If it works you can try truncating it yourself to 27,123,712 bytes, 0x019DE000
See if that runs.
If you can't truncate it, I could post it.