11-20-2004, 03:45 PM | #1 (permalink) |
Sky Piercer
Location: Ireland
|
New to Linux, and I have a few questions...
I am new to Linux. I found the New To Linux? Want To Try It? Read here! thread to be very helpful. Thanks a bunch to all who contributed to it; your efforts are appreciated!
I installed Fedora Core 1 a few weeks ago, and am so far very impressed but I have a few questions. 1. How do I make a boot disk? I had to re-install the OS, and the second time round I didn't make a boot disk, and of course my original one does not work now. After a search on google I found I was to use the mkbootdisk command, but I got a "command not found" error. (Strangely there is still a man entry for this command). Do I have to install a package to get this utility? If I can't do this, how can I make a boot disk? 2. How can I grant write permission on my windows partition? My system is dual booted with windows. I have one of my windows partitions (FAT32) mounted under linux as /mnt/win and I can read files from it perfectly. However, I cannot write to this partition without root privledges, but would like to be able to access it as a regular user, but chmod fails: [root@localhost win]# chmod 777 newfile.txt chmod: changing permissions of `newfile.txt' (requested: 0777, actual: 0755): Operation not permitted [root@localhost win]# 3. Can I have Mozilla use the same profile under Windows and Linux? I would like to have the same bookmarks, history, and settings enabled when I run Mozilla under either OS. (Obviously I would need to solve the permissions problem above) What I would like to do is to move my Windows Mozilla profile onto the shared partition (its currently on a different partition), and then set up Mozilla under Linux to use this profile. Can this be done? And more importantly should this be done? Is it a bad idea? That's all my questions for now. Thanks.
__________________
|
11-20-2004, 06:24 PM | #2 (permalink) |
In Your Dreams
Location: City of Lights
|
Welcome.. glad you're deciding to try...
Just a quick note.. FC3 was recently released (I haven't updated the New To Linux post yet). You may want to give that one a shot, as it has newer versions of most things, and may fix some bugs before you encounter them. 1. You may have to be root to run mkbootdisk... I don't have the program installed on my system so I can't be sure. Some programs (for root-only) are stored in /sbin and /usr/sbin, which is (by default) not included in your path as a normal user. As root you'd have a different path, and those dirs may have mkbootdisk. 2. It's been a while since I've had a fat32 partition on my system, but I think I ended up mounting it with permissions for the user account I'd mainly access it with. i.e., my fstab line looked like: /dev/hdb1 /mnt/win user,uid=1000,gid=100,rw 0 0 the "user" bit means that a user can mount and unmount that share (although likely not necessary for you, so you can just leave it out). The uid and gid are the user id and group id of who I want to own that mount. Type 'id' in a terminal window as the user you want to access the stuff as. They will list the uid and gid you want to use. The "rw" is probably already a default, but it just says "open for read-write" access. 3. Interesting idea. I haven't tried it myself. Mozilla seems to designate it's own unique directories for each instance (look in your ~/.mozilla/default, i.e. /home/csfilm/.mozilla/default). They are usually a random set of numbers and letters in the 8.3 format. I am not sure if you can force mozilla to read a specific one of those directories. Someone may have a better idea. Besides that, I'm not 100% sure mozilla in linux writes it's data the exact same way mozilla in windows does. I can't remember where user plugins are installed, but if they're installed into that directory, it may/will cause problems between windows and linux. I'm floundering here, maybe someone else can say better... Good luck. |
11-20-2004, 07:30 PM | #3 (permalink) |
Psycho
Location: inside my own mind
|
1. How do I make a boot disk?
If you are using fedora you should able to do that from the installation cds..nice gui if you can't find that I will lead you here http://www.tldp.org/HOWTO/Bootdisk-HOWTO/ 2. How can I grant write permission on my windows partition? open up /etc/fstab with your favorite text editor and add the following to the line where you see /mnt/win (should be in second collumn) in the 4th collumn "user,umask=000" 3. Can I have Mozilla use the same profile under Windows and Linux? I don't believe so. Mozilla in linux by default keeps profiles in /home/user/.mozilla I think it can be changed but, There also may be some differences between the data storage in linux and windows.
__________________
A damn dirty hippie without the dirty part.... |
11-20-2004, 07:34 PM | #4 (permalink) |
In Your Dreams
Location: City of Lights
|
As for #2, limitations in FAT32 prevent you from setting permissions to much else besides 755, I believe. I don't think a umask of 000 will solve his problem... although I'm not positive. Someone else may be able to test it.
|
11-20-2004, 09:28 PM | #5 (permalink) |
Professional Loafer
Location: texas
|
Mounting a Windows Partition in Linux
There are two different generally-used Windows FS types. The first is widely used and old: FAT32 (which Linux recognizes and calls it vfat). The second is much newer (and gained wide popularity and use with the release of Windows XP), known as NTFS. Linux doesn't read both these file systems natively. In fact, chances are you might need to recompile your kernel with support for VFAT (or FAT32) and NTFS. However, take note: NTFS write support is still experimental. At the moment, a user can only modify a file without changing a file size. Further, corruptions and massive data loss have been reported in the past when users have tried to write to their NTFS partitions. Although the kernel used to recognize NTFS reading as experimental in the past, it is now fully supported without an experimental flag. Writing is, though, still considered experimental as of the 2.6.3 kernel. Anyways, on with the HowTo. In your kernel, include support for VFAT and NTFS by compiling them in; hit "Y" when the file types are selected. Personally, I wouldn't recommend adding them in as modules, although I have not tested to see if that would work. What you specificall need to enable is the following: * DOS FAT fs support * MSDOS fs support * VFAT (Windows-95) fs support * NTFS file system support (read only) In this howto, I will not discuss how to use write-support in NTFS. I haven't risked it, and I wouldn't recommend it. Compile your kernel, smack that baby into your boot partition, and reboot. With that said, we can now mount a Windows partition in Linux. Please note that there are many different variations on what I am going to explain below. To mount a partition in Linux using one command (and assuming that the mount point is not in your fstab file), use the following command with the appropriate syntax: QUOTE root / # mount -t [filetype] /dev/[location] /mnt/[mountpoint] Please note that to mount a device, you need to specify a valid mountpoint -- i.e., if the directory doesn't exist, create it. Good examples of names would be, "/mnt/xp" or "/mnt/vfat" or even "/mnt/ntfs". So, a brief example of loading up a vfat partition that is located normally in Windows under "D:\" would be the following: QUOTE root / # mount -t vfat /dev/hda2 /mnt/windows I used the mountpoint /mnt/windows, and I assumed that the partition was located at /dev/hda2 (since it was called D:\ in Windows). Now, instead of typing a long command like that every time you want to fire up your VFAT/NTFS partition, it's probably easier to write a line in your /etc/fstab. Please note you have to be root to do this, and that you want to be careful with whatever you put in your fstab. (you can't send your system up in flames for writing something incorrectly in your fstab, but I am not going to be held responsible for anything that goes wrong). For your fstab, your Linux system expects you to add lines following this syntax: QUOTE device location� � � device mountpoint� � � file type� � � options� � � dump/fsck options (integrity test) Here's a good way to take the same command listed above and write it into the fstab so that the Windows partition located at /dev/hda2 is loaded automatically: QUOTE /dev/hda2� � � /mnt/windows� � � vfat� � � defaults,auto� � � 0 0 The defaults option passes the default parameters to mount. "auto" means that the partition is mounted automatically at boot. However, the problem with this chunk of the fstab file is that only root will be able to enter and write to your vfat partition. To change this, we are going to use a variety of commands. Below is an example of a setup that would allow any user to access the drive and write to it: QUOTE /dev/hda2� � � /mnt/windows� � � vfat� � � defaults,umask=000� � � 0 0 umask can be compared to chmod. The three numbers represent access levels for the given mount. The first number is the number which sets the permissions everybody has on the mount. The second number represents a certain group number, while the third number represents a users' permission on the mount. This table below will give more information about the what numbers would accomplish what in the umask setting: QUOTE Octal Number | Permission 0 --------> Read and write (and execute for directories) 1 --------> Read and write 2 --------> Read (and execute for directories) 3 --------> Read 4 --------> Write (and execute for directories) 5 --------> Write 6 --------> Execute for directories only 7 --------> No permissions So here's a hypothetical situation. You want to allow group 730 to read and execute data located in the mount. Here's what the fstab chunk would look like: QUOTE /dev/hda2� � � /mnt/windows� � � vfat� � � defaults,gid=730,umask=727� � � 0 0 Make sense? One quick note before I continue. Careful with the way you syntax your fstab. mount won't like it if you include spaces between your options arguments. Now I'll finally cover NTFS mounts. Again, I am only going to include read-only NTFS support in this HowTo. I don't want people to eMail me flaming me when they loose gigs and gigs of data on an NTFS drive after they try to write data to the drive. (although realistically this might never happen to you, I've heard of it happening on several occasions; again, I wouldn't take the risk...at least not until the kernel support is deemed non-experimental). Let's say you have an NTFS partition on /dev/hdb3. It has all your fancy movies and mp3 files. What do you do to mount it? Well, you can try the one-lined mount command again, but adding it to the fstab file is much easier. Again, let's assume you have kernel support for NTFS already figured out. Here's what the chunk for the NTFS mount would look like in your /etc/fstab: QUOTE /dev/hdb3� � � /mnt/ntfs� � � ntfs� � � noauto,user,ro,umask=000� � � 0 0 Note the noauto argument. This means the partition will not be mounted automatically. Any user can mount this partition using the following command (because of the umask argument): QUOTE joe ~ $ mount /mnt/ntfs Small note: The umask=000 does indeed mean that any user can read, write and execute. However, the ro syntax takes presidence over the umask argument. Any user will be able to read, mount, and execute files from the mount, but ro will prevent writing to the partition. Take note, an attempt to write to a partition mounted as shown above will not work because mount will reject the request stating the partition is mounted as read-only. The mount command above will look through your fstab, find the entry that has your mountpoint as ntfs, and then execute the appropriate command in order to mount your ntfs partition. We didn't have to do this on the vfat partition because the setting "auto" was present which would mount your vfat partition automatically at boot. Kinda nifty, 'eh? Note also the fstab for your ntfs partition entry has "ro." This means read only. No need to mess with the umask settings. --------------------------------------------------------------------------- As for the Mozillia Firefox using the same profile in Windows and Linux. This isn't possible as far as I know. I looked on Google a bit for answers. The OS' are quite a bit different in the way that they handle file writes and reads. If you notice that Windows systems also use a backslash, whereas linux uses the forwardslash. You can get around this easily enough through linux, but not sure Windows would know what to do. I'm meaning that you would have to set up a profile in Windows first, and then tell Linux where it is. The folder might be: mozilla\ firfox\ profile\ folder/ . Anyway, I'm just getting at the heirarchy is completely different.
__________________
"You hear the one about the fella who died, went to the pearly gates? St. Peter let him in. Sees a guy in a suit making a closing argument. Says, "Who's that?" St. Peter says, "Oh, that's God. Thinks he's Denny Crane." Last edited by bendsley; 11-21-2004 at 11:11 AM.. |
11-21-2004, 08:02 AM | #6 (permalink) |
Psycho
Location: inside my own mind
|
yeah I forgot to mention to get rid of the ro line..
and to say if that partition is ntfs please for your sake leave the ro line in...I still don't trust the write support for ntfs
__________________
A damn dirty hippie without the dirty part.... |
11-21-2004, 12:30 PM | #7 (permalink) |
Psycho
Location: Sweden - Land of the sodomite damned
|
No, NTFS write support is not very stable. I believe it is considered safe to write to already existant files. For instance editing a textfile should be ok. Deleting or creating stuff however is not a good idea. (Note that I have not ever tried to write to an NTFS disk myself, I'm sticking to read only. I'm only repeating what I have heard in several support channels on IRC)
__________________
If atheism is a religion, then not collecting stamps is a hobby. |
11-21-2004, 12:39 PM | #8 (permalink) |
Professional Loafer
Location: texas
|
connyosis: did you read the posts above yours? Writing to NTFS, or actually NOT writing to them was already covered.
__________________
"You hear the one about the fella who died, went to the pearly gates? St. Peter let him in. Sees a guy in a suit making a closing argument. Says, "Who's that?" St. Peter says, "Oh, that's God. Thinks he's Denny Crane." |
11-21-2004, 02:23 PM | #9 (permalink) |
In Your Dreams
Location: City of Lights
|
There are a couple ways to read/write NTFS.. one of them is fairly safe (from what I've heard). It uses the Microsoft NTFS drivers in a layer between you and the hard drive.. meaning all operations done on the disk are dont throught the proper NTFS driver... clever.
|
Tags |
linux, questions |
|
|