Apps2Sd + Hero - G1 General

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!

Related

Swap performance - Swap Partition or Swap File?

Hi All,
I have been trying to find the best way to configure my swap for my android phone, currently the G1. I had started out with the regular swap partition but find my phone performance degraded over time thus I decided to test the usual read/write for my Class 6 Micro SDHC card.
Configure the SD card via fdisk and setup 3 partitions (like everyone else).
Command (m for help): p
Disk /dev/sdm: 8166 MB, 8166309888 bytes
224 heads, 56 sectors/track, 1271 cylinders
Units = cylinders of 12544 * 512 = 6422528 bytes
Disk identifier: 0x3114df25
Device Boot Start End Blocks Id System
/dev/sdm1 1 800 5017572 c W95 FAT32 (LBA)
/dev/sdm2 801 1100 1881600 83 Linux
/dev/sdm3 1101 1271 1072512 82 Linux swap / Solaris
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.
Afterward, format the drive as vfat, ext3, swap
localhost ~ # mkfs.vfat /dev/sdm1
mkfs.vfat 3.0.1 (23 Nov 2008)
localhost ~ # mkfs.ext3 /dev/sdm2
mke2fs 1.41.3 (12-Oct-2008)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
117600 inodes, 470400 blocks
23520 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=482344960
15 block groups
32768 blocks per group, 32768 fragments per group
7840 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 26 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
localhost ~ # mkswap /dev/sdm3
Setting up swapspace version 1, size = 1072508 KiB
no label, UUID=2046ef6b-ac5a-47a2-9484-ea2a356cc7fa
now the read performance via "hdparm -t /dev/sdxxx"
sdm1 (fat) = Timing buffered disk reads: 26 MB in 3.12 seconds = 8.34 MB/sec
sdm2 (ext3) = Timing buffered disk reads: 26 MB in 3.11 seconds = 8.35 MB/sec
sdm3 (swap) = Timing buffered disk reads: 26 MB in 3.08 seconds = 8.45 MB/sec
as you can see, reading is more or less the same across the board.
now the fun part of write. for fat and ext3, I decided to write to a file, for the swap partition, I decided to write directly to the partition.
FAT:
localhost ~ # dd count=30 bs=1M if=/dev/urandom of=sdm1/test.write
30+0 records in
30+0 records out
31457280 bytes (31 MB) copied, 4.9464 s, 6.4 MB/s
EXT3:
localhost ~ # dd count=30 bs=1M if=/dev/urandom of=sdm2/test.write
30+0 records in
30+0 records out
31457280 bytes (31 MB) copied, 4.94644 s, 6.4 MB/s
SWAP:
localhost ~ # dd count=30 bs=1M if=/dev/urandom of=/dev/sdm3
30+0 records in
30+0 records out
31457280 bytes (31 MB) copied, 8.79714 s, 3.6 MB/s
As you can see, write to a FAT or EXT3 partition seems to be faster than writing to a swap partition. Of course, this is assuming I have done my test correctly . If writing to FAT or EXT3 is faster and reads are the same, would it mean that you get better SWAP performance via a swap file on an EXT3 partition?
thanx for the interesting read
Your write test is flawed.
Flaw 1: You use /dev/urandom as a data source. Data generation from /dev/urandom is heavily affected by CPU usage AND by available entropy -- though it doesn't block, its speed does vary drastically.
Flaw 2: You only run the test ONCE. This means that issues from flaw 1 are totally visible rather than being averaged out over a large number of tests. You should do the test 100's of times and take the average over them.
Flaw 3: Implementation of the ext3 filesystem tend to hide the effects of disk latency. There are caches and journals that you haven't accounted for. In order to get the ACTUAL time that it takes to write to the ext3 filesystem, you need to follow the write test by a synchronization, which will *actually* write the data to the disk (i.e., it will BLOCK until the write is actually completed). Unfortunately though, this test will also synchronize OTHER write operations that are buffered, which will further skew your results. What you REALLY need to do is perform the tests on a completely empty partition. Should be starting sync, begin time, test write, finishing sync, finishing time. Elapsed time = finishing time - begin time.
In other words, I'm sorry, but your conclusions are not correct. What I *very strongly* suspect, is that if you do your tests correctly, you will find that the performance of swap-on-ext3 will actually be *lower* than swap-on-partition due to the extra overhead of the ext3 filesystem.
Note: the linux vfat filesystem implementation also buffers writes.
A little bit of fun trivia:
Back in the days when we actually used floppy disks, you could actually copy an entire disk worth of data over to a vfat floppy disk without it even BEGINNING to write to the disk. Usually, it would begin writing several seconds after the copy "completed". If you wanted to speed it along, a sync or umount would force the buffer immediately to write to disk.
ahhh...thanks for the info. I guess with buffer, it makes timing or calculating the write speed a bit difficult. I will have to think more about this.
This really makes me wonder how do SD card manufactures test their write speed and assign the card class.
I believe they do a test similar to yours without any buffering and write different amounts of data to simple file systems.
Then, according to http://en.wikipedia.org/wiki/Secure_Digital the class number is equal to the amount of minimum write megabytes per second that can be written to the disk when in a clean and unfragmented state. So a class 6 card would at it's slowest writing speed on a perfectly setup disk be able to write data at 6 megabytes per second or faster. Read speed isn't taken into account for the rating, but is generally faster than write speed.
I redid my test with raw write via if=/dev/zero and the write speed is now on-par with what was classified on the SD class. (7.4MBps write on my class 6). Playing around w/ the setting more, seems like the over-time degradation seems to be caused by my swappiness configuration.

Photon sd card builds (partition coruption)

I faced an problem with sd card builds, need to see if it is only to me or is also present to you. Problem is with sd card (partition 1) coruption!
fdisk mmcmlk0 displayng no coruption!
Code:
fdisk /dev/block/mmcblk0
Command (m for help): p
p
Disk /dev/block/mmcblk0: 7948 MB, 7948206080 bytes
245 heads, 62 sectors/track, 1021 cylinders
Units = cylinders of 15190 * 512 = 7777280 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 1021 7754464 b Win95 FAT32
but fdisk partition (mmcblkop1) displaying very very good coruption with 4 partitions inside partition
Code:
fdisk /dev/block/mmcblk0p1
The number of cylinders for this disk is set to 242327.
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): p
p
Disk /dev/block/mmcblk0p1: 7940 MB, 7940571136 bytes
4 heads, 16 sectors/track, 242327 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1p1 ? 12158374 29994462 570754815+ 72 Unknown
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p1p2 ? 2635774 32886216 968014120 65 Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p1p3 ? 29216898 59467339 968014096 79 Unknown
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p1p4 ? 45088769 45089636 27749+ d Unknown
Partition 4 does not end on cylinder boundary
Partition table entries are not in disk order
So its like we have problem! Also I think this is all a result of problems we have with the file transfer to disk!
Also in log I see all time enter/leave (but phone is in sleep mode!):
Code:
<4>[ 568.114746] msmsdcc_resume enter
<4>[ 568.114928] msmsdcc_resume leave
<4>[ 568.114986] msmsdcc_resume enter
<4>[ 568.115103] msmsdcc_resume leave
I don't know whats wrong but we have coruption in sd card, initrd related? or kernel side related? or android side related??? I created two fat32 partitions this time, first is for all android files /bootsdcard, seccond is mounted as a /mnt/sdcard, initrd is edited allso! Got coruption in all partitions Why???
Code:
Disk /dev/block/mmcblk0p1: 6892 MB, 6892752384 bytes
4 heads, 16 sectors/track, 210350 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1p1 ? 29215178 31850952 84344761 69 Unknown
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p1p2 ? 26586242 55803140 934940732+ 73 Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p1p3 ? 41 41 0 74 Unknown
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p1p4 45088769 45089587 26207+ 0 Empty
Partition 4 does not end on cylinder boundary
Partition table entries are not in disk order
Command (m for help): q
q
# fdisk /dev/block/mmcblk0p2
fdisk /dev/block/mmcblk0p2
The number of cylinders for this disk is set to 32130.
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): p
p
Disk /dev/block/mmcblk0p2: 1052 MB, 1052835840 bytes
4 heads, 16 sectors/track, 32130 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p2p1 ? 29215178 31850952 84344761 69 Unknown
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2p2 ? 26586242 55803140 934940732+ 73 Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p2p3 ? 41 41 0 74 Unknown
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p2p4 45088769 45089587 26207+ 0 Empty
Partition 4 does not end on cylinder boundary
Partition table entries are not in disk order
Anyone who use google page release want to confirm our problem? How to see if coruption exist in your sd card? Simply open android terminal emulator, type "su" press enter and confirm administrator, type "fdisk /dev/block/mmcblk0p1" and press enter, type "p" and press enter, to exit from fdisk type "q" and press enter. I waiting you reply
Code:
Disk /dev/block/mmcblk0p1: 1971 MB, 1971416576 bytes
4 heads, 16 sectors/track, 60162 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1p1 ? 27627926 54209359 850605874+ 6e Unknown
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p1p2 ? 30526934 45850528 490354992+ ff Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p1p3 ? 28151302 30786496 84326194+ 74 Unknown
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p1p4 1 55513776 1776440832 0 Empty
Partition 4 does not end on cylinder boundary
Partition table entries are not in disk order
Code:
# fdisk /dev/block/mmcblk0p1
The number of cylinders for this disk is set to 120880.
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): p
Disk /dev/block/mmcblk0p1: 3960 MB, 3960995840 bytes
4 heads, 16 sectors/track, 120880 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1p1 ? 27627926 54209359 850605874+ 6e Unknown
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p1p2 ? 30526934 45850528 490354992+ ff Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p1p3 ? 28151302 30786496 84326194+ 74 Unknown
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p1p4 45088769 45089616 27106 0 Empty
Partition 4 does not end on cylinder boundary
Partition table entries are not in disk order

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

take a NSTG back to stock

Hi,
I succesfullly rooted my Nook glowlight, but when I tried to go back to stock with my nook backup I found the backup was not ok (just 77MB) and now I have a bricked NSTG that won't get past the "Install Failed" screen.
I've tried almost every method I could find in the forums, but none worked for me.
Is there anything else beside n2T and Alpha-Format I could try to revive my device?
TIA
I think the most careful way to proceed here is to get a shell going and inspect the damage.
If you were lucky you just wiped out the first partition and the partition tables.
Reinstating the partition tables might make undamaged partitions visible.
It's important to preserve the device dependent info on the /rom partition.
If you copy over ClockworkRecovery onto an SD card you should be able to boot that.
Without selecting anything on the menus you should be able to get ADB working.
With an ADB shell you can run fdisk -l /dev/block/mmcblk0
As soon as you can get access to /rom I'd suggest that you back that up.
I'm sure somebody has other ways to get shell access.
Renate NST said:
I think the most careful way to proceed here is to get a shell going and inspect the damage.
If you were lucky you just wiped out the first partition and the partition tables.
Reinstating the partition tables might make undamaged partitions visible.
It's important to preserve the device dependent info on the /rom partition.
If you copy over ClockworkRecovery onto an SD card you should be able to boot that.
Without selecting anything on the menus you should be able to get ADB working.
With an ADB shell you can run fdisk -l /dev/block/mmcblk0
As soon as you can get access to /rom I'd suggest that you back that up.
I'm sure somebody has other ways to get shell access.
Click to expand...
Click to collapse
thanks for that I'll give it a try...
Sadly, I'm on a W7 box (not mine) and all I can see in the device manager is a nook with a yellow sign in it
ADB devices returns a blank list....
I tried updating the drivers for the nook: first uninstalled anything nooklike with usbdeview, and then pointed W7 to a folder where I had downloaded usbdrivers from this thread http://forum.xda-developers.com/showthread.php?t=1354487 but W7 keeps telling there are no drivers for nook in that folder.
If I boot without SD then the nook is recognized and USB drivers install fine. It's booting with CWM that the device is not recognized.
Stuck
There are drivers and drivers.
As a composite USB device the Nook uses both the stock Windows Mass Storage driver and the Google ADB driver.
See: http://forum.xda-developers.com/wiki/BN_Nook_Simple_Touch/Installing_ADB
Renate NST said:
There are drivers and drivers.
As a composite USB device the Nook uses both the stock Windows Mass Storage driver and the Google ADB driver.
See: http://forum.xda-developers.com/wiki/BN_Nook_Simple_Touch/Installing_ADB
Click to expand...
Click to collapse
It worked:
D:\nook_root\adbshell>adb devices
List of devices attached
11223344556677 recovery
D:\nook_root\adbshell>adb shell
~ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 1958 MB, 1958739968 bytes
4 heads, 16 sectors/track, 59776 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
~ #
completely noob with the nook, can't seem to find /rom and Win32DiskImager does not find a device to read from to perform said backup
The best bet would be to check with somebody with a Glow to see if the partitioning is the same as the Touch.
They could have even changed the exact size of partitions over time for the same model.
In any case, here are my partitions. You might try partitioning and not formatting and see if all the pieces fit properly.
Code:
Disk /dev/block/mmcblk0: 1958 MB, 1958739968 bytes
128 heads, 32 sectors/track, 934 cylinders
Units = cylinders of 4096 * 512 = 2097152 bytes
Partition Format Id Start End Size (bytes) Mount
--------- ------ -- ----- --- ------------- --------
Total 0 933 1,958,739,968
mmcblk0p1 vfat 0c 1 38 79,691,776 /boot
mmcblk0p2 vfat 0c 39 46 16,777,216 /rom
mmcblk0p3 ext2 83 47 141 199,229,440 /factory
mmcblk0p4 05 142 926 1,646,264,320
mmcblk0p5 ext2 83 142 285 301,989,888 /system
mmcblk0p6 vfat 0c 286 405 251,658,240 /media
mmcblk0p7 ext3 83 406 525 251,658,240 /cache
mmcblk0p8 ext3 83 526 926 840,957,952 /data
Unused 927 933 14,680,064
Renate NST said:
The best bet would be to check with somebody with a Glow to see if the partitioning is the same as the Touch.
They could have even changed the exact size of partitions over time for the same model.
In any case, here are my partitions. You might try partitioning and not formatting and see if all the pieces fit properly.
Code:
Disk /dev/block/mmcblk0: 1958 MB, 1958739968 bytes
128 heads, 32 sectors/track, 934 cylinders
Units = cylinders of 4096 * 512 = 2097152 bytes
Partition Format Id Start End Size (bytes) Mount
--------- ------ -- ----- --- ------------- --------
Total 0 933 1,958,739,968
mmcblk0p1 vfat 0c 1 38 79,691,776 /boot
mmcblk0p2 vfat 0c 39 46 16,777,216 /rom
mmcblk0p3 ext2 83 47 141 199,229,440 /factory
mmcblk0p4 05 142 926 1,646,264,320
mmcblk0p5 ext2 83 142 285 301,989,888 /system
mmcblk0p6 vfat 0c 286 405 251,658,240 /media
mmcblk0p7 ext3 83 406 525 251,658,240 /cache
mmcblk0p8 ext3 83 526 926 840,957,952 /data
Unused 927 933 14,680,064
Click to expand...
Click to collapse
mmmm, a bit risky isn't it ?
I think I'll read the rest of the internets before proceeding I need to understand this.....
thanks again
srgarfi said:
mmmm, a bit risky isn't it ?
Click to expand...
Click to collapse
Well, you don't have anything at all in your partition table, not even the correct CHS.
If you tried this configuration and you can't mount the partition, then no harm is done.
It will only mount if the partition formatting makes sense.
Renate NST said:
If you tried this configuration and you can't mount the partition, then no harm is done.
It will only mount if the partition formatting makes sense.
Click to expand...
Click to collapse
Oh, ah, that changes everything! It's worth a try.
I need to find a dummy guide to perform this operations, any clues?
Edit: Found this, looks like a start http://forum.xda-developers.com/showthread.php?t=1279091
thanks again
booted in gparted live and took a peek at the Nook. This is what I found (sorry I don't know yet how to post images):
Device information
Model: B&N Ebook Disk
Size: 182 GiB
Path: /dev/sdb
Partition table: msdos
Heads: 255
Sectors/track: 63
Cylinders: 238
Total sectors: 3825664
Sector size: 512
Physical characteristics being so different I'm affraid trying to convert heads/cylinders from Renate's Touch to my Glo schema would be useless.
Could someone with a NSTG please share partition information?
Thank you all,
srgarfi said:
Physical characteristics being so different...
Click to expand...
Click to collapse
Well, they are not real physical differences.
You can juggle heads and sectors/track as long as the size of a cylinder stays the same.
It may be that the Glow has gone to a bigger cylinder, but it's suspicious that it's not a power of two.
Renate NST said:
You can juggle heads and sectors/track as long as the size of a cylinder stays the same.
Click to expand...
Click to collapse
Not good at math, I can't get an exact match
Here is a script that will partition your Nook internal SD card like the listing above.
You can either copy this to the SD card, chmod 777 it and run it
or just copy and paste it to the Windows command line window running ADB.
Then you can try some mounts and see what you've got.
(nookpart.sh is zipped.)
was about to try the script (thanks again!) but nook is stuck at "rooted forever" screen and nothing I do awakes it: power on, power on 30 sec, power on and n, plug it to pc, and every combination. Took off the sd and tried combinations again, nothing. I've searched a bit and all other cases resumed to reboot by pressing long power. Not this one....no hard reset available? Every piece of equipment must have a big red switch =)
Should I stop messing around and buy another one? (not in the states anymore, it will take like 40+ days to deliver here...)
EDIT: false alarm, battery was too low to power on. Where did the full charge go? I dunno....30 more minutes before I can try
Renate NST said:
Here is a script that will partition your Nook internal SD card like the listing above.
You can either copy this to the SD card, chmod 777 it and run it
or just copy and paste it to the Windows command line window running ADB.
Then you can try some mounts and see what you've got.
(nookpart.sh is zipped.)
Click to expand...
Click to collapse
Executed the script:
Code:
D:\nook_root\adbshell>adb shell sh /sdcard/nookpart.sh
Command (m for help): Command action
e extended
p primary partition (1-4)
Partition number (1-4): First cylinder (1-934, default 1): Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-934, default 934):
Command (m for help): Command action
e extended
p primary partition (1-4)
Partition number (1-4): First cylinder (39-934, default 39): Using default value
39
Last cylinder or +size or +sizeM or +sizeK (39-934, default 934):
Command (m for help): Command action
e extended
p primary partition (1-4)
Partition number (1-4): First cylinder (47-934, default 47): Using default value
47
Last cylinder or +size or +sizeM or +sizeK (47-934, default 934):
Command (m for help): Command action
e extended
p primary partition (1-4)
Selected partition 4
First cylinder (142-934, default 142): Using default value 142
Last cylinder or +size or +sizeM or +sizeK (142-934, default 934):
Command (m for help): First cylinder (142-926, default 142): First cylinder (142
-926, default 142): Using default value 142
Last cylinder or +size or +sizeM or +sizeK (142-926, default 926):
Command (m for help): First cylinder (286-926, default 286): First cylinder (286
-926, default 286): Using default value 286
Last cylinder or +size or +sizeM or +sizeK (286-926, default 926):
Command (m for help): First cylinder (406-926, default 406): First cylinder (406
-926, default 406): Using default value 406
Last cylinder or +size or +sizeM or +sizeK (406-926, default 926):
Command (m for help): First cylinder (526-926, default 526): First cylinder (526
-926, default 526): Using default value 526
Last cylinder or +size or +sizeM or +sizeK (526-926, default 926):
Command (m for help): Partition number (1-8): Hex code (type L to list codes): C
hanged system type of partition 1 to c (Win95 FAT32 (LBA))
Command (m for help): Partition number (1-8): Hex code (type L to list codes): C
hanged system type of partition 2 to c (Win95 FAT32 (LBA))
Command (m for help): Partition number (1-8): Hex code (type L to list codes): C
hanged system type of partition 6 to c (Win95 FAT32 (LBA))
Command (m for help): Partition number (1-8):
Command (m for help):
Disk /dev/block/mmcblk0: 1958 MB, 1958739968 bytes
128 heads, 32 sectors/track, 934 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)
/dev/block/mmcblk0p2 39 46 16384 c Win95 FAT32 (LB
A)
/dev/block/mmcblk0p3 47 141 194560 83 Linux
/dev/block/mmcblk0p4 142 926 1607680 5 Extended
/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
D:\nook_root\adbshell>
From CWM tried to mount /boot and failed. Took off the SD, booted nook (fingers crossed) and it displayed the "install failed" screen.
Nice try, thanks for the patience :good:
No, that's what I expected.
The partitioning worked fine
You had already bashed the boot partition.
Now try:
Code:
mkdir /rom
mount -t vfat /dev/block/mmcblk0p2 /rom
ls -l /rom
Looks like there was already a /rom
Code:
D:\nook_root\adbshell>adb shell
~ # mkdir /rom
mkdir /rom
mkdir: can't create directory '/rom': File exists
~ # mount -t vfat /dev/block/mmcblk0p2 /rom
mount -t vfat /dev/block/mmcblk0p2 /rom
mount: mounting /dev/block/mmcblk0p2 on /rom failed: Device or resource busy
~ # ls -l /rom
ls -l /rom
-rwxrwxrwx 1 root root 1088 Jan 1 02:30 bcb
drwxrwxrwx 2 root root 2048 Jan 1 02:30 devconf
~ #
Hmm, I thought of that at the last moment.
Code:
mkdir /stuff
mount -t vfat /dev/block/mmcblk0p2 /stuff
ls -l /stuff
Renate NST said:
Hmm, I thought of that at the last moment.
Code:
mkdir /stuff
mount -t vfat /dev/block/mmcblk0p2 /stuff
ls -l /stuff
Click to expand...
Click to collapse
yes, works, but I don't get it?
Code:
~ # mkdir /stuff
mkdir /stuff
~ # mount -t vfat /dev/block/mmcblk0p2 /stuff
mount -t vfat /dev/block/mmcblk0p2 /stuff
~ # ls -l /stuff
ls -l /stuff
-rwxrwxrwx 1 root root 1088 Jan 1 02:30 bcb
drwxrwxrwx 2 root root 2048 Jan 1 02:30 devconf
~ #
in the meantime I booted noogie and did a backup of the semibricked nook just in case.... =)
Now I'll write CWM to the SD and boot again
That means that the partitioning is correct and that your /rom is intact.
Make a good backup of your personalized stuff:
Code:
adb pull /stuff
Now you have to fix up the boot partition.
I'd probably try to install the factory.zip
Code:
mkdir /fact
mount -t ext2 /dev/block/mmcblk0p3 /fact
ls -l /fact
Code:
adb pull /fact/factory.zip
adb pull /fact/rombackup.zip
Then copy factory.zip to the external SD card and do a CWR update with that.

How to resize a partition table ?

I'm trying to fix my messed up partition table in my Meizu 5 PRO for Ubuntu Touch installation.
Using ADB and fdisk I've managed to get this print out:
Code:
~ # fdisk /dev/block/sda
Note: sector size is 4096 (not 512)
Found valid GPT with protective MBR; using GPT
Command (m for help): p
Disk /dev/block/sda: 122142720 sectors, 1984M
Logical sector size: 4096
Disk identifier (GUID): 00042021-0408-4601-9dcc-a8c51255994f
Partition table holds up to 128 entries
First usable sector is 6, last usable sector is 15267834
Number Start (sector) End (sector) Size Code Name
1 1024 1279 1024K 0700 private
2 1280 1343 256K 0700 proinfo
3 1344 1407 256K 0700 misc
21 2048 3071 4096K 0700 param
22 3072 5119 8192K 0700 efs
23 5120 5631 2048K 0700 pnv
24 5632 6655 4096K 0700 ldfw
25 6656 7679 4096K 0700 dtb
26 7680 13823 24.0M 0700 bootimg
27 13824 22015 32.0M 0700 recovery
28 22016 30207 32.0M 0700 bootlogo
29 30208 35327 20.0M 0700 rstinfo
30 35328 40447 20.0M 0700 mnv
31 40448 45567 20.0M 0700 reserved1
32 45568 50687 20.0M 0700 reserved2
33 50688 55807 20.0M 0700 reserved3
41 65536 720895 2560M 0700 system
42 720896 851967 512M 0700 custom
43 851968 15267834 [B]54.9G 0700 cache[/B]
44 55808 65535 [B]38.0M 0700 userdata[/B]
I bolded partitions in question. Cache is taking up all the storage whereas "userdata" gets only 38MB. I need to resize "userdata" partition to take up most of the storage and leave about 2 GB for cache. I noticed cache partition is formatted in ext4 and "userdata" is vfat.
option "d" selects partition 1 for some reason.
after running
Code:
disk /dev/block/sda43
(which is the partition with 60GB) I get:
Code:
Command (m for help): p
Disk /dev/block/sda43: 59.0 GB, 59047391232 bytes
64 heads, 32 sectors/track, 7038 cylinders
Units = cylinders of 2048 * 4096 = 8388608 bytes
Device Boot Start End Blocks Id System
Someone more experienced, can you guide me ? I don't wanna mess it up more than it is.
Thank you in advance.
Update:
Have learned that the best tool for resizing a filesystem is resize2fs thus I ran:
Code:
~ # resize2fs /dev/block/sda43 1G
However even after resizing the filesystem to 1GB I still get:
Code:
43 851968 15267834 [B]54.9G 0700 cache[/B]
Shouldn't it be reading 1GB now ???
Oh boy. Maybe parts of this guide could help you:
https://forum.xda-developers.com/meizu-pro-5/how-to/tutorial-how-to-upgrade-to-ubuntu-touch-t4021397
You *need* the correct fdisk version for this, as stated in the guide.
Do not just copy the bold parts. Sectors for your current table are below the next code box):
Code:
Command (m for help): d
Partition number (1-3,21-33,43,44, default 44): 43
Partition 43 has been deleted
Command (m for help): d
Partition number (1-3,21-33,44, default 44): 44
Partition 44 has been deleted.
Command (m for help): n
Partition number (4-20,34-40,43-128, default 4): 43
First sector (6-15267834, default 1769472): [B]1769472[/B]
Last sector, +sectors or +size{K,M,G,T,P} (1769472-15267834, default 15267834): [B]2293775[/B]
Created a new partition 43 of type 'Linux filesystem' and of size 2 GiB.
Command (m for help): n
Partition number (4-20,34-40,44-128, default 4): 44
First sector (6-15267834, default 2294016): [B]2293776[/B]
Last sector, +sectors or +size{K,M,G,T,P} (2293776-15267834, default 15267834): [B]15267824[/B]
Created a new partition 44 of type 'Linux filesystem' and of size 49.5 GiB.
When creating partition 43 sector should be first 851969 - last 1376271 for 2GB cache
and for partition 44 first 1376272 - last 15267824 to assign the remaining space to userdata.
Next change the partition types to "Microsoft basic data"
Code:
Command (m for help): t
Partition number (1-3,21-33,41-44, default 44): 43
Partition type (type L to list all types): 11
Changed type of partition 'Linux filesystem' to 'Microsoft basic data'.
Command (m for help): t
Partition number (1-3,21-33,41-44, default 44): 44
Partition type (type L to list all types): 11
Changed type of partition 'Linux filesystem' to 'Microsoft basic data'.
Check again with "p", if the types are correct. If not, search correct type number with "t" and "L" and try again.
Afterwards, you need to continue to give the partitions names:
Code:
Command (m for help): x
Expert command (m for help): n
Partition number (1-3,21-33,41-44, default 44): 43
New name: cache
Partition number (1-3,21-33,41-44, default 44): 44
New name: userdata
Expert command (m for help): r
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
If the table has been successfully altered, you can now continue to install the filesystem:
Code:
~ # mke2fs -t ext4 -m 0 /dev/block/sda43
~ # mke2fs -t ext4 -m 0 /dev/block/sda44
This should fix your current dilemma. Its a lengthy guide and if you actually want the most recent ubuntu touch you might as well do it completely, resizing your system partition too. In that case ignore above changes.

Categories

Resources