[HOWTO] fix your partitions on your nook tablet 16GB (UNBRICK) - Barnes & Noble Nook Tablet

Hello!
The partitions on my nook got messy, and when i tried to use the repart.img i got a red X.
i found this guide by so****e whice didn't work for me, but defenetly helped me and everything that is written here is based on it.
Download the files from so****e thread and put them where it says. When you get to the part of the commands- come back here. (in the last link, one file (scrips) is down from the server. you can get this file here.)
This should work for the nook tablet 16GB, i don't know about the 8GB.
This method worked for me, i'm not sure it will work for you, but it should.
I am not responsible for any damage; anyhow this should fix the damage. DO NOT try this if you don't have any experience. Before you do enything, read everything and make sure you understand.
After you have all the files in the right place, and you are in CWM recovery, let's get started.
In CWM, get into mounts and storage, and then get into mount SDcard.
Open the CMD in your computer, connect your nook to your computer and let's start the work
After you write "adb devices", make sure you see the serial number and recovery:
Code:
$ adb start-server
$ adb devices
This will backup your rom partition, which holds important information, like serial no. and MAC address- When i tried to save it i got an error, maybe this will work for you, this is pretty important:
Code:
$ adb shell
~ # mount sdcard
~ # dd if=/dev/block/mmcblk0p5 of=/sdcard/blk/mmcblk0p5
Then:
Code:
~ # cd sdcard
/sdcard # ./sgdisk -Z /dev/block/mmcblk0
/sdcard # ./sgdisk /dev/block/mmcblk0 -a 256 -n 1:256:511 -n 0:0:1023 -n 0:0:31743 -n 0:0:65535 -n 0:0:163839 -n 0:0:262143 -n 0:0:1019903 -n 0:0:2273279 -n 0:0:3145727 -n 0:0:+12G -n 0:0:0
/sdcard # ./sgdisk -c 1:xloader -c 2:bootloader -c 3:recovery -c 4:boot -c 5:rom -c 6:bootdata -c 7:factory -c 8:system -c 9:cache -c 10:media -c 11:userdata /dev/block/mmcblk0
/sdcard # ./sgdisk -p /dev/block/mmcblk0
Then:
Code:
/sdcard # cd /sdcard/sbin
/sdcard # ./genptable /tmp/genptable
Then:
Code:
/sdcard # mv /tmp/genptable /sdcard/blk
~ # dd if=/sdcard/blk/genptable of=/dev/block/mmcblk0
Then:
Code:
/sdcard # cd sbin
/sdcard/sbin # ./mkdosfs -F 32 /dev/block/mmcblk0p5
/sdcard/sbin # ./mkdosfs -F 32 /dev/block/mmcblk0p6
/sdcard/sbin # ./mkdosfs -F 32 /dev/block/mmcblk0p10
Then:
Code:
/sdcard/sbin # cd ../../
~ # dd if=/sdcard/blk/mmcblk0p1 of=/dev/block/mmcblk0p1
~ # dd if=/sdcard/blk/mmcblk0p2 of=/dev/block/mmcblk0p2
~ # dd if=/sdcard/blk/mmcblk0p3 of=/dev/block/mmcblk0p3
~ # dd if=/sdcard/blk/mmcblk0p4 of=/dev/block/mmcblk0p4
~ # dd if=/sdcard/blk/mmcblk0p5 of=/dev/block/mmcblk0p5
Then:
Code:
~ # parted /dev/block/mmcblk0
(parted) mkpartfs primary ext2 134MB 522MB
(parted) mkpartfs primary ext2 522MB 1164MB
(parted) mkpartfs primary ext2 1164MB 1611MB
(parted) mkpartfs primary ext2 2684MB 15.9GB
Then:
Code:
(parted) quit
~ # tune2fs -j /dev/block/mmcblk0p7
~ # e2fsck -fDp /dev/block/mmcblk0p7
~ # tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p7
~ # e2fsck -fDp /dev/block/mmcblk0p7
~
~ # tune2fs -j /dev/block/mmcblk0p11
~ # e2fsck -fDp /dev/block/mmcblk0p11
~ # tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p11
~ # e2fsck -fDp /dev/block/mmcblk0p11
Then:
Code:
~ # parted /dev/block/mmcblk0
(parted) name 1 xloader
(parted) name 2 bootloader
(parted) name 3 recovery
(parted) name 4 boot
(parted) name 5 rom
(parted) name 6 bootdata
(parted) name 7 factory
(parted) name 8 system
(parted) name 9 cache
(parted) name 10 media
(parted) name 11 userdata
To make sure that everything is OK, do this:
Code:
(parted) print
If you did everything right, you should get something like this:
Code:
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.3MB 33.6MB 17.3MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4 factory
8 522MB 1164MB 642MB system
9 1164MB 1611MB 447MB cache
10 1611MB 14.5GB 12.9GB fat32 media
11 14.5GB 15.9GB 1430MB ext4 userdata
###As you can see the "File system" in 8&9 are missing. After a rom installtion it will fix itself###
From here, just go to CWM, install your favorite rom and you are good to go.
[notice]If you have bootloader problem like me, just download "CyanoBoot" (Universal Bootloader).
Sorry if I had any spelling mistake,
and Goodluck!

Related

[ADDON] Dual Recovery (xRecovery + CWM recovery on your Phone)

The thread it's open to discussions. Thanks for your help puppet13th / doixanh
Tested on Stock / CM6 / CM7
This is it!
Code:
#!/system/bin/busybox sh
#
# Unified Chargemon / DualRecovery By D4rKn3sSyS
# Idea from FroyoBread DualRecovery
# corrected by DooMLoRD ;)
#
# keychecks
cat /dev/input/event0 > /dev/keycheck&
sleep 3
kill -9 $!
keypressed=`cat /dev/keycheck`
if [ "$keypressed" != "${keypressed/ž/}" ] # If the key that you pressed contain character "ž" (on mini pro back button give this character), then boot to recovery
then
echo "recovery" > /data/local/tmp/bootrecovery
else
if [ "$keypressed" != "${keypressed/f/}" ] # Else, If the key that you pressed contain character "f" (on mini pro home button give this character), then boot to xrecovery
then
echo "xrecovery" > /data/local/tmp/bootrecovery
fi
fi
# DualRecovery
if [ -s /data/local/tmp/bootrecovery ] # check if key was pressed
then
boot=`cat /data/local/tmp/bootrecovery`
rm -f /data/local/tmp/bootrecovery
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /dev/block/mtdblock1
umount -l /dev/block/mtdblock2
umount -l /dev/block/mtdblock3
# Mount recovery partition
cd /
rm -r /sbin
rm -f etc
if [ "$boot" != "" ] #this is unnecesary, but just to be sure, can be removed
then
tar -xf /system/bin/"$boot".tar
fi
# Umount /system
umount -l /dev/block/mtdblock0
# chroot
chroot / /init
fi
# offline charging
/system/bin/charger
# CM & Stock compatibility
if [ -f /system/etc/CHANGELOG-CM.txt ]; then
# for cyanogenmod
# remount rootfs rw
mount -o remount,rw rootfs /
chmod 0777 /dev -R
chown 0.2000 /dev/oncrpc -R
cd /
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/ramdisk.tar
# nobodyAtall - Fix
mkdir -p /minicm
cd /minicm
tar -xf /system/bin/ramdisk.tar
sync
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount /dev/block/mtdblock3
umount /dev/block/mtdblock1
rmdir /system /data /cache /mnt
# Mount /system to /minicm/system
/sbin/mount_system
sleep 1
chroot /minicm /init
else
#for stock
# Continue booting
exit
fi
Yes, that simply, back key to open CWM Recovery, home key to open xRecovery.
Install through CWM Recovery ( no xRecovery )
NOTE: If you install this, reboot into recovery will not work, the new way it's this:
Code:
#Boot Into Recovery
echo "recovery" > /data/local/tmp/bootrecovery
reboot
Code:
#Boot into xRecovery
echo "xrecovery" > /data/local/tmp/bootrecovery
reboot
Cheers, d4.
Updated Code, im still getting problems with touchscreen events on startup, but now works manually (echo xrecovery/recovery > /data/local/tmp/bootrecovery)
I guess you can try event2, event3.... There may be different event mapping name.
doixanh said:
I guess you can try event2, event3.... There may be different event mapping name.
Click to expand...
Click to collapse
I thought that too, but when you do
Code:
cat /dev/input/event2
With the phone booted, if you touch the screen, you get output, (like when you do with event0 and press a key), I think ill try different approach, wish me luck
EDIT: See this
Code:
B ž 1 ž
That mean 1 press of back button, but this
Code:
6W ž sÁ ž «7 ž ž
Means 2 press.
Now you know my approach
There is 5 input devices,check this out :
Code:
/sys/devices/virtual/input/
For x8
/dev/input/event1 = key input
/dev/input/event0 = touch screen input
i have attach input from x8 check it.
here my chargemon code for universal dual mode recovery plus cwm multiboot :
Code:
#!/system/xbin/sh
/system/bin/charger
keyrecovery=/system/fx8-rec.tar
tsrecovery=/system/cwm-rec.tar
cat /dev/input/event1 > /dev/keycheck&
cat /dev/input/event0 > /dev/tscheck&
sleep 3
kill -9 $!
###keyrecovery script
if [ -s /dev/keycheck -o -f /data/local/tmp/xrecovery ]
then
rm -f /data/local/tmp/xrecovery
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /dev/block/mtdblock1
umount -l /dev/block/mtdblock2
umount -l /dev/block/mtdblock3
# Mount recovery partition
cd /
rm -r /sbin
rm -f etc
tar -xf $keyrecovery
# Umount /system
umount -l /dev/block/mtdblock0
# chroot
chroot / /init
fi
###TS recovery script
if [ -s /dev/tscheck -o -f /data/local/tmp/cwmrecovery ]
then
rm -f /data/local/tmp/cwmrecovery
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /dev/block/mtdblock1
umount -l /dev/block/mtdblock2
umount -l /dev/block/mtdblock3
# Mount recovery partition
cd /
rm -r /sbin
rm -f etc
tar -xf $tsrecovery
# Umount /system
umount -l /dev/block/mtdblock0
# chroot
chroot / /init
fi
### nobodyAtall - Multiboot hack
if [ -h /system/bin/multiboot_default ]
then
# remount rootfs rw
mount -o remount,rw rootfs /
chmod 0777 /dev -R
chown 0.2000 /dev/oncrpc -R
cd /
rm init*
rm logo.rle
rm default.prop
echo "Multiboot on" >> /data/multiboot.log
mkdir -p /sdcard
/system/bin/fsck_msdos -y /dev/block/mmcblk0p1
if [ $? -ne 0 ]
then
/system/bin/fsck_msdos -y /dev/block/mmcblk0p1
fi
mount -t vfat -o rw,noatime,nodiratime /dev/block/mmcblk0p1 /sdcard
if [ $? -eq 0 ] && [ -f /system/bin/multiboot_default/system.img ] && [ -f /system/bin/multiboot_default/data.img ] && [ -f /system/bin/multiboot_default/cache.img ]
then
echo "Good to multiboot" >> /data/multiboot.log
losetup /dev/block/loop1 /system/bin/multiboot_default/system.img
losetup /dev/block/loop2 /system/bin/multiboot_default/data.img
losetup /dev/block/loop3 /system/bin/multiboot_default/cache.img
if [ -f /system/bin/e2fsck ]
then
/system/bin/e2fsck -y /dev/block/loop1
/system/bin/e2fsck -y /dev/block/loop2
/system/bin/e2fsck -y /dev/block/loop3
fi
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount -l /dev/block/mtdblock3
umount -l /dev/block/mtdblock1
mount -t ext2 -o rw,noatime,nodiratime /dev/block/loop1 /system
if [ -f /system/bin/ramdisk.tar ]
then
tar -xf /system/bin/ramdisk.tar
# nobodyAtall - Reboot Fix
mkdir -p /minicm
cd /minicm
tar -xf /system/bin/ramdisk.tar
sync
umount -l /system
umount -l /cache
umount -l /data
sleep 1
rmdir /system /data /cache /mnt
mkdir -p /minicm/system /minicm/data /minicm/cache
mount -t ext2 -o rw,noatime,nodiratime /dev/block/loop1 /minicm/system
mount -t ext2 -o rw,noatime,nodiratime,nosuid,nodev /dev/block/loop2 /minicm/data
mount -t ext2 -o rw,noatime,nodiratime,nosuid,nodev /dev/block/loop3 /minicm/cache
sleep 1
chroot /minicm /init
else
umount -l /system
umount -l /cache
umount -l /data
sleep 1
mount -t ext2 -o rw,noatime,nodiratime /dev/block/loop1 /system
mount -t ext2 -o rw,noatime,nodiratime,nosuid,nodev /dev/block/loop2 /data
mount -t ext2 -o rw,noatime,nodiratime,nosuid,nodev /dev/block/loop3 /cache
sleep 1
/system/bin/qmuxd &
sleep 1
exit
fi
fi
fi
echo "Multiboot off" >> /data/multiboot.log
###Custom ROM Script
if [ -f /system/bin/ramdisk.tar ]
# remount rootfs rw
mount -o remount,rw rootfs /
chmod 0777 /dev -R
chown 0.2000 /dev/oncrpc -R
cd /
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/ramdisk.tar
mkdir -p /minicm
cd /minicm
tar -xf /system/bin/ramdisk.tar
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount /dev/block/mtdblock3
umount /dev/block/mtdblock1
rmdir /system /data /cache /mnt
# Mount /system to /minicm/system
/sbin/mount_system
cp -f /minicm/system/bin/build.prop /minicm/system/
chroot /minicm /init
it's based on doixanh modification
Any keys can trigger /dev/input/event1 including power key
puppet13th said:
Any keys can trigger /dev/input/event1 including power key
Click to expand...
Click to collapse
Yes, i know, on mimmi it's event0, and touchscreen it's event2, but I have tried a script that redirects all the output of cat /dev/input/event2 to a file, and seems like dont catch any touchscreen output. That's why im trying a different approach.
D4rKn3sSyS said:
Yes, i know, on mimmi it's event0, and touchscreen it's event2, but I have tried a script that redirects all the output of cat /dev/input/event2 to a file, and seems like dont catch any touchscreen output. That's why im trying a different approach.
Click to expand...
Click to collapse
check input.rar for x8
/sys/devices/virtual/input/input3/name :
Code:
qwerty
maybe x10 mini pro hardware qwerty keyboard can be used to trigger the recovery
puppet13th said:
check input.rar for x8
/sys/devices/virtual/input/input3/name :
Code:
qwerty
maybe x10 mini pro hardware qwerty keyboard can be used to trigger the recovery
Click to expand...
Click to collapse
Our input4 it's qwerty, i'll try with it, also, this is weird
Code:
# cd /sys/devices/virtual/input/
cd /sys/devices/virtual/input/
# ls
ls
input0 input1 input4 input5
No input2 or input3
but
Code:
# cd /dev/input/
cd /dev/input/
# ls
ls
event0 event1 event2 event3 event4
on x8 :
Code:
/ # ls -l /dev/input/
ls -l /dev/input/
crw-rw---- 1 0 1004 13, 64 Jul 24 14:23 event0
crw-rw---- 1 0 1004 13, 65 Jul 24 14:23 event1
crw-rw---- 1 0 1004 13, 66 Jul 24 14:23 event2
crw-rw---- 1 0 1004 13, 67 Jul 24 14:24 event3
crw-rw---- 1 0 1004 13, 68 Jul 24 14:24 event4
/ # ls -l /sys/devices/virtual/input/
ls -l /sys/devices/virtual/input/
drwxr-xr-x 6 0 0 0 Jul 24 17:02 input0
drwxr-xr-x 6 0 0 0 Jul 24 17:02 input1
drwxr-xr-x 6 0 0 0 Jul 24 16:49 input2
drwxr-xr-x 6 0 0 0 Jul 24 16:49 input3
drwxr-xr-x 6 0 0 0 Jul 24 16:49 input4
/ #
input3 and input4 on x8 :
Code:
/ # cat /sys/devices/virtual/input/input3/name
cat /sys/devices/virtual/input/input3/name
qwerty
/ # cat /sys/devices/virtual/input/input4/name
cat /sys/devices/virtual/input/input4/name
systemconnector
/ #
input0 for touch screen
input1 for keys
input2 for compass
check /sys/devices/virtual/input/input4/name and /sys/devices/virtual/input/input5/name
puppet13th said:
on x8 :
Code:
/ # ls -l /dev/input/
ls -l /dev/input/
crw-rw---- 1 0 1004 13, 64 Jul 24 14:23 event0
crw-rw---- 1 0 1004 13, 65 Jul 24 14:23 event1
crw-rw---- 1 0 1004 13, 66 Jul 24 14:23 event2
crw-rw---- 1 0 1004 13, 67 Jul 24 14:24 event3
crw-rw---- 1 0 1004 13, 68 Jul 24 14:24 event4
/ # ls -l /sys/devices/virtual/input/
ls -l /sys/devices/virtual/input/
drwxr-xr-x 6 0 0 0 Jul 24 17:02 input0
drwxr-xr-x 6 0 0 0 Jul 24 17:02 input1
drwxr-xr-x 6 0 0 0 Jul 24 16:49 input2
drwxr-xr-x 6 0 0 0 Jul 24 16:49 input3
drwxr-xr-x 6 0 0 0 Jul 24 16:49 input4
/ #
input3 and input4 on x8 :
Code:
/ # cat /sys/devices/virtual/input/input3/name
cat /sys/devices/virtual/input/input3/name
qwerty
/ # cat /sys/devices/virtual/input/input4/name
cat /sys/devices/virtual/input/input4/name
systemconnector
/ #
input0 for touch screen
input1 for keys
input2 for compass
check /sys/devices/virtual/input/input4/name and /sys/devices/virtual/input/input5/name
Click to expand...
Click to collapse
Got it working! in a kindly dirty way, back button, Recovery, middle button, xRecovery
EDIT: Need to fix a bit, now allways boot on recovery's XD
do you mean middle button = home button ?
any luck with qwerty keyboard ?
if it's using keys value for the trigger,it's awesome.
puppet13th said:
do you mean middle button = home button ?
any luck with qwerty keyboard ?
if it's using keys value for the trigger,it's awesome.
Click to expand...
Click to collapse
Yes middle button it's home button, and left... left, im using a dirty way to identify what's the key pressed, so if you press left it goes to CWM Recovery, and if you press home, it just go to xRecovery
I had no luck with qwerty. but this works, only a issue, allways boot on recovery, but i know how to fix it
D4rKn3sSyS said:
Yes middle button it's home button, and left... left, im using a dirty way to identify what's the key pressed, so if you press left it goes to CWM Recovery, and if you press home, it just go to xRecovery
I had no luck with qwerty. but this works
Click to expand...
Click to collapse
That's is nice.i'll try it with x8.you know that any keys or touch screen on boot will trigger the recovery.if we specificate a key to trigger the recovery,we could prevent any accidental recovery trigger.
Done, fixed, but need X10 mini pro testers, maybe each device have different keys.
Last code working on 1st post
happy testing !
Added explanation of code to first post, so can be ported to other devices easily
i can't boot in any recovery.
pressing left button it boot system, pressing midlle (home) button stuck in sony ericsson logo and pressing back button (right) stuck in sony ericsson logo.
from system (power button) reboot into recovery phone reboot and skip booting in recovery it just go in system.
edit: looks like i lost recovery i can't get it:/ i hope that reflash rom ower it will fix that
Eyama said:
i can't boot in any recovery.
pressing left button it boot system, pressing midlle (home) button stuck in sony ericsson logo and pressing back button (right) stuck in sony ericsson logo.
from system (power button) reboot into recovery phone reboot and skip booting in recovery it just go in system.
Click to expand...
Click to collapse
Great :S that means we cannot use this system. Can you try pressing only Once?, and when Sony Ericsson logo appears, btw it take Longer that normal
EDIT: Of course, zip file it's wrong, lemme fix it
EDIT2: Fixed, try now
D4rKn3sSyS said:
Great :S that means we cannot use this system. Can you try pressing only Once?, and when Sony Ericsson logo appears, btw it take Longer that normal
EDIT: Of course, zip file it's wrong, lemme fix it
EDIT2: Fixed, try now
Click to expand...
Click to collapse
well i can't i dont have revovery any more:/ will it work if i putt manualy in system/bin ?
Eyama said:
well i can't i dont have revovery any more:/ will it work if i putt manualy in system/bin ?
Click to expand...
Click to collapse
Well yes, you can use adb too , in fact only thing you have to do now it's to change permissions to xRecovery.tar inside /system/bin to 755
or
xxx
x x
x x
EDIT: Also if recovery dont works, use terminal emulator for running this
Code:
echo "recovery" > /data/local/tmp/bootrecovery
reboot
well great news it is working midle button xRecovery (it come fast no need to pressing long time), back (left) button CWM recovery (it takes a litle bit but no long it is quite fast) so great work D4 your the man

[unbrick] - Fixing partition table, or completely dead nook

An Unbrick Guide for 16GB Tablet. I am not responsible for damage, otherwise this should fix any damage. But am more than happy to help.
meghd00t's 8GB and 16GB partition rescue sdcard: http://forum.xda-developers.com/showthread.php?t=1562130
For whatever reason the repartitioning card didn't work on my 16gb tablet, which is why I had to do it manually.
When to use this guide
1. If you used parted to remove your entire partitions and cannot recreate them in parted
2. If 1 is true, and you can't boot into Clockworkmod
3. If 2 is true and nothing will boot at all--the only exception being booting from the sd card--and it just won't turn on at all and get into any splash screen.
4. If everything else has failed
5. If all the above are true but you can boot Clockworkmod from an sd card. This is important.
If your nook will boot into cwm, then your partitions are fine. If you would like to, however, you can still use this to fix your nook, but I insist you try other methods around the development section before trying this one. This is a long process, and most other solutions for an otherwise dead nook can easily be solved, and a lot faster. This should only be used as a last resort. Otherwise if you just want to experiment around a bit, feel free!
------
Okay. So, visit Goncezilla's thread on making a bootable cwm-sd:
http://forum.xda-developers.com/showthread.php?t=1446987
Download the files on the first method ("METHOD 1- SDCARD")
Instead of a 50mb partition, just make a 2gb partition, make sure it's formatted to fat32 and enable boot, and lba flags. I reccommend at least a 2gb microsd. Anyways, unzip the files that are provided, but put them in the root folder of the sd card, not "SDCARD". Make a folder called blk.
Go to lavero.burgos' topic on "restoring partitions with dd":
http://forum.xda-developers.com/showthread.php?t=1570022
Download the provided files: mmcblk0p1, mmcblk0p2, mmcblk0p3, and mmcblk0p4. Place them in the "blk" folder.
Download the two files provided by meghd00t here:
http://forum.xda-developers.com/showpost.php?p=24805392&postcount=74
unpack gdisk and sgdisk to the root folder of the sdcard. unpack "scripts" into the same root folder of the sdcard. Don't worry about the mess. Now make sure your nook is off by pressing and holding the power button for like 15 seconds. Then, insert the the microsd card into your nook. Connect the cable to the nook and either to the wall adapter or to your box. Let it boot into cwm. Once in, open up a terminal. First thing you want to do:
Code:
$ adb start-server
$ adb devices
now make sure your device's serial number shows up, and that it shows your nook in recovery. Now, this next part is very important. VERY important. I wish I would have done this before. But even so, there is always hope!~ But still, make sure you follow this next step:
Code:
$ adb shell
~ # mount sdcard
~ # dd if=/dev/block/mmcblk0p5 of=/sdcard/blk/mmcblk0p5
This will backup your rom partition, which holds important information, like serial no. and MAC address. You'll be happy you did this before.
**Note, if it brings up an error, make sure the sdcard is mounted, try again, and cd over to /sdcard/blk to make sure that the rom partition is there safely. If it brings up an error and everything is mounted, try changing the extension name to "mmcblk0p5.img" when you use disk dump.
Optionally, it might be smart to backup the rom partition to your computer:
Code:
~ # exit
$ adb pull /sdcard/blk/mmcblk0p5 /path/to/backup
So now, you've got all the files you need. For the sake of argument, I'll assume you have made a cwm backup before your nook died. So, go ahead and destroy your nook completely:
Code:
~ # cd sdcard
/sdcard # ./sgdisk -Z /dev/block/mmcblk0
And now re-create it:
Code:
/sdcard # ./sgdisk /dev/block/mmcblk0 -a 256 -n 1:256:511 -n 0:0:1023 -n 0:0:31743 -n 0:0:65535 -n 0:0:163839 -n 0:0:262143 -n 0:0:1019903 -n 0:0:2273279 -n 0:0:3145727 -n 0:0:+12G -n 0:0:0
This is a lot easier than re-creating the partitions with parted by the way. I'd like to give a special shout out to meghd00t for compiling these static binaries for ARM. Thanks! This is a full stock partition, if you want meghd00t's 10gb media, 2.8gb userdata partitions:
Code:
/sdcard # ./sgdisk -c 1:xloader -c 2:bootloader -c 3:recovery -c 4:boot -c 5:rom -c 6:bootdata -c 7:factory -c 8:system -c 9:cache -c 10:media -c 11:userdata /dev/block/mmcblk0
Now follow up:
Code:
/sdcard # ./sgdisk -p /dev/block/mmcblk0
verify the list is correct. Now do this:
Code:
[b]/sdcard # cd /sdcard/sbin
/sdcard # ./genptable /tmp/genptable[/b]
This will create a partition table, the stock nook tablet modified gpt table in /tmp
Code:
/sdcard # mv /tmp/genptable /sdcard/blk
~ # dd if=/sdcard/blk/genptable of=/dev/block/mmcblk0
You now have your partition table back that will pass consistency checks! but we aren't done yet. We need to reformat everything:
Code:
/sdcard # cd sbin
/sdcard/sbin # ./mkdosfs -F 32 /dev/block/mmcblk0p5
/sdcard/sbin # ./mkdosfs -F 32 /dev/block/mmcblk0p6
/sdcard/sbin # ./mkdosfs -F 32 /dev/block/mmcblk0p10
/sdcard/sbin # cd ../../
~ # dd if=/sdcard/blk/mmcblk0p1 of=/dev/block/mmcblk0p1
~ # dd if=/sdcard/blk/mmcblk0p2 of=/dev/block/mmcblk0p2
~ # dd if=/sdcard/blk/mmcblk0p3 of=/dev/block/mmcblk0p3
~ # dd if=/sdcard/blk/mmcblk0p4 of=/dev/block/mmcblk0p4
~ # dd if=/sdcard/blk/mmcblk0p5 of=/dev/block/mmcblk0p5
Who just got their Serial number back. :]
Now this next part is confusing, but for some reason make_ext4fs didn't want to work for me, so I had to do it the painful way:
Code:
~ # parted /dev/block/mmcblk0
(parted) rm 7
(parted) rm 8
(parted) rm 9
(parted) rm 11
(parted) mkpartfs primary ext2 134MB 522MB
(parted) mkpartfs primary ext2 522MB 1164MB
(parted) mkpartfs primary ext2 1164MB 1611MB
Now the userdata partition all depends on how big you made your media partition. But I will go ahead and use the stock settings
Code:
(parted) mkpartfs primary ext2 2684MB 15.9GB
(parted) quit
~ # tune2fs -j /dev/block/mmcblk0p7
~ # e2fsck -fDp /dev/block/mmcblk0p7
~ # tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p7
~ # e2fsck -fDp /dev/block/mmcblk0p7
~
~ # tune2fs -j /dev/block/mmcblk0p8
~ # e2fsck -fDp /dev/block/mmcblk0p8
~ # tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p8
~ # e2fsck -fDp /dev/block/mmcblk0p8
~
~ # tune2fs -j /dev/block/mmcblk0p9
~ # e2fsck -fDp /dev/block/mmcblk0p9
~ # tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p9
~ # e2fsck -fDp /dev/block/mmcblk0p9
~
~ # tune2fs -j /dev/block/mmcblk0p11
~ # e2fsck -fDp /dev/block/mmcblk0p11
~ # tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p11
~ # e2fsck -fDp /dev/block/mmcblk0p11
~
~ # parted /dev/block/mmcblk0
[b]
(parted) name 7 factory
(parted) name 8 system
(parted) name 9 cache
(parted) name 11 userdata
[/b]
(parted) print
Now verify that your table looks like, or at least similar, to this. Basically, you want to make sure everything is formatted correctly:
Code:
Model: MMC 016G4A (sd/mmc)
Disk /dev/block/mmcblk0: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.8MB 33.6MB 16.8MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4 factory
8 522MB 1164MB 642MB ext4 system
9 1164MB 1611MB 447MB ext4 cache
10 1611MB 2684MB 1074MB fat32 media
11 2684MB 15.9GB 12.9GB ext4 userdata
If something looks a bit off, go back and repeat the appropriate step.
Code:
(parted) quit
~ # umount sdcard
~ # exit
Go ahead and shut down the device. Remove the sdcard, and turn it back on with the power button.
Status: xloader, bootloader, recovery, and boot partitions were all flashed and should be working perfectly. Which means you have probably noticed yourself booting into cwm, which is a good sign!!
Now, insert an sdcard that has your original cwm backup. And go ahead and restore your backup. Wipe /cache. Reboot the nook. You should see a splash screen. Dead nook... alive!11!
That's pretty much it. I'm just happy my nook is working. Hopefully this will help someone out who has a dead nook and has no clue how to fix it, like I did. If you have any questions, let me know so I can try to help. If you notice an error or inconsistency in my guide, please let me know so I can fix it before someone breaks their nook because of me. Sorry about reformatting the ext4 partitions guys. Since make_ext4fs wouldn't work for me, that was the only other way I knew how to do it. If someone can post what they did to reformat to ext4 using make_ext4fs, I'll edit the post to accomodate everyone else.
Thanks to: meghd00t, lavero.burgos, AdamOutler, tselling, and CelticWebSolutions.
Thanks for finding time to make this.
All i can say is Bravo!
We need more of this guides coming up.
2TU!
Nice guide.....
Sent from my Non-B&N Tablet running CM7
Very nice guide for dead nook, may i advice you to put a link for meghd00t recovery for 8GB NT so 8gb users work with the proper cwm recovery for them. I will be linking to this guide in my Unbrick thread.
Also would be good if you advice people to try alternative methods if they don't have dead dead nooks and with this i mean people that their boot block(s) is working and they have just flashed wrong recovery or flashed a rom that they should had not. This is advanced and if people have messed enough with their devices to competely wipe the partitions and more then im sure they will have fun with this .
Big thanks to meghd00t for build the tools and the cwm recovery for 8GB NT.
~ Veronica
lavero.burgos said:
Very nice guide for dead nook, may i advice you to put a link for meghd00t recovery for 8GB NT so 8gb users work with the proper cwm recovery for them. I will be linking to this guide in my Unbrick thread.
Also would be good if you advice people to try alternative methods if they don't have dead dead nooks and with this i mean people that their boot block(s) is working and they have just flashed wrong recovery or flashed a rom that they should had not. This is advanced and if people have messed enough with their devices to competely wipe the partitions and more then im sure they will have fun with this .
Big thanks to meghd00t for build the tools and the cwm recovery for 8GB NT.
~ Veronica
Click to expand...
Click to collapse
Thanks!
I did try to say when to use the guide at the beginning but I will be more specific most definitely, to make sure users don't get confused!
demetris_I said:
Thanks for finding time to make this.
All i can say is Bravo!
We need more of this guides coming up.
2TU!
Click to expand...
Click to collapse
It was kind of hard, because I couldn't remember where all the topics I used went to. Like Goncezilla's cwm sd files. I couldn't find them anywhere! I apologize for taking so long though. I'm really lazy...... not my greatest strength1!
Thank you though! I'm glad I finally figured it out1; :]
okey, so I get this error:
/sdcard # ./sgdisk -Z /dev/block/mmcblk0
/sbin/sh: ./sgdisk: not found
EDIT: never mind it didn't mount the sdcard had to restart the computer and nook then it worked.
EDIT2: now I got this error
/sdcard # /sdcard/sbin/genptable
Usage /sdcard/sbin/genptable <raw_output_file>
/sdcard # mv /tmp/genptable /sdcard/blk
mv: can't rename '/tmp/genptable': No such file or directory
Pete1612 said:
okey, so I get this error:
/sdcard # ./sgdisk -Z /dev/block/mmcblk0
/sbin/sh: ./sgdisk: not found
EDIT: never mind it didn't mount the sdcard had to restart the computer and nook then it worked.
EDIT2: now I got this error
/sdcard # /sdcard/sbin/genptable
Usage /sdcard/sbin/genptable <raw_output_file>
/sdcard # mv /tmp/genptable /sdcard/blk
mv: can't rename '/tmp/genptable': No such file or directory
Click to expand...
Click to collapse
Did you do the genptable script?
EDIT: Aw, son of a..!! I messed up, hang on, give me a second.
EDIT 2: oKAY, I fixed it. I'm sorry about that, my mistake. i bolded the text so you can see what I fixed.
okey that worked and now I get this if I do dd:
~ # dd if=/sdcard/blk/mmcblk0p1 /dev/block/mmcblk0p1
BusyBox v1.19.4-cm7 static (2012-02-04 22:27 +0100) multi-call binary.
Usage: dd [if=FILE] [of=FILE] [ibs=N] [obs=N] [bs=N] [count=N] [skip=N]
[seek=N] [conv=notrunc|noerror|sync|fsync]
Copy a file with converting and formatting
if=FILE Read from FILE instead of stdin
of=FILE Write to FILE instead of stdout
bs=N Read and write N bytes at a time
ibs=N Read N bytes at a time
obs=N Write N bytes at a time
count=N Copy only N input blocks
skip=N Skip N input blocks
seek=N Skip N output blocks
conv=notrunc Don't truncate output file
conv=noerror Continue after read errors
conv=sync Pad blocks with zeros
conv=fsync Physically write data out before finishing
Numbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024),
MD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824)
EDIT: It has to be dd if=/sdcard/blk/mmcblk0p1 of=/dev/block/mmcblk0p1 you forgot the of=
EDIT2: mkpartfs primary ext2 2684GB 15.9GB I think the 2684GB is supposed to mean mb
EDIT3: so after doing your tutorial my partition table looks like this:
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.3MB 33.6MB 17.3MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4
8 522MB 1164MB 642MB ext4
9 1164MB 1611MB 447MB ext4
10 1611MB 14.5GB 12.9GB fat32 media
11 14.5GB 15.9GB 1443MB ext4
as you can see a bunch of names for the partitions are missing, how can I name them
Pete1612 said:
EDIT: It has to be dd if=/sdcard/blk/mmcblk0p1 of=/dev/block/mmcblk0p1 you forgot the of=
Click to expand...
Click to collapse
Yeah, yeah laugh away. I always forget it, I'm just half dumb okay? <.<;
Pete1612 said:
EDIT2: mkpartfs primary ext2 2684GB 15.9GB I think the 2684GB is supposed to mean mb
Click to expand...
Click to collapse
The laughter doesn't stop. ;_;
Pete1612 said:
EDIT3: so after doing your tutorial my partition table looks like this:
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.3MB 33.6MB 17.3MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4
8 522MB 1164MB 642MB ext4
9 1164MB 1611MB 447MB ext4
10 1611MB 14.5GB 12.9GB fat32 media
11 14.5GB 15.9GB 1443MB ext4
as you can see a bunch of names for the partitions are missing, how can I name them
Click to expand...
Click to collapse
Ooh. I forgot about that!!! Thanks for reminding me actually. You know, you've helped me with a lot of errors I've made. :l Just go back into parted and do this:
Code:
(parted) name 7 factory
(parted) name 8 system
(parted) name 9 cache
(parted) name 11 userdata
And that should do it. Go into cwm and either flash an old backup or one of the other roms.
By the way, while you're at it, do me a favour. When in clockworkmod, on the terminal, if you enter "adb devices" does it show your nook with your original serial number? This is the part I am most concerned apart. I want to make sure the serial number stays intact.
And I'm sorry for taking so long to respond. I was replacing my stupid laptop's old keyboard. It had broken shift and backspace keys. Which is probably why I seemed illiterate most of the time.
okey so I did adb devices and I only get zeros, the problem is though I couldn't pull partition 5 from my nook because the partition table was completely destroyed (and as far as I know partition 5 has the serial number and the mac adress in it)
EDIT: so I tried to install CM 7.2 which was succesfull. Then I rebooted my nook and it goes into CWM (internal).
EDIT2: just tried the recovery bootloop fix and it didn't help
Pete1612 said:
okey so I did adb devices and I only get zeros, the problem is though I couldn't pull partition 5 from my nook because the partition table was completely destroyed (and as far as I know partition 5 has the serial number and the mac adress in it)
EDIT: so I tried to install CM 7.2 which was succesfull. Then I rebooted my nook and it goes into CWM (internal).
EDIT2: just tried the recovery bootloop fix and it didn't help
Click to expand...
Click to collapse
Ok i know about this one and it might help. Flash stock 1.4.2 recovery and then run the stock 1.4.2 update.zip from sdcard. More info in my thread where it says ATTENTION 8GB USERS but works for 16GB aswell.
~ Veronica
Sent from my BNTV250A using xda premium
well and where can I find the stock recovery and the 1.4.2 ? the problem is, if this method doesn't work, am I still able to run CWM sd card?
Did you take out the microsd card? Dumb question but yeah.
Okay, I see the problem:
EDIT3: so after doing your tutorial my partition table looks like this:
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.3MB 33.6MB 17.3MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4
8 522MB 1164MB 642MB ext4
9 1164MB 1611MB 447MB ext4
10 1611MB 14.5GB 12.9GB fat32 media
11 14.5GB 15.9GB 1443MB ext4
Click to expand...
Click to collapse
Boot is a secure partition that's supposed to start at 16.8mb not 16.3mb
Hmm...hmmm... Try doing "dd if=/sdcard/blk/genptable of=/dev/block/mmcblk0" one more time. And then repost your partition table.
Pete1612 said:
well and where can I find the stock recovery and the 1.4.2 ? the problem is, if this method doesn't work, am I still able to run CWM sd card?
Click to expand...
Click to collapse
Yes, you can still run CWM from sdcard. It's probably the best thing about the nook amirite.
okey I"ll do the bootpartition fix. I changed the micro sd card becuase my bootable sdcard couldn't safe all the mmcblk0px files...
Alrighty. Let me know what happens
nope it's still at the same place:
Model: MMC 016G4A (sd/mmc)
Disk /dev/block/mmcblk0: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.3MB 33.6MB 17.3MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4 factory
8 522MB 1164MB 642MB ext4 system
9 1164MB 1611MB 447MB ext4 cache
10 1611MB 14.5GB 12.9GB fat32 media
11 14.5GB 15.9GB 1443MB ext4 userdata
EDIT: can I redo the boot partition and if yes how ?
Pete1612 said:
nope it's still at the same place:
Model: MMC 016G4A (sd/mmc)
Disk /dev/block/mmcblk0: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.3MB 33.6MB 17.3MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4 factory
8 522MB 1164MB 642MB ext4 system
9 1164MB 1611MB 447MB ext4 cache
10 1611MB 14.5GB 12.9GB fat32 media
11 14.5GB 15.9GB 1443MB ext4 userdata
EDIT: can I redo the boot partition and if yes how ?
Click to expand...
Click to collapse
Hmm. You can't. Because parted will automatically revert it back to 16.3MB.
Try the process again, but this time dd genptable before you create the partitions, then create the partitions with sgdisk and let me know what it says.
what do you think about the Ubuntu total recovery before I do anything else ?

Multi-Boot RPi from Command Line [31 Oct 2013]

I wrote a shell script to multi-boot my RPi from a terminal. Script can be executed remotely via SSH or VNC.
Features:
Automatically detect all ext4 partitions of all storage devices attached to RPi (ext4 is the default partition type for hosting an RPi-compatible OS)
Reconstruct boot device names (root=/dev/*) from partition editor output. No changes are made to storage devices
Generate table of boot options and prompt user for option
Include option to shutdown
Reboot to selected rootfs, e.g. /dev/sda2 according to user-selected boot option
Script uses partition editor (parted) to identify the storage device paths. I did have to install parted on Raspbmc:
Code:
sudo apt-get install parted
Presently I have triple boot:
Raspbian #1 on SD (/dev/mmcblk0p2)
Raspbian #2 on USB HD (/dev/sda2)
Raspbmc on USB HD (/dev/sda4)
Partition Info:
PNY 16GB SD
[email protected]:/boot# parted /dev/mmcblk0 print
Model: SD SD16G (sd/mmc)
Disk /dev/mmcblk0: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 4194kB 62.9MB 58.7MB primary fat16 lba
2 62.9MB 16.0GB 15.9GB primary ext4
Western Digital 160GB HD 7200 RPM
[email protected]:/boot# parted /dev/sda print
Model: WDC WD1600BJKT-75F4T (scsi)
Disk /dev/sda: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 4194kB 62.9MB 58.7MB primary fat16 lba
2 77.6MB 21.5GB 21.5GB primary ext4
3 21.5GB 25.8GB 4295MB primary linux-swap(v1)
4 25.8GB 160GB 134GB primary ext4
And here's the boot script (/boot/rpiboot.sh):
Code:
#!/bin/sh
echo
echo "Reboot RPi to rootfs... "
cd /boot
ftxt="cmdline.txt"
fbak="cmdline.bak"
fnew="cmdline.new"
if [ -f $fnew ]
then
rm $fnew
fi
echo
rootfs=$(awk '{for (i=1; i<NF; i++) if (match($i,"root=")) {sub("root=", "", $i); print $i} }' $ftxt)
echo "Current rootfs: $rootfs"
#Reconstructing device names from partition editor output
parted /dev/mmcblk0 print > parted.txt
mmcname=$(awk '/\/dev\// {printf "%s", substr($2,1,length($2)-1) }' parted.txt)
awk -v mmcname=$mmcname '/ext4/ {printf "%sp%d\n", mmcname, $1 > "ext4.txt" }' parted.txt
parted /dev/sda print > parted.txt
mmcname=$(awk '/\/dev\// {printf "%s", substr($2,1,length($2)-1) }' parted.txt)
awk -v mmcname=$mmcname '/ext4/ {printf "%s%d\n", mmcname, $1 >> "ext4.txt" }' parted.txt
echo
echo "Boot options for rootfs:"
cat -n ext4.txt > ext4_enum.txt
more ext4_enum.txt
echo
printf "Enter boot option (press ENTER to shutdown or CNTL-z to exit):"
read -r ext4_index
if test -z "$ext4_index"
then
echo
echo "Shutting down in 3 seconds..."
sleep 3
shutdown -h now
exit 0
fi
#Determine rootfs corresponding to boot option
rootfs=$(awk -v ext4_index=$ext4_index '{if (match($1,ext4_index)) print $2}' ext4_enum.txt)
if test -z "$rootfs"
then
echo
echo "Invalid boot option or other error. Exiting..."
exit 1
fi
awk -v rootfs=$rootfs -v fnew=$fnew '{
for (i=1; i<NF; i++) if (match($i,"root=")) {$i = "root=" rootfs; print $0 > fnew} }' $ftxt
if [ -f $fnew ]
then
printf "Press ENTER to reboot to $rootfs, or CNTL-z to exit."
read -r text
mv $ftxt $fbak
mv $fnew $ftxt
fi
echo
echo "/boot/cmdline.txt:"
more $ftxt
echo "Rebooting to $rootfs in 3 seconds..."
sleep 3
reboot
exit 0
Launching rpiboot.sh as root, here are my own results of a boot switch from /dev/sda2 (Raspbian) to /dev/sda4 (Raspbmc):
Code:
[email protected] ~ $ sudo sh /boot/rpiboot.sh
Reboot RPi to rootfs...
Current rootfs: /dev/sda2
Boot options for rootfs:
1 /dev/mmcblk0p2
2 /dev/sda2
3 /dev/sda4
Enter boot option (press ENTER to shutdown or CNTL-z to exit):3
Press ENTER to reboot to /dev/sda4, or CNTL-z to exit.
/boot/cmdline.txt:
dwc_otg.lpm_enable=0 root=/dev/sda4 rootfstype=ext4 noatime quiet rootwait loglevel=1 sdhci-bcm2708.enable_l
lm=1 dwc_otg.microframe_schedule=1 dwc_otg.fiq_fix_enable=0 dwc_otg.fiq_split_enable=0 dwc_otg.trans_backoff
=3000
Rebooting to /dev/sda4 in 3 seconds...
Broadcast message from [email protected] (pts/0) (Thu Oct 31 15:28:20 2013):
The system is going down for reboot NOW!
[email protected] ~ $ Connection to 10.0.0.16 closed by remote host.
Connection to 10.0.0.16 closed.
[email protected]:~#
And voila, Raspbmc comes up. I now SSH in from my Ubuntu laptop:
Code:
[email protected]:~# ssh [email protected]
[email protected]'s password:
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
[email protected]:~$
Of course VNC renders the elegant desktop experience, and setting up VNC is fairly straightforward:
http://learn.adafruit.com/adafruit-...control-with-vnc/running-vncserver-at-startup
However VNC does not work on Raspbmc since VNC relies on the X11 window system, while Raspbmc’s XBMC implementation is rendered in the framebuffer only. Thus VNC cannot be used as there is no X-session available for connection. See:
http://www.raspbmc.com/wiki/user/frequently-asked-questions/
But SSH works well.
Blessings. Enjoy!
tanks!
hello is verry good
please tuto create multiboot for noobs lol
And Raspbmc is EOL.
help
[email protected]:~ $ df -h
Sys. de fichiers Taille Utilis▒ Dispo Uti% Mont▒ sur
/dev/root 7,2G 4,5G 2,5G 65% /
devtmpfs 364M 0 364M 0% /dev
tmpfs 368M 0 368M 0% /dev/shm
tmpfs 368M 5,3M 363M 2% /run
tmpfs 5,0M 4,0K 5,0M 1% /run/lock
tmpfs 368M 0 368M 0% /sys/fs/cgroup
tmpfs 1,0M 4,0K 1020K 1% /var/pipeyelog
/dev/mmcblk0p1 60M 20M 41M 34% /boot
tmpfs 74M 0 74M 0% /run/user/1000
/dev/sda3 6,3G 15M 6,0G 1% /media/pi/e836e8e0-22be-4f6e-8836-1f4 039a627e8
/dev/sda2 7,2G 4,5G 2,5G 65% /media/pi/ad6203a1-ec50-4f44-a1c0-e6c 3dd4c9202
/dev/sda1 60M 20M 41M 34% /media/pi/boot
[email protected]:~ $ sudo sh /boot/rpiboot.sh
Reboot RPi to rootfs...
Current rootfs: /dev/mmcblk0p2
Boot options for rootfs:
1 /dev/mmcblk0p2
Enter boot option (press ENTER to shutdown or CNTL-z to exit):^Z
[1]+ Stopp▒ sudo sh /boot/rpiboot.sh
[email protected]:~ $
why not see my sda2 and sda3 partition ( Raspbian and raspbmc ) ??

Infinix x551 boot loop and cant mount /cache on recovery

Please help me,
First of all my infinix x551 16gb 2gb ram is running on kitkat, then i have successly upgrade to lolipop via flashtool. (my infinix ealry product is only support kitkat)
after while i realized my phone is slower with lolipop then i tried to downgrade to kitkat using stok rom and flashtool.
But my phone is now bootloop (after infinix logo then black screen)
tried to enter rec mode and it load rua1 autoCWM v5.5.0.4 but there is error e:cant mount /cache......
i have tried MTK Droid tools but i dont understand how to flash with it.
i have tried adb shell command :
~ # 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)
/dev/block/mmcblk0p5 on /system type ext4 (ro,relatime,data=ordered)
~ # rm - r /data/dalvik-cache
rm: can't remove '-': No such file or directory
rm: can't remove 'r': No such file or directory
rm: can't remove '/data/dalvik-cache': No such file or directory
~ # rm - r /cache/dalvik-cache
rm: can't remove '-': No such file or directory
rm: can't remove 'r': No such file or directory
rm: can't remove '/cache/dalvik-cache': No such file or directory
~ #
/sbin/sh: --wipe_data: not found
~ # recovery --wipe_data
sh: /sbin/postrecoveryboot.sh: not found
^Z[1]+ Stopped recovery --wipe_data
~ # recovery --wipe_cache
sh: /sbin/postrecoveryboot.sh: not found
^C
for information i tried install any stok rom i can find for my infinix with flashtool (download only or format and download) it is succed (after flashing) but it still blackscreen when i tried to boot.
I though the problem is from my stok rom that i tried to downgrade that corrupt my partition table.
i check with adb shell i found ext2fs is exist but ext4fs is not and my cwm is read only on ext4fs so there is mistmacth boot partition format. however i dont know how to change the partition and clean install my infinix.
anyway, i tried enter fastboot with adb fastboot,
then i tried fastboot oem unlock and there is confirm notification on phone.
but i cant choose with my volume key (no response) although in recovery is normal.
Is there anyway to unlock oem and confirm with out volume key?
any suggest are welcom...
i need help as fast as posible.
Thank you for any of you that help me.
here's another try with adb shell :
~ # parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mkfs
mkfs
mkfs
Error: /dev/block/mmcblk0: unrecognised disk label
(parted) print
print
print
Error: /dev/block/mmcblk0: unrecognised disk label
i tried to do rm then reboot recovery :
~ # ls -la /dev/block/mmcblk*
ls -la /dev/block/mmcblk*
brw------- 1 root root 179, 0 Jan 2 23:55 /dev/block/mmcblk0
brw------- 1 root root 179, 32 Jan 2 23:55 /dev/block/mmcblk0boot0
brw------- 1 root root 179, 64 Jan 2 23:55 /dev/block/mmcblk0boot1
brw------- 1 root root 179, 1 Jan 2 23:55 /dev/block/mmcblk0p1
brw------- 1 root root 179, 2 Jan 2 23:55 /dev/block/mmcblk0p2
brw------- 1 root root 179, 3 Jan 2 23:55 /dev/block/mmcblk0p3
brw------- 1 root root 179, 4 Jan 2 23:55 /dev/block/mmcblk0p4
brw------- 1 root root 179, 5 Jan 2 23:55 /dev/block/mmcblk0p5
brw------- 1 root root 179, 6 Jan 2 23:55 /dev/block/mmcblk0p6
brw------- 1 root root 179, 7 Jan 2 23:55 /dev/block/mmcblk0p7
~ # parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
print
Error: Can't have a partition outside the disk!
so, the memory can still remove folder and adding new one.
tried to flash it again... cross my finger
no hope....
it still get error on mmcblk0p6
(parted) print
print
print
Error: /dev/block/mmcblk0p6: unrecognised disk label
(parted) mklabel
mklabel
mklabel
New disk label type? msdos
msdos
msdos
(parted) print
print
print
Error: /dev/block/mmcblk0p6: unrecognised disk label
(parted)
only mmcblk0p5 can be print.... other than this it give error label.
~ # parted /dev/block/mmcblk0p5
parted /dev/block/mmcblk0p5
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0p5
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
print
Model: Unknown (unknown)
Disk /dev/block/mmcblk0p5: 2684MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 2684MB 2684MB ext4
anyway when i flashing with spflashtool there is no error....
What can be wrong...
up...
is there anyway i can use my ext sd card to boot from that i case my internal ROM is dead?

[GUIDE][Project Treble] Manual - Create Vendor Partition for PT GSI ROM MI3/MI4

PHP:
#include
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices
* Do With Your Own Risk
* If you put blamed on me?
* I will laugh at you.
* YOU HAVE BEEN WARNED!
*/
Hello Guys, in order to make our Cancro successfully flash GSI Treble Rom, we need to do some of the modification to the internal memory and system space and also create a new partition for vendor image. As we all know there is bunch of guide and tutorial for system partition for MI3 and the very famous and easy is just using script to flash via recovery, and you done. So today im going to lead you to extend your system partition to 2GB, and creating new vendor partition. I tested it on MI3W 16GB and 64GB.
​
REQUIREMENTS
BACKUP ALL YOUR CURRENT DATA TO WINDOWS OR USB OTG
CWM v6.0.5.1 (R11) by furniel and donbot
ADB Install
Fastboot Install
TWRP TREBLE 3.2.3.0 Cancro
MIUI 10 EU ROM
LET'S BEGIN
Reboot to recovery and connect your phone to Window
Open a cmd window (or terminal, if you're using linux), and connect through adb by typing;
adb devices enter
adb shell enter
Code:
adb devices
adb shell
If everything is fine and you get a shell input (#), start parted by typing;
parted /dev/block/mmcblk0 enter
print enter
Code:
parted /dev/block/mmcblk0
print
{
"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"
}
Output of "print" should be something like this
Remove partition 23 24 25
rm 23 enter
rm 24 enter
rm 25 enter
Code:
rm 23
rm 24
rm 25
If you get an error message when rm 25 like this
name 25 cache
type quit enter
reboot recovery on phone
connect to adb again
repeat #2 , #3 command
type print enter
type rm 25
And now we are going to create 2GB system partition and vendor partition and rename it
mkpartfs primary ext2 403 2403 enter
mkpartfs primary ext2 2403 2453 enter
mkpartfs primary ext2 2453 2653 enter
mkpartfs primary ext2 2653 62.5G enter * for 64GB if * 16GB mkpartfs primary ext2 2653 15.8GB
name 23 system enter
name 24 cache enter
name 25 vendor enter
name 26 userdata enter
Code:
mkpartfs primary ext2 403 2403
mkpartfs primary ext2 2403 2453
mkpartfs primary ext2 2453 2653
mkpartfs primary ext2 2653 62.5G
Code:
name 23 system
name 24 cache
name 25 vendor
name 26 userdata
quit
After renaming and type quit and dont close the cmd and still on shell ~#
Now we are going to convert all newly partition 23 24 25 26 from ext2 to ext4
tune2fs -j /dev/block/mmcblk0p23 enter
e2fsck -fDp /dev/block/mmcblk0p23 enter
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p23 enter
e2fsck -fDp /dev/block/mmcblk0p23 enter
tune2fs -j /dev/block/mmcblk0p24 enter
e2fsck -fDp /dev/block/mmcblk0p24 enter
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p24 enter
e2fsck -fDp /dev/block/mmcblk0p24 enter
tune2fs -j /dev/block/mmcblk0p25 enter
e2fsck -fDp /dev/block/mmcblk0p25 enter
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p25 enter
e2fsck -fDp /dev/block/mmcblk0p25 enter
tune2fs -j /dev/block/mmcblk0p26 enter
e2fsck -fDp /dev/block/mmcblk0p26 enter
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p26 enter
e2fsck -fDp /dev/block/mmcblk0p26 enter
Code:
tune2fs -j /dev/block/mmcblk0p23
e2fsck -fDp /dev/block/mmcblk0p23
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p23
e2fsck -fDp /dev/block/mmcblk0p23
tune2fs -j /dev/block/mmcblk0p24
e2fsck -fDp /dev/block/mmcblk0p24
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p24
e2fsck -fDp /dev/block/mmcblk0p24
tune2fs -j /dev/block/mmcblk0p25
e2fsck -fDp /dev/block/mmcblk0p25
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p25
e2fsck -fDp /dev/block/mmcblk0p25
tune2fs -j /dev/block/mmcblk0p26
e2fsck -fDp /dev/block/mmcblk0p26
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p26
e2fsck -fDp /dev/block/mmcblk0p26
exit
Go back to parted to check whether it's applied;
parted /dev/block/mmcblk0 enter
print enter
Code:
parted /dev/block/mmcblk0
print
Your partition should be like this, if you follow my calculation.
Also can follow this calculation for 1.5 GB system partition.
CONGRATS!! You have success parted your system partition, now you can disable your MI3/MI4 connection from WINDOWS.
Make sure that you still on that CWM Recovery, copy MIUI 10 EU ROM to internal memory, flash it via CWM, wait till your MI3 load till startup wizard. Install MIUI 10 via CWM and reboot around 10 to 20 minutes, pls make sure that your battery is up to 50% above.
Reboot to fastboot and flash TWRP Treble 3.2.3.0 and now you can easily flash GSI ROM type Arm A Only.
Now you already have a system partition 2GB and vendor partition, that enough for flashing GSI Image, Thanks for following my guide.
​
Reference link
[GUIDE][ProjectTreble]Create a vendor partition for cancro to flash a PT GSI IMAGE
[HOWTO][GUIDE][Mi3][Mi4]Resize/extend system partition capacity
Cancro ROM Group
Group rules:
English only.(You can use the translator to communicate.
Respect developers and administrators.
Please do not send spam.
Do not send stickers continuously.
Channel: @cancro ROM
CN Group: @cancro Group
https://t.me/micancro
Contributor
gujiangjiang
biepurity
RESERVED FOR SCREENSHOT
2GB PARTITION
1.5GB PARTITION
These 800 MB free space is left after installation? Or...
Sent from my MI 4W using Tapatalk
nikolce.markovski said:
These 800 MB free space is left after installation? Or...
Sent from my MI 4W using Tapatalk
Click to expand...
Click to collapse
Yes, im using treble rom, and it supposed to be like what you seeing. If no partition done. So there is no taste of trebel gsi rom.
Great Guide, but how to copy the vendor files in the new Vendor partition, how to extract them from MIUI?
May i know what's the most stable treble rom ur using rn?
dace.manutd said:
Great Guide, but how to copy the vendor files in the new Vendor partition, how to extract them from MIUI?
Click to expand...
Click to collapse
First post Reference link
kaiz16 said:
May i know what's the most stable treble rom ur using rn?
Click to expand...
Click to collapse
HAVOC OS 2.0 OFFICIAL GSI ARM A
@Dzol Cp - Can you issue the following commands whilst you're in 'TWRP recovery' on your 16GB Xiaomi Mi3 that has a 2GB vendor partition....
Or anyone else for that matter...
Code:
adb shell
busybox fdisk -l /dev/block/mmcblk0
I would like to see your partition layout in blocks, the above command will output that information. Paste the partition table printed out in shell here, as I need this information to create a script that will benefit us all in the future.
Thanks.
stickman89
---------- Post added at 09:17 PM ---------- Previous post was at 08:57 PM ----------
Anyone with a 64GB cancro device, if you could post your partition table resulting from the above command before and after ammending vendor to 2GB; then I can also create a script for you too. Thanks.
Stickman89 said:
@Dzol Cp - Can you issue the following commands whilst you're in 'TWRP recovery' on your 16GB Xiaomi Mi3 that has a 2GB vendor partition....
Or anyone else for that matter...
Code:
adb shell
busybox fdisk -l /dev/block/mmcblk0
I would like to see your partition layout in blocks, the above command will output that information. Paste the partition table printed out in shell here, as I need this information to create a script that will benefit us all in the future.
Thanks.
stickman89
---------- Post added at 09:17 PM ---------- Previous post was at 08:57 PM ----------
Anyone with a 64GB cancro device, if you could post your partition table resulting from the above command before and after ammending vendor to 2GB; then I can also create a script for you too. Thanks.
Click to expand...
Click to collapse
Alright bro, will post for you asap. Now my current system is 1.5GB and only 200MB of vendor partition, are you sure that you need all info for 2GB vendor partition,
? in that case, so i need to repartition for 2GB vendor, bc vendor image just around 170MB (lot of space wasted), just give me sometime.
Dzol Cp said:
Alright bro, will post for you asap. Now my current system is 1.5GB and only 200MB of vendor partition, are you sure that you need all info for 2GB vendor partition,
? in that case, so i need to repartition for 2GB vendor, bc vendor image just around 170MB (lot of space wasted), just give me sometime.
Click to expand...
Click to collapse
That's fine. The 1.5GB partition table will do. Just use the commands I mentioned above... No point modifying your partitions further, especially if you're happy with your current table. Someone else can always provide their partition table for a 2GB allocation later.
If you've done it for both your 16GB and 64GB, then if you could provide the output for both that'd be useful.
Thanks.
Please can you upload vendor image only
Thanks a lot,Great Guide
Dzol Cp said:
​
Click to expand...
Click to collapse
Thanks for ur hard work bro..now let's share some fully working treble rom...:good:​

Categories

Resources