File EditingForum: User Feedback Topic: File Editing started by: jlowell Posted by jlowell on July 22 2004,00:34
Attempting as superuser to make an edit of a file well down into the /usr directory, I get a "read only file system" error. I see that /usr is symlinked to /KNOPPIX/usr, so attempt to remove the symlink with rm -r /usr expecting to follow that with cp /KNOPPIX/usr /usr and edit the file. But rm -r /usr doesn't prompt for symlink removal as I expect, it simply asks to remove the file. While I'm suspicious at this point, I go ahead expecting to recreate the directory and its contents by copying /KNOPPIX/usr anyway. But when doing the copying part way through I'm told there's no room on the disk and the process flops. Now I know why I wasn't prompted to remove the symlink. How does one edit something as simple as a file in /usr/share/fluxbox/styles? Are size constaints so severe with DSL that doing something like this is out of the question or have I misunderstood the proceedure?jlowell Posted by cbagger01 on July 22 2004,02:18
Try loading up a *.dsl extension, or enable apt, or install Synaptic.If you do one of these things, DSL will rebuild the file system with links to a writable file system in the ramdisk. IE: Instead of /usr -> /KNOPPIX/usr you will have /usr -> /ramdisk/usr You can then overwrite the symlink for the style file with your edited version (provided that you are using 'root' or superuser authority). However, it is preferrable to save edited versions of fluxbox styles in your /home/username/.fluxbox/styles directory. They will still appear on the list of available styles to choose from, and it is easier to back up your .fluxbox directory. Hope this helps. Posted by jlowell on July 22 2004,04:26
Hi cbagger01,OK, so curiosity has gotten the better of me. I just had to take a look at DSL and even though it won't load on my webserver, the machine on which I'd hoped to use it, I've sneeked a look on my main system where it will load and I can't let go. Anyway, from what you say, the most risk free of the three possibilities you list would seem to be to run "enable apt" from the menu. I have had very limited exposure to Debian, most of my background is with Gentoo and Arch, but I know enough to know that apt is the Debian package manager, eh? So, if I follow you, if I "enable apt", I'll be setting up apt's functionality. I strictly want to avoid any hard drive involvement with anything I do with DSL, cbagger01. Loading something into memory temporarily is not a problem, of course. But since I'm new to DSL, I want to avoid the stupidities usually characteristic of a newcomer. So I must ask, will "enable apt" in any way involve my hard drives? It strikes me that by adding the option "toram" to the dsl command at start up that I might achieve the same thing you're describing about the file system rewrite. Am I on target with this thought? jlowell Posted by cbagger01 on July 22 2004,14:40
The "Enable apt" function will create a writable file system inside your ramdisk. It will not touch your hard drive unless you are running DSL under a full hard disk installation.The "dsl toram" function does NOT create a writeable file system. The "toram" option will load the contents of yor dsl cd into a ramdisk. Because the compressed filesystem (eg. /KNOPPIX) is read-only, you cannot write to it even if it is stored inside a ramdisk or stored on a read/write device like a hard disk or a USB flash drive. Why? Because the compressed filesystem drivers can only read the stuff inside the filesystem. There may be a linux technology that supports compression of file system and both reading and writing (like "compressed drives" in older versions of Microsoft Windows), but the system that was chosen for knoppix and DSL, called "cramfs" does not support writing. Hope this helps. Posted by jlowell on July 22 2004,14:55
Hello cbagger01,
It certainly does, and that's true of your replies to every question I've raised here over the last several days. Many thanks to you! Regards. jlowell Posted by TyphoonMentat on July 22 2004,16:40
As far as I was aware, Knoppix and derivatives use cloop, or is that the same thing? Posted by cbagger01 on July 22 2004,17:06
You are correct.cloop is not the same as cramfs. My bad. They both do similar things in similar ways, but cloop seems to result in a higher compression ratio. Sorry about that. Posted by jlowell on July 23 2004,01:47
cbagger01,I've run into more read only troubles despite the kindness of your instructions above. I boot up, configure the network with the supplied tool, enter "Enable Apt" and, sure enough there I see usr -> /ramdisk/usr in / as you'd mentioned. Trying to edit a style file in /ramdisk/usr/share/fluxbox/styles still brings read only objections though. What's wrong here, I don't get it. jlowell Posted by cbagger01 on July 23 2004,02:19
(1) You may need to be the 'root' superuser in order to be able to overwrite the symlink when you do your file save.(2) Your program may try to follow the link back to it's ultimate target in the /KNOPPIX/usr directory. To solve this, do the following: Load your file into an editor. While keeping the editor open, use emelfm or "sudo emelfm" to delete the /usr/share/fluxbox/styles symlink. Then try and save the file. Or you can do this: Type 'sudo emelfm' to launch emelfm as 'root' user. In the LEFT window pane, navigate over to the /KNOPPIX/usr/fluxbox/styles directory. In the RIGHT window pane, navigate over to the /ramdisk/usr/fluxbox/styles directory. Then DELETE the symlinks for the desired files in the RIGHT pane. Go into the LEFT pane and highlight the desired files. Click on the "copy" button in emelfm. Real copies of these files will appear in the ramdisk directory. You can then edit and save these files as you wish. Keep in mind that the correct way to save an edited Fluxbox Style is to save it in the /home/dsl/.fluxbox/styles directory instead of the /usr directory. Read the whitebox.dsl info file for more details. It is located in the mydsl testing area. Posted by jlowell on July 23 2004,04:08
cbagger01,OK, cbagger, mystery solved! :-) The trick was learning that the files in /ramdisk were linked back to the same files in /KNOPPIX. Then it was simply a matter of removing the /ramdisk version of the file then copying back to the parent directory that same file in it's /KNOPPIX version. Pretty standard stuff. Being so new, I'd never have known about the connection of /ramdisk back to /KNOPPIX if you hadn't pointed it out to me. So the deed is done, style file edited. Thanks. jlowell |