File: clueless.html

package info (click to toggle)
lg-issue18 4-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,928 kB
  • ctags: 148
  • sloc: makefile: 36; sh: 4
file content (209 lines) | stat: -rw-r--r-- 9,444 bytes parent folder | download | duplicates (2)
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
<!--startcut ==========================================================-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<title>Clueless at the Prompt Issue 18</title>
</HEAD>
<body>
<!--endcut ============================================================-->

<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>

<P> <HR> <P> 
<!--===================================================================-->
<center><H2>Clueless at the Prompt</H2> 
<H4>By Mike List,
<a href="mailto:troll@net-link.net">troll@net-link.net</a></H4>
</center>
<P> <HR> <P> 
<center><IMG ALIGN=MIDDLE SRC = "../gx/list/gnub.jpg" ></center><p>

<h4>Welcome to installment 5 of Clueless at the Prompt:
a new column for new users.</h4>
<hr>
<p><h4> Getting Serious</h4>
<p>If you've been experimenting with linux, reading all the docs you can
get your hands on, downloading software to try, and generally cleaning up
after the inevitable ill advised rm as root, you are probably starting to
get enough confidence in linux to use it to do more than browse the
internet. After all, why use Gates when you can jump the fences?
This month I'm going to discuss some strategies for damage control, and
how you can safely upgrade without losing valuable files and
configurations, as well as some more general scouting around the
filesystem.
<hr>                                    
<p><h4>Partitions as Safety Devices</h4><p>
If you have your entire linux installation on one partition, or partition,
you could be putting your files and accmulated data in jeopardy as well as
making the business of upgrading more difficult.
<p>
I understand that some distributions, notably Debian, are capable of
upgrading any part of the system's component software without a full
install, but I'm running Slackware, and it's generally recommended that
when certain key system components are upgraded, a full reinstall is the
safest way to avoid conflicts between old and new parts. What to do when
the time comes can be much simpler if you have installed at least your
/home direcory on a separate partition.
<p>
When you do a fresh install you are asked to describe mount points for
your partitions. You are also asked if you want to format those
partitions. If your /home directory doesn't contain much in the way of
system files you can opt to skip formatting it, thereby reducing the
chance that you'll have to use your backup to recover lost files in those
directories. No, I'm not suggesting tht you don't have to backup your
/home or other personal files, since there is no reliable undelete for
linux that I'm aware of at this time. However, if you are just
experimenting with linux and using a separate OS to do your important
work and it's located on another disk, you may not feel to compelled to
backup much in the way of linux files. Sooner or later though, if you are
committed(or ought to be :) ) enough to linux to drop the other system,
you WILL want to rethink that omission.   
<hr><h4>Formatting Floppies</h4><p>
When you format a floppy disk in MSDOS you do several operations in one
fell swoop. You erase files, line up the tracks, sectors, etc, and install
a MSDOS compatible filesystem. Another thing to recognize is that MS
mounts the floppy drive as a device, while in linux the device is mounted
as a part of the filesystem, to a specific directory.
 <p>
There is a suite of utilities called mtools that can be used to create DOS
formatted floppies, as well as some other MS specific operations, but I
haven't had a lot of fun with it. I use the standard utilities instead
Here is how I format a floppy disk:
<pre>
     fdformat /dev/fd0xxx
</pre><p>
where xxx is the full device name. My floppy drive is /dev/fd0u1440
but your mileage may vary. Try ls'ing your /dev directory to see.
I installed from floppies, so I'm not real sure about CDROM installation  
but I took note of the drive specified to install the system. When the
drive finishes formatting, you can type:
<pre>
     mkfs -t msdos /dev/fd0xxxx
</pre><p>
once again if necessary adding any specifiers.
Your disk should be formatted.</p>
<hr>
<h4>Writing to your Floppy Disk</h4><p>
You are probably sitting there with a newly msdos formatted floppy disk
and wondering how to write to it. If you use mtools, you are on your own,
but don't feel bad you will save some steps, ie. mount and umount the
floppy drive before and after writing to the drive, but it seems that I
always fail to remember some option when I try to use mtools, so I don't
use them. I type :
<pre>
     mount -t msdos /dev/fd0xxxx /mnt
</pre><p>
you can specify another mount point besides /mnt if you would like,
perhaps a different mount point for each filesystem type that you might
want to use, ext2, or minix for example, but if you or people that you
work with use MS the msdos format might be the best, at least for now.
<p>
You can put an entry in your /etc/fstab that specifies the mount point for
your floppy drive, with a line that looks something like:
<pre>
     /dev/fd0         /mnt      msdos       rw,user,noauto  0   0 
</pre><p>
This particular line will keep the floppy drive from mounting on bootup
(noauto), and allow users to mount the drive. You should take the time to
alert your users that they MUST mount and umount /dev/fd0 each time they
change a disk, otherwise they will not get a correct ls when they try to
read from the mount point.
Assuming that this line is added to the /etc/fstab file the correct
command for mounting the drive is:
<pre>
     mount /dev/fd0
</pre> <p>
which will automatically choose /mnt as the mount point.To read from the
drive, the present working directory must be changed by:
<pre>
     cd /mnt
</pre><p>
after which the contents of the disk can be read or written to> 
Linux is capable of reading files from several filesystem types, so it's a
pretty good first choice, since you can share files with DOS users.
<p>
Anyway, assuming you didn't get any error messages, you are ready to copy
a file to the disk using the: 
<pre>
     cp anyfile.type /mnt
</pre><p>
assuming tha /mnt is the mount point that you specified in the mount
command, you should have  copied the file to your floppy disk. Try:
<pre>
     ls /mnt
</pre><p>
you should see the file you just cp'ed. if not, you should retry the mount
command, but if you didn't get any error messages when you tried to mount
the drive, you should be OK. To verify that you did write to the floppy
instead of the /mnt directory, (there is a difference, if no drive is
mounted it's just a directory) you can:
<pre>
     umount /dev/fd0xxxx
</pre><p>
and then try:
<pre>
     ls /mnt
</pre><p>
upon which you should get a shell prompt. If you get the file name that
you tried to copy to floppy, merely rm it and try the whole routine again.
If you find this confusing, read up on mtools by:
<pre>
    info mtools
</pre><p>
You may like what you see, give them a try. As I said I haven't had much
luck with them, but basically the mformat command should do the
abovementioned format tasks in one pass. Mcopy should likewise copy the
named file to the floppy without the need to separately mount the drive.
<hr>
<h4> Other Filesystems</h4><p>
There are several filesystems, as mentioned above that can be read by 
linux. Minix, ext2, ext, xiaf, vfat, msdos(I'm still a little bit foggy
on the difference between these two).Still others can be read with the use
of applications, amiga for instance. That's why it makes sense to split up
what is a single step process in DOS.
<hr>
<h4>Humbly acknowledging...</h4><p>
I got a lot of mail regarding the locate command, which I'm woefully
guilty of spreading misinformation about. The real poop is that locate is
a byproduct of a  command, updatedb, which can be run at any time. It is
run as default in the wee hours of the morning from /usr/bin/crontab,
which is where I got the idea to leave the computer on overnight.
<hr>
 Next Time- Let me know what you would like to see in here and I'll
try to
oblige just e-mail<a
href="mailto:troll@net-link.net">troll@net-link.net
</a> me and ask, otherwise I'll just write about what gave me trouble
and
how I got past it.</h4></p>
<p> TTYL, Mike List </p>

<!--===================================================================-->
<P> <hr> <P> 
<center><H4>Previous "Clueless at the Prompt" Columns</H4></center>
<P>
<A HREF="../issue14/clueless.html">Clueless at the Prompt #1 - February 1997</A><br>
<A HREF="../issue15/clueless.html">Clueless at the Prompt #2 - March 1997</A><br>
<A HREF="../issue16/clueless.html">Clueless at the Prompt #3 - April 1997</A><br>
<A HREF="../issue17/clueless.html">Clueless at the Prompt #4 - May 1997</A>
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, Mike List<BR> 
Published in Issue 18 of the Linux Gazette, June 1997</H5></center>

<!--===================================================================-->
<P> <hr> <P> 
<A HREF="./lg_toc18.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif" 
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../lg_frontpage.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./tmp.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./disk_hog.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P> 
<!--startcut ==========================================================-->
</BODY>
</HTML>
<!--endcut ============================================================-->