Need help renaming Partitions in Dual Boot kernel!! Please Help!!

Search This thread

fishingfon

Senior Member
Feb 10, 2012
724
250
Brisbane, QLD, Australia
Hi all,

I am in the process of porting the dual boot ramfs from the Galaxy S3 Siyah kernel to our Note II smartphones.

I have finished editing the ramfs, and changing the init files ect.
But the is still two files I have left to edit, and I am a bit stuck on them.

In the files /sbin/init and /sbin/ueventd the is quite a few references to theses partitions:





mknod /dev/block/mmcblk0p13 b 179 9
mknod /dev/block/mmcblk0p16 b 179 12

the problem is this, on the Galaxy S3 (which is what that ramfs was designed for) those partitions dont exist as far as I can see.
But on the note 2, those partitions are the /DATA and /SYSTEM partitions.

So I need to change thoses partitions to something else, but I dont know what.
I have copied the contents of the two files which thoses partitions are referenced in, and a table showing the Note 2 partitions and the coresponing S3 partitions, below

Could someone please help me find out what I should do here, as I cant do any more on the dual boot kernel till I get that sorted.

Here is the question I asked gokhan moral:





“I have edited all the files in the ramfs, apart from two files.
In the files /sbin/init and /sbin/ueventd the is 2 partitions referenced thru out them, they are:
mknod /dev/block/mmcblk0p13 b 179 9
mknod /dev/block/mmcblk0p16 b 179 12v
On the Galaxy S3, thoses partition names are un-used (as far as i know)
But on the Galaxy Note 2, thoses partitions are the /DATA and /SYSTEM partitions.
can i just change the partition names in thoses 2 files to soemthing like:
mknod /dev/block/mmcblk0p17 b 179 9
mknod /dev/block/mmcblk0p18 b 179 12v
or do i need to do something else to rename thoses two partitions?.”

And here is Gokhan Morals Response:





“block devices are created using the major and minor id's specific to your device (those do not change normally but you need to check anyway). so if they are mounted and needed you create them. if they are not needed in the script you don't have to create them. you have to try to keep the same functionality in the script. if you mount /system then you will need the block device that corresponds to /system with the correct major and minor numbers.”

but I still dont understand what I am supposed to do (I am not really a developer, I am more of a web designer ect)


Could someone please explain in simpler steps what I should do to rename thoses two partitions.



Here are the file contents (both files have the same contents, so i have only copied one here)

INIT:





#!/sbin/busybox sh
cd /

busybox mount -t proc proc /proc
busybox mount -t sysfs sysfs /sys

if busybox grep -q 1 /sys/class/power_supply/battery/batt_lp_charging ; then
# low power mode
echo 0 > /proc/sys/kernel/rom_feature_set
cp -a /res/misc/init.41/* /
chmod 755 /innt
chmod 644 /*.rc
chmod 644 /*.prop
exec /sbin/init2
fi

SECONDROM=1
NOBOOTLOGO=0
mkdir -p /dev/block
mkdir /dev/input
mkdir /dev/graphics
mknod /dev/graphics/fb0 c 29 0
mknod /dev/input/event1 c 13 65
mknod /dev/input/event2 c 13 66
mknod /dev/input/event8 c 13 72
mknod /dev/input/event9 c 13 73
mknod /dev/ashmem c 10 60
mknod /dev/block/mmcblk0p13 b 179 9
mknod /dev/block/mmcblk0p16 b 179 12
mknod /dev/block/loop0 b 7 0

mkdir /mnt
chmod 755 /mnt
mkdir /.secondrom
mount -t ext4 /dev/block/mmcblk0p16 /.secondrom

NEXTBOOT=`cat /.secondrom/media/.nextboot`
rm -f /.secondrom/media/.nextboot
DEFAULTROM=`cat /.secondrom/media/.defaultrom`

if grep -q bootmode=2 /proc/cmdline ; then
NEXTBOOT=0
fi

if [ "$NEXTBOOT" == "0" ]; then
mv -f /res/etc /
umount /.secondrom
echo 0 > /proc/sys/kernel/rom_feature_set
mv -f /res/misc/init.41/* /
mv -f /res/misc/recovery/* /
chmod 755 /innt
chmod 644 /*.smdk4x12
chmod 644 /*.rc
chmod 644 /*.prop
chmod -R 755 /lib
exec /sbin/init2
fi

SECONDROM=1
NOBOOTLOGO=0
[ -f /.secondrom/media/.secondrom/system.img ] || SECONDROM=0
[ -f /.secondrom/media/.nobootlogo ] && NOBOOTLOGO=1

if [ "$SECONDROM" == "0" ];then
if [ "$NOBOOTLOGO" == "0" ];then
/sbin/choose_rom $SECONDROM
fi
else
if [ "$NEXTBOOT" == "1" ];then
SECONDROM=0;
elif [ "$NEXTBOOT" == "2" ];then
SECONDROM=1;
else
if [ "$NOBOOTLOGO" == "1" ];then
SECONDROM=$DEFAULTROM
elif [ "$DEFAULTROM" == "1" ];then
/sbin/choose_rom $SECONDROM
if [ "$?" == "1" ]; then
SECONDROM=0
else
SECONDROM=1
fi
else
/sbin/choose_rom $SECONDROM
if [ "$?" == "1" ]; then
SECONDROM=1
else
SECONDROM=0
fi
fi
fi
fi

if [ "$SECONDROM" == "1" ]; then
mount -t ext4 /.secondrom/media/.secondrom/system.img /system
else
mount -t ext4 /dev/block/mmcblk0p13 /system
fi


AOSP=0
MIUI=0
CM10=0
JB=0

[ -f /system/framework/framework2.jar ] || AOSP=1
[ -f /system/framework/miui-framework.jar ] && MIUI=1
[ -f /system/lib/ssl/engines/libkeystore.so ] && JB=1
[ -f /system/framework/seccamera.jar ] || CM10=1

if [ "$JB" == 1 ];
then
if [ "$CM10" == 1 ];
then
echo 3 > /proc/sys/kernel/rom_feature_set
mv -f /lib/modules/dhd_cm.ko /lib/modules/dhd.ko
mv -f /res/misc/init.cm10/* /
else
echo 2 > /proc/sys/kernel/rom_feature_set
mv -f /res/misc/init.41/* /
fi
fi

if [ "$SECONDROM" == "1" ];then
mv /init.smdk4x12.rc.2 /init.smdk4x12.rc
mv /init.rc.2 /init.rc
mv /fstab.smdk4x12.2 /fstab.smdk4x12
else
rm -f /init.rc.2 /init.smdk4x12.rc.2 /fstab.smdk4x12.2
fi

umount -f /system
umount -f /.secondrom

rm -rf /res/misc/init*
chmod 755 /innt
chmod 644 /*.smdk4x12
chmod 644 /*.rc
chmod 644 /*.prop
chmod -R 755 /lib

# misc mods for i9300
insmod /lib/modules/m0_mods.ko
# cpu undervolting interfaces
insmod /lib/modules/cpu_undervolting.ko
# mali (gpu) interfaces
insmod /lib/modules/mali_control.ko
# additional CPU governors
insmod /lib/modules/cpufreq_hotplug.ko
insmod /lib/modules/cpufreq_lulzactiveq.ko
# additional I/O schedulers
insmod /lib/modules/sio-iosched.ko
insmod /lib/modules/vr-iosched.ko
# audio enhancements
insmod /lib/modules/kscoobydoo.ko devicename=scoobydoo_sound

exec /sbin/init2


And here is the partition layouts:





PARTITION: ` Galaxy S3 Galaxy Note 2
/BOOT mmcblk0p5 mmcblk0p8
/BOTA0 mmcblk0p1 mmcblk0p1
/BOTA1 mmcblk0p2 mmcblk0p2
/CACHE mmcblk0p8 mmcblk0p12
/EFS mmcblk0p3 mmcblk0p3
/HIDDEN mmcblk0p10 mmcblk0p14
/OTA mmcblk0p11 mmcblk0p15
/PARAM mmcblk0p4 mmcblk0p7
/RADIO mmcblk0p7 mmcblk0p10
/RECOVERY mmcblk0p6 mmcblk0p9
/SYSTEM mmcblk0p9 mmcblk0p13
/TOMBSTONES unknown mmcblk0p11
/USERDATA mmcblk0p12 mmcblk0p16

I think i copied thoses partitions right from my pc, but i may have got one mixed up or something



Please can someone help, as i have been searching for days, and asking lots of different people on xda, but no response

Thanks in advance

Cheers
Corey
 
Last edited:

garyd9

Inactive Recognized Developer
Sep 13, 2006
2,643
2,732
53
Pittsburgh, PA
First, if "herbew" is a friend of yours, please ask him to never send me a PM asking me to help someone ELSE. That's just spam.

On the i9300 (and Note2) devices, I'm surprised to see any calls at all to mknod. Most of the device files are created automatically these days. However, I'm NOT familiar with Gokhan's dual boot thing (I've never used it and I don't have an i9300 anymore to tinker with it.) I'm assuming that you'd like to reverse engineer what Gokhan has done and it's often more fun to work backwards than to just nag him until he helps. ;) So, I can't answer how to make it work, but I might be able to help you to reverse engineer or understand what is going on.

To find out more about your device nodes for mmcblk devices, you can run the following command (rooted, of course):
Code:
ls -l /dev/block/mmc*
The output will contain several lines similar to:
Code:
brw-rw----    1 system   root      179,   7 Dec 18 22:28 mmcblk0p7
In this case, the device major id is 179 and the minor id is 7. To see what those major ID's are, run "cat /proc/devices". (This doesn't show ALL device ID's used by the system, but covers most of them.) Another way to see all the partitions within the system is "cat /proc/partitions".

Doing the above on a i9300 both with and without the dual boot stuff might give some hints as to what changes the dualboot thing is making. You might also consider taking a look at whatever is used to install that dualboot stuff. Is it ONLY a kernel, or something more? Is it re-partitioning the device?

From what I could see of that init file, p16 is a partition used to store the secondary boot related flags and a system image. p13 appears to be the "primary" /system image partition.

Some questions to ask yourself:

What is the /system partition on a normal (non-dualboot) i9300? Is it p13 or something else? Does p16 exist in /proc/partitions on a non-dualboot system? In that non-dual boot setup, is there ANY device with a major of 179 and minor of 12? (My first thought would be it would be named mmcblk0p12)

Disclaimer: I'm going to try to avoid solving this for you. I'd prefer if I can guide you to solving it yourself and then sharing the results.
 

fishingfon

Senior Member
Feb 10, 2012
724
250
Brisbane, QLD, Australia
First, if "herbew" is a friend of yours, please ask him to never send me a PM asking me to help someone ELSE. That's just spam.

On the i9300 (and Note2) devices, I'm surprised to see any calls at all to mknod. Most of the device files are created automatically these days. However, I'm NOT familiar with Gokhan's dual boot thing (I've never used it and I don't have an i9300 anymore to tinker with it.) I'm assuming that you'd like to reverse engineer what Gokhan has done and it's often more fun to work backwards than to just nag him until he helps. ;) So, I can't answer how to make it work, but I might be able to help you to reverse engineer or understand what is going on.

To find out more about your device nodes for mmcblk devices, you can run the following command (rooted, of course):
Code:
ls -l /dev/block/mmc*
The output will contain several lines similar to:
Code:
brw-rw----    1 system   root      179,   7 Dec 18 22:28 mmcblk0p7
In this case, the device major id is 179 and the minor id is 7. To see what those major ID's are, run "cat /proc/devices". (This doesn't show ALL device ID's used by the system, but covers most of them.) Another way to see all the partitions within the system is "cat /proc/partitions".

Doing the above on a i9300 both with and without the dual boot stuff might give some hints as to what changes the dualboot thing is making. You might also consider taking a look at whatever is used to install that dualboot stuff. Is it ONLY a kernel, or something more? Is it re-partitioning the device?

From what I could see of that init file, p16 is a partition used to store the secondary boot related flags and a system image. p13 appears to be the "primary" /system image partition.

Some questions to ask yourself:

What is the /system partition on a normal (non-dualboot) i9300? Is it p13 or something else? Does p16 exist in /proc/partitions on a non-dualboot system? In that non-dual boot setup, is there ANY device with a major of 179 and minor of 12? (My first thought would be it would be named mmcblk0p12)

Disclaimer: I'm going to try to avoid solving this for you. I'd prefer if I can guide you to solving it yourself and then sharing the results.

Hi,
Yes Herbew is a friend of mine, but i didn't tell him to start private messaging people like that lol, I think he just gets a bit carried away, I will tell him to stop :p.

I will try running thoses commands on my note 2 to get the device id ect tomorrow thanks.

And on a normal S3, the is no partitions past p12 (I think the /system partition is either p7 or p9, i will check tomorrow) hence why I am stuck :p

I don't have a galaxy S3, so i can't run thoses commands u said, is the any other way I can work it out?, without spending $500 on a s3?. Thanks.


Thanks for your help.



Sent from my GT-N7100
 

garyd9

Inactive Recognized Developer
Sep 13, 2006
2,643
2,732
53
Pittsburgh, PA
I don't have a galaxy S3, so i can't run thoses commands u said, is the any other way I can work it out?, without spending $500 on a s3?. Thanks.
If I wanted that info, I'd probably post a message in the i9300/General section titled "Need a rooted user to help" and containing a message body similar to:
Can someone who is rooted, comfortable with a shell prompt, and NOT running any kind of dualboot, please run the following commands and send me (or reply with) the results? "ls -l /dev/block/mmc*", "cat /proc/devices", and "cat /proc/partitions"

Thank you,
YourNameHere
You might also ask that a person who IS running dualboot do the same thing so you can compare them. Just be sure that they tell you if they are/aren't doing dualboot so you don't get mixed up which is which. Another thing that might be helpful is to compare the init scripts of a non-dualboot kernel's initramfs with the ones you already have. Understanding what is different might be the key to understanding what you'll have to change on the note2.

Gary
 

fishingfon

Senior Member
Feb 10, 2012
724
250
Brisbane, QLD, Australia
If I wanted that info, I'd probably post a message in the i9300/General section titled "Need a rooted user to help" and containing a message body similar to:
You might also ask that a person who IS running dualboot do the same thing so you can compare them. Just be sure that they tell you if they are/aren't doing dualboot so you don't get mixed up which is which. Another thing that might be helpful is to compare the init scripts of a non-dualboot kernel's initramfs with the ones you already have. Understanding what is different might be the key to understanding what you'll have to change on the note2.

Gary

Ok thanks, I will make a thread in the s3 section tomorrow.

I have already replaced all the init files in /res/misc/init.41 with the stock ones from the root of the ramfs from a stock boot img (when the phone starts, if it detects a jb stock rom, it will move all the init files from init.41 to the root of the ramfs). So they are already stock.

I will have another look thru the stock Sammy ramfs tomorrow, and see if I can find a init file in /sbin (where the one i am having trouble with came from).
I can't get on my pc right now, as the is about 200 ants that have decided to move in to the laptop, so i need to figure out how to remove them before I can look :p

Thanks again for your help.

Corey

Sent from my GT-N7100
 

fishingfon

Senior Member
Feb 10, 2012
724
250
Brisbane, QLD, Australia
If I wanted that info, I'd probably post a message in the i9300/General section titled "Need a rooted user to help" and containing a message body similar to:
You might also ask that a person who IS running dualboot do the same thing so you can compare them. Just be sure that they tell you if they are/aren't doing dualboot so you don't get mixed up which is which. Another thing that might be helpful is to compare the init scripts of a non-dualboot kernel's initramfs with the ones you already have. Understanding what is different might be the key to understanding what you'll have to change on the note2.

Gary

Hi,
I have got the results from typing 2 of the things in the terminal on the s3, and I will compare them when I get home, but i havent got the results from typing "ls -l /dev/block/mmc*" tho, do i really need the results from that command, or are the ones from the other 2 commands enough?.

Thanks

Cheers
Corey

EDIT: i have found someone to get me the results from "
ls -l /dev/block/mmc" so ignore the message above :p
Sent from my GT-N7100
 
Last edited:

fishingfon

Senior Member
Feb 10, 2012
724
250
Brisbane, QLD, Australia
Hi,
I have got the results from thoses 3 commands u said to run in the terminal, and u can see the is 3 extra devices when the dual boot kernel is installed on the S3. theses are the devices:
brw------- root root 179, 16 2012-12-22 12:53 mmcblk0boot0
brw------- root root 179, 32 2012-12-22 12:53 mmcblk0boot1
7 1 1572864 loop1

Here are the full results from the terminal:

Code:
 "Siyah Dual boot 1.8.4,booted in to 2nd Rom ParanoidAndroid 2.54"

u0_a40@android:/ $ su
u0_a40@android:/ # ls -l /dev/block/mmc*
brw------- root     root     179,   0 2012-12-22 12:53 mmcblk0
brw------- root     root     179,  16 2012-12-22 12:53 mmcblk0boot0
brw------- root     root     179,  32 2012-12-22 12:53 mmcblk0boot1
brw------- root     root     179,   1 2012-12-22 12:53 mmcblk0p1
brw------- root     root     179,  10 2012-12-22 12:53 mmcblk0p10
brw------- root     root     179,  11 2012-12-22 12:53 mmcblk0p11
brw------- root     root     179,  12 2012-12-22 12:53 mmcblk0p12
brw------- root     root     179,   2 2012-12-22 12:53 mmcblk0p2
brw------- root     root     179,   3 2012-12-22 12:53 mmcblk0p3
brw-rw---- system   system   179,   4 2012-12-22 12:53 mmcblk0p4
brw------- root     root     179,   5 2012-12-22 12:53 mmcblk0p5
brw------- root     root     179,   6 2012-12-22 12:53 mmcblk0p6
brw-rw---- system   radio    179,   7 2012-12-22 12:53 mmcblk0p7
brw------- root     root     179,   8 2012-12-22 12:53 mmcblk0p8
brw------- root     root     179,   9 2012-12-22 12:53 mmcblk0p9
brw------- root     root     179,  48 2012-12-22 12:53 mmcblk1
brw------- root     root     179,  49 2012-12-22 12:53 mmcblk1p1
u0_a40@android:/ # cat /proc/devices
Character devices:
  1 mem
  4 /dev/vc/0
  4 tty
  4 ttyS
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
  7 vcs
 10 misc
 13 input
 21 sg
 29 fb
 81 video4linux
 89 i2c
108 ppp
116 alsa
128 ptm
136 pts
153 spi
180 usb
188 ttyUSB
189 usb_device
204 ttySAC
216 rfcomm
243 ump
244 mali
248 ttyGS
249 roccat
250 BaseRemoteCtl
251 media
252 usbmon
253 tzic
254 rtc

Block devices:
  1 ramdisk
259 blkext
  7 loop
  8 sd
 65 sd
 66 sd
 67 sd
 68 sd
 69 sd
 70 sd
 71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
179 mmc
254 device-mapper
u0_a40@android:/ # cat /proc/partitions
major minor  #blocks  name

   7        0    1572864 loop0
   7        1    1572864 loop1
 179        0   15388672 mmcblk0
 179        1       4096 mmcblk0p1
 179        2       4096 mmcblk0p2
 179        3      20480 mmcblk0p3
 179        4       8192 mmcblk0p4
 179        5       8192 mmcblk0p5
 179        6       8192 mmcblk0p6
 179        7      32768 mmcblk0p7
 179        8    1048576 mmcblk0p8
 179        9    1572864 mmcblk0p9
 179       10     573440 mmcblk0p10
 179       11       8192 mmcblk0p11
 179       12   12091392 mmcblk0p12
 179       32       2048 mmcblk0boot1
 179       16       2048 mmcblk0boot0
 179       48   30657536 mmcblk1
 179       49   30653440 mmcblk1p1
u0_a40@android:/ #

Code:
"Siyah DualBoot 1.8.4,booted in to 1st rom XXELKC Samsung Rom"


u0_a111@android:/ $ su
u0_a111@android:/ # ls -l /dev/block/mmc*
brw------- root     root     179,   0 2012-12-22 12:10 mmcblk0
brw------- root     root     179,  16 2012-12-22 12:10 mmcblk0boot0
brw------- root     root     179,  32 2012-12-22 12:10 mmcblk0boot1
brw------- root     root     179,   1 2012-12-22 12:10 mmcblk0p1
brw------- root     root     179,  10 2012-12-22 12:10 mmcblk0p10
brw------- root     root     179,  11 2012-12-22 12:10 mmcblk0p11
brw------- root     root     179,  12 2012-12-22 12:10 mmcblk0p12
brw------- root     root     179,   2 2012-12-22 12:10 mmcblk0p2
brw------- root     root     179,   3 2012-12-22 12:10 mmcblk0p3
brw-rw---- system   system   179,   4 2012-12-22 12:11 mmcblk0p4
brw------- root     root     179,   5 2012-12-22 12:10 mmcblk0p5
brw------- root     root     179,   6 2012-12-22 12:10 mmcblk0p6
brw-rw---- system   radio    179,   7 2012-12-22 12:10 mmcblk0p7
brw------- root     root     179,   8 2012-12-22 12:10 mmcblk0p8
brw------- root     root     179,   9 2012-12-22 12:10 mmcblk0p9
brw------- root     root     179,  48 2012-12-22 12:10 mmcblk1
brw------- root     root     179,  49 2012-12-22 12:10 mmcblk1p1
u0_a111@android:/ # cat /proc/devices
Character devices:
  1 mem
  4 /dev/vc/0
  4 tty
  4 ttyS
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
  7 vcs
10 misc
13 input
21 sg
29 fb
81 video4linux
89 i2c
108 ppp
116 alsa
128 ptm
136 pts
153 spi
180 usb
188 ttyUSB
189 usb_device
204 ttySAC
216 rfcomm
243 ump
244 mali
248 ttyGS
249 roccat
250 BaseRemoteCtl
251 media
252 usbmon
253 tzic
254 rtc

Block devices:
  1 ramdisk
259 blkext
  7 loop
  8 sd
65 sd
66 sd
67 sd
68 sd
69 sd
70 sd
71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
179 mmc
254 device-mapper
u0_a111@android:/ # cat /proc/partitions
major minor  #blocks  name

   7        0       2111 loop0
179        0   15388672 mmcblk0
179        1       4096 mmcblk0p1
179        2       4096 mmcblk0p2
179        3      20480 mmcblk0p3
179        4       8192 mmcblk0p4
179        5       8192 mmcblk0p5
179        6       8192 mmcblk0p6
179        7      32768 mmcblk0p7
179        8    1048576 mmcblk0p8
179        9    1572864 mmcblk0p9
179       10     573440 mmcblk0p10
179       11       8192 mmcblk0p11
179       12   12091392 mmcblk0p12
179       32       2048 mmcblk0boot1
179       16       2048 mmcblk0boot0
179       48   30657536 mmcblk1
179       49   30653440 mmcblk1p1
254        0       2110 dm-0
u0_a111@android:/ #

Code:
"Stock Kernel (ELK4) + XXELKC Samsung Rom"


u0_a111@android:/ $ su
u0_a111@android:/ # ls -l /dev/block/mmc*
brw------- root     root     179,   0 2012-12-22 12:57 mmcblk0
brw------- root     root     179,   1 2012-12-22 12:57 mmcblk0p1
brw------- root     root     179,  10 2012-12-22 12:57 mmcblk0p10
brw------- root     root     179,  11 2012-12-22 12:57 mmcblk0p11
brw------- root     root     179,  12 2012-12-22 12:57 mmcblk0p12
brw------- root     root     179,   2 2012-12-22 12:57 mmcblk0p2
brw------- root     root     179,   3 2012-12-22 12:57 mmcblk0p3
brw-rw---- system   system   179,   4 2012-12-22 12:58 mmcblk0p4
brw------- root     root     179,   5 2012-12-22 12:57 mmcblk0p5
brw------- root     root     179,   6 2012-12-22 12:57 mmcblk0p6
brw-rw---- system   radio    179,   7 2012-12-22 12:57 mmcblk0p7
brw------- root     root     179,   8 2012-12-22 12:57 mmcblk0p8
brw------- root     root     179,   9 2012-12-22 12:57 mmcblk0p9
brw------- root     root     179,  16 2012-12-22 12:57 mmcblk1
brw------- root     root     179,  17 2012-12-22 12:57 mmcblk1p1
u0_a111@android:/ # cat /proc/devices
Character devices:
  1 mem
  4 /dev/vc/0
  4 tty
  4 ttyS
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
  7 vcs
10 misc
13 input
21 sg
29 fb
81 video4linux
89 i2c
108 ppp
116 alsa
128 ptm
136 pts
153 spi
180 usb
188 ttyUSB
189 usb_device
204 ttySAC
216 rfcomm
243 ump
244 mali
248 roccat
249 BaseRemoteCtl
250 media
251 ttyGS
252 usbmon
253 tzic
254 rtc

Block devices:
  1 ramdisk
259 blkext
  7 loop
  8 sd
65 sd
66 sd
67 sd
68 sd
69 sd
70 sd
71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
179 mmc
254 device-mapper
u0_a111@android:/ # cat /proc/partitions
major minor  #blocks  name

   7        0       2111 loop0
179        0   15388672 mmcblk0
179        1       4096 mmcblk0p1
179        2       4096 mmcblk0p2
179        3      20480 mmcblk0p3
179        4       8192 mmcblk0p4
179        5       8192 mmcblk0p5
179        6       8192 mmcblk0p6
179        7      32768 mmcblk0p7
179        8    1048576 mmcblk0p8
179        9    1572864 mmcblk0p9
179       10     573440 mmcblk0p10
179       11       8192 mmcblk0p11
179       12   12091392 mmcblk0p12
179       16   30657536 mmcblk1
179       17   30653440 mmcblk1p1
254        0       2110 dm-0
u0_a111@android:/ #


And here is the results I got from typing the commands in my Note
II

Code:
u0_a160@android:/ $ export PATH=/data/local/bin:$PATH
 u0_a160@android:/ $ su
 u0_a160@android:/ # ls -l /dev/block/mmc*
 brw------- root     root     179,   0 2012-12-22 08:35 mmcblk0
 brw------- root     root     179,   1 2012-12-22 08:35 mmcblk0p1
 brw-rw---- system   radio    179,  10 2012-12-22 08:35 mmcblk0p10
 brw-rw---- system   radio    179,  11 2012-12-22 08:35 mmcblk0p11
 brw------- root     root     179,  12 2012-12-22 08:35 mmcblk0p12
 brw------- root     root     179,  13 2012-12-22 08:35 mmcblk0p13
 brw------- root     root     179,  14 2012-12-22 08:35 mmcblk0p14
 brw------- root     root     179,  15 2012-12-22 08:35 mmcblk0p15
 brw------- root     root     259,   0 2012-12-22 08:35 mmcblk0p16
 brw------- root     root     179,   2 2012-12-22 08:35 mmcblk0p2
 brw------- root     root     179,   3 2012-12-22 08:35 mmcblk0p3
 brw-rw---- system   radio    179,   4 2012-12-22 08:35 mmcblk0p4
 brw-rw---- system   radio    179,   5 2012-12-22 08:35 mmcblk0p5
 brw-rw---- system   radio    179,   6 2012-12-22 08:35 mmcblk0p6
 brw-rw---- system   root     179,   7 2012-12-22 08:35 mmcblk0p7
 brw------- root     root     179,   8 2012-12-22 08:35 mmcblk0p8
 brw------- root     root     179,   9 2012-12-22 08:35 mmcblk0p9
 brw------- root     root     179,  16 2012-12-22 08:35 mmcblk1
 brw------- root     root     179,  17 2012-12-22 08:35 mmcblk1p1
 u0_a160@android:/ # cat /proc/devices
 Character devices:
   1 mem
   4 /dev/vc/0
   4 tty
   4 ttyS
   5 /dev/tty
   5 /dev/console
   5 /dev/ptmx
   7 vcs
 10 misc
 13 input
 21 sg
 29 fb
 81 video4linux
 89 i2c
 108 ppp
 116 alsa
 128 ptm
 136 pts
 153 spi
 180 usb
 188 ttyUSB
 189 usb_device
 204 ttySAC
 216 rfcomm
 243 ump
 244 mali
 248 roccat
 249 BaseRemoteCtl
 250 media
 251 ttyGS
 252 usbmon
 253 tzic
 254 rtc

Block devices:
   1 ramdisk
 259 blkext
   7 loop
   8 sd
 65 sd
 66 sd
 67 sd
 68 sd
 69 sd
 70 sd
 71 sd
 128 sd
 129 sd
 130 sd
 131 sd
 132 sd
 133 sd
 134 sd
 135 sd
 179 mmc
 254 device-mapper
 u0_a160@android:/ # cat /proc/partitions
 major minor  #blocks  name

   7        0      47849 loop0
    7        1      12506 loop1
    7        2      14585 loop2
    7        3       2111 loop3
    7        4       3150 loop4
    7        5      35375 loop5
    7        6      34335 loop6
    7        7       2111 loop7
 179        0   15388672 mmcblk0
 179        1       4096 mmcblk0p1
 179        2       4096 mmcblk0p2
 179        3      20480 mmcblk0p3
 179        4       4096 mmcblk0p4
 179        5       4096 mmcblk0p5
 179        6       4096 mmcblk0p6
 179        7       8192 mmcblk0p7
 179        8       8192 mmcblk0p8
 179        9       8192 mmcblk0p9
 179       10      90112 mmcblk0p10
 179       11       4096 mmcblk0p11
 179       12    1400832 mmcblk0p12
 179       13    2097152 mmcblk0p13
 179       14     573440 mmcblk0p14
 179       15       8192 mmcblk0p15
 259        0   11141120 mmcblk0p16
 179       16   62367744 mmcblk1
 179       17   62351360 mmcblk1p1
 254        0      47848 dm-0
 254        1      12505 dm-1
 254        2      14584 dm-2
 254        3       2110 dm-3
 254        4       3150 dm-4
 254        5      35374 dm-5
 254        6      34335 dm-6
 254        7       2110 dm-7
    7        8      13545 loop8
 254        8      13545 dm-8
    7        9      16664 loop9
 254        9      16663 dm-9
    7       10       2111 loop10
 254       10       2110 dm-10
    7       11      43691 loop11
 254       11      43690 dm-11
    7       12       8348 loop12
 254       12       8347 dm-12
    7       13       9387 loop13
 254       13       9387 dm-13
    7       14      21861 loop14
 254       14      21861 dm-14
 u0_a160@android:/ #


Do u know how I would get thoses two extra partitions on the note 2?. are thoses the same partitions that I mentioned in the first post (p13 and p16)??.

Thanks again for your help.

Corey
 

fishingfon

Senior Member
Feb 10, 2012
724
250
Brisbane, QLD, Australia
Ps,
The /system and /data partitions on a stick non-dual boot s3 are p9 and p12, and they have the minor of 9 and 12, just like the partitions p13 and p16 I mentioned in the first post. But the partitions on the first post have different names. Do u have any idea why that could be?.

Cheers
Corey

Sent from my GT-N7100
 

garyd9

Inactive Recognized Developer
Sep 13, 2006
2,643
2,732
53
Pittsburgh, PA
What I'm NOT seeing is the mmcblk0p13 and mmcblk0p16 devices that are supposedly made by the init script on the dual boot s3. Any idea why not?
 

fishingfon

Senior Member
Feb 10, 2012
724
250
Brisbane, QLD, Australia
What I'm NOT seeing is the mmcblk0p13 and mmcblk0p16 devices that are supposedly made by the init script on the dual boot s3. Any idea why not?

Hi,
No I have no idea :p

Also I can't find anything in the script about the 3 devices that are made, so i have absolutely no idea.

I asked Gokhan moral about them, and here is my message and then his:

" Hi,
I have spent the last day or two trying to figure out how to change the names of theses partitions that are referenced in /sbin/init
mknod /dev/block/mmcblk0p13 b 179 9
mknod /dev/block/mmcblk0p16 b 179 12

But well I was doing that (I still haven't worked it out :p). I noticed that when the dual boot is installed on a galaxy S3, the is 3 extra devices in dev/block
they are:
brw------- root root 179, 16 2012-12-22 12:53 mmcblk0boot0
brw------- root root 179 32 2012-12-22 12:53 mmcblk0boot1
7 1 1572864 loop1

I have already been thru the scripts lots of times, and I never noticed any partitions named this. I was just wondering if you could explain what files theses partitions are referenced in?. as I cant find them anywhere."

And here is his response:

" They are not referenced in any of my modifications because they are not needed for any of my customizations. I only create devices that I want to mount and mount them to some directories and try to understand the rom type. Once I get the rom type I initialize the corresponding init sequence by moving init files to the original location, move innt to init and exec it. That is all and there is no more in those scripts. Now try to read them once again and try to map my descriptions to that script. When I say init script I mean the symbolic link from /init to /sbin/init. "

Do u have any idea what I should do?, as i am a bit stuck :p


Thanks

Cheers
Corey


Sent from my GT-N7100
 

garyd9

Inactive Recognized Developer
Sep 13, 2006
2,643
2,732
53
Pittsburgh, PA
Okay...

First, the mmc*boot? device nodes are for the boot loaders - please ignore those device nodes. Act like they don't exist. Don't mess with them. Ever. If there's one way to brick a samsung phone, it's by messing up the bootloaders. (Thanks to people like Adam Outler, you might still be able to recover, but only via hardware tinkering.)

So, let's back up and not be concerned about what the device nodes are named, but more concerned about what the device nodes are USED FOR (in relation to dual booting.) If I'm correct, you really aren't concerned about those device node names, but are more concerned about getting the dual boot working.

Is that init script in the OP unmolested? The reason I'm asking is that parts of it aren't making sense to me. For example, it's mounting the /system directory either via an image file OR from mmcblk0p13. However, you've stated that the SGS3 has the SYSTEM partition on mmcblk0p9. It almost appears as if you (or someone else) might have started editing the init script to make it work with a device that has the system partition on p13 (such as the note2.) That would also match with the fact that p16 on the Note2 is the data (userdata) partition...

Actually, that might be exactly what's going on here. The mknod parameters are creating device nodes to the existing p9/p12 partitions, but giving them different names that just happen to match the names used on the Note2...

You could, in theory, do something similar to what you suggested in your OP, but you'd need to do it a bit differently.... Instead of making device nodes with unused names and minors of 9/12, you'd want to use unused names and minors of 13 and 16. Let me explain...

Here is the code you said was in the sgs3 init script (along with comments followed by "//")
Code:
mknod /dev/block/mmcblk0p13 b 179 9 // creates a device node called p13 but is identical to p9
mknod /dev/block/mmcblk0p16 b 179 12 // creates a device node called p16 but is identical to p12
So, in your init script, /dev/block/mmcblk0p13 is referencing the EXACT SAME DEVICE as /dev/block/mmcblk0p9 (and the same for the created p16 device and the already existing p12 device.)

Wow, I really hope that not only am I making sense, but also that you are following me. I'm going to start rambling even more.

You kind of have to understand how device nodes work, etc. The NAME of the device node doesn't matter. What matters is if it's a block or character device, the MAJOR number and the MINOR number. For block types of MAJOR 179, it's referring to a MMC device. For block/MMC (b 179). the minor number specifies the partition of the device. (I'm simplifying here - it's actually a masked value that includes a partition and device - and gets more interesting with > 16 partitions that require different majors)

So, you could (in theory) go into that script that works fine on the sgs3 and rename every occurrence of "mmcblk0p16" with "i_like_sex" and it'll still work on the sgs3 (even if you didn't like sex.)

Okay... so back to the script. Keep in mind that I'm basing EVERYTHING on that one script and haven't seen anything else related to this multi-boot thing. It'd probably help if someone gave me a link (I'm too lazy to search) to something that installs this multi-boot stuff.

Anyway, that script. I'm going to do something here for clarity. Instead of referencing the misleading "mmcblk0p13" and "mmcblk0p16" device node nodes, I'm just going to call them "extra13" and "extra16" (because they are NOT referencing partitions 13/16.)

So, in that script, extra13 is actually pointing to partition9 which (based on your information) is the SYSTEM partition (mmcblk0p9) and extra16 is actually pointing to partition12 which (again based on your info) is the USERDATA partition.

In other words, extra13 is pointing to what is normally mounted as "/system" and extra16 is pointing to what is normally mounted as "/data". However, at least for getting the dual boot stuff kick started, it's mounting extra16 in "/.secondrom" instead of "/data".

THAT should be enough information to get you going towards solving your issue.

Personally, I think that whoever decided to use mmcblk0p13 and mmcblk0p16 as fictional device node names on the sgs3 should be thumped in the head for either intentionally or unintentionally creating confusion. It might be due to one of the other dependencies of the dual booting system (what is "/sbin/choose_rom"?) that they were unwilling (or unable) to fix. It might also just be a way to try and make the stuff a pain to port. I don't know their intentions/motives.

I will offer this: If my explanation didn't make sense, you might want to take a few steps back and learn what all of it means before you keep going with the porting effort. Some of the concepts here are important to know, and some basic understanding of device nodes is important when mounting file systems.

Take care
Gary
 

fishingfon

Senior Member
Feb 10, 2012
724
250
Brisbane, QLD, Australia
Okay...

First, the mmc*boot? device nodes are for the boot loaders - please ignore those device nodes. Act like they don't exist. Don't mess with them. Ever. If there's one way to brick a samsung phone, it's by messing up the bootloaders. (Thanks to people like Adam Outler, you might still be able to recover, but only via hardware tinkering.)

So, let's back up and not be concerned about what the device nodes are named, but more concerned about what the device nodes are USED FOR (in relation to dual booting.) If I'm correct, you really aren't concerned about those device node names, but are more concerned about getting the dual boot working.

Is that init script in the OP unmolested? The reason I'm asking is that parts of it aren't making sense to me. For example, it's mounting the /system directory either via an image file OR from mmcblk0p13. However, you've stated that the SGS3 has the SYSTEM partition on mmcblk0p9. It almost appears as if you (or someone else) might have started editing the init script to make it work with a device that has the system partition on p13 (such as the note2.) That would also match with the fact that p16 on the Note2 is the data (userdata) partition...

Actually, that might be exactly what's going on here. The mknod parameters are creating device nodes to the existing p9/p12 partitions, but giving them different names that just happen to match the names used on the Note2...

You could, in theory, do something similar to what you suggested in your OP, but you'd need to do it a bit differently.... Instead of making device nodes with unused names and minors of 9/12, you'd want to use unused names and minors of 13 and 16. Let me explain...

Here is the code you said was in the sgs3 init script (along with comments followed by "//")
Code:
mknod /dev/block/mmcblk0p13 b 179 9 // creates a device node called p13 but is identical to p9
mknod /dev/block/mmcblk0p16 b 179 12 // creates a device node called p16 but is identical to p12
So, in your init script, /dev/block/mmcblk0p13 is referencing the EXACT SAME DEVICE as /dev/block/mmcblk0p9 (and the same for the created p16 device and the already existing p12 device.)

Wow, I really hope that not only am I making sense, but also that you are following me. I'm going to start rambling even more.

You kind of have to understand how device nodes work, etc. The NAME of the device node doesn't matter. What matters is if it's a block or character device, the MAJOR number and the MINOR number. For block types of MAJOR 179, it's referring to a MMC device. For block/MMC (b 179). the minor number specifies the partition of the device. (I'm simplifying here - it's actually a masked value that includes a partition and device - and gets more interesting with > 16 partitions that require different majors)

So, you could (in theory) go into that script that works fine on the sgs3 and rename every occurrence of "mmcblk0p16" with "i_like_sex" and it'll still work on the sgs3 (even if you didn't like sex.)

Okay... so back to the script. Keep in mind that I'm basing EVERYTHING on that one script and haven't seen anything else related to this multi-boot thing. It'd probably help if someone gave me a link (I'm too lazy to search) to something that installs this multi-boot stuff.

Anyway, that script. I'm going to do something here for clarity. Instead of referencing the misleading "mmcblk0p13" and "mmcblk0p16" device node nodes, I'm just going to call them "extra13" and "extra16" (because they are NOT referencing partitions 13/16.)

So, in that script, extra13 is actually pointing to partition9 which (based on your information) is the SYSTEM partition (mmcblk0p9) and extra16 is actually pointing to partition12 which (again based on your info) is the USERDATA partition.

In other words, extra13 is pointing to what is normally mounted as "/system" and extra16 is pointing to what is normally mounted as "/data". However, at least for getting the dual boot stuff kick started, it's mounting extra16 in "/.secondrom" instead of "/data".

THAT should be enough information to get you going towards solving your issue.

Personally, I think that whoever decided to use mmcblk0p13 and mmcblk0p16 as fictional device node names on the sgs3 should be thumped in the head for either intentionally or unintentionally creating confusion. It might be due to one of the other dependencies of the dual booting system (what is "/sbin/choose_rom"?) that they were unwilling (or unable) to fix. It might also just be a way to try and make the stuff a pain to port. I don't know their intentions/motives.

I will offer this: If my explanation didn't make sense, you might want to take a few steps back and learn what all of it means before you keep going with the porting effort. Some of the concepts here are important to know, and some basic understanding of device nodes is important when mounting file systems.

Take care
Gary

Hi,
Thanks for your reply, i think i uderstand what i need to do.
Just to be sure tho (i would rather not brick my phone if i dont have to :p), is this what u think i should do?:

Change these lines:
Code:
mknod /dev/block/mmcblk0p13 b 179 9
mknod /dev/block/mmcblk0p16 b 179 12

To:
Code:
mknod /dev/block/extra13 b 179 13
mknod /dev/block/extra16 b 259 0

Cos if u look at the Minor and majors for the data partition (p16) u see that they have thoses ids:
Code:
 u0_a160@android:/ # ls -l /dev/block/mmc*
 brw------- root     root     179,   0 2012-12-22 08:35 mmcblk0
 brw------- root     root     179,   1 2012-12-22 08:35 mmcblk0p1
 brw-rw---- system   radio    179,  10 2012-12-22 08:35 mmcblk0p10
 brw-rw---- system   radio    179,  11 2012-12-22 08:35 mmcblk0p11
 brw------- root     root     179,  12 2012-12-22 08:35 mmcblk0p12
[COLOR="Red"] brw------- root     root     179,  13 2012-12-22 08:35 mmcblk0p13[/COLOR]
 brw------- root     root     179,  14 2012-12-22 08:35 mmcblk0p14
 brw------- root     root     179,  15 2012-12-22 08:35 mmcblk0p15
[COLOR="Red"] brw------- root     root     259,   0 2012-12-22 08:35 mmcblk0p16[/COLOR]
 brw------- root     root     179,   2 2012-12-22 08:35 mmcblk0p2
 brw------- root     root     179,   3 2012-12-22 08:35 mmcblk0p3
 brw-rw---- system   radio    179,   4 2012-12-22 08:35 mmcblk0p4
 brw-rw---- system   radio    179,   5 2012-12-22 08:35 mmcblk0p5
 brw-rw---- system   radio    179,   6 2012-12-22 08:35 mmcblk0p6
 brw-rw---- system   root     179,   7 2012-12-22 08:35 mmcblk0p7
 brw------- root     root     179,   8 2012-12-22 08:35 mmcblk0p8
 brw------- root     root     179,   9 2012-12-22 08:35 mmcblk0p9
 brw------- root     root     179,  16 2012-12-22 08:35 mmcblk1
 brw------- root     root     179,  17 2012-12-22 08:35 mmcblk1p1


Does that look right to you?.

Here are the links to the dual boot kernel:
Here is the link to the ramfs i used to edit:
https://github.com/gokhanmoral/ramfs-sgs3
Here is the full kernel source code:
https://github.com/gokhanmoral/siyahkernel-sgs3
Here is the Completed kernel for the S3:
http://www.gokhanmoral.com/

the init scipt i sent was completely un-molested. it came from the source code provided by gokhanmoral, and it hadnt been edited or anything.

Thanks again for your help.

Cheers
Corey
 

garyd9

Inactive Recognized Developer
Sep 13, 2006
2,643
2,732
53
Pittsburgh, PA
It looks okay... obviously you'll have to change the script and perhaps some other stuff. I can't download the linked stuff right now (I'm on my phone) but will look more later.

Sent from my SAMSUNG-SGH-I317 using Tapatalk 2
 

fishingfon

Senior Member
Feb 10, 2012
724
250
Brisbane, QLD, Australia
It looks okay... obviously you'll have to change the script and perhaps some other stuff. I can't download the linked stuff right now (I'm on my phone) but will look more later.

Sent from my SAMSUNG-SGH-I317 using Tapatalk 2

Ok thanks. So do u mean I need to change the partition layout on all the scripts, and change any reference of thoses partitions mentioned earlier?. Or do u mean something else?.
Gokhan moral said I just needed to change the partition layout, and try it and see if it boots, and if it doesn't I can play around with the init file to try
And get it booting (he also said he would give me a copy of his modded recovery which has all the dual boot options if I get the dual boot booting via adb :))

Thanks again
Cheers
Corey

Sent from my GT-N7100

If I helped you, please hit Thanks..
 
Last edited:

garyd9

Inactive Recognized Developer
Sep 13, 2006
2,643
2,732
53
Pittsburgh, PA
Ok thanks. So do u mean I need to change the partition layout on all the scripts, and change any reference of thoses partitions mentioned earlier?. Or do u mean something else?.
You'd have to change the references to the device nodes in the scripts (and anything else that might use device nodes that reference sgs3 partitions.)

take care
Gary
 

fishingfon

Senior Member
Feb 10, 2012
724
250
Brisbane, QLD, Australia
You'd have to change the references to the device nodes in the scripts (and anything else that might use device nodes that reference sgs3 partitions.)

take care
Gary

Hi,
Yes I have already done that, although I will go thru all the scripts again to check I haven't missed one before I repack the ramdisk.

Thanks

Cheers
Corey

Sent from my GT-N7100

If I helped you, please hit Thanks..
 

fishingfon

Senior Member
Feb 10, 2012
724
250
Brisbane, QLD, Australia
Great news, I just flashed the kernel, and it didn't brick my phone :) :).
The first rom booted fine, with the only bug being that the external sd doesn't work (but i know what i did wrong with that).
I have cloned the data to the second rom system img, but i am still figuring out how to boot in to the second rom, as the one boot user promt doesn't work without the custom dual boot recovery (i think)

Corey

Sent from my GT-N7100

If I helped you, please hit Thanks..
 

garyd9

Inactive Recognized Developer
Sep 13, 2006
2,643
2,732
53
Pittsburgh, PA
If I helped you, please hit Thanks..
What would be more helpful is for you to post not only that you've had successes, but also to post the details of those successes to share with the community. What did you have to change with the scripts, what does the end result look like, etc.

It's annoying to see "I got it working" posts without details of HOW a person got it working. As well, the details will help the next person who tries to port it to another platform.

Take care
Gary
 

fishingfon

Senior Member
Feb 10, 2012
724
250
Brisbane, QLD, Australia
What would be more helpful is for you to post not only that you've had successes, but also to post the details of those successes to share with the community. What did you have to change with the scripts, what does the end result look like, etc.

It's annoying to see "I got it working" posts without details of HOW a person got it working. As well, the details will help the next person who tries to port it to another platform.

Take care
Gary

Hi,
I haven't finished getting it working yet, as only the first Rom is booting, i am still setting up the ext4 images ect for the second rom. i didn't really see much point in writing what u said till I had got the actual dual boot working. But when I have got the dual boot working I will write what u said.

Cheers
Corey

Sent from my GT-N7100

If I helped you, please hit Thanks..
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    Hi all,

    I am in the process of porting the dual boot ramfs from the Galaxy S3 Siyah kernel to our Note II smartphones.

    I have finished editing the ramfs, and changing the init files ect.
    But the is still two files I have left to edit, and I am a bit stuck on them.

    In the files /sbin/init and /sbin/ueventd the is quite a few references to theses partitions:





    mknod /dev/block/mmcblk0p13 b 179 9
    mknod /dev/block/mmcblk0p16 b 179 12

    the problem is this, on the Galaxy S3 (which is what that ramfs was designed for) those partitions dont exist as far as I can see.
    But on the note 2, those partitions are the /DATA and /SYSTEM partitions.

    So I need to change thoses partitions to something else, but I dont know what.
    I have copied the contents of the two files which thoses partitions are referenced in, and a table showing the Note 2 partitions and the coresponing S3 partitions, below

    Could someone please help me find out what I should do here, as I cant do any more on the dual boot kernel till I get that sorted.

    Here is the question I asked gokhan moral:





    “I have edited all the files in the ramfs, apart from two files.
    In the files /sbin/init and /sbin/ueventd the is 2 partitions referenced thru out them, they are:
    mknod /dev/block/mmcblk0p13 b 179 9
    mknod /dev/block/mmcblk0p16 b 179 12v
    On the Galaxy S3, thoses partition names are un-used (as far as i know)
    But on the Galaxy Note 2, thoses partitions are the /DATA and /SYSTEM partitions.
    can i just change the partition names in thoses 2 files to soemthing like:
    mknod /dev/block/mmcblk0p17 b 179 9
    mknod /dev/block/mmcblk0p18 b 179 12v
    or do i need to do something else to rename thoses two partitions?.”

    And here is Gokhan Morals Response:





    “block devices are created using the major and minor id's specific to your device (those do not change normally but you need to check anyway). so if they are mounted and needed you create them. if they are not needed in the script you don't have to create them. you have to try to keep the same functionality in the script. if you mount /system then you will need the block device that corresponds to /system with the correct major and minor numbers.”

    but I still dont understand what I am supposed to do (I am not really a developer, I am more of a web designer ect)


    Could someone please explain in simpler steps what I should do to rename thoses two partitions.



    Here are the file contents (both files have the same contents, so i have only copied one here)

    INIT:





    #!/sbin/busybox sh
    cd /

    busybox mount -t proc proc /proc
    busybox mount -t sysfs sysfs /sys

    if busybox grep -q 1 /sys/class/power_supply/battery/batt_lp_charging ; then
    # low power mode
    echo 0 > /proc/sys/kernel/rom_feature_set
    cp -a /res/misc/init.41/* /
    chmod 755 /innt
    chmod 644 /*.rc
    chmod 644 /*.prop
    exec /sbin/init2
    fi

    SECONDROM=1
    NOBOOTLOGO=0
    mkdir -p /dev/block
    mkdir /dev/input
    mkdir /dev/graphics
    mknod /dev/graphics/fb0 c 29 0
    mknod /dev/input/event1 c 13 65
    mknod /dev/input/event2 c 13 66
    mknod /dev/input/event8 c 13 72
    mknod /dev/input/event9 c 13 73
    mknod /dev/ashmem c 10 60
    mknod /dev/block/mmcblk0p13 b 179 9
    mknod /dev/block/mmcblk0p16 b 179 12
    mknod /dev/block/loop0 b 7 0

    mkdir /mnt
    chmod 755 /mnt
    mkdir /.secondrom
    mount -t ext4 /dev/block/mmcblk0p16 /.secondrom

    NEXTBOOT=`cat /.secondrom/media/.nextboot`
    rm -f /.secondrom/media/.nextboot
    DEFAULTROM=`cat /.secondrom/media/.defaultrom`

    if grep -q bootmode=2 /proc/cmdline ; then
    NEXTBOOT=0
    fi

    if [ "$NEXTBOOT" == "0" ]; then
    mv -f /res/etc /
    umount /.secondrom
    echo 0 > /proc/sys/kernel/rom_feature_set
    mv -f /res/misc/init.41/* /
    mv -f /res/misc/recovery/* /
    chmod 755 /innt
    chmod 644 /*.smdk4x12
    chmod 644 /*.rc
    chmod 644 /*.prop
    chmod -R 755 /lib
    exec /sbin/init2
    fi

    SECONDROM=1
    NOBOOTLOGO=0
    [ -f /.secondrom/media/.secondrom/system.img ] || SECONDROM=0
    [ -f /.secondrom/media/.nobootlogo ] && NOBOOTLOGO=1

    if [ "$SECONDROM" == "0" ];then
    if [ "$NOBOOTLOGO" == "0" ];then
    /sbin/choose_rom $SECONDROM
    fi
    else
    if [ "$NEXTBOOT" == "1" ];then
    SECONDROM=0;
    elif [ "$NEXTBOOT" == "2" ];then
    SECONDROM=1;
    else
    if [ "$NOBOOTLOGO" == "1" ];then
    SECONDROM=$DEFAULTROM
    elif [ "$DEFAULTROM" == "1" ];then
    /sbin/choose_rom $SECONDROM
    if [ "$?" == "1" ]; then
    SECONDROM=0
    else
    SECONDROM=1
    fi
    else
    /sbin/choose_rom $SECONDROM
    if [ "$?" == "1" ]; then
    SECONDROM=1
    else
    SECONDROM=0
    fi
    fi
    fi
    fi

    if [ "$SECONDROM" == "1" ]; then
    mount -t ext4 /.secondrom/media/.secondrom/system.img /system
    else
    mount -t ext4 /dev/block/mmcblk0p13 /system
    fi


    AOSP=0
    MIUI=0
    CM10=0
    JB=0

    [ -f /system/framework/framework2.jar ] || AOSP=1
    [ -f /system/framework/miui-framework.jar ] && MIUI=1
    [ -f /system/lib/ssl/engines/libkeystore.so ] && JB=1
    [ -f /system/framework/seccamera.jar ] || CM10=1

    if [ "$JB" == 1 ];
    then
    if [ "$CM10" == 1 ];
    then
    echo 3 > /proc/sys/kernel/rom_feature_set
    mv -f /lib/modules/dhd_cm.ko /lib/modules/dhd.ko
    mv -f /res/misc/init.cm10/* /
    else
    echo 2 > /proc/sys/kernel/rom_feature_set
    mv -f /res/misc/init.41/* /
    fi
    fi

    if [ "$SECONDROM" == "1" ];then
    mv /init.smdk4x12.rc.2 /init.smdk4x12.rc
    mv /init.rc.2 /init.rc
    mv /fstab.smdk4x12.2 /fstab.smdk4x12
    else
    rm -f /init.rc.2 /init.smdk4x12.rc.2 /fstab.smdk4x12.2
    fi

    umount -f /system
    umount -f /.secondrom

    rm -rf /res/misc/init*
    chmod 755 /innt
    chmod 644 /*.smdk4x12
    chmod 644 /*.rc
    chmod 644 /*.prop
    chmod -R 755 /lib

    # misc mods for i9300
    insmod /lib/modules/m0_mods.ko
    # cpu undervolting interfaces
    insmod /lib/modules/cpu_undervolting.ko
    # mali (gpu) interfaces
    insmod /lib/modules/mali_control.ko
    # additional CPU governors
    insmod /lib/modules/cpufreq_hotplug.ko
    insmod /lib/modules/cpufreq_lulzactiveq.ko
    # additional I/O schedulers
    insmod /lib/modules/sio-iosched.ko
    insmod /lib/modules/vr-iosched.ko
    # audio enhancements
    insmod /lib/modules/kscoobydoo.ko devicename=scoobydoo_sound

    exec /sbin/init2


    And here is the partition layouts:





    PARTITION: ` Galaxy S3 Galaxy Note 2
    /BOOT mmcblk0p5 mmcblk0p8
    /BOTA0 mmcblk0p1 mmcblk0p1
    /BOTA1 mmcblk0p2 mmcblk0p2
    /CACHE mmcblk0p8 mmcblk0p12
    /EFS mmcblk0p3 mmcblk0p3
    /HIDDEN mmcblk0p10 mmcblk0p14
    /OTA mmcblk0p11 mmcblk0p15
    /PARAM mmcblk0p4 mmcblk0p7
    /RADIO mmcblk0p7 mmcblk0p10
    /RECOVERY mmcblk0p6 mmcblk0p9
    /SYSTEM mmcblk0p9 mmcblk0p13
    /TOMBSTONES unknown mmcblk0p11
    /USERDATA mmcblk0p12 mmcblk0p16

    I think i copied thoses partitions right from my pc, but i may have got one mixed up or something



    Please can someone help, as i have been searching for days, and asking lots of different people on xda, but no response

    Thanks in advance

    Cheers
    Corey
    5
    Any success bro? Lot of people looking forward to this :)!

    Hi,
    I have been busy studying for university, and Microsoft exams, and I have been packing to move back to England in 3 weeks, and I have had some websites that I was building that needed finishing for people, so I haven't been able to do any of The kernel the last week or two.
    Also I have had to rebuild my PC.

    The kernel is still freezing on boot up of the second ROM.
    But I have found some lines of code in the ftab.2 and init.2 files in /sbin/misc/init.41 that could be causing the problem, and I will try changing them as soon as I get time.

    But its all very hectic here at the moment, and my WiFi and speaker on my note 2 have broken, so I also need to send it to a service center aswell. So I don't know when I will be able to get round to it, but I will try as soon as I can.

    Cheers
    Corey Bacon

    Sent from my GT-N7100

    If I helped you, please hit Thanks..
    4
    Great news, I just flashed the kernel, and it didn't brick my phone :) :).
    The first rom booted fine, with the only bug being that the external sd doesn't work (but i know what i did wrong with that).
    I have cloned the data to the second rom system img, but i am still figuring out how to boot in to the second rom, as the one boot user promt doesn't work without the custom dual boot recovery (i think)

    Corey

    Sent from my GT-N7100

    If I helped you, please hit Thanks..
    4
    Hi,
    Yes i didnt think of that, i will try that later.
    Thanks

    Corey






    Hi,
    Yes I found out what the contents of choose_ROM is, and its a symbolic link to busy box.
    But I can't find anything wrong with the choose ROM thing ect.

    I fixed the first problem of not being able to select the second ROM on boot, but now I have a new problem.
    When I boot The phone up, with the value of 2 in .nextboot, and select the second ROM, the second ROM trys to boot, but it freezes as soon as I select the second ROM.

    I am thinking something might be wrong with my second system.img
    Cos I created a 1gb ext4 system img, and placed it in /data/media/.secondrom
    But when I clone the second ROM to it, instead of using the 1gb of space already created, it seems to try and expand the system img, so if I clone a 500mb ROM to the IMG the system IMG will expand to 1.5gb.

    I know the second system.img is getting mounted, cos if I leave the img empty, the phone will loop on the choose rom screen, but if I put a system.img with a cloned rom, the choose ROM screen freezes when it trys to boot the second rom.
    I really need someone with a s3 to install a n2 ROM with the s3 update script etc as there second rom, and then send me the system.IMG but I can't seem to find anyone :(

    Cheers
    Corey



    Sent from my GT-N7100

    If I helped you, please hit Thanks..

    I can do this, but it won't be until Sunday. I need my phone all through most the weekend. Toss me some links and I'll get on it either Saturday night or Sunday daytime.
    3
    Ok the last 5-10 post are very confusing....do I understand right that you have dualboot working

    It was easier for me to understand the code you was posting and my development skills are limited to mainly apps

    Sent from my GT-N7100 using xda app-developers app

    Hi,
    No I haven't got dual boot working yet.
    I am editing some things in various fstabs and init files, and I will test it soon hopefully.
    The second ROM still freezes on boot at the moment.

    Cheers
    Corey

    Sent from my GT-N7100

    If I helped you, please hit Thanks..