Книга: Fedora™ Unleashed, 2008 edition
Examine an initrd Image File
Examine an initrd
Image File
The initrd.img
file is automatically created during the installation process (if necessary) or with the mkinitrd
command. You never need to examine it, but if you are curious about what's in the initrd.img
file, just take a look: It is really just a gzipped ext2
file system. To examine it, first copy it to the /tmp
directory and add the .gz
suffix to it:
# cp /boot/initrd-2.6.7-1.478.img /tmp/initrd-2.6.7-1.478.img.gz
If your system does not have an initrd.img
file in /boot
, mount your boot floppy and see whether it has one. Next, uncompress it as follows:
# gunzip /tmp/initrd-2.6.7-1.478.img.gz
Mount it as follows:
# mount -o loop /tmp/initrd-2.6.7-1.478.img /mnt/image
and browse the directory to your heart's content.
Not every system has an initrd.img
file. It is typically used to load device drivers for file systems (such as Reiser) or hardware (such as the Promise RAID IDE controller) that must be in place before the system can continue booting. Some floppy-disc-based Linux distributions use initrd.img
to load a minimal operating system that can then uncompress and load the working file system from the floppy.
You can also mount .iso
images in the same way, but remember that they are always read-only because of the nature of the underlying iso9660
file system; you can write to the other images unless you explicitly mount them as read-only. If you want to read and write to the files in an ISO file system, you must first copy the files to a device that is mounted read-write, make your changes, and then use mkisofs
to create a new .iso
image. This is a common "gotcha" for many users.
Relevant Fedora and Linux Commands
You use these commands when managing file systems in Fedora:
? df
— Shows free disk space
? du
— Displays disk usage
? dump
— An ext2
file system backup utility
? dumpe2fs
— Shows information about an ext2
file system
? e2fsadm
— Administers an LVM/ext2
file system
? e2image
— Creates an image file of ext2
file system data
? fdisk
— The standard Linux partition table editor
? fsck
— Checks or repairs a file system
? lsraid
— Displays information about Linux RAID devices
? mformat
— Formats a DOS floppy disk; part of the Mtools suite of tools
? mkfs
— Creates various file systems and acts as a wrapper for the actual programs that do the work
? mkisofs
— Creates a CD-ROM file system in iso960
format
? mkreiserfs
— Creates a Linux reiserfs
file system
? mkswap
— Prepares a Linux swap device
? mount
— Mounts a supported file system
? parted
— The GNU partition editor and resizing utility
? reiserfsck
— Checks a Linux reiserfs
file system
? resize_reiserfs
— Resizes a Linux reiserfs
file system
? smbmount
— Mounts an smbfs
file system
? stat
— Shows file or file system status
? swapon
— Displays swap usage or start using system swap device
? swapoff
— Turns off swap usage
? sync
— Flushes file system buffers
? tune2fs
— Changes file system parameters on ext2
file systems
? umount
— Unmounts a file systems
? usermount
— The Fedora graphical file system mounting and formatting tool
- File System Manipulation
- Shared Cache file
- Безопасность внешних таблиц. Параметр EXTERNAL FILE DIRECTORY
- Chapter 13. rc.firewall file
- Chapter 2 Building and Deploying a Run-Time Image
- 4.3.3. Makefile Targets
- Что это за файл – pagefile.sys?
- Для чего нужны папки Windows, Documents and Settings, Program Files и Temp?
- Можно ли указать использование по умолчанию вместо C:Program Files другого каталога для установки программ?
- Можно ли удалять из папки Program Files папки деинсталлированных программ?
- Диски С: и D: невозможно открыть простым щелчком кнопки мыши. Появляется сообщение Не найден файл file.exe. Что делать?
- 1.22. Показ изображений с помощью UIImageView