Tilted Forum Project Discussion Community  

Go Back   Tilted Forum Project Discussion Community > Interests > Tilted Technology


 
 
LinkBack Thread Tools
Old 11-20-2004, 03:45 PM   #1 (permalink)
Sky Piercer
 
CSflim's Avatar
 
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.
__________________
CSflim is offline  
Old 11-20-2004, 06:24 PM   #2 (permalink)
In Your Dreams
 
Latch's Avatar
 
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.
Latch is offline  
Old 11-20-2004, 07:30 PM   #3 (permalink)
Psycho
 
jonjon42's Avatar
 
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....
jonjon42 is offline  
Old 11-20-2004, 07:34 PM   #4 (permalink)
In Your Dreams
 
Latch's Avatar
 
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.
Latch is offline  
Old 11-20-2004, 09:28 PM   #5 (permalink)
Professional Loafer
 
bendsley's Avatar
 
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..
bendsley is offline  
Old 11-21-2004, 08:02 AM   #6 (permalink)
Psycho
 
jonjon42's Avatar
 
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....
jonjon42 is offline  
Old 11-21-2004, 12:30 PM   #7 (permalink)
Psycho
 
connyosis's Avatar
 
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.
connyosis is offline  
Old 11-21-2004, 12:39 PM   #8 (permalink)
Professional Loafer
 
bendsley's Avatar
 
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."
bendsley is offline  
Old 11-21-2004, 02:23 PM   #9 (permalink)
In Your Dreams
 
Latch's Avatar
 
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.
Latch is offline  
 

Tags
linux, questions

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 02:57 AM.

Tilted Forum Project

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360