up

char-major-10-134

/usr/src/linux-2.4.31/Documentation/devices.txt

なんの項目が関連するの?

# tail -2440 /usr/src/linux-2.4.31/Documentation/devices.txt | head -5
                132 = /dev/hwtrap       Hardware fault trap
                133 = /dev/exttrp       External device trap
                134 = /dev/apm_bios     Advanced Power Management BIOS
                135 = /dev/rtc          Real Time Clock
                139 = /dev/openprom     SPARC OpenBoot PROM

Advanced Power Management BIOS support

これを有効にしてしまおう char-major-10-134
方針
今回は カーネルの再構築で ”shutdown -h now”で 電源を切るようにする事にする。

発端

syslog さんから お手紙が

lx:/var/log# cat syslog 
Oct 19 10:32:43 lx kernel: e100: eth0 NIC Link is Up 100 Mbps Full duplex
Oct 19 10:32:57 lx modprobe: modprobe: Can't locate module char-major-10-134

kernel の 再構築

ほなら

lx:/var/log# cd /usr/src/linux-2.4.31/
lx:/usr/src/linux-2.4.31# make menuconfig
rm -f include/asm
( cd include ; ln -sf asm-i386 asm)
make -C scripts/lxdialog all
make[1]: Entering directory `/usr/src/linux-2.4.31/scripts/lxdialog'
make[1]: Leaving directory `/usr/src/linux-2.4.31/scripts/lxdialog'
/bin/sh scripts/Menuconfig arch/i386/config.in

Your display is too small to run Menuconfig!
It must be at least 19 lines by 80 columns.
make: *** [menuconfig] Error 1

画面が狭いと言っているのだろう と考えて 画面を 広げた 後で再度

lx:/usr/src/linux-2.4.31# make menuconfig

Linux Kernel v2.4.31-plamo Configuration 
----------------------------------------------------------------------------
 Main Menu ---
Code maturity level options  ---> 
Loadable module support  --->                                     
      Processor type and features  --->                           
      General setup  --->                                         
      Memory Technology Devices (MTD)  --->                       
      Parallel port support  --->                                 
      Plug and Play configuration  --->                           
      Block devices  --->                                         
      Multi-device support (RAID and LVM)  --->                   
      Networking options  --->                                    
      Telephony Support  --->                                     
      ATA/IDE/MFM/RLL support  --->                               
      SCSI support  --->                                          
  +--v(+)-------------------------------
        <Select>    < Exit >    < Help >    
--------------------------------
 *******     General setup  --->/*  General setup を 選択 */

 Linux Kernel v2.4.31-plamo Configuration
Arrow keys navigate the menu.  <Enter> selects submenus --->.  
    Highlighted letters are hotkeys.  Pressing <Y> includes, <N> excludes,     
    <M> modularizes features.  Press <Esc><Esc> to exit, <?> for Help.      
    Legend: [*] built-in  [ ] excluded  <M> module  < > module capable      
   +----------^(-)---------------------------------------------------+    
            (Any)   PCI access mode                                          
            [*] ISA bus support                                              
            [*] PCI device name database                                     
            [ ] EISA support                                                 
            [ ] MCA support                                                  
            [*] Support for hot-pluggable devices                            
            PCMCIA/CardBus support  --->                                     
            PCI Hotplug Support  --->                                        
            [*] System V IPC                                                 
            [*] BSD Process Accounting                                       
            [*] Sysctl support                                               
            (ELF) Kernel core (/proc/kcore) format                           
            < > Kernel support for a.out binaries     
   +----------v(+)----------------------------------------------------+    
  +-----------------------------------------------------------+   
                        <Select>    < Exit >    < Help >        

      ********    PCMCIA/CardBus support  ---> 


 Linux Kernel v2.4.31-plamo Configuration
-------------------------------------------------------------------- 
  +-------------------------- PCMCIA/CardBus support ----------------+   
    Arrow keys navigate the menu.  <Enter> selects submenus --->.          
    Highlighted letters are hotkeys.  Pressing <Y> includes, <N> excludes,     
    <M> modularizes features.  Press <Esc><Esc> to exit, <?> for Help.        
    Legend: [*] built-in  [ ] excluded  <M> module  < > module capable 
   +---------------------------------------------------------------------+    
               < > PCMCIA/CardBus support                     
    +----------------------------------------------+    
    +----------------------------------------------+   
                        <Select>    < Exit >    < Help >       
================================ /*    ずーと下がってきて */
            [*] Sysctl support                                               
            (ELF) Kernel core (/proc/kcore) format                           
            < > Kernel support for a.out binaries    
            [*] Kernel support for ELF binaries                              
            < > Kernel support for MISC binaries     
            [*] Select task to kill on out of memory condition               
            [*] Power Management support                                     
            <M>   Advanced Power Management BIOS support  
            [ ]     Ignore USER SUSPEND                                      
            [*]     Enable PM at boot time                                   
            [*]     Make CPU Idle calls when idle                            
            [ ]     Enable console blanking using APM                        
            [ ]     RTC stores time in GMT           
==========================
            [*] Kernel support for ELF binaries           
            < > Kernel support for MISC binaries       
            [*] Select task to kill on out of memory condition               
            [*] Power Management support                                     
            <M>   Advanced Power Management BIOS support 
            [ ]     Ignore USER SUSPEND                                      
            [*]     Enable PM at boot time                                   
            [*]     Make CPU Idle calls when idle                            
            [ ]     Enable console blanking using APM                        
            [ ]     RTC stores time in GMT                                   
            [*]     Allow interrupts during APM BIOS calls                   
            [*]     Use real mode APM BIOS call to power off                 
            ACPI Support  --->                
================================== /* まず ACPI Support を 無効にする */
 ACPI Support ---
                       [*] ACPI Support                                      
                       <M>   AC Adapter       
                       <M>   Battery        
                       <M>   Button         
                       <M>   Fan           
                       <M>   Processor       
                       <M>   Thermal Zone    
                       <M>   ASUS Laptop Extras  
                       <M>   Toshiba Laptop Extras    
                       [ ]   Debug Statements
            <Select>    < Exit >    < Help > 
                       | /* これは 計算機固有 及び個人の 設定に 依るもので */
                       V /* この処置を しなければ ということではありません */
                  [ ] ACPI Support     
====================================
            [*] Power Management support                                     
            <M>   Advanced Power Management BIOS support    
            [ ]     Ignore USER SUSPEND                                      
            [*]     Enable PM at boot time                                   
            [*]     Make CPU Idle calls when idle                            
            [ ]     Enable console blanking using APM                        
            [ ]     RTC stores time in GMT                                   
            [*]     Allow interrupts during APM BIOS calls                   
            [*]     Use real mode APM BIOS call to power off 
                  ||
                  ||
                  \/
            [*] Power Management support                                     
            <*>   Advanced Power Management BIOS support     
            [*]     Ignore USER SUSPEND                                      
            [*]     Enable PM at boot time                                   
            [*]     Make CPU Idle calls when idle                            
            [*]     Enable console blanking using APM                        
            [ ]     RTC stores time in GMT                                   
            [*]     Allow interrupts during APM BIOS calls                   
            [*]     Use real mode APM BIOS call to power off 
====================================================
 Linux Kernel v2.4.31-plamo Configuration  
Do you wish to save your new kernel configuration? 
< Yes >      <  No  >    
rm -f include/asm
( cd include ; ln -sf asm-i386 asm)
make -C scripts/lxdialog all
make[1]: Entering directory `/usr/src/linux-2.4.31/scripts/lxdialog'
make[1]: Leaving directory `/usr/src/linux-2.4.31/scripts/lxdialog'
/bin/sh scripts/Menuconfig arch/i386/config.in
Using defaults found in .config
Preparing scripts: functions, parsing............
...........................................done.

Saving your kernel configuration...

*** End of Linux kernel configuration.
*** Check the top-level Makefile for additional configuration.
*** Next, you must run 'make dep'.

make dep && make clean && make bzImage

おっしゃられたように

lx:/usr/src/linux-2.4.31# make dep && make clean && make bzImage
....

tools/build -b bbootsect bsetup compressed/bvmlinux.out CURRENT > bzImage
Root device is (3, 7)
Boot sector 512 bytes.
Setup is 4767 bytes.
System is 1144 kB
warning: kernel is too big for standalone boot from floppy
make[1]: Leaving directory `/usr/src/linux-2.4.31/arch/i386/boot'

modules の 退避

余計なことです 無視すべき

# cd /lib/modules/
lx:/lib/modules# ls
2.4.31-plamo/
lx:/lib/modules# du -h 2.4.31-plamo/
...
23M     2.4.31-plamo
======
lx:/lib/modules# mv 2.4.31-plamo/ org_2.4.31-plamo/

make modules && make modules_install

lx:/lib/modules# cd -
/usr/src/linux-2.4.31
lx:/usr/src/linux-2.4.31# make modules && make modules_install
...
cd /lib/modules/2.4.31-plamo; \
mkdir -p pcmcia; \
find kernel -path '*/pcmcia/*' -name '*.o' | xargs -i -r ln -sf ../{} pcmcia
if [ -r System.map ]; then /sbin/depmod -ae -F System.map  2.4.31-plamo; fi

基本は完了 置き換えが当然行わないといけんわな!

lx:/usr/src/linux-2.4.31# cd /
lx:/# mv vmlinuz-2.4.31 org_vmlinuz-2.4.31
lx:/# ls -l /usr/src/linux-2.4.31/arch/i386/boot/bzImage 
-rw-r--r--  1 root  root 1177970 Oct 19 12:33 /usr/src/linux-2.4.31/arch/i386/boot/bzImage
lx:/# cp  /usr/src/linux-2.4.31/arch/i386/boot/bzImage vmlinuz-2.4.31
lx:/# ls -l | grep vmlinuz
-rw-r--r--    1 root     root      1252608 Aug 15  2005 org_vmlinuz-2.4.31
lrwxrwxrwx    1 root     root           14 Oct 19 07:52 vmlinuz -> vmlinuz-2.4.31
-rw-r--r--    1 root     root      1177970 Oct 19 13:42 vmlinuz-2.4.31

lx:/# cd /boot/
lx:/boot# mv System.map-2.4.31 org_System.map-2.4.31
lx:/boot# ls -l /usr/src/linux-2.4.31/System.map 
-rw-r--r--    1 root     root       568322 Oct 19 12:33 /usr/src/linux-2.4.31/System.map
lx:/boot# cp /usr/src/linux-2.4.31/System.map System.map-2.4.31
lx:/boot# ls -l | grep System.map
lrwxrwxrwx    1 root     root           17 Oct 19 07:52 System.map -> System.map-2.4.31
-rw-r--r--    1 root     root       568322 Oct 19 13:45 System.map-2.4.31
-rw-r--r--    1 root     root       606483 Aug 15  2005 org_System.map-2.4.31

lx:/boot# ls /lib/modules/   
2.4.31-plamo/  org_2.4.31-plamo/

次、再起動確認すべい

lx:/var/log# shutdown -r now
aruuser@lx:~$ su -
Password: 
lx:~# cd /var/log
lx:/var/log# ls -l
total 228
-rw-r--r--    1 root     users       36950 Oct 19 13:55 XFree86.0.log
-rw-r--r--    1 root     users       37034 Oct 19 10:34 XFree86.0.log.old
-rw-r--r--    1 root     root        19213 Oct 19 13:55 bootlog
-rw-r--r--    1 root     root         4807 Oct 19 10:32 bootlog.last.gz
drwxr-xr-x    2 bin      bin          4096 Oct 18 23:21 canna/
-rw-r-----    1 root     root            0 Apr  7  2002 cron
-rw-r-----    1 root     root          264 Oct 19 11:32 debug
drwxr-xr-x    2 root     root         4096 Apr  1  1997 ftpd/
drwxr-xr-x    2 root     root         4096 Oct 19 11:29 initpkg/
-rw-r--r--    1 root     root          201 Oct 19 13:51 kkk
-rw-r--r--    1 root     root       292292 Oct 18 23:22 lastlog
-rw-r-----    1 root     root            0 Apr  7  2002 maillog
-rw-r-----    1 root     root          909 Oct 19 13:55 messages
drwxr-xr-x    2 root     root         8192 Oct 19 11:29 packages/
drwxr-xr-x    2 root     root         4096 Oct 28  1998 removed_packages/
drwxr-xr-x    2 root     root         4096 Oct 28  1998 removed_scripts/
drwxr-xr-x    2 root     root         4096 Oct 19 11:29 scripts/
-rw-r--r--    1 root     root          473 Oct 19 08:11 scrollkeeper.log
-rw-r-----    1 root     root          471 Oct 19 13:57 secure
drwxr-xr-x    3 root     root         4096 Oct 19 07:53 setup/
-rw-r-----    1 root     root            0 Mar  9  2002 spooler
-rw-r-----    1 root     root           74 Oct 19 13:55 syslog
lrwxrwxrwx    1 root     root           13 Oct 19 07:51 utmp -> /var/run/utmp
-rw-r--r--    1 root     root        46464 Oct 19 13:55 wtmp
-rw-r--r--    1 root     root            0 Oct 19 13:55 xfs.log

syslog を確認すべい

lx:/var/log# cat syslog 
Oct 19 13:55:16 lx kernel: e100: eth0 NIC Link is Up 100 Mbps Full duplex

OK Not complain about "char-major-10-134"

lx:/var/log# date ; df
Fri Oct 19 14:02:06 JST 2007
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hda7              9469148   2771208   6209164  31% /

これは ほんの 一例にしか過ぎません。いろいろ有る選択肢の もののひとつです。

にゃんたろう 拝!

2007年11月19日 (月) 22:02:42 JST 作成


up

Copyright © 2004.-2007. nyantarou All Rights Reserved.