Lemur zaprasza
Red Hat Linux Unleashed rhl05.htm Setting the Default Video Mode Identifying Bad Blocks on Your Hard Drive Linux Loadable Modules Summary 5 Odds and Ends This chapter covers a variety of topics that basically could not fit in other chapters, nor could they justify a chapter by themselves. We cover these topics briefly and provide locations where you can get more information: Setting the default video mode How to mark bad blocks on a hard disk Loadable modules Setting the Default Video Mode You don't have to recompile the kernel to set the default video mode. Just use rdev with the -v switch to set the video mode in the kernel (either on your hard drive or on your boot floppy). For example, to change the kernel in /vmlinuz to prompt for the video mode on bootup, type the following: rdev -v /vmlinuz -3 To change the kernel on your boot floppy, type rdev -v /dev/fd0 {video-mode} The valid video-mode options for the kernel are: -3 Prompt the user for a response every time -2 Extended VGA -1 Normal VGA The rdev program resides in /sbin. rdev is very handy and also is used to set the root and swap partitions, ramdisk size, and more in a compiled kernel. It means you don't have to recompile the kernel to make these changes. Use rdev -? for a list of options. Identifying Bad Blocks on Your Hard Drive If you are using a SCSI or IDE (and EIDE) drive, you don't have to worry about bad blocks as they are handled at the device level. On the other hand, if you have an older ESDI, RLL, or MFM drive (or other non-SCSI or non-IDE drive) you may need to scan your drive for bad blocks. Normally the bad blocks are identified and marked when the file system is created using mkefs, mke2fs, and mkxfs. Unfortunately, the mkefs program cannot detect bad blocks on a hard drive. So if you create a file system over a part of your hard drive with bad blocks, things will eventually go wrong. What you need is a "bad block list" stored in a file; use the -l option on mkefs so it will flag those blocks when making a file system. Do not check for bad blocks on a mounted system. Doing a check on a mounted file system will cause irreparable damage and/or loss of data. Unmount the file system first with the umount command. If you have to check the root file system, boot off a floppy disk, unmount the root file system if it is mounted, and then check for bad blocks. mke2fs and mkxfs correctly flag bad blocks, so this only applies to mkfs and mkefs. This is also only needed for older RLL and MFM drives. SCSI and IDE drives have bad block logic on- board, so you are safe there. How do you generate a bad block list? Generating a bad block list is only needed for older drives and older file system types (such as Minix and extfs). Your best bet is to use mke2fs or mkxfs, anyway. Linux Loadable Modules The Linux kernel (since version 1.2.0) supports loadable modules. Using loadable modules enables you to build a minimal kernel and add or remove modules to this kernel without requiring a kernel rebuild. A module could be support for a kernel function or a new feature. To see what modules exist in your system, use the lsmod command. To install a module, use the insmod command. Some modules may require other modules. To check the dependencies, use the depmod command. To install a module (and its dependant modules), use the depmod command. Summary It's hard to summarize this chapter except to say that this has been a grab-bag of all the things that did not fit anywhere else. A lot of the information you need to configure Linux and install new kernels are included in separate chapters later in this book. Details on file systems are included in Part VI, "Linux for System Administrators." |