LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Option of tmpfs Instead of RAMdisk when Creating Bootdisk (https://www.linuxquestions.org/questions/linux-newbie-8/option-of-tmpfs-instead-of-ramdisk-when-creating-bootdisk-17031/)

fbagnato 03-26-2002 08:53 AM

Option of tmpfs Instead of RAMdisk when Creating Bootdisk
 
Hello All,

I am a Linux newbie and am in the process of building a Bootdisk for Linux based on the 2.4.18 Kernel as a self-education exercise and as a starting point for a new Hard Drive install of a Linux system.

I have managed to follow the instructions using the BOOTDISK - HOWTO and successfully produced a working boot/root diskette.

NOW I wish to try again, but using the 2.4.18 version of the Kernel. I noticed that a filesystem called tmpfs has been introduced in recent kernel releases.

In the current release of the Bootdisk HOWTO, 3 options are provided in creating the filesystem: 1 is using a RAMDisk, 2 is an unused hard disk partition and 3 is using a loopback device.

I was wondering whether it would be feasible to use the tmpfs filesystem as an alternative (or FOURTH option) to building the compressed filesystem on.

I have attempted to use this method already, but am getting problems when I get to the stage of creating the compressed rootfs.gz compressed.

I perform the following steps:

1. I prepare all the files I want for the root/bootdisk in the tmpfs partition (which is where I mount the tmpsfs filesystem partition)......so far so good

2. I then perform the command 'umount /tmpfs' which is the directory the tmpfs filesystem is mounted on

3. I TRY to run the command 'dd if=/tmpfs bs=1k|gzip -v9>rootfs.gz' and it tells me the directory is not mounted!

When I follow the same process using a RAMDisk then it works.

I prefer however to use the tmpfs filessytem instead of the RAMDisk option as the space is dynamically allocated and easier to mount on the fly.

Thanks in advance!!!!!!

Mik 03-27-2002 07:26 AM

I don't know exactly how you would go about using a tmpfs when making a boot floppy. But from what I understand the tmpfs exists as long as it's mounted. In step 2 you unmounted it and then after that you try to copy it. But once it's unmounted it gets cleaned up so it no longer exists.
I've never gotten into making bootdisk so I couldn't tell you what would be the right way to do it.

fbagnato 03-27-2002 12:35 PM

Thanks for your post Mik.

I suspected that the 'unmount' prior to the copy is the error.

I'm then guessing that the tmpfs filesystem works differently to a RAMDisk in the sense that with a RAMDisk you can unmount it then do a 'if' copy.

ie. does the problem lie in the tmpfs not being a device???? (like a RAMdisk or Hard Disk Partition)

If that is the case, im wondering why the HOWTO asks to unmount the RAMDisk or spare partition before doing the 'if' copy.

ie. would the result be if you did an 'if' copy without unmounting a device first?


All times are GMT -5. The time now is 01:12 AM.