tech-kern archive

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

Re: amd64 kernel, i386 userland



On Fri, 24 Jan 2014, matthew green wrote:
i386 and amd64 do NOT have compatible /dev.  if you boot an amd64
kernel, make sure you run an amd64 MAKEDEV in /dev.

I have successfully used "magic symlinks" (see symlink(7)) to allow
i386 and amd64 to use different instances of /dev.  The basic scheme is:

    Build a kernel with "options MAGICLINKS", or arrange to run
    sysctl -w vfs.generic.magiclinks=1 very early in /etc/rc.
    Putting the setting in /etc/sysctl.conf will probably be too late.

    mkdir /dev.i386
    mkdir /dev.amd64
    copy the i386 version of MAKEDEV to /dev.i386/MAKEDEV
    copy the amd64 version of MAKEDEV to /dev.amd64/MAKEDEV
    ( cd /dev.i386 && sh ./MAKEDEV all )
    ( cd /dev.amd64 && sh ./MAKEDEV all )
    mv /dev /dev.old && ln -sf dev.@machine /dev

    reboot.  If it works then rm -rf /dev.old.

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index