LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Edit cramfs? Read-only? How to make R/W? (https://www.linuxquestions.org/questions/linux-software-2/edit-cramfs-read-only-how-to-make-r-w-56620/)

oswald21 04-24-2003 03:02 PM

Edit cramfs? Read-only? How to make R/W?
 
I'm playing around with trying to edit the mini-kernel that comes with System Imager. I want to add my own loadable modules and create a bootable CD. And in the process of tracing it thru, I found that I cannot modifiy the little mini-kernel (init ramdisk) after mouting it as a loopback device.

Any ideas on what I can do? It looks like an iso9660 in that it's at 100% use and I cannot get past this. How do I force a cramfs to be read/writeable?


[root@shockme tmp]# df -k .
Filesystem 1K-blocks Used Available Use% Mounted on
/tmp/initrd.img 1188 1188 0 100% /mnt/initrd

[root@shockme my_modules]# ll
total 88
-rw-r--r-- 1 20800 64 88530 Apr 24 15:06 e1000.o
-rw-r----- 1 20800 64 881 Apr 24 15:06 INSMOD_COMMANDS

[root@shockme my_modules]# touch me
touch: creating `me': Permission denied

[root@shockme my_modules]# mount
/tmp/initrd.img on /mnt/initrd type cramfs (rw,loop=/dev/loop2)

jailbait 04-24-2003 03:31 PM

I think that you have to mount the mini-kernel twice in effect. The mount command mounts it as a partition. You also have to use the losetup command to set up ("mount") the mini-kernel as a file. Then commands like mkfs access the mini-kernel as a device and commands like touch access the mini-kernel as a file.


All times are GMT -5. The time now is 08:14 AM.