Re: [gentoo-user] Re: Beta test Gentoo with mdev instead of udev; version 2

2011-12-01 Thread Walter Dnes
On Wed, Nov 30, 2011 at 08:58:13PM +0700, Pandu Poluan wrote
 On Mon, Nov 21, 2011 at 17:47,  waltd...@waltdnes.org wrote:
 
 
 - 8 snip
 
  3) In the bootloader append line, include init=/sbin/linuxrc where
  ?? the file /sbin/linuxrc consists of *AT LEAST*...
 
  #!/sbin/busybox ash
  mount -t proc proc /proc
  mount -t sysfs sysfs /sys
  exec /sbin/init
 
  ?? This should be enough for most users. ??If you have an unusual setup,
  ?? you may need additional stuff in there. ??If you're using lilo remember
  ?? to re-run lilo to implement the changes.
 
 
 - 8 snip
 
 BTW, which busybox returns /bin/busybox instead of /sbin/busybox

  In plain English... I goofed.  It is /bin/busybox.  Thanks for
catching that.  This is what beta testing is for G.  I'll update the
instructions.

-- 
Walter Dnes waltd...@waltdnes.org



Re: [gentoo-user] Re: Beta test Gentoo with mdev instead of udev; version 2

2011-11-30 Thread Pandu Poluan
On Mon, Nov 21, 2011 at 17:47,  waltd...@waltdnes.org wrote:


- 8 snip

 3) In the bootloader append line, include init=/sbin/linuxrc where
   the file /sbin/linuxrc consists of *AT LEAST*...

 #!/sbin/busybox ash
 mount -t proc proc /proc
 mount -t sysfs sysfs /sys
 exec /sbin/init

   This should be enough for most users.  If you have an unusual setup,
   you may need additional stuff in there.  If you're using lilo remember
   to re-run lilo to implement the changes.


- 8 snip

BTW, which busybox returns /bin/busybox instead of /sbin/busybox

In other words, all this time /sbin/linuxrc *didn't* run on my boxen,
but the kernel is smart enough to run with the defaults, whatever
that is (I forgot to write down the exact error message in dmesg).

After fixing the hashbang line, I can now insert the line mount -o
remount,rw / at the 2nd line...

... and I no longer have the two red asterisks! Yay!!

Rgds,
-- 
FdS Pandu E Poluan
~ IT Optimizer ~

 • LOPSA Member #15248
 • Blog : http://pepoluan.tumblr.com
 • Linked-In : http://id.linkedin.com/in/pepoluan



[gentoo-user] Re: Beta test Gentoo with mdev instead of udev; version 2

2011-11-21 Thread waltdnes
  Based on feedback, I've changed step 6, to get a modified ebuild for
virtual/dev-manager to properly check for busybox with the mdev USE
flag.  Steps 1-through-5 are unchanged.

  The usual warnings apply...
* this is a beta
* use a spare test machine
* if you don't follow the instructions correctly, the result might be
  an unbootable linux
* even if you do follow instructions, the result might be an unbootable
  linux


1) Set up your kernel to support and automount a devtmpfs filesystem at
   /dev

* If you prefer to edit .config directly, set
  CONFIG_DEVTMPFS=y and CONFIG_DEVTMPFS_MOUNT=y

* If you prefer make menuconfig, the route is as shown below.  Note
  that the Autount devtmpfs... option won't appear until you enable
  Maintain a devtmpf... option.

make menuconfig
  Device Drivers  ---
Generic Driver Options  ---
  [*] Maintain a devtmpfs filesystem to mount at /dev
  [*]   Automount devtmpfs at /dev, after the kernel mounted the rootfs

  Once you've made the changes, rebuild the kernel.


2) Set up for emerging busybox, there are 2 items to change

A) It appears that there may be an mdev bug in older versions of
   busybox.  To avoid that bug, keyword busybox-1.19.2 in
   /etc/portage/package.keywords  E.g. if you're using 32-bit Gentoo on
   Intel, the incantation is...

=sys-apps/busybox-1.19.2 ~x86

   Change the ~x86 to reflect your architecture, etc.

B) busybox requires the mdev flag in this situation.  The static
flag is probably also a good idea.  In file /etc/portage/package.use
add the line

sys-apps/busybox static mdev

   Now, emerge busybox


3) In the bootloader append line, include init=/sbin/linuxrc where
   the file /sbin/linuxrc consists of *AT LEAST*...

#!/sbin/busybox ash
mount -t proc proc /proc
mount -t sysfs sysfs /sys
exec /sbin/init

   This should be enough for most users.  If you have an unusual setup,
   you may need additional stuff in there.  If you're using lilo remember
   to re-run lilo to implement the changes.

4) Remove udev from the services list, and replace it with mdev.  Type
   the following 2 commands at the command line
rc-update del udev sysinit
rc-update add mdev sysinit


5) reboot to your new kernel.  You're now running without using udev.


6) ***THIS STEP IS OPTIONAL***  This is only to alay any suspicion that
   udev is still in use.  udev is pulled in by virtual/dev-manager,
   which in turn is pulled in by the kernel.

* If you don't already have an overlay, create one, and implement it in
  /etc/make.conf.  In the following example, I'll use my setup, which has
  the overlay in /usr/local/portage

* copy the contents of /usr/portage/virtual/dev-manager/ to
  /usr/local/portage/virtual/dev-manager/

* cd /usr/local/portage/virtual/dev-manager/

* Edit the dev-manager-0.ebuild in the overlay to include
  sys-apps/busybox[mdev] as one option in RDEPEND.  And also include
  EAPI=2 at the top of the ebuild, which is required for this syntax.
  The revised ebuild is shown below.


EAPI=2

DESCRIPTION=Virtual for the device filesystem manager
HOMEPAGE=
SRC_URI=

LICENSE=
SLOT=0
KEYWORDS=alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~spar
c-fbsd ~x86-fbsd
IUSE=

DEPEND=
RDEPEND=|| ( sys-fs/udev
sys-apps/busybox[mdev]
sys-fs/devfsd
sys-fs/static-dev
sys-freebsd/freebsd-sbin )


* execute the following 3 commands at the commandline
ebuild dev-manager-0.ebuild digest
emerge -1 dev-manager
emerge --unmerge sys-fs/udev

* In file /atc/portage/package.mask, append the line
sys-fs/udev
  Create the file if it doesn't already exist.  You now have a totally
  udev-free machine


-- 
Walter Dnes waltd...@waltdnes.org