리눅스상에서 작동하는 C 코드들은 모두 시스템콜을 주어진 임무를 수행한다. 그러므로 프로그램의 시스템콜이 호출되는 것을 추적할 수 있다면, 프로그램을 디버깅하거나 제대로 작동되는지에 대한 중요한 정보를 얻을 수 있을 것이다.


http://www.joinc.co.kr/modules/moniwiki/wiki.php/man/1/strace


Posted by eoseontaek

3. General Non-Device Specific Boot Args

These are the boot arguments that are not related to any specific device or peripheral. They are instead related to certain internal kernel parameters, such as memory handling, ramdisk handling, root file system handling and others.

3.1 Root Filesystem options

The following options all pertain to how the kernel selects and handles the root filesystem.

The `root=' Argument

This argument tells the kernel what device is to be used as the root filesystem while booting. The default of this setting is the value of the root device of the system that the kernel was built on. For example, if the kernel in question was built on a system that used `/dev/hda1' as the root partition, then the default root device would be `/dev/hda1'. To override this default value, and select the second floppy drive as the root device, one would use `root=/dev/fd1'.

Valid root devices are any of the following devices:

(1) /dev/hdaN to /dev/hddN, which is partition N on ST-506 compatible disk `a to d'.

(2) /dev/sdaN to /dev/sdeN, which is partition N on SCSI compatible disk `a to e'.

(3) /dev/xdaN to /dev/xdbN, which is partition N on XT compatible disk `a to b'.

(4) /dev/fdN, which is floppy disk drive number N. Having N=0 would be the DOS `A:' drive, and N=1 would be `B:'.

(5) /dev/nfs, which is not really a device, but rather a flag to tell the kernel to get the root fs via the network.

(6) /dev/ram, which is the RAM disk.

The more awkward and less portable numeric specification of the above possible disk devices in major/minor format is also accepted. (e.g. /dev/sda3 is major 8, minor 3, so you could use root=0x803 as an alternative.)

This is one of the few kernel boot arguments that has its default stored in the kernel image, and which can thus be altered with the rdev utility.

The `rootflags=' Argument

This option allows you to give options pertaining to the mounting of the root filesystem just as you would to the mount program. An example could be giving the noatime option to an ext2 fs.

The `rootfstype=' Argument

This option allows you to give a comma separated list of fs types that will be tried for a match when trying to mount the root filesystem. This list will be used instead of the internal default which usually starts with ext2, minix and the like.

The `ro' Argument

When the kernel boots, it needs a root filesystem to read basic things off of. This is the root filesystem that is mounted at boot. However, if the root filesystem is mounted with write access, you can not reliably check the filesystem integrity with half-written files in progress. The `ro' option tells the kernel to mount the root filesystem as `readonly' so that any filesystem consistency check programs (fsck) can safely assume that there are no half-written files in progress while performing the check. No programs or processes can write to files on the filesystem in question until it is `remounted' as read/write capable.

This is one of the few kernel boot arguments that has its default stored in the kernel image, and which can thus be altered with the rdev utility.

The `rw' Argument

This is the exact opposite of the above, in that it tells the kernel to mount the root filesystem as read/write. The default is to mount the root filesystem as read only. Do not run any `fsck' type programs on a filesystem that is mounted read/write.

The same value stored in the image file mentioned above is also used for this parameter, accessible via rdev.

The `nfsroot=' Argument

This argument tells the kernel which machine, what directory and what NFS options to use for the root filesystem. Also note that the argument root=/dev/nfs is required. Detailed information on using an NFS root fs is in the file linux/Documentation/nfsroot.txt.

The `ip=' or `nfsaddrs=' Argument

If you are using NFS as a root filesystem, then there is no programs like ifconfig and route present until the root fs is mounted, and so the kernel has to configure the network interfaces directly. This boot argument sets up the various network interface addresses that are required to communicate over the network. If this argument is not given, then the kernel tries to use RARP and/or BOOTP to figure out these parameters.

3.2 Options Relating to RAM Disk Management

The following options all relate to how the kernel handles the RAM disk device, which is usually used for bootstrapping machines during the install phase, or for machines with modular drivers that need to be installed to access the root filesystem.

The `ramdisk_start=' Argument

To allow a kernel image to reside on a floppy disk along with a compressed ramdisk image, the `ramdisk_start=<offset>' command was added. The kernel can't be included into the compressed ramdisk filesystem image, because it needs to be stored starting at block zero so that the BIOS can load the bootsector and then the kernel can bootstrap itself to get going.

Note: If you are using an uncompressed ramdisk image, then the kernel can be a part of the filesystem image that is being loaded into the ramdisk, and the floppy can be booted with LILO, or the two can be separate as is done for the compressed images.

If you are using a two-disk boot/root setup (kernel on disk 1, ramdisk image on disk 2) then the ramdisk would start at block zero, and an offset of zero would be used. Since this is the default value, you would not need to actually use the command at all.

The `load_ramdisk=' Argument

This parameter tells the kernel whether it is to try to load a ramdisk image or not. Specifying `load_ramdisk=1' will tell the kernel to load a floppy into the ramdisk. The default value is zero, meaning that the kernel should not try to load a ramdisk.

Please see the file linux/Documentation/ramdisk.txt for a complete description of the new boot time arguments, and how to use them. A description of how this parameter can be set and stored in the kernel image via `rdev' is also described.

The `prompt_ramdisk=' Argument

This parameter tells the kernel whether or not to give you a prompt asking you to insert the floppy containing the ramdisk image. In a single floppy configuration the ramdisk image is on the same floppy as the kernel that just finished loading/booting and so a prompt is not needed. In this case one can use `prompt_ramdisk=0'. In a two floppy configuration, you will need the chance to switch disks, and thus `prompt_ramdisk=1' can be used. Since this is the default value, it doesn't really need to be specified. ( (Historical note: Sneaky people used to use the `vga=ask' LILO option to temporarily pause the boot process and allow a chance to switch from boot to root floppy.)

Please see the file linux/Documentation/ramdisk.txt for a complete description of the new boot time arguments, and how to use them. A description of how this parameter can be set and stored in the kernel image via `rdev' is also described.

The `ramdisk_size=' Argument

While it is true that the ramdisk grows dynamically as required, there is an upper bound on its size so that it doesn't consume all available RAM and leave you in a mess. The default is 4096 (i.e. 4MB) which should be large enough for most needs. You can override the default to a bigger or smaller size with this boot argument.

Please see the file linux/Documentation/ramdisk.txt for a complete description of the new boot time arguments, and how to use them. A description of how this parameter can be set and stored in the kernel image via `rdev' is also described.

The `ramdisk_blocksize=' Argument

This can be tuned for better memory management behaviour. Quoting from the ramdisk driver rd.c:

It would be very desirable to have a soft-blocksize (that in the case of the ramdisk driver is also the hardblocksize ;) of PAGE_SIZE because doing that we'll achieve a far better MM footprint. Using a rd_blocksize of BLOCK_SIZE in the worst case we'll make PAGE_SIZE/BLOCK_SIZE buffer-pages unfreeable. With a rd_blocksize of PAGE_SIZE instead we are sure that only 1 page will be protected. Depending on the size of the ramdisk you may want to change the ramdisk blocksize to achieve a better or worse MM behaviour. The default is still BLOCK_SIZE (needed by rd_load_image that supposes the filesystem in the image uses a BLOCK_SIZE blocksize)

The `ramdisk=' Argument (obsolete)

(NOTE: This argument is obsolete, and should not be used except on kernels v1.3.47 and older. The commands that should be used for the ramdisk device are documented above. Newer kernels may accept this as an alias for ramdisk_size.)

This specifies the size in kB of the RAM disk device. For example, if one wished to have a root filesystem on a 1.44MB floppy loaded into the RAM disk device, they would use:


        ramdisk=1440

This is one of the few kernel boot arguments that has its default stored in the kernel image, and which can thus be altered with the rdev utility.

The `noinitrd' (initial RAM disk) Argument

The v2.x and newer kernels have a feature where the root filesystem can be initially a RAM disk, and the kernel executes /linuxrc on that RAM image. This feature is typically used to allow loading of modules needed to mount the real root filesystem (e.g. load the SCSI driver modules stored in the RAM disk image, and then mount the real root filesystem on a SCSI disk.)

The actual `noinitrd' argument determines what happens to the initrd data after the kernel has booted. When specified, instead of converting it to a RAM disk, it is accessible via /dev/initrd, which can be read once before the RAM is released back to the system. For full details on using the initial RAM disk, please consult linux/Documentation/initrd.txt. In addition, the most recent versions of LILO and LOADLIN should have additional useful information.

3.3 Boot Arguments Related to Memory Handling

The following arguments alter how Linux detects or handles the physical and virtual memory of your system.

The `cachesize=' Argument

Override level 2 CPU cache size detection (in kB). Sometimes CPU hardware bugs make them report the cache size incorrectly. The kernel will attempt work arounds to fix known problems, but for some CPUs it is not possible to determine what the correct size should be. This option provides an override for these situations.

The `mem=' Argument

This argument has several purposes: The original purpose was to specify the amount of installed memory (or a value less than that if you wanted to limit the amount of memory available to linux).

The next (and hardly used) purpose is to specify mem=nopentium which tells the Linux kernel to not use the 4MB page table performance feature. If you want to use it for both purposes, use a separate mem= for each one.

The original BIOS call defined in the PC specification that returns the amount of installed memory was only designed to be able to report up to 64MB. (Yes, another lack of foresight, just like the 1024 cylinder disks... sigh.) Linux uses this BIOS call at boot to determine how much memory is installed. A newer specification (e820) allows the BIOS to get this right on most machines nowadays. If you have more than 64MB of RAM installed on an older machine, you can use this boot argument to tell Linux how much memory you have. Here is a quote from Linus on the usage of the mem= parameter.

``The kernel will accept any `mem=xx' parameter you give it, and if it turns out that you lied to it, it will crash horribly sooner or later. The parameter indicates the highest addressable RAM address, so `mem=0x1000000' means you have 16MB of memory, for example. For a 96MB machine this would be `mem=0x6000000'. If you tell Linux that it has more memory than it actually does have, bad things will happen: maybe not at once, but surely eventually.''

Note that the argument does not have to be in hex, and the suffixes `k' and `M' (case insensitive) can be used to specify kilobytes and Megabytes, respectively. (A `k' will cause a 10 bit shift on your value, and a `M' will cause a 20 bit shift.) A typical example for a 128MB machine would be "mem=128m".

In some cases, the memory reported via e820 can also be wrong, and so the mem=exactmap was added. You use this in conjunction with specifying an exact memory map, such as:


        mem=exactmap mem=640K@0 mem=1023M@1M

for a 1GB machine with the usual 384k of ISA memory mapped I/O space excluded from use.

The `memfrac=' Argument

Memory is broken down into zones; on i386 these zones correspond to `DMA' (for legacy ISA devices that can only address up to 16MB via DMA); `Normal' for memory from 16MB up to 1GB, and `HighMem' for memory beyond 1GB (assuming your kernel was built with high mem support enabled). The two (or three) integers supplied here determine how much memory in each zone should be kept free - with the size of the zone divided by the number supplied being used as the minimum (so smaller numbers mean keep more free in the zone). The defaults are currently memfrac=32,128,128.

The `swap=' Argument

This allows the user to tune some of the virtual memory (VM) parameters that are related to swapping to disk. It accepts the following eight parameters:


        MAX_PAGE_AGE
        PAGE_ADVANCE
        PAGE_DECLINE
        PAGE_INITIAL_AGE
        AGE_CLUSTER_FRACT
        AGE_CLUSTER_MIN
        PAGEOUT_WEIGHT
        BUFFEROUT_WEIGHT

Interested hackers are advised to have a read of linux/mm/swap.c and also make note of the goodies in /proc/sys/vm. Kernels come with some useful documentation on this in the linux/Documentation/vm/ directory.

The `buff=' Argument

Similar to the `swap=' argument, this allows the user to tune some of the parameters related to buffer memory management. It accepts the following six parameters:


        MAX_BUFF_AGE
        BUFF_ADVANCE
        BUFF_DECLINE
        BUFF_INITIAL_AGE
        BUFFEROUT_WEIGHT
        BUFFERMEM_GRACE

Interested hackers are advised to have a read of linux/mm/swap.c and also make note of the goodies in /proc/sys/vm. Kernels come with some useful documentation on this in the linux/Documentation/vm/ directory.

3.4 Other Misc. Kernel Boot Arguments

These various boot arguments let the user tune certain internal kernel parameters.

The `acpi=' Argument

Currently this only accepts `off' to disable the ACPI subsystem.

The `console=' Argument

Usually the console is the 1st virtual terminal, and so boot messages appear on your VGA screen. Sometimes it is nice to be able to use another device like a serial port (or even a printer!) to be the console when no video device is present. It is also useful to capture boot time messages if a problem stops progress before they can be logged to disk. An example would be to use console=ttyS1,9600 for selecting the 2nd serial port at 9600 baud to be the console. More information can be found in linux/Documentation/serial-console.txt.

The `debug' Argument

The kernel communicates important (and not-so important) messages to the operator via the printk() function. If the message is considered important, the printk() function will put a copy on the present console as well as handing it off to the klogd() facility so that it gets logged to disk. The reason for printing important messages to the console as well as logging them to disk is because under unfortunate circumstances (e.g. a disk failure) the message won't make it to disk and will be lost.

The threshold for what is and what isn't considered important is set by the console_loglevel variable. The default is to log anything more important than DEBUG (level 7) to the console. (These levels are defined in the include file kernel.h) Specifying debug as a boot argument will set the console loglevel to 10, so that all kernel messages appear on the console.

The console loglevel can usually also be set at run time via an option to the klogd() program. Check the man page for the version installed on your system to see how to do this.

The `decnet=' Argument

If you are using DECnet, you can supply two comma separated integers here to give your area and node respectively.

The `devfs=' Argument

If you are using devfs, instead of the standard static devices in /dev/ then you can supply the words only or mount with this argument. There are also additional debug arguments that are listed in the source.

The `gpt' Argument

If you are using EFI GUID Partition Table handling, you can use this to override problems associated with an invalid PMBR.

The `idle=' Argument

Setting this to `poll' causes the idle loop in the kernel to poll on the need reschedule flag instead of waiting for an interrupt to happen. This can result in an improvement in performance on SMP systems (albeit at the cost of an increase in power consumption).

The `init=' Argument

The kernel defaults to starting the `init' program at boot, which then takes care of setting up the computer for users via launching getty programs, running `rc' scripts and the like. The kernel first looks for /sbin/init, then /etc/init (depreciated), and as a last resort, it will try to use /bin/sh (possibly on /etc/rc). If for example, your init program got corrupted and thus stopped you from being able to boot, you could simply use the boot prompt init=/bin/sh which would drop you directly into a shell at boot, allowing you to replace the corrupted program.

The `isapnp=' Argument

This takes the form of: isapnp=read_port,reset,skip_pci_scan,verbose

The `isapnp_reserve_dma=' Argument

This takes the form of: isapnp_reserve_dma=n1,n2,n3,...nN where n1 ... nN are the DMA channel numbers to not use for PnP.

The `isapnp_reserve_io=' Argument

This takes the form of: isapnp_reserve_irq=io1,size1,io2,size2,...ioN,sizeN where ioX,sizeX are I/O start and length pairs of regions in I/O space that are not to be used by PnP.

The `isapnp_reserve_irq=' Argument

This takes the form of: isapnp_reserve_irq=n1,n2,n3,...nN where n1 ... nN are the interrupt numbers to not use for PnP.

The `isapnp_reserve_mem=' Argument

This takes the form of: isapnp_reserve_mem=mem1,size1,mem2,size2,...memN,sizeN where ioX,sizeX are I/O start and length pairs of regions in memory space that are not to be used by PnP.

The `kbd-reset' Argument

Normally on i386 based machines, the Linux kernel does not reset the keyboard controller at boot, since the BIOS is supposed to do this. But as usual, not all machines do what they should. Supplying this option may help if you are having problems with your keyboard behaviour. It simply forces a reset at initialization time. (Some have argued that this should be the default behaviour anyways).

The `lockd.udpport=' and `lockd.tcpport' Argument

These tell the kernel to use the given port numbers for NFS lockd operation (for either UDP or TCP operation).

The `maxcpus=' Argument

The number given with this argument limits the maximum number of CPUs activated in SMP mode. Using a value of 0 is equivalent to the nosmp option.

The `mca-pentium' Argument

The IBM model 95 Microchannel machines seem to lock up on the test that Linux usually does to detect the type of math chip coupling. Since all Pentium chips have a built in math processor, this test (and the lock up problem) can be avoided by using this boot option.

The `md=' Argument

If your root filesystem is on a Multiple Device then you can use this (assuming you compiled in boot support) to tell the kernel the multiple device layout. The format (from the file linux/Documentation/md.txt) is:

md=md_device_num,raid_level,chunk_size_factor,fault_level,dev0,dev1,...,devN

Where md_device_num is the number of the md device, i.e. 0 means md0, 1 means md1, etc. For raid_level, use -1 for linear mode and 0 for striped mode. Other modes are currently unsupported. The chunk_size_factor is for raid-0 and raid-1 only and sets the chunk size as PAGE_SIZE shifted left the specified amount. The fault_level is only for raid-1 and sets the maximum fault number to the specified number. (Currently unsupported due to lack of boot support for raid1.) The dev0-devN are a comma separated list of the devices that make up the individual md device: e.g. /dev/hda1,/dev/hdc1,/dev/sda1

See also raid=.

The `nmi_watchdog=' Argument

Supplying a non-zero integer will enable the non maskable interrupt watchdog (assuming IO APIC support is compiled in). This checks to see if the interrupt count is increasing (indicating normal system activity) and if it is not then it assumes that a processor is stuck and forces an error dump of diagnostic information.

The `no387' Argument

Some i387 coprocessor chips have bugs that show up when used in 32 bit protected mode. For example, some of the early ULSI-387 chips would cause solid lockups while performing floating point calculations, apparently due to a bug in the FRSAV/FRRESTOR instructions. Using the `no387' boot argument causes Linux to ignore the math coprocessor even if you have one. Of course you must then have your kernel compiled with math emulation support! This may also be useful if you have one of those really old 386 machines that could use an 80287 FPU, as Linux can't use an 80287.

The `no-hlt' Argument

The i386 (and successors thereof) family of CPUs have a `hlt' instruction which tells the CPU that nothing is going to happen until an external device (keyboard, modem, disk, etc.) calls upon the CPU to do a task. This allows the CPU to enter a `low-power' mode where it sits like a zombie until an external device wakes it up (usually via an interrupt). Some of the early i486DX-100 chips had a problem with the `hlt' instruction, in that they couldn't reliably return to operating mode after this instruction was used. Using the `no-hlt' instruction tells Linux to just run an infinite loop when there is nothing else to do, and to not halt your CPU when there is no activity. This allows people with these broken chips to use Linux, although they would be well advised to seek a replacement through a warranty where possible.

The `no-scroll' Argument

Using this argument at boot disables scrolling features that make it difficult to use Braille terminals.

The `noapic' Argument

Using this option tells a SMP kernel to not use some of the advanced features of the interrupt controller on multi processor machines. Use of this option may be required when a device (such as those using ne2k-pci or 3c59xi drivers) stops generating interrupts (i.e. cat /proc/interrupts shows the same interrupt count.) See linux/Documentation/IO-APIC.txt for more information.

The `noht' Argument

This will disable hyper-threading on intel processors that have this feature.

The `noisapnp' Argument

If ISA PnP is built into the kernel, this will disable it.

The `nomce' Argument

Some newer processors have the ability to self-monitor and detect inconsistencies that should not regularly happen. If an inconsistency is detected, a Machine Check Exception will take place and the system will be halted (rather than plundering forward and corrupting your data). You can use this argument to disable this feature, but be sure to check that your CPU is not overheating or otherwise faulty first.

The `nosmp' Argument

Use of this option will tell a SMP kernel on a SMP machine to operate single processor. Typically only used for debugging and determining if a particular problem is SMP related.

The `noresume' Argument

If software suspend is enabled, and a suspend to disk file has been specified, using this argument will give a normal boot and the suspend data will be ignored.

The `notsc' Argument

Use of this option will tell the kernel to not use the Time Stamp Counter for anything, even if the CPU has one.

The `nofxsr" Argument

Use of this option will tell the kernel to not use any speed-up tricks involving the floating point unit, even if the processor supports them.

The `panic=' Argument

In the unlikely event of a kernel panic (i.e. an internal error that has been detected by the kernel, and which the kernel decides is serious enough to moan loudly and then halt everything), the default behaviour is to just sit there until someone comes along and notices the panic message on the screen and reboots the machine. However if a machine is running unattended in an isolated location it may be desirable for it to automatically reset itself so that the machine comes back on line. For example, using panic=30 at boot would cause the kernel to try and reboot itself 30 seconds after the kernel panic happened. A value of zero gives the default behaviour, which is to wait forever.

Note that this timeout value can also be read and set via the /proc/sys/kernel/panic sysctl interface.

The `pirq=' Argument

Using this option tells a SMP kernel information on the PCI slot versus IRQ settings for SMP motherboards which are unknown (or known to be blacklisted). See linux/Documentation/IO-APIC.txt for more information.

The `profile=' Argument

Kernel developers can profile how and where the kernel is spending its CPU cycles in an effort to maximize efficiency and performance. This option lets you set the profile shift count at boot. Typically it is set to two. You need a tool such as readprofile.c that can make use of the /proc/profile output.

The `quiet' Argument

This is pretty much the opposite of the `debug' argument. When this is given, only important and system critical kernel messages are printed to the console. Normal messages about hardware detection at boot are suppressed.

The `raid=' Argument

Accepts noautodetect at the moment. See also md=.

The `reboot=' Argument

This option controls the type of reboot that Linux will do when it resets the computer (typically via /sbin/init handling a Control-Alt-Delete). The default as of v2.0 kernels is to do a `cold' reboot (i.e. full reset, BIOS does memory check, etc.) instead of a `warm' reboot (i.e. no full reset, no memory check). It was changed to be cold by default since that tends to work on cheap/broken hardware that fails to reboot when a warm reboot is requested. To get the old behaviour (i.e. warm reboots) use reboot=w or in fact any word that starts with w will work.

Other accepted options are `c', `b', `h', and `s', for cold, bios, hard, and SMP respectively. The `s' takes an optional digit to specify which CPU should handle the reboot. Options can be combined where it makes sense, i.e. reboot=b,s2

The `reserve=' Argument

This is used to protect I/O port regions from probes. The form of the command is:

reserve=iobase,extent[,iobase,extent]...

In some machines it may be necessary to prevent device drivers from checking for devices (auto-probing) in a specific region. This may be because of poorly designed hardware that causes the boot to freeze (such as some ethercards), hardware that is mistakenly identified, hardware whose state is changed by an earlier probe, or merely hardware you don't want the kernel to initialize.

The reserve boot-time argument addresses this problem by specifying an I/O port region that shouldn't be probed. That region is reserved in the kernel's port registration table as if a device has already been found in that region (with the name reserved). Note that this mechanism shouldn't be necessary on most machines. Only when there is a problem or special case would it be necessary to use this.

The I/O ports in the specified region are protected against device probes that do a check_region() prior to probing blindly into a region of I/O space. This was put in to be used when some driver was hanging on a NE2000, or misidentifying some other device as its own. A correct device driver shouldn't probe a reserved region, unless another boot argument explicitly specifies that it do so. This implies that reserve will most often be used with some other boot argument. Hence if you specify a reserve region to protect a specific device, you must generally specify an explicit probe for that device. Most drivers ignore the port registration table if they are given an explicit address.

For example, the boot line


        reserve=0x300,32  blah=0x300

keeps all device drivers except the driver for `blah' from probing 0x300-0x31f.

As usual with boot-time specifiers there is an 11 parameter limit, thus you can only specify 5 reserved regions per reserve keyword. Multiple reserve specifiers will work if you have an unusually complicated request.

The `resume=' Argument

If you are using software suspend, then this will allow you to specify the file name of the suspend to disk data that you want the machine to resume from.

The `vga=' Argument

Note that this is not really a boot argument. It is an option that is interpreted by LILO and not by the kernel like all the other boot arguments are. However its use has become so common that it deserves a mention here. It can also be set via using rdev -v or equivalently vidmode on the vmlinuz file. This allows the setup code to use the video BIOS to change the default display mode before actually booting the Linux kernel. Typical modes are 80x50, 132x44 and so on. The best way to use this option is to start with vga=ask which will prompt you with a list of various modes that you can use with your video adapter before booting the kernel. Once you have the number from the above list that you want to use, you can later put it in place of the `ask'. For more information, please see the file linux/Documentation/svga.txt that comes with all recent kernel versions.

Note that newer kernels (v2.1 and up) have the setup code that changes the video mode as an option, listed as Video mode selection support so you need to enable this option if you want to use this feature.


http://www.linux.org/docs/ldp/howto/BootPrompt-HOWTO-3.html



Posted by eoseontaek

Microsoft 고객 지원

- Linux를 제거하고 Windows XP를 설치하는 방법 -

http://support.microsoft.com/kb/314458/ko







Posted by eoseontaek

[host@]$ finger @finger.kernel.org
The latest linux-next version of the Linux kernel is:         next-20101004
The latest snapshot 2.6 version of the Linux kernel is:       2.6.36-rc6-git2
The latest mainline 2.6 version of the Linux kernel is:       2.6.36-rc6
The latest stable 2.6.35 version of the Linux kernel is:      2.6.35.7 
The latest stable 2.6.34 version of the Linux kernel is:      2.6.34.7 
The latest stable 2.6.33 version of the Linux kernel is:      2.6.33.7 
The latest stable 2.6.32 version of the Linux kernel is:      2.6.32.24
The latest stable 2.6.31 version of the Linux kernel is:      2.6.31.14
The latest stable 2.6.27 version of the Linux kernel is:      2.6.27.54
The latest stable 2.4.37 version of the Linux kernel is:      2.4.37.10
Posted by eoseontaek

dd - convert and copy a file



a-하드를 통째로 b-하드로 복사하기

[host@]$ dd if=/dev/sda of=/dev/sdb



리눅스 partition을 zero로 채우는 방법
[host@]$ dd if=/dev/zero of=/dev/sdb




참 고
http://www.servergoogle.net/entry/dd-%EB%AA%85%EB%A0%B9%EC%96%B4-%EB%A6%AC%EB%88%85%EC%8A%A4%ED%95%98%EB%93%9C%EC%B9%B4%ED%94%BC

http://blog.daum.net/_blog/BlogTypeView.do?blogid=0K8PK&articleno=3880625&_bloghome_menu=recenttext#ajax_history_home

Posted by eoseontaek

SSH 접속시 한글 깨짐

# vi /etc/sysconfig/i18n
LANG="ko_KR.eucKR"
SUPPORTED=""ko_KR.eucKR:ko_KR:ko"
SYSFONT="lat0-sun16"
SYSFONTACM="8859-15"



man에서 한글 깨짐

# vi /etc/man.config
PAGEG /usr/bin/less -isr



윈도우 파티션 마운트시 한글 깨짐

# mount -t vfat /dev/ha1 /mnt/windows -o iocharset=euc_kr



콘솔에서 한글 깨짐

# vi /etc/profile
export LC_ALL=ko_KR.eucKR
export LANG=ko_KR.eucKR



vi 에서 설정

set encoding=euc-kr


참고
http://zeroit.tistory.com/223



'[D-01] Linux' 카테고리의 다른 글

[linux] 최신 버전 커널 확인 방법  (0) 2010.10.04
[linux] 리눅스 명령어 dd  (0) 2010.10.04
[Linux] 리눅스에서 cpu 정보 확인하기  (0) 2010.09.17
[Linux] Bootstrap 이란?  (0) 2010.09.06
[Linux] Pipe, Filter, Redirection  (0) 2010.08.16
Posted by eoseontaek


[user]$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 3
model name      : Intel(R) Pentium(R) 4 CPU 2.80GHz
stepping        : 3
cpu MHz         : 2800.095
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
apicid          : 0
initial apicid  : 0
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc pebs bts pni monitor ds_cpl cid
bogomips        : 5600.19
clflush size    : 64
power management:
processor       : 1
vendor_id       : GenuineIntel
cpu family      : 15
model           : 3
model name      : Intel(R) Pentium(R) 4 CPU 2.80GHz
stepping        : 3
cpu MHz         : 2800.095
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
apicid          : 1
initial apicid  : 1
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc pebs bts pni monitor ds_cpl cid
bogomips        : 5599.20
clflush size    : 64
power management:




Posted by eoseontaek
시스템에 전원이 들어와서 새롭게 시작되는 것을 부팅이라고 한다. 이 부팅 과정을 BootStrap이라고 하는데 BootStrap이란 
    장화(Boot)의 끈(Strap)을 묶고서 일어서려는 사람을 가르킨다.
      * Cold Booting : 컴퓨터에 전원을 넣는 것. (일반적으로 Cold Booting일 경우에만 POST과정이 진행된다)
      * Warm Booting : 전원이 들어와 있는 상태에서 하는 부팅


※ More info.

Posted by eoseontaek
Posted by eoseontaek

'[D-01] Linux' 카테고리의 다른 글

[Linux] Bootstrap 이란?  (0) 2010.09.06
[Linux] Pipe, Filter, Redirection  (0) 2010.08.16
Ubuntu 10.04 Samba 설치하기  (0) 2010.07.05
[Linux] 네트워크를 이용한 리눅스 설치  (0) 2010.06.30
[Linux] 리눅스 명령어 - unset  (0) 2010.06.17
Posted by eoseontaek

삼바 설치
$sudo apt-get install samba
$sudo apt-get install smbfs

이 공유에 접근할 아이디와 비밀번호를 설정한다.
$sudo smbpasswd -a 아이디

접근 아이디를 지울 때는 다음과 같이 한다.
$sudo smbpasswd -x system_username


삼바서버 설정
$sudo gedit /etc/samba/smb.conf

[global]
# 워크그룹이름은 맘대로 정한다.
workgroup = WORKGROUP
encrypt passwords = yes
# 접근을 허락할 아이피 범위
hosts allow = 192.168.
# 문자 인코딩 설정, 우분투는 utf-8을 기본적으로 사용하고
# 이것이 윈도우즈에서도 한글이 잘 깨지지 않는다.
unix charset=utf-8
dos charset=utf-8
#공유할 디렉토리 이름, 이것은 여러개를 만들 수도 있다.

[steo samba]
comment = My Documents
path = /공유할/디렉토리
#읽기 전용으로 접근할지 여부
read only = no
browsable = yes


설정 검사

$sudo testparm

삼바 실행
$sudo /etc/init.d/smbd restart 
 


Posted by eoseontaek
Posted by eoseontaek
unset : 선언된 변수를 제거하는 데 사용한다.

1) 사용법
unset 변수이름
2) 사용예
  [root@www /root]# TEL=042
  [root@www /root]# echo $TEL
  042
  [root@www /root]# unset TEL
  [root@www /root]# echo $TEL  // 변수가 제거되었으므로 아무값도 출력되지 않는다.

(참고) bash에서는 환경변수를 만들 때 변수 값을 설정한 후, 환경에 변수를 익스포트(export)하는
    두 단계를 거친다.
 * 사용예
  [posein@www posein]$ echo $LANG     // 언어관련 환경변수값 확인
  ko_KR.eucKR
  [posein@www posein]$ date
  수 5월 21 01:28:56 KST 2003       // 한글로 표시된다.
  [posein@www posein]$ LANG=euc_UN    // 영어로 변경
  [posein@www posein]$ export LANG    // 일시적으로 변경할 경우에는 생략가능
  [posein@www posein]$ date
  Wed May 21 01:29:07 KST 2003       // 영어로 표시된다.


Posted by eoseontaek

☞ export
# export [환경변수]=[값]
export 명령은 환경 변수를 지정, 변경하거나 현재 정의되어 있는 환경 변수를 보여주는 명령이다.
환경 변수를 변경함으로써 명령 프롬프트에서 실행한 프로그램에 영향을 미치게 된다. 다만
export 명령에 의해 변경된 환경 변수는 export 명령을 실행한 사용자의 로그아웃 전까지만 유효
하며 영구적으로 변경하기 위해서는 환경 변수를 정의하는 설정 파일(/etc/profile 등) 을 직접
수정해야 한다.

example>
export DVD_USE_STFRONTEND=YES

Link : http://blog.daum.net/_blog/BlogView.do?blogid=0FSvI&articleno=7887115#ajax_history_home


Posted by eoseontaek
만약 특정 디렉토리 이하에서 network 라는 문자열을 포함한 화일을 찾고싶다면.. 해당 디렉토리에서 모든 화일을 읽어 찾아보아야 하나.. 다음과 같이 find 와 grep 를 파이프로 연결하여 사용하면 쉽게 찾을 수있다.

find /etc/ -type f -exec grep 'network' {} /dev/null \;


위와 같이 명령어를 타입하면 /etc/ 디렉토리 이하에서 network 라는 문자열을 포함한 모든 화일명과 위치를 listing 해 준다.

그리고 단순히 특정 단어를 포함한 화일명을 찾고 싶으면 locste 라는 것을 쓰면 된다.
즉, locate ftp 를 하면 ftp 라는 화일명이 포함된 화일들을 listing 해 준다.

Link : http://www.joon.pe.kr/blog/160

Posted by eoseontaek

시스템이 정전에 의해 reboot 된 후, 네트워크가 붙지 않는 현상이 발생했다.

리눅스의 TERMINAL에서

root > ifup eth0

라는 명령을 주어 네트워크를 살렸다.


부팅시에 자동으로 실행되게 하려면
Cent 계열이라면...
/etc/rc.d/rc.local 파일에 해당 커맨드를 적어주면 된다.

Link : http://kldp.org/node/104601
Posted by eoseontaek
디렉토리 크기 / 용량 확인

하위 디렉토리까지 포함하여 "트리 사이즈 (Tree Size)"를 구하려면, du 라는 명령어를 사용합니다.

du -h --apparent-size

이 명령은 현재 디렉토리와 하위 디렉토리의 크기를 출력합니다.

-h 옵션은, 블록 사이즈 대신 사람이 읽을 수 있는 (킬로바이트)KB, 메가바이트(MB) 단위로 출력하라는 것이고

--apparent-size 옵션이 없으면, 파일들이 차지하는 "여분 공간"까지 다 디렉토리 사이즈에 포함되기에 용량이 더 크집니다.




du -h --apparent-size /

이렇게 하면 전체 하드에 있는 디렉토리들의 용량이 다 출력됩니다. "/"가 루트 디렉토리이기에.


하위 디렉토리를 포함하지 않으려면
-s
옵션을 소문자로 붙입니다. 도움말에는 대문자로 -S 이렇게 되어 있던데, 실제로는 소문자로 해야 하더군요-_-?



Link : http://mwultong.blogspot.com/2006/11/unix-linux-directory-size.html


Posted by eoseontaek


리눅스에서 Network throughput을 테스트하는 util이다.

NAME
       iperf - perform network throughput tests

SYNOPSIS
       iperf -s [ options ]

       iperf -c server [ options ]

       iperf -u -s [ options ]

       iperf -u -c server [ options ]

DESCRIPTION
       iperf  is  a  tool  for  performing  network throughput measurements.  It can test either TCP or UDP
       throughput.  To perform an iperf test the user must establish both a server (to discard traffic) and
       a client (to generate traffic).

GENERAL OPTIONS
       -f, --format
              [kmKM]   format to report: Kbits, Mbits, KBytes, MBytes

       -h, --help
              print a help synopsis

       -i, --interval n
              pause n seconds between periodic bandwidth reports

       -l, --len n[KM]
              set length read/write buffer to n (default 8 KB)

       -m, --print_mss
              print TCP maximum segment size (MTU - TCP/IP header)

       -o, --output <filename>
              output the report or error message to this specified file

       -p, --port n
              set server port to listen on/connect to to n (default 5001)

       -u, --udp
              use UDP rather than TCP

       -w, --window n[KM]
              TCP window size (socket buffer size)

       -B, --bind <host>
              bind to <host>, an interface or multicast address

       -C, --compatibility
              for use with older versions does not sent extra msgs

       -M, --mss n
              set TCP maximum segment size (MTU - 40 bytes)

       -N, --nodelay
              set TCP no delay, disabling Nagle's Algorithm

       -v, --version
              print version information and quit

       -V, --IPv6Version
              Set the domain to IPv6

       -x, --reportexclude
              [CDMSV]   exclude C(connection) D(data) M(multicast) S(settings) V(server) reports

       -y, --reportstyle C|c
              if set to C or c report results as CSV (comma separated values)

SERVER SPECIFIC OPTIONS
       -s, --server
              run in server mode

       -U, --single_udp
              run in single threaded UDP mode

       -D, --daemon
              run the server as a daemon

CLIENT SPECIFIC OPTIONS
       -b, --bandwidth n[KM]
              set target bandwidth to n bits/sec (default 1 Mbit/sec).  This setting requires UDP (-u).

       -c, --client <host>
              run in client mode, connecting to <host>

       -d, --dualtest
              Do a bidirectional test simultaneously

       -n, --num n[KM]
              number of bytes to transmit (instead of -t)

       -r, --tradeoff
              Do a bidirectional test individually

       -t, --time n
              time in seconds to transmit for (default 10 secs)

       -F, --fileinput <name>
              input the data to be transmitted from a file

       -I, --stdin
              input the data to be transmitted from stdin

       -L, --listenport n
              port to recieve bidirectional tests back on

       -P, --parallel n
              number of parallel client threads to run

       -T, --ttl n
              time-to-live, for multicast (default 1)

       -Z, --linux-congestion <algo>
              set TCP congestion control algorithm (Linux only)

ENVIRONMENT
       TCP_WINDOW_SIZE
              Controls the size of TCP buffers.

DIAGNOSTICS
       This section needs to be filled in.

BUGS
       Exit statuses are inconsistent.  The threading implementation is rather heinous.

AUTHORS
       Iperf was originally written by Mark Gates and Alex Warshavsky.  Man page and maintence by Jon Dugan
       <jdugan at x1024 dot net>.  Other contributions from Ajay Tirumala, Jim Ferguson,  Feng  Qin,  Kevin
       Gibbs,  John Estabrook <jestabro at ncsa.uiuc.edu>, Andrew Gallatin <gallatin at gmail.com>, Stephen
       Hemminger <shemminger at linux-foundation.org>

SEE ALSO
      http://iperf.sourceforge.net/

Posted by eoseontaek

[steo@localhost src]$ find -name "mb680.py" -print | xargs egrep -rnol "lmi2xfreq" | more


Posted by eoseontaek
/boot/grub/grub.conf

파일을 열어서 splashimage=(hd0,0)/grub/splask.xpm/gz

위에서 빨간 부분이 이미지가 있는 곳이다.

grup 디렉토리에 이미지를 넣고 파일 이름을 써 준 다음에 재부팅한다.

작업 완료!!


Link : http://gnome-look.org/
Posted by eoseontaek
이전버튼 1 2 3 4 5 이전버튼