1752815 Members
5894 Online
108789 Solutions
New Discussion юеВ

RE : Ramdisk

 
Charles Ooi Chia Lun
Occasional Advisor

RE : Ramdisk

Dea Sir,
What's Ram disk? If created the ram disk with mkinitrd , how to remove it? Please advise. thank you.
3 REPLIES 3
Alexander Chuzhoy
Honored Contributor

Re: RE : Ramdisk

Took the next line from internet:

RAMDisk is a software driver that emulates as fully as possible the low-level functionality of a hard disk with system RAM.


To remove it you can use the simple
rm filename
where filename is the name of the file that you've created with mkinitrd.
Ivan Ferreira
Honored Contributor

Re: RE : Ramdisk

RAM disks are used at boot time to load kernel modules. You cannot just delete a ram disk. If you delete a ramdisk that is used to boot the current kernel, you system won't boot next time.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ralph Grothe
Honored Contributor

Re: RE : Ramdisk

Unless you compiled yourself a custom Linux kernel that contains all the drivers for the HW built into your PC it is most likely that the kernel that you are running used an initial RAM disk to bootstrap itself, especially when your boot disk is a SCSI device.
If you look into /boot you will notice files beginning with initrd*.
These are the RAM disks needed to boot up your kernel.
Because in a modular kernel drivers are commonly loaded only on demand, i.e. when the system needs to access a device,
this could pose a typical hen and egg problem.
The kernel needs to load the SCSI driver to access your boot disk, which is the very place where the driver module resides beneath /lib/modules/$(uname -r).
So if you don't have a monolithical kernel you need an initial RAM disk to have the driver load from to boot up.
It only resides temporarily in memory,
as long as needed.

If you run a recent RH/Fedora Linux distro you can extract the initrd file to have a look at what's required during that early boot up phase.
In fact if you're HW requires any special treatment or loading of uncommon drivers
during boot up you are required to build a custom initrd file.
RedHat supplies a helper shell script to ease the creation of such a file, called mkinitrd
(see its manpage)

See also my reply to this thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=972313

Madness, thy name is system administration