PDA

View Full Version : Mounting and creating shortcuts for partitions



xolstis
06-26-2003, 10:10 PM
Hello, just managed to get knoppix to recognise my modem. Now I can't seem to figure out how to mount my NTFS and VFAT partitions. I tried editing fstab and heres the code from it:

# partitions found by Knoppix
#/dev/hda1 /mnt/hda1 ntfs noauto, users,exec,ro,uid=knoppix,gid=knoppix 0 0
#/dev/hda3 /mnt/hda3 ext3 noauto,users,exec 0 0
#/dev/hda5 /mnt/hda5 vfat noatime 0 0

I've tried to remove the noauto at one point and also for hda5 have tried another command suggested by someone else. Am trying to get a shortcut onto the desktop which links to the other two drives. When i right click and select add new hard disc, hda1 and hda5 does not appear. I tried to just type /dev/hda5 and /mnt/hda5 but got and error msg:

/home/knoppix/Desktop/Hard Disc
is of type FSDevice but has no Dev=... entry.

This occurs even after i logon as root and type: mount /dev/hda5 /mnt/hda5.

Some help wud be appreciated.

Another thing is I can't seem to change password for the knoppix user, when i do the system hangs. Was wondering what is the non-GUI way of changing passwords.

Thanks

rickenbacherus
06-26-2003, 10:29 PM
Hello, just managed to get knoppix to recognise my modem. Now I can't seem to figure out how to mount my NTFS and VFAT partitions. I tried editing fstab and heres the code from it:

# partitions found by Knoppix
#/dev/hda1 /mnt/hda1 ntfs noauto, users,exec,ro,uid=knoppix,gid=knoppix 0 0
#/dev/hda3 /mnt/hda3 ext3 noauto,users,exec 0 0
#/dev/hda5 /mnt/hda5 vfat noatime 0 0

I presume you are working from a hard drive installation. The lines above are commented out. You need to uncomment them. That is to say, remove the leading '#' from each line you want read. It is akin to a Rem in DOS. When the file is read any lines with a '#' in front of them are ignored. Very handy for making adjustments- rather than remove and retype lines to try something out just comment it out instead and it won't be read.


I've tried to remove the noauto at one point and also for hda5 have tried another command suggested by someone else. Am trying to get a shortcut onto the desktop which links to the other two drives. When i right click and select add new hard disc, hda1 and hda5 does not appear. I tried to just type /dev/hda5 and /mnt/hda5 but got and error msg:

/home/knoppix/Desktop/Hard Disc
is of type FSDevice but has no Dev=... entry.

If you uncomment the lines above and have the 'auto' flag in each line that you want auto mounted it should mount them on boot for you. (DO NOT USE 'auto' ON A CDROM)

You can make desktop icons by right clicking on the desktop itself.


This occurs even after i logon as root and type: mount /dev/hda5 /mnt/hda5.

You don't need to log in as root (but you can)- just become root:


su
<password>

OR "do as root"


sudo mount -t blah blah blah

This is under the assumption that your username is part of the sudoers group.

To mount a drive you need to specify the filesystem type, for example:


#: mount -t vfat /dev/hda5 /mnt/hda5


Some help wud be appreciated.

Another thing is I can't seem to change password for the knoppix user, when i do the system hangs. Was wondering what is the non-GUI way of changing passwords.

Thanks

passwd

xolstis
06-27-2003, 02:30 PM
Okies I did as suggested just got rid of the # in front of the commands. I presume then fstab is something like autoexec.bat in DOS?

Problem now is that when i login and out there it says error is line 10 and 12 of /etc/fstab. This would be the corresponding two lines i removed the # from.

I tried running the code deirectly in KONSOLE (while logged in as root) and it says permission denied. Any ideas?

Thanks

fingers99
06-27-2003, 03:41 PM
Okies I did as suggested just got rid of the # in front of the commands. I presume then fstab is something like autoexec.bat in DOS?

Problem now is that when i login and out there it says error is line 10 and 12 of /etc/fstab. This would be the corresponding two lines i removed the # from.

I tried running the code deirectly in KONSOLE (while logged in as root) and it says permission denied. Any ideas?

Thanks

No, it's not really like autoexec.bat.


You can't run it in KONSOLE. The closest you can do is su to root and do

mount -a

but that won't work with the error messages.

Can you post the whole /etc/fstab ?

xolstis
06-28-2003, 06:07 AM
Allrites heres the current fstab

# /etc/fstab: filesystem table.
#
# filesystem mountpoint type options dump pass
/dev/hda3 / ext3 defaults,errors=remount-ro 0 1
/dev/hda4 none swap sw 0 0
proc /proc proc defaults 0 0
/dev/fd0 /floppy vfat defaults,user,noauto,showexec,umask=022 0 0
/dev/cdrom /cdrom iso9660 defaults,ro,user,noexec,noauto 0 0
# partitions found by Knoppix
#/dev/hda1 /mnt/hda1 ntfs auto, users,exec,ro,uid=knoppix,gid=knoppix 0 0
#/dev/hda3 /mnt/hda3 ext3 noauto,users,exec 0 0
#/dev/hda5 /mnt/hda5 vfat auto, users,exec,ro,uid=knoppix,gid=knoppix 0 0


Another thing I tried was just this. Logging in as root i typed this in konsole:

mount /dev/hda1 /mnt/hda1
mount de/dev/hda5 /mnt/hda5

Now I can see the files as root by using konqueror to go to /mnt/hda1 and /mnt/hda5.

However when i logged out and logged in as another user, hda1 is locked (has a lock symbol over the directory) and I can get into hda5 but am not able to see anything in it at all. hda1 is a NTFS partition and hda5 a VFAT. Whats going on?

Thanks

Stephen
06-28-2003, 07:25 AM
# partitions found by Knoppix
#/dev/hda1 /mnt/hda1 ntfs auto, users,exec,ro,uid=knoppix,gid=knoppix 0 0
#/dev/hda3 /mnt/hda3 ext3 noauto,users,exec 0 0
#/dev/hda5 /mnt/hda5 vfat auto, users,exec,ro,uid=knoppix,gid=knoppix 0 0


However when i logged out and logged in as another user, hda1 is locked (has a lock symbol over the directory) and I can get into hda5 but am not able to see anything in it at all. hda1 is a NTFS partition and hda5 a VFAT. Whats going on?

Thanks

Edit the hda1 & hda5 lines and remove the # from the beginning of the lines and they will be mounted on boot. When you say another user do you mean a user other than knoppix if so remove the uid & gid=knoppix you will not have permission to access the drives only the user knoppix will. Also if you want to write to the vfat (hda5) partition change the ro to rw.

My suggestions would result in the lines:



/dev/hda1 /mnt/hda1 ntfs auto,users,exec,ro 0 0
/dev/hda5 /mnt/hda5 vfat auto,users,exec,rw 0 0


And you should now be able to access the drives when you boot or make your icons on the desktop.

xolstis
06-29-2003, 04:19 AM
Okies have done that, now during bootup I can see that it says no uid and gid. Are u saying that if I wanted to mount the two hdd partitions so that user.... say user xolstis could login I would put

#/dev/hda5 /mnt/hda5 vfat auto, users,exec,ro,uid=xolstis,gid=xolstis 0 0

while editing the fstab I sometimes get errors in the /etc/fstab msg am wondering if the what I am doing is right, the spaces commas etc.

Also was wondering how do I rename a user. I created a new user called xolstis but having a whole heap of problems with that user. When logged on as xolstis my sound is having trouble. I can't seem to run kppp tho I have no trouble running kppp as user knoppix or root. Was hoping to just delete user xolstis (I don't know how to remove a user either) and rename user-knoppix to user-xolstis. Can I do that?

Thanks

Stephen
06-29-2003, 06:29 AM
Okies have done that, now during bootup I can see that it says no uid and gid. Are u saying that if I wanted to mount the two hdd partitions so that user.... say user xolstis could login I would put

#/dev/hda5 /mnt/hda5 vfat auto, users,exec,ro,uid=xolstis,gid=xolstis 0 0

You have a users option already in the line so any user will be able to access there is no need for the uid & gid.


while editing the fstab I sometimes get errors in the /etc/fstab msg am wondering if the what I am doing is right, the spaces commas etc.

Knoppix does a poor job of putting the fstab in a proper format it should be:


filesystem mountpoint type options dump pass
/dev/hda1 /mnt/hda1 ext3 auto,user,rw,exec 0 0


Also was wondering how do I rename a user. I created a new user called xolstis but having a whole heap of problems with that user. When logged on as xolstis my sound is having trouble. I can't seem to run kppp tho I have no trouble running kppp as user knoppix or root. Was hoping to just delete user xolstis (I don't know how to remove a user either) and rename user-knoppix to user-xolstis. Can I do that?

Thanks

You would have to hack the install script to change the user knoppix to yours how-to is here (http://www.knoppix.net/docs/index.php/HdInstallUserChangeHowTo) you have to be real careful with it or you will screw up the install.

The problem are most likely with the groups you belong too login as user knoppix and open a console and groups or id will tell you which groups the knoppix user belongs too copy them down. Now su and enter your root password then enter and adduser xolstis audio to add your user to the group audio repeat until you belong to the same groups as the user knoppix. You would normally have to logout and back in for the changes to take effect but you would be user knoppix while you are doing this so you will have to logout anyway to login in to your user account.

If it comes to the point where you feel you would like to delete the user and start clean then as root from a console login (choose from the menu option on the login screen) deluser --remove-home username which will remove the user and the home directory of the user.