Modify

Opened 9 years ago

Closed 8 years ago

#64 closed defect (fixed)

Missing block devices in /dev/

Reported by: stappers Owned by: amain
Priority: minor Milestone: milestone:
Component: debian/rootfs Version: 2.0
Severity: severity 4 Keywords:
Cc:

Description

In the debwrt system did fdisk -l /dev/sda show nothing.

Executing ls -l /dev/sda reports

ls: cannot access /dev/sda: No such file or directory

where mount reports

/dev/sda1 on / type ext3 (rw,noatime,nodiratime,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)

Note the /dev/sda1
However, ls -l /dev/sda1 also bails out with

ls: cannot access /dev/sda1: No such file or directory

My first impression was that /dev/MAKEDEV is missing,
but there are several character devices available.

ls -l /dev/ | sort | head
brw------- 1 root root      7,   0 Dec 19 17:11 loop0
crw------- 1 root root      1,  11 Dec 19 17:11 kmsg
crw------- 1 root root      4,   0 Dec 19 17:11 tty0
crw------- 1 root root      4,   1 Dec 19 17:11 tty1
crw------- 1 root root      4,   2 Dec 19 17:11 tty2
crw------- 1 root root      4,   3 Dec 19 17:11 tty3
crw------- 1 root root      4,   4 Dec 19 17:11 tty4
crw------- 1 root root      4,   5 Dec 19 17:11 tty5
crw------- 1 root root      4,   6 Dec 19 17:11 tty6
crw------- 1 root root      4,   7 Dec 19 17:11 tty7

Attachments (0)

Change History (9)

comment:1 Changed 9 years ago by stappers

Manual creating the node file, makes a fdisk -l possible.

root@debwrt:~# fdisk -l /dev/sda
root@debwrt:~# mknod /dev/sda b 8 0
root@debwrt:~# fdisk -l /dev/sda

Disk /dev/sda: 2147 MB, 2147483648 bytes
4 heads, 32 sectors/track, 32768 cylinders
Units = cylinders of 128 * 512 = 65536 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0005f707

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       29297     1874992   83  Linux
/dev/sda2           29298       32768      222144   82  Linux swap / Solaris
root@debwrt:~# 

comment:2 Changed 9 years ago by stappers

root@debwrt:~# file /dev/MAKEDEV
/dev/MAKEDEV: symbolic link to `/bin/true'

On my build host:

$ file /dev/MAKEDEV 
/dev/MAKEDEV: symbolic link to `/sbin/MAKEDEV'

comment:3 follow-up: Changed 9 years ago by amain

  • Owner changed from amain to stappers@…
  • Status changed from new to assigned

Sounds serious. Any ideas on how to fix this? I haven't seen /dev/ devices missing before. Is it easily reproducible? For now assigning to you.

comment:4 Changed 9 years ago by amain

  • Version VersionControlSystem deleted

comment:5 in reply to: ↑ 3 Changed 9 years ago by stappers

  • Owner changed from stappers@… to stappers
  • Status changed from assigned to accepted

Replying to amain:

Any ideas on how to fix this?
Is it easily reproducible?

Reproducing will indeed be the first step to get it fixed.

comment:6 Changed 9 years ago by stappers

  • Component changed from openwrt to debian

We encountered a documentation feature http://bugs.debian.org/413642

The fix for us is

--- debian/rootfs/debian.mk     (revision 156)
+++ debian/rootfs/debian.mk     (working copy)
@@ -62,6 +62,8 @@
                     $(DEBIAN_BUILD_VERSION) \
                     $(ROOTFS_BUILD_DIR) \
                     $(CONFIG_DEBIAN_BUILDENV_REPOSITORY)
+       # complete ROOTFS/dev/ with additional device files
+       sudo bash -c "cd $(ROOTFS_BUILD_DIR)/dev ; /sbin/MAKEDEV -v sda"
        touch $@
 
 debian/rootfs/unpack: debian/rootfs/bootstrap

which is in staging SVN as r160

comment:7 Changed 9 years ago by amain

  • Owner changed from stappers to amain
  • Status changed from accepted to assigned

In the past I had a set of device files which I copied during the creation of the rootfs. Especially indeed to get access to /dev/sda, the (initial) console devices. Also needed by sshd and telnetd, which are spawned during the second stage install.

Leaving this ticket openend, for me to futher investigate.

patch is a good patch, accepted and commited to main SVN.

comment:8 Changed 9 years ago by amain

  • Severity set to severity 4
  • Version set to 2.0

comment:9 Changed 8 years ago by amain

  • Resolution set to fixed
  • Status changed from assigned to closed

All devices are accounted for. Closing.

Add Comment

Modify Ticket

Action
as closed The owner will remain amain.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.