PDA

View Full Version : saving changes to /etc/fstab



masimar
12-02-2004, 09:58 PM
Okay, I'm very new, less than 24 hours. I found an article about using captive ntds with 3.6 that includes making changes to /ets/fstab
I cannot save the changes. I've been round and round with permissions, but it seems as if I'm trying to make changes to the cd. Can anyone please tell me what I'm missing?

eco2geek
12-02-2004, 11:39 PM
I wouldn't put a captive-ntfs-mounted drive in fstab. I'd mount it manually. A known bug listed on the Captive site says that writes aren't committed during machine shutdown. But that's your choice.*

Within KDE, bring up a terminal.
su
cd /etc
mcedit fstab
(make your changes and save it)

Then if you use the "Save KNOPPIX configuration" command off the Knoppix menu, and reload your saved configs the next time you reboot, Knoppix will use your modified fstab.

* Matter of fact, 90% of the time I have no luck getting files I edit on my NTFS partition to "stick". They edit and save OK, but I switch back to Windows and the changes haven't been committed. Hope your luck is better.

masimar
12-03-2004, 03:30 AM
Thanks for the tip. However, I can't make the ntfs partition writeable no matter what I do. The following is an article I found on a linux forum. I tried exactly what was prescribed with no results. Then I noticed if I added the user "captive" with the default id of 1001, a corresponding group was added with id of 1002. No change. I downloaded the ntfs drivers from the service pack 1a, then tried the following mounting method and then tried mounting manually. I tried editing fstab by changing only ro to rw. I am now out of ideas and would appreciate any help. Thanks.


Solution! for V3.6-2004-08-16

The problem is that the user "captive" and group "captive" have been removed accidentally in V3.6. One has to recreate them; I copied settings from KnxV3.4-2004-05-17-EN for use in procedure below.

Penguin Menu:Root Shell
passwd
(set to your choice)

KDE Menu:System:KUser
(enter passwd)
OK
Adduser Button: captive
userID: 108 (same as v3.4)
login shell: /bin/false
home folder: /var/lib/captive
uncheck all three boxes (in reverse order to avoid greying out)
Groups Tab
Primary Group: nogroup
OK
AddGroup Button:
Group name: captive
Group number: 116 (not same as V3.4, but close by.)
SAVE
Dialog 'no shadow entry for captive': OK

Penguin Menu: Utilities:Captive NTFS
Follow menu directions; get XP drivers from your hard drive, or download them; Win 2k drivers won't work.

Penguin Menu:Root Shell
mkdir /mnt/hda1 (or whatever you like)
mount -t /dev/hda1 /mnt/hda1

Lastly, there's couple in's and out's for accessing the drive:
I edited the lines in /etc/fstab to look like: (changed ntfs to captive-ntfs and ro to rw)

# Added by KNOPPIX
/dev/hda1 /mnt/hda1 captive-ntfs:lol: noauto,users,exec,rw,umask=000,uid=knoppix,gid=kno ppix 0 0

Next, right clik on kde desktop icon:Properties:Device:uncheck Read Only
Now you can open the drive by clicking this icon in Konqueror and read/write as you like.

Lastly, REMEMBER to unmount the drive before quitting or your changes may be lost and not copied from the sandbox data area to be written to the hard drive.

CrashedAgain
12-03-2004, 04:30 AM
Okay, I'm very new, less than 24 hours.

I saw a tag once that read "proudly using Linux since last Tuesday". Guess that fits.

I don't know much about captive ntfs but I did a search & found this:

http://www.knoppix.net/forum/viewtopic.php?t=11736

Hope it helps.

eco2geek
12-03-2004, 04:37 AM
Here's what greenfly (aka Kyle Rankin) recommends in Knoppix Hacks: After you've installed the Captive drivers, mount the drive with the command

sudo mount -t captive-ntfs -o uid=knoppix,gid=knoppix /dev/hda1 /mnt/hda1

replacing "hda1" with whatever your NTFS partition is. Then the partition's writeable by the regular Knoppix user (which is the real trick here). Of course, you can't have hda1 mounted already.

Then to unmount it and save changes to the disk, use the command

sudo umount /mnt/hda1

Please post your success rate with Captive -- I have Win2K on an NTFS partition, and although using Captive hasn't harmed my drive, more often than not the files I edit using Captive haven't changed the next time I examine them in Windows.