Skip to main content
added 3 characters in body
Source Link
Lexx Luxx
  • 1.5k
  • 11
  • 30
  • 40

Linux 2.6.26.5 embedded. I need manually mount the root file system from busybox shell (initramfs). Because this Linux kernel not use devtmpfs, I have to create the basic device nodes manually, use mknod (/dev/null, /dev/zero, dev/mtdblock {0-10}, ttys). I'm not sure about correct format for /dev/mtdblock and ttys. Should I create nodes for both /dev/mtdblock and /dev/mtd? The device creates 11 MTD partitions on nand0. Where to find the major and minor numbers assigned for a devices? The same question for ttys: what is correct mknod command for 5 /dev/tty and 4 tty - are they in different places?

mknod /dev/ttyS0-m 666 tty c 4 640 mknod -m 666 /dev/ttyS1tty c 45 650 

Edit: partitions, devices and filesystems

# cat /proc/partitions major minor #blocks name 31 0 384 mtdblock0 31 1 128 mtdblock1 31 2 20352 mtdblock2 31 3 7168 mtdblock3 31 4 18816 mtdblock4 31 5 2048 mtdblock5 31 6 1024 mtdblock6 31 7 512 mtdblock7 31 8 128 mtdblock8 31 9 512 mtdblock9 31 10 512 mtdblock10 # cat /proc/devices Character devices: 1 mem 2 pty 3 ttyp 4 /dev/vc/0 4 tty 4 ttyS 5 /dev/tty 5 /dev/console 5 /dev/ptmx 7 vcs 10 misc 13 input 89 i2c 90 mtd 108 ppp 128 ptm 136 pts 153 spi 204 ttyJ 254 cordless Block devices: 1 ramdisk 31 mtdblock 93 nftl 

Linux 2.6.26.5 embedded. I need manually mount the root file system from busybox shell (initramfs). Because this Linux kernel not use devtmpfs, I have to create the basic device nodes manually, use mknod (/dev/null, /dev/zero, dev/mtdblock {0-10}, ttys). I'm not sure about correct format for /dev/mtdblock and ttys. Should I create nodes for both /dev/mtdblock and /dev/mtd? The device creates 11 MTD partitions on nand0. Where to find the major and minor numbers assigned for a devices? The same question for ttys: what is correct mknod command for 5 /dev/tty and 4 tty - are they in different places?

mknod /dev/ttyS0 c 4 64 mknod /dev/ttyS1 c 4 65 

Edit: partitions, devices and filesystems

# cat /proc/partitions major minor #blocks name 31 0 384 mtdblock0 31 1 128 mtdblock1 31 2 20352 mtdblock2 31 3 7168 mtdblock3 31 4 18816 mtdblock4 31 5 2048 mtdblock5 31 6 1024 mtdblock6 31 7 512 mtdblock7 31 8 128 mtdblock8 31 9 512 mtdblock9 31 10 512 mtdblock10 # cat /proc/devices Character devices: 1 mem 2 pty 3 ttyp 4 /dev/vc/0 4 tty 4 ttyS 5 /dev/tty 5 /dev/console 5 /dev/ptmx 7 vcs 10 misc 13 input 89 i2c 90 mtd 108 ppp 128 ptm 136 pts 153 spi 204 ttyJ 254 cordless Block devices: 1 ramdisk 31 mtdblock 93 nftl 

Linux 2.6.26.5 embedded. I need manually mount the root file system from busybox shell (initramfs). Because this Linux kernel not use devtmpfs, I have to create the basic device nodes manually, use mknod (/dev/null, /dev/zero, dev/mtdblock {0-10}, ttys). I'm not sure about correct format for /dev/mtdblock and ttys. Should I create nodes for both /dev/mtdblock and /dev/mtd? The device creates 11 MTD partitions on nand0. Where to find the major and minor numbers assigned for a devices? The same question for ttys: what is correct mknod command for 5 /dev/tty and 4 tty - are they in different places?

mknod -m 666 tty c 4 0 mknod -m 666 /dev/tty c 5 0 

Edit: partitions, devices and filesystems

# cat /proc/partitions major minor #blocks name 31 0 384 mtdblock0 31 1 128 mtdblock1 31 2 20352 mtdblock2 31 3 7168 mtdblock3 31 4 18816 mtdblock4 31 5 2048 mtdblock5 31 6 1024 mtdblock6 31 7 512 mtdblock7 31 8 128 mtdblock8 31 9 512 mtdblock9 31 10 512 mtdblock10 # cat /proc/devices Character devices: 1 mem 2 pty 3 ttyp 4 /dev/vc/0 4 tty 4 ttyS 5 /dev/tty 5 /dev/console 5 /dev/ptmx 7 vcs 10 misc 13 input 89 i2c 90 mtd 108 ppp 128 ptm 136 pts 153 spi 204 ttyJ 254 cordless Block devices: 1 ramdisk 31 mtdblock 93 nftl 
deleted 222 characters in body
Source Link
Lexx Luxx
  • 1.5k
  • 11
  • 30
  • 40

Linux 2.6.26.5 embedded. I need manually mount the root file system from busybox shell (initramfs). Because this Linux kernel not use devtmpfs, I have to create the basic device nodes manually, use mknod (/dev/null, /dev/zero, dev/mtdblock {0-10}, ttys). I'm not sure about correct format for /dev/mtdblock and ttys. Should I create nodes for both /dev/mtdblock and /dev/mtd? The device creates 11 MTD partitions on nand0. Where to find the major and minor numbers assigned for a devices? The same question for ttys.: what is correct mknod command for 5 /dev/tty and 4 tty - are they in different places?

mknod /dev/ttyS0 c 4 64 mknod /dev/ttyS1 c 4 65 

Edit: partitions, devices and filesystems

# cat /proc/partitions major minor #blocks name 31 0 384 mtdblock0 31 1 128 mtdblock1 31 2 20352 mtdblock2 31 3 7168 mtdblock3 31 4 18816 mtdblock4 31 5 2048 mtdblock5 31 6 1024 mtdblock6 31 7 512 mtdblock7 31 8 128 mtdblock8 31 9 512 mtdblock9 31 10 512 mtdblock10 # cat /proc/devices Character devices: 1 mem 2 pty 3 ttyp 4 /dev/vc/0 4 tty 4 ttyS 5 /dev/tty 5 /dev/console 5 /dev/ptmx 7 vcs 10 misc 13 input 89 i2c 90 mtd 108 ppp 128 ptm 136 pts 153 spi 204 ttyJ 254 cordless Block devices: 1 ramdisk 31 mtdblock 93 nftl 

Linux 2.6.26.5 embedded. I need manually mount the root file system from busybox shell (initramfs). Because this Linux kernel not use devtmpfs, I have to create the basic device nodes manually, use mknod (/dev/null, /dev/zero, dev/mtdblock {0-10}, ttys). I'm not sure about correct format for /dev/mtdblock and ttys. Should I create nodes for both /dev/mtdblock and /dev/mtd? The device creates 11 MTD partitions on nand0. Where to find the major and minor numbers assigned for a devices? The same question for ttys.

mknod /dev/ttyS0 c 4 64 mknod /dev/ttyS1 c 4 65 

Edit: partitions, devices and filesystems

# cat /proc/partitions major minor #blocks name 31 0 384 mtdblock0 31 1 128 mtdblock1 31 2 20352 mtdblock2 31 3 7168 mtdblock3 31 4 18816 mtdblock4 31 5 2048 mtdblock5 31 6 1024 mtdblock6 31 7 512 mtdblock7 31 8 128 mtdblock8 31 9 512 mtdblock9 31 10 512 mtdblock10 # cat /proc/devices Character devices: 1 mem 2 pty 3 ttyp 4 /dev/vc/0 4 tty 4 ttyS 5 /dev/tty 5 /dev/console 5 /dev/ptmx 7 vcs 10 misc 13 input 89 i2c 90 mtd 108 ppp 128 ptm 136 pts 153 spi 204 ttyJ 254 cordless Block devices: 1 ramdisk 31 mtdblock 93 nftl 

Linux 2.6.26.5 embedded. I need manually mount the root file system from busybox shell (initramfs). Because this Linux kernel not use devtmpfs, I have to create the basic device nodes manually, use mknod (/dev/null, /dev/zero, dev/mtdblock {0-10}, ttys). I'm not sure about correct format for /dev/mtdblock and ttys. Should I create nodes for both /dev/mtdblock and /dev/mtd? The device creates 11 MTD partitions on nand0. Where to find the major and minor numbers assigned for a devices? The same question for ttys: what is correct mknod command for 5 /dev/tty and 4 tty - are they in different places?

mknod /dev/ttyS0 c 4 64 mknod /dev/ttyS1 c 4 65 

Edit: partitions, devices and filesystems

# cat /proc/partitions major minor #blocks name 31 0 384 mtdblock0 31 1 128 mtdblock1 31 2 20352 mtdblock2 31 3 7168 mtdblock3 31 4 18816 mtdblock4 31 5 2048 mtdblock5 31 6 1024 mtdblock6 31 7 512 mtdblock7 31 8 128 mtdblock8 31 9 512 mtdblock9 31 10 512 mtdblock10 # cat /proc/devices Character devices: 1 mem 2 pty 3 ttyp 4 /dev/vc/0 4 tty 4 ttyS 5 /dev/tty 5 /dev/console 5 /dev/ptmx 7 vcs 10 misc 13 input 89 i2c 90 mtd 108 ppp 128 ptm 136 pts 153 spi 204 ttyJ 254 cordless Block devices: 1 ramdisk 31 mtdblock 93 nftl 
deleted 222 characters in body
Source Link
Lexx Luxx
  • 1.5k
  • 11
  • 30
  • 40

Linux 2.6.26.5 embedded. I need manually mount the root file system from busybox shell (initramfs). Because this Linux kernel not use devtmpfs, I have to create the basic device nodes manually, use mknod (/dev/null, /dev/zero, dev/mtdblock {0-10}, ttys). I'm not sure about correct format for /dev/mtdblock and ttys. Should Should I create nodes for both /dev/mtdblock and /dev/mtd? The device creates 11 MTD partitions on nand0.

For example:

mknod /dev/mtdblock0 b 31 0 ... mknod /dev/mtdblock10 b 31 10 mknod /dev/mtd0 c 90 0 ... mknod /dev/mtd10 c 90 20 

And where Where to getfind the major and minor numbers assigned for a devices? The same question for ttys, where to find ttys # and major and minor numbers?.

mknod /dev/ttyS0 c 4 64 mknod /dev/ttyS1 c 4 65 

Edit: partitions, devices and filesystems

# cat /proc/partitions major minor #blocks name 31 0 384 mtdblock0 31 1 128 mtdblock1 31 2 20352 mtdblock2 31 3 7168 mtdblock3 31 4 18816 mtdblock4 31 5 2048 mtdblock5 31 6 1024 mtdblock6 31 7 512 mtdblock7 31 8 128 mtdblock8 31 9 512 mtdblock9 31 10 512 mtdblock10 # cat /proc/devices Character devices: 1 mem 2 pty 3 ttyp 4 /dev/vc/0 4 tty 4 ttyS 5 /dev/tty 5 /dev/console 5 /dev/ptmx 7 vcs 10 misc 13 input 89 i2c 90 mtd 108 ppp 128 ptm 136 pts 153 spi 204 ttyJ 254 cordless Block devices: 1 ramdisk 31 mtdblock 93 nftl 

Linux 2.6.26.5 embedded. I need manually mount the root file system from busybox shell (initramfs). Because this Linux kernel not use devtmpfs, I have to create the basic device nodes manually, use mknod (/dev/null, /dev/zero, dev/mtdblock {0-10}, ttys). I'm not sure about correct format for /dev/mtdblock and ttys. Should I create nodes for both /dev/mtdblock and /dev/mtd? The device creates 11 MTD partitions on nand0.

For example:

mknod /dev/mtdblock0 b 31 0 ... mknod /dev/mtdblock10 b 31 10 mknod /dev/mtd0 c 90 0 ... mknod /dev/mtd10 c 90 20 

And where to get the major and minor numbers assigned for a devices? The same question for ttys, where to find ttys # and major and minor numbers?

mknod /dev/ttyS0 c 4 64 mknod /dev/ttyS1 c 4 65 

Edit: partitions, devices and filesystems

# cat /proc/partitions major minor #blocks name 31 0 384 mtdblock0 31 1 128 mtdblock1 31 2 20352 mtdblock2 31 3 7168 mtdblock3 31 4 18816 mtdblock4 31 5 2048 mtdblock5 31 6 1024 mtdblock6 31 7 512 mtdblock7 31 8 128 mtdblock8 31 9 512 mtdblock9 31 10 512 mtdblock10 # cat /proc/devices Character devices: 1 mem 2 pty 3 ttyp 4 /dev/vc/0 4 tty 4 ttyS 5 /dev/tty 5 /dev/console 5 /dev/ptmx 7 vcs 10 misc 13 input 89 i2c 90 mtd 108 ppp 128 ptm 136 pts 153 spi 204 ttyJ 254 cordless Block devices: 1 ramdisk 31 mtdblock 93 nftl 

Linux 2.6.26.5 embedded. I need manually mount the root file system from busybox shell (initramfs). Because this Linux kernel not use devtmpfs, I have to create the basic device nodes manually, use mknod (/dev/null, /dev/zero, dev/mtdblock {0-10}, ttys). I'm not sure about correct format for /dev/mtdblock and ttys. Should I create nodes for both /dev/mtdblock and /dev/mtd? The device creates 11 MTD partitions on nand0. Where to find the major and minor numbers assigned for a devices? The same question for ttys.

mknod /dev/ttyS0 c 4 64 mknod /dev/ttyS1 c 4 65 

Edit: partitions, devices and filesystems

# cat /proc/partitions major minor #blocks name 31 0 384 mtdblock0 31 1 128 mtdblock1 31 2 20352 mtdblock2 31 3 7168 mtdblock3 31 4 18816 mtdblock4 31 5 2048 mtdblock5 31 6 1024 mtdblock6 31 7 512 mtdblock7 31 8 128 mtdblock8 31 9 512 mtdblock9 31 10 512 mtdblock10 # cat /proc/devices Character devices: 1 mem 2 pty 3 ttyp 4 /dev/vc/0 4 tty 4 ttyS 5 /dev/tty 5 /dev/console 5 /dev/ptmx 7 vcs 10 misc 13 input 89 i2c 90 mtd 108 ppp 128 ptm 136 pts 153 spi 204 ttyJ 254 cordless Block devices: 1 ramdisk 31 mtdblock 93 nftl 
deleted 88 characters in body
Source Link
Lexx Luxx
  • 1.5k
  • 11
  • 30
  • 40
Loading
deleted 354 characters in body
Source Link
Lexx Luxx
  • 1.5k
  • 11
  • 30
  • 40
Loading
deleted 428 characters in body
Source Link
Lexx Luxx
  • 1.5k
  • 11
  • 30
  • 40
Loading
added 10 characters in body
Source Link
Lexx Luxx
  • 1.5k
  • 11
  • 30
  • 40
Loading
added 1731 characters in body
Source Link
Lexx Luxx
  • 1.5k
  • 11
  • 30
  • 40
Loading
added 1731 characters in body
Source Link
Lexx Luxx
  • 1.5k
  • 11
  • 30
  • 40
Loading
deleted 5 characters in body; edited title
Source Link
peterh
  • 10.5k
  • 18
  • 70
  • 99
Loading
Source Link
Lexx Luxx
  • 1.5k
  • 11
  • 30
  • 40
Loading