PDA

View Full Version : Persistent Home and HD access



Knewbie
02-01-2003, 10:07 PM
Since I started using persistent home, user Knoppix no longer has write/enter acess to the FAT32 hard disk. In the Konquerer file manager, Knoppix only sees a locked tmp directory on the HD. In the console, Knoppix can get ls to list top level directories on the HD, and a "permission denied" error for every file in the FAT root directory.

Root has full access to the HD. Permissions are drwxr--r-- . Attempts to modify permissions with chmod produce a "permission denied" error or are silently ignored.

I'm stymied and looking for suggestions. I'm a total newbie to Linux with only a little Unix experience several years ago, so I might be overlooking something that's very obvious to others.

Thanks for any help!

Dave_Bechtel
02-02-2003, 07:47 AM
1. First, umount the FAT32 partition.
2. ' chmod ' the mount point to whatever you want
3. Edit ' /etc/fstab ' and make sure you have 'users,rw' in the Options field for that partition/mount point
4. then, ' mount /dev/hda1 /mnt/hda1 ' (subst actual values.)

--Post results, either way....


Since I started using persistent home, user Knoppix no longer has write/enter acess to the FAT32 hard disk. In the Konquerer file manager, Knoppix only sees a locked tmp directory on the HD. In the console, Knoppix can get ls to list top level directories on the HD, and a "permission denied" error for every file in the FAT root directory.

Root has full access to the HD. Permissions are drwxr--r-- . Attempts to modify permissions with chmod produce a "permission denied" error or are silently ignored.

I'm stymied and looking for suggestions. I'm a total newbie to Linux with only a little Unix experience several years ago, so I might be overlooking something that's very obvious to others.

Thanks for any help!

Knewbie
02-02-2003, 06:03 PM
Thanks, Dave! I think I followed your instructions to the letter. Unfortunately....


1. First, umount the FAT32 partition.


The difficulty appears to be in the very first step. With persistent home active, the device is busy. A lazy umount seemed to work, and I was able to complete the other steps. 'chmod' and 'mount' both reported success. But after it was all done, the permissions for hda1 had not changed and user Knoppix still could not access the HD.

I suspect (in my vast ignorance) a solution is going to depend on modifying the persistent home script (knoppix.sh) or creating a preknoppix.sh script. Figuring out where to go next is way beyond me!

Schwarze
02-02-2003, 09:46 PM
Hi Knewbie!

You are right - you have to modify the KPH knoppix.sh a bit. Sorry for that; the update is on the way. Till then you can fix it yourself for the 0.4 version:

Open the knoppix.sh file from KHP and change line #112
from: "mount $p $d 2>&1 > /dev/null"
to: "mount $d 2>&1 > /dev/null"

In other words: simply drop the $p.

I hope this works for you!
Matthias

Dave_Bechtel
02-02-2003, 10:54 PM
>> 1. First, umount the FAT32 partition.
>>2. ' chmod ' the mount point to whatever you want
>>3. Edit ' /etc/fstab ' and make sure you have 'users,rw' in the Options field for that partition/mount point
>>4. then, ' mount /dev/hda1 /mnt/hda1 ' (subst actual values.)

--Ok, try this:
After umounting, ' chown knoppix /mnt/hda1 ' and ' chmod a+rx /mnt/hda1 '; follow steps 3 and 4 again. That should at least enable READ access for the knoppix user.

--Post results again....


Thanks, Dave! I think I followed your instructions to the letter. Unfortunately....


1. First, umount the FAT32 partition.


The difficulty appears to be in the very first step. With persistent home active, the device is busy. A lazy umount seemed to work, and I was able to complete the other steps. 'chmod' and 'mount' both reported success. But after it was all done, the permissions for hda1 had not changed and user Knoppix still could not access the HD.

I suspect (in my vast ignorance) a solution is going to depend on modifying the persistent home script (knoppix.sh) or creating a preknoppix.sh script. Figuring out where to go next is way beyond me!

Knewbie
02-03-2003, 01:34 AM
--Ok, try this:
After umounting, ' chown knoppix /mnt/hda1 ' and ' chmod a+rx /mnt/hda1 '; follow steps 3 and 4 again. That should at least enable READ access for the knoppix user.


Thanks again, Dave, but still no joy. User Knoppix still sees no change in permissions.

I'll be trying the script change suggested by Matthias now, but I wanted to test your suggestion first. Your advice is appreciated!

Knewbie
02-03-2003, 02:13 AM
You are right - you have to modify the KPH knoppix.sh a bit. Sorry for that; the update is on the way. Till then you can fix it yourself for the 0.4 version:

Open the knoppix.sh file from KHP and change line #112
from: "mount $p $d 2>&1 > /dev/null"
to: "mount $d 2>&1 > /dev/null"


That's it! Thank you, Matthias! HD access works fine now.

I'm looking forward to the next update, of course!

I'm thinking of copying the Knoppix directory to the HD, in order to run from the HD without a full installation. Do you know if Persistent Home will work if Knoppix is located on the HD?

Thanks again!

audioaficionado
02-03-2003, 04:24 AM
Open the knoppix.sh file from KHP and change line #112
from: "mount $p $d 2>&1 > /dev/null"
to: "mount $d 2>&1 > /dev/null"


Perfect timing, I was just about to reburn my ISO with the ph scripts included. You saved me from making a coaster.

Is that the only update or are there some more enhancements I should wait for?

Thanx,

Schwarze
02-04-2003, 12:02 AM
Is that the only update or are there some more enhancements I should wait for?


There a two fixes for v0.4. The first is described above and fixes issues with fat32 partitions.
The second fixes the problem, that you cannot have your .knoppix file on the same partition as /knoppix/KNOPPIX (i call this a poor man's hd install ;) )

To apply the fix you change the knoppix.sh like this:
Replace the following text in line #148:
"for dir in /mnt/*; do"
with
"for dir in /cdrom /mnt/*; do"

(add /cdrom)

With these fixes you are fully up-to-date. I planned the release of the following version for the next days, but i've delayed it to investigate a possible integration of KPH with Andre Holzhey's interesting project "plugscript". I expect this to take a few days.

Matthias

audioaficionado
02-04-2003, 03:57 AM
I did the edit in w2k using GVIM (vim for windoze). http://www.vim.org

I love this editor. It makes notepad.exe suck bad.

It's even lots better than Note Tab IMHO because it shows the line and charictor position. Sure beats counting while repeatedly hitting the down arrow key.

Anyway post us on any more changes and merges of your kool script.

Thanx again,

Knewbie
02-04-2003, 06:12 AM
The second fixes the problem, that you cannot have your .knoppix file on the same partition as /knoppix/KNOPPIX (i call this a poor man's hd install)


Thanks again, Matthias. You answered my next question!

After making the second change in the script, I tried running Knoppix from the HD (I call it a lazy man's hd install) with floppyconfig. Persistent Home worked, but I could no longer access the HD as /mnt/hda1. It was accessible only as /cdrom. Is this the expected behavior?

I also tried running Knoppix from the HD without the floppyconfig option, but with knoppix.sh in the /knoppix directory on the HD. This did not work. The script executed, but with numerous errors, including several 'wrong password' messages. Is this also as you would expect?

Thanks again. Persistent Home is a great tool. I'll continue running Knoppix from the cdrom, if that's what I must do in order to use Persistent Home.

Schwarze
02-04-2003, 09:44 PM
After making the second change in the script, I tried running Knoppix from the HD (I call it a lazy man's hd install) with floppyconfig. Persistent Home worked, but I could no longer access the HD as /mnt/hda1. It was accessible only as /cdrom. Is this the expected behavior?

I also tried running Knoppix from the HD without the floppyconfig option, but with knoppix.sh in the /knoppix directory on the HD. This did not work. The script executed, but with numerous errors, including several 'wrong password' messages. Is this also as you would expect?

Thanks again. Persistent Home is a great tool. I'll continue running Knoppix from the cdrom, if that's what I must do in order to use Persistent Home.

:wink: Yep, that's the experimental encryption interfering:
The simulated /cdrom makes life a bit hard for KPH - and since the encryption is aboard, KPH expects .knoppix to be encrypted when it's not trivial to mount and asks for a password. :roll:

It's running fine with my version, but i've changed quite a bit since 0.4 - so it's more than the typical one-liner fix... As a workaround you can copy your .knoppix file to another partition if you have one. It does not have to be on the first partition, but it must not be a NTFS partition.

Hope that helps a bit!
Bye, Matthias

Knewbie
02-05-2003, 12:48 AM
As a workaround you can copy your .knoppix file to another partition if you have one.


No other partition is available. That's why I'm using the lazy man's hd install! :D

No problem. I'll wait for the release.

As long as I have your attention, one more question, if I may. Actually, it's a two-part question:

With KPH active, does Knoppix still use the ramdisk?

And if not, does KPH do anything to free the RAM, or should I use a startup option to limit the size of the ramdisk?

audioaficionado
02-05-2003, 01:54 AM
As long as you're live CD, the ram disk is acting as a HD. PH will save your configs to a HD file. If you've allowed Knoppix to set a swap file on the HD, it will just swap out when you fill up your ram.

I dropped a huge 350Mb file on the KDE desktop and watched as the ram filled up and then just before it got down to ~4Mb the swap started filling and the ram emptied back to ~20Mb. All without XMMS skipping once while playing internet mp3 shoutcast 128kbs radio. Lets see windows do that.

Schwarze
02-05-2003, 10:22 PM
With KPH active, does Knoppix still use the ramdisk?


Yes, as audioaficionado said. KPH only (kinda) remounts the directory /home/knoppix so that every access to it goes directly to the harddisk. Everything else still remains on the ramdisk or swap.

Second point: No, KPH does not do anything about the memory usage. But i'm very interested, if you find some optimisations in this field! ;)

Knewbie
02-06-2003, 04:44 AM
As long as you're live CD, the ram disk is acting as a HD.


I was unclear as to whether the .knoppix file is actually mounted and used as /home during a session, or is used a a repository for /home between sessions. Thanks to audioaficionado for clearning this up and to Matthias for confirming it.



But i'm very interested, if you find some optimisations in this field!


You flatter me! I am stumbling around in the dark in this new environment, and it's unlikely I will soon reach a level of expertise that would enable me to suggest optimizations. Maybe some day!

Following audioaficionado's suggestion, I've experimented with the swap file, something I had overlooked until now. I find I cannot create a swap file while using Persistent Home. If Knoppix starts without kph, I can create a swap file, but on the next reboot, the swap file seems to interfere with kph. kph reports that the hd is already mounted and gives up, then kde is unable to load

Any guidance that might help me resolve the conflice will, of course, be much appreciated!

audioaficionado
02-06-2003, 07:43 AM
See if you can carve out a small ~256Mb Linux swap partition on your HD. Maybe Knoppix/ph will use that. Knoppix always automaticly grabs the linux swap I created trying to install Libranet. I was going to reburn my CD with PH but I'm holding out for the next KDE3.1 Knoppix release.