Re: Kernel boot panic

2016-12-12 Thread Kristof Provost

Please don’t top-post.

On 12 Dec 2016, at 10:59, Amit Mahadik wrote:
Yes I tried mounting the SD card on another Linux machine. I can mount 
it. Following is its 
log*root@sagark-Ubu14:~/amitm# 
mount

/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs 
(rw,noexec,nosuid,nodev,size=104857600,mode=0755)

none on /sys/fs/pstore type pstore (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc 
(rw,noexec,nosuid,nodev)
systemd on /sys/fs/cgroup/systemd type cgroup 
(rw,noexec,nosuid,nodev,none,name=systemd)
/dev/sdb1 on /media/evslab/BOOT type vfat 
(rw,nosuid,nodev,uid=1001,gid=1001,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)
/dev/sdb2 on /mnt type ext3 
(rw)**
I have created the ROOTFS image using buildroot 2016.05 version. The 
/dev management option selected is "Dynamic using devtmpfs + eudev" 
and corresponding DEVTMPS options are enabled in Kernel config.



Oooh, I missed this in the log the first time round:

[6.227066] Failed to create /dev/root: -2’

This is logged by `mount_root()`, if the `create_dev()` call fails.
It returned -2, which is `-ENOENT`.

Does your rootfs have a /dev directory?

Regards,
Kristof___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Kernel boot panic

2016-12-12 Thread Amit Mahadik
Hi Kristof,  Yes I tried mounting the SD card on another Linux 
machine. I can mount it. Following is its 
log*root@sagark-Ubu14:~/amitm#
 mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc 
(rw,noexec,nosuid,nodev)
systemd on /sys/fs/cgroup/systemd type cgroup 
(rw,noexec,nosuid,nodev,none,name=systemd)
/dev/sdb1 on /media/evslab/BOOT type vfat 
(rw,nosuid,nodev,uid=1001,gid=1001,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)
/dev/sdb2 on /mnt type ext3 
(rw)**
I have created the ROOTFS image using buildroot 2016.05 version. The /dev 
management option selected is "Dynamic using devtmpfs + eudev" and 
corresponding DEVTMPS options are enabled in Kernel config. 

Browsing through the kernel code I find that the code gives error after 
create_dev API in init/do_mounts.c file. 

Please let me know what I am doing wrong or missing?
Regards,Amit.
 

On Monday, 12 December 2016 2:38 PM, Kristof Provost  
wrote:
 

 On 12 Dec 2016, at 9:53, Amit Mahadik wrote:
> Yes I have compiled the EXT3 support into the kernel itself. But no 
> luck yet!
> Regards,Amit.
>
Have you tried mounting the ext3 partition in another linux machine?  
Your log
indicates the kernel is not able to mount the partition, so the most 
likely
causes are that the kernel doesn’t know how to read ext3 or that 
there’s no
ext3 there.

Regards,
Kristof

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


   ___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Kernel boot panic

2016-12-12 Thread Kristof Provost
On 12 Dec 2016, at 9:53, Amit Mahadik wrote:
> Yes I have compiled the EXT3 support into the kernel itself. But no 
> luck yet!
> Regards,Amit.
>
Have you tried mounting the ext3 partition in another linux machine?  
Your log
indicates the kernel is not able to mount the partition, so the most 
likely
causes are that the kernel doesn’t know how to read ext3 or that 
there’s no
ext3 there.

Regards,
Kristof

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Kernel boot panic

2016-12-12 Thread Amit Mahadik
Hi Kristof,               Yes I have compiled the EXT3 support into the kernel 
itself. But no luck yet!
Regards,Amit. 

On Thursday, 8 December 2016 10:51 PM, Kristof Provost  
wrote:
 

 On 8 Dec 2016, at 15:59, Amit Mahadik wrote:
>      Hi,
>       I am trying to boot Linux kernel version 4.4.16 on custom ARM 
> based development platform.I want to separate rootfs and kernel Image 
> so that the size of my uImage is small. I followed the following 
> steps.
> 1. Partitioned the SD card. It has 2 partition. First partition is 
> formatted as vfat partition and    has uImage (without rootfs). 
> Second partition is formatted as ext3 and has the rootfs.2. I then 
> changed the U-Boot (version 2011.05) bootargs   Kernel command line: 
> console=ttyS0,115200 noinitrd rw rootfstype=ext3 root=/dev/mmcblk0p2 
>          rootwait mem=512M coherent_pool=4M no_console_suspend 
> resume=/dev/mtdblock3.
>
> However, while booting I get the following error 
> Failed to create /dev/root: -2VFS: Cannot open root device "mmcblk0p2" 
> or unknown-block(179,2): error -2
> I have also attached log for reference. Can anyone please point out 
> what I may be missing?

Well, your kernel finds the partition, but it’s still unable to open 
the root device.
Did you remember to compile ext3 support into your kernel (so not as a 
module)?

Regards,
Kristof

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


   ___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Kernel boot panic

2016-12-08 Thread Kristof Provost
On 8 Dec 2016, at 15:59, Amit Mahadik wrote:
>      Hi,
>       I am trying to boot Linux kernel version 4.4.16 on custom ARM 
> based development platform.I want to separate rootfs and kernel Image 
> so that the size of my uImage is small. I followed the following 
> steps.
> 1. Partitioned the SD card. It has 2 partition. First partition is 
> formatted as vfat partition and    has uImage (without rootfs). 
> Second partition is formatted as ext3 and has the rootfs.2. I then 
> changed the U-Boot (version 2011.05) bootargs   Kernel command line: 
> console=ttyS0,115200 noinitrd rw rootfstype=ext3 root=/dev/mmcblk0p2 
>          rootwait mem=512M coherent_pool=4M no_console_suspend 
> resume=/dev/mtdblock3.
>
> However, while booting I get the following error 
> Failed to create /dev/root: -2VFS: Cannot open root device "mmcblk0p2" 
> or unknown-block(179,2): error -2
> I have also attached log for reference. Can anyone please point out 
> what I may be missing?

Well, your kernel finds the partition, but it’s still unable to open 
the root device.
Did you remember to compile ext3 support into your kernel (so not as a 
module)?

Regards,
Kristof

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Kernel boot panic

2016-12-08 Thread Amit Mahadik

     Hi,
      I am trying to boot Linux kernel version 4.4.16 on custom ARM based 
development platform.I want to separate rootfs and kernel Image so that the 
size of my uImage is small. I followed the following steps.
1. Partitioned the SD card. It has 2 partition. First partition is formatted as 
vfat partition and    has uImage (without rootfs). Second partition is 
formatted as ext3 and has the rootfs.2. I then changed the U-Boot (version 
2011.05) bootargs   Kernel command line: console=ttyS0,115200 noinitrd rw 
rootfstype=ext3 root=/dev/mmcblk0p2          rootwait mem=512M coherent_pool=4M 
no_console_suspend resume=/dev/mtdblock3.

However, while booting I get the following error 
Failed to create /dev/root: -2VFS: Cannot open root device "mmcblk0p2" or 
unknown-block(179,2): error -2
I have also attached log for reference. Can anyone please point out what I may 
be missing?
Regards,Amit.


   Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[0.00] Booting Linux on physical CPU 0x0
[0.00] Initializing cgroup subsys cpuset
[0.00] Initializing cgroup subsys cpu
[0.00] Linux version 4.4.16-svn125 (amitm@buildserver-90) (gcc version 
4.8.3 20140320 (prerelease) (GCC) ) #6 SMP PREEMPT Wed Nov 30 15:09:22 IST 2016
[0.00] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=18c5387d
[0.00] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing 
instruction cache
[0.00] Machine: OPV5XC-CA9MP
[0.00] cma: Reserved 32 MiB at 0x1e00
[0.00] Memory policy: Data cache writealloc
[0.00] PERCPU: Embedded 12 pages/cpu @9dbbd000 s18496 r8192 d22464 
u49152
[0.00] Built 1 zonelists in Zone order, mobility grouping on.  Total 
pages: 130048
[0.00] Kernel command line: console=ttyS0,115200 noinitrd rw 
rootfstype=ext3 root=/dev/mmcblk0p2 rootwait mem=512M coherent_pool=4M 
no_console_suspend resume=/dev/mtdblock3
[0.00] PID hash table entries: 2048 (order: 1, 8192 bytes)
[0.00] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[0.00] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[0.00] Memory: 476628K/524288K available (5704K kernel code, 355K 
rwdata, 1804K rodata, 1976K init, 282K bss, 14892K reserved, 32768K 
cma-reserved)
[0.00] Virtual kernel memory layout:
[0.00] vector  : 0x - 0x1000   (   4 kB)
[0.00] fixmap  : 0xffc0 - 0xfff0   (3072 kB)
[0.00] vmalloc : 0xa080 - 0xff80   (1520 MB)
[0.00] lowmem  : 0x8000 - 0xa000   ( 512 MB)
[0.00] modules : 0x7f00 - 0x8000   (  16 MB)
[0.00]   .text : 0x80008000 - 0x8075d398   (7509 kB)
[0.00]   .init : 0x8075e000 - 0x8094c000   (1976 kB)
[0.00]   .data : 0x8094c000 - 0x809a4c60   ( 356 kB)
[0.00].bss : 0x809a4c60 - 0x809eb76c   ( 283 kB)
[0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=3, Nodes=1
[0.00] Preemptible hierarchical RCU implementation.
[0.00]  RCU debugfs-based tracing is enabled.
[0.00]  Build-time adjustment of leaf fanout to 32.
[0.00] NR_IRQS:264
[0.00] smp_twd: clock not found -2
[0.00] twd_local_timer registered.
[0.12] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 
85899345900ns
[0.32] clocksource: timer2: mask: 0x max_cycles: 0x, 
max_idle_ns: 76450417870 ns
[0.53] opv5xc_timer_init OK.
[0.000162] Console: colour dummy device 80x30
[0.000196] Calibrating local timer... 199.90MHz.
[0.060091] Calibrating delay loop... 1594.16 BogoMIPS (lpj=7970816)
[0.150080] pid_max: default: 32768 minimum: 301
[0.150197] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[0.150214] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[0.150946] CPU: Testing write buffer coherency: ok
[0.151278] CPU0: thread -1, cpu 0, socket 0, mpidr 8000
[0.151344] opv5xc_secondary_startup @ 0x56c544
[0.151367] see 0x56c544
[0.151450] Setting up static identity map for 0x8280 - 0x82d8
[0.230641] CPU1: Booted secondary processor
[0.26] CPU1: thread -1, cpu 1, socket 0, mpidr 8001
[0.300599] CPU2: Booted secondary processor
[0.339965] CPU2: thread -1, cpu 2, socket 0, mpidr 8002
[0.340128] Brought up 3 CPUs
[0.340167] SMP: Total of 3 processors activated (4782.48 BogoMIPS).
[0.340182] CPU: All CPU(s) started in SVC mode.
[0.341887] devtmpfs: initialized
[0.355711] VFP support v0.3: implementor 41 architecture 3 part 30 variant 
9 rev 4
[0.357002] clocksource: jiffies: mask: 0x max_cycles: 0x, 
max_idle_ns: 1911260446275 ns
[0.361766] NET: Registered protocol family 16
[0.370148] DMA: preallocated 4096 KiB pool for atomic coherent allocations
[0.32] cpuidle: using governor 

Re: Kernel boot panic

2016-11-30 Thread Amit Mahadik
Hi Valdis,               Thanks for your prompt answer. I have ext3 builtin the 
kernel. After looking into the code I found that sys_mknod function fails. I am 
unable to understand why this happens?
Regards,Amit. 

On Wednesday, 30 November 2016 11:38 PM, "valdis.kletni...@vt.edu" 
 wrote:
 

 On Wed, 30 Nov 2016 14:12:18 +, Amit Mahadik said:

> bootargs   Kernel command line: console=ttyS0,115200 noinitrd rw 
> rootfstype=ext3 root=/dev/mmcblk0p2          rootwait mem=512M 
> coherent_pool=4M no_console_suspend resume=/dev/mtdblock3.

> However, while booting I get the following error 
> Failed to create /dev/root: -2VFS: Cannot open root device "mmcblk0p2" or 
> unknown-block(179,2): error -2

If you're booting with noinitrd, you better have ext3 as a builtin, not a
module, or you're going to have a really bad day




   ___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Kernel boot panic

2016-11-30 Thread Amit Mahadik

     Hi,      I am trying to boot Linux kernel version 4.4.16 on custom ARM 
based development platform.I want to separate rootfs and kernel Image so that 
the size of my uImage is small. I followed the following steps.
1. Partitioned the SD card. It has 2 partition. First partition is formatted as 
vfat partition and    has uImage (without rootfs). Second partition is 
formatted as ext3 and has the rootfs.2. I then changed the U-Boot (version 
2011.05) bootargs   Kernel command line: console=ttyS0,115200 noinitrd rw 
rootfstype=ext3 root=/dev/mmcblk0p2          rootwait mem=512M coherent_pool=4M 
no_console_suspend resume=/dev/mtdblock3.

However, while booting I get the following error 
Failed to create /dev/root: -2VFS: Cannot open root device "mmcblk0p2" or 
unknown-block(179,2): error -2
I have also attached log for reference. Can anyone please point out what I may 
be missing?
Regards,Amit.
Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[0.00] Booting Linux on physical CPU 0x0
[0.00] Initializing cgroup subsys cpuset
[0.00] Initializing cgroup subsys cpu
[0.00] Linux version 4.4.16-svn125 (amitm@buildserver-90) (gcc version 
4.8.3 20140320 (prerelease) (GCC) ) #6 SMP PREEMPT Wed Nov 30 15:09:22 IST 2016
[0.00] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=18c5387d
[0.00] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing 
instruction cache
[0.00] Machine: OPV5XC-CA9MP
[0.00] cma: Reserved 32 MiB at 0x1e00
[0.00] Memory policy: Data cache writealloc
[0.00] PERCPU: Embedded 12 pages/cpu @9dbbd000 s18496 r8192 d22464 
u49152
[0.00] Built 1 zonelists in Zone order, mobility grouping on.  Total 
pages: 130048
[0.00] Kernel command line: console=ttyS0,115200 noinitrd rw 
rootfstype=ext3 root=/dev/mmcblk0p2 rootwait mem=512M coherent_pool=4M 
no_console_suspend resume=/dev/mtdblock3
[0.00] PID hash table entries: 2048 (order: 1, 8192 bytes)
[0.00] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[0.00] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[0.00] Memory: 476628K/524288K available (5704K kernel code, 355K 
rwdata, 1804K rodata, 1976K init, 282K bss, 14892K reserved, 32768K 
cma-reserved)
[0.00] Virtual kernel memory layout:
[0.00] vector  : 0x - 0x1000   (   4 kB)
[0.00] fixmap  : 0xffc0 - 0xfff0   (3072 kB)
[0.00] vmalloc : 0xa080 - 0xff80   (1520 MB)
[0.00] lowmem  : 0x8000 - 0xa000   ( 512 MB)
[0.00] modules : 0x7f00 - 0x8000   (  16 MB)
[0.00]   .text : 0x80008000 - 0x8075d398   (7509 kB)
[0.00]   .init : 0x8075e000 - 0x8094c000   (1976 kB)
[0.00]   .data : 0x8094c000 - 0x809a4c60   ( 356 kB)
[0.00].bss : 0x809a4c60 - 0x809eb76c   ( 283 kB)
[0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=3, Nodes=1
[0.00] Preemptible hierarchical RCU implementation.
[0.00]  RCU debugfs-based tracing is enabled.
[0.00]  Build-time adjustment of leaf fanout to 32.
[0.00] NR_IRQS:264
[0.00] smp_twd: clock not found -2
[0.00] twd_local_timer registered.
[0.12] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 
85899345900ns
[0.32] clocksource: timer2: mask: 0x max_cycles: 0x, 
max_idle_ns: 76450417870 ns
[0.53] opv5xc_timer_init OK.
[0.000162] Console: colour dummy device 80x30
[0.000196] Calibrating local timer... 199.90MHz.
[0.060091] Calibrating delay loop... 1594.16 BogoMIPS (lpj=7970816)
[0.150080] pid_max: default: 32768 minimum: 301
[0.150197] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[0.150214] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[0.150946] CPU: Testing write buffer coherency: ok
[0.151278] CPU0: thread -1, cpu 0, socket 0, mpidr 8000
[0.151344] opv5xc_secondary_startup @ 0x56c544
[0.151367] see 0x56c544
[0.151450] Setting up static identity map for 0x8280 - 0x82d8
[0.230641] CPU1: Booted secondary processor
[0.26] CPU1: thread -1, cpu 1, socket 0, mpidr 8001
[0.300599] CPU2: Booted secondary processor
[0.339965] CPU2: thread -1, cpu 2, socket 0, mpidr 8002
[0.340128] Brought up 3 CPUs
[0.340167] SMP: Total of 3 processors activated (4782.48 BogoMIPS).
[0.340182] CPU: All CPU(s) started in SVC mode.
[0.341887] devtmpfs: initialized
[0.355711] VFP support v0.3: implementor 41 architecture 3 part 30 variant 
9 rev 4
[0.357002] clocksource: jiffies: mask: 0x max_cycles: 0x, 
max_idle_ns: 1911260446275 ns
[0.361766] NET: Registered protocol family 16
[0.370148] DMA: preallocated 4096 KiB pool for atomic coherent allocations
[0.32] cpuidle: using governor ladder
[