Linux?е?RAMDISK??INITRD
???????????? ???????[ 2015/2/13 16:12:36 ] ????????Linux ?????? RAM
????Ramdisk???
??????????????ramdisk??Ramdisk????????RAM?е???(Disk)?????????????????RAM disk??????????????????/dev/hda1????????????????磺
redice # mkfs.ext2 /dev/ram0
mke2fs 1.38 (30-Jun-2005)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
2048 inodes?? 8192 blocks
409 blocks (4.99%) reserved for the super user
First data block=1
1 block group
8192 blocks per group?? 8192 fragments per group
2048 inodes per group
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 24 mounts or
180 days?? whichever comes first. Use tune2fs -c or -i to override.
redice # mount /dev/ram0 /mnt/rd
redice # ls /mnt/rd
lost+found
redice # mount
/dev/hda2 on / type ext3
proc on /proc type proc (rw)
/dev/ram0 on /tmp/xxx type ext2 (rw)
?????????Ramdisk???????????????????????RAM disk????????????????????????????Ramdisk???????????????????????????Ramdisk????????????????????д????????????????????д???????????2.6?汾??Ramdisk?????????????tmpfs(Virtual memory file system support)?????
??????????????????????????????ramdisk(/dev/ram0)???????mount??/mnt/rd???£???????Ramdisk?ж??????????£?
????redice # df -h /dev/ram2
????Filesystem ???? ???? ???? ????% ?????
????/dev/ram0 7.8M 1.0K 7.4M 1% /mnt/rd
????????????????????ramdisk?д??7.8M????????????????????????????????????????minix?????????????£?
redice # umount /mnt/rd
redice # mkfs.minix /dev/ram0
2752 inodes
8192 blocks
Firstdatazone=90 (90)
Zonesize=1024
Maxsize=268966912
redice # mount /dev/ram0 /mnt/rd
redice # df -h /dev/ram0
Filesystem ???? ???? ???? ????% ?????
/dev/ram0 8.0M 1.0K 8.0M 1% /mnt/rd
????????????????????8M???????????EXT2??????????????????洢?????????minix????????Щ?????????????????????????????????????Ramdisk?????????? Default RAM disk size ?????????????????Ramdisk???С????????????????в???(ramdisk_size)????????????????????Ramdisk???С?16M????grub???????
????# grub.conf -
????default=0
????timeout=10
????splashimage=(hd0??0)/grub/splash.xpm.gz
????title Redice Linux
????root (hd0??0)
????kernel /vmlinuz ro root=LABEL=/ hdc=ide-scsi ramdisk_size=16384
????initrd /initrd
??????????Ramdisk???С???16M????????????Ramdisk???????????????????????Ramdisk???????飬????????????????????Ramdisk???С:
????redice # insmod rd rd_size=16384
??????????????????????????Щ?????????в?????????Ramdisk:
????ramdisk_size - ramdisk???С(Kbytes)??
????ramdisk - ??ramdisk_size???????????
????ramdisk_blocksize - ramdisk????С?????????1024??
??????????????????????????????????????????
????rd_size - ??????ramdisk_size??ramdisk??????
????rd_blocksize - ??????ramdisk_blocksize??
????initrd
??????????????Ramdisk??????????????????á???????????????????ramdisk??????????????initrd???????initrd????? initial RAM disk ??????????ú?????????Ramdisk?????????????????Щ??????????
???????????? Ramdisk??
??????????????????Ramdisk??
??????Ramdisk????????????
???????????initrd????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11