how to create /dev/root

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I added this to the Debian udev init script, run between mounting /dev
and starting udevtrigger.

mountpoint at least on Debian systems is part of sysvinit and happens to
be in /bin, but if /usr is available then you can as well use stat(1).

create_devroot_rule() {
  local udevroot="$1"
  local rootnumbers=$(mountpoint -q -d / || true)
  local rootmajor=${rootnumbers%:*}
  local rootminor=${rootnumbers#*:}
  [ "$rootmajor" -a "$rootminor" ] || return 0
  
  echo 'ACTION=="add", SUBSYSTEM=="block", ENV{MAJOR}=="'$rootmajor'", ENV{MINOR}=="'$rootminor'", SYMLINK+="root"' > /dev/.udev/rules.d/rules.d/61-dev-root-link.rules
}

-- 
ciao,
Marco

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux