I'm losing files from my hd? What's going on?

Booting, installing, newbie
Post Reply
Message
Author
NinerSevenTango
Posts: 186
Joined: Sun 17 Jun 2007, 18:25

I'm losing files from my hd? What's going on?

#1 Post by NinerSevenTango »

I'm missing something very basic here, and I've read everything I can find. But maybe my eyes were blurring over and I missed it.

I guess you have to mount drives to read or write to them. And I guess you have to unmount them when you are done (I get that from reading messages on this board, couldn't find it in the manual).

And I think you go by the color of the icon in the Drive Mounter to see whether it's mounted or not. (Is that documented somewhere?)

Now, say I want to copy or read a file on another HD in my system. It doesn't show up in any of the file management tools. I can find something that looks like it in /mnt. I've been able to play some MP3's I have on another disk that way.

I downloaded a file, navigated to /mnt/hdb1, created a directory, saved the file to it, extracted the file, ran the program. Then I went to download another file, and danged if the directory and all the files didn't just disappear. So what, did I put them in RAM or something?

I feel pretty stupid asking this: how the heck do I navigate to another drive or partition? And where did my files go, or why?

Thanks for the infinite patience it must take to answer basic questions like this.

--97T--

Edit: Note that there is no "Mount" button in the Drive Mounter as shown in the video or described in the manuals I could find.

Edit2: Interestingly, my hard drive light is lit continously. I never noticed that before. I'm off to check it out.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#2 Post by sunburnt »

Hi NinerSevenTango; On my PC the drive light is on in DOS but not Puppy.

Drives & files are mounted on "empty directories" usually in /mnt
They don't really have to be unmounted.
A green dot on the mount point directory shows it's mounted.

If you want to, you can setup it up so they're all mounted at bootup.
If your interested in doing that... Let me know.
Last edited by sunburnt on Mon 18 Jun 2007, 07:26, edited 1 time in total.

Bruce B

#3 Post by Bruce B »

Here is a primer.

/mnt is a directory and that's all it is

/mnt/hdb1 is a directory and that's all it is

/ would be the top level of Linux' file structure

/mnt is a directory that is by convention used as a parent directory for child directories used to mount filesystems

under /mnt we have sub-directories such as hdb1 and by convention we would use /mnt/hdb1 to mount the filesystem corresponding with hdb1 which would be the first partition of the first slave drive.


we could also mount the filesystem on the CD-ROM disc on /mnt/hdb1 but that wouldn't be very intuitive

In order to keep a sense of order we give the subdirectories under /mnt meaningful names.

Examples:

/mnt/floppy
/mnt/cdrom
/mnt/hda2


These names gives us clues as to what were we should mount our filesystems.

The names don't mean anything to Linux. Meaning to say we can mount just about any filesystem by any name we want and just about anywhere we want.

------------------------

Puzzle question:

Suppose I mounted /dev/hda3 on the mount point /mnt/hda2. Then I copied files to it.

Where are the files in actuality?

------------------------

Suppose I've been away from my computer for a couple hours and I forgot what is even mounted.

I open the command window RXVT and type mount

This will show what is mounted and where. You will notice that things are mounted in places other than /mnt. The reason why is Puppy does its own mounting. Leave this stuff alone.

A good computing practice would be to mount the filesystems we mount under /mnt - this way at a glance we can tell what filesystems we have mounted. Because we always do our mounting there.

Do you want to know what filesystems are available in terms of hard disk partitions? Type probepart and we get a partition display.

Suppose probepart says we have a FAT32 partition at /dev/hdb1

We can see if it is mounted by typing mount and if it is mounted we can see where its mounted also.

Suppose its not mounted and we want to mount it.

Make a mount point and give it a meaningful name.

Convention would have us make this directory /mnt/hdb1

To mount it we would type this command.

mount -t vfat /dev/hdb1 /mnt/hdb1

We could also take a shortcut and see if mount can figure out the filesystem type:

mount /dev/hdb1 /mnt/hdb1


If the command prompt returns with no errors we have mounted the first partition of the first slave drive at /mnt/hdb1

We can now work with the files on that partition with our filemanager and/or the command prompt

When we are done working with that partition we can unmount it by one of these commands.

umount /dev/hdb1

umount /mnt/hdb1

Note: umount NOT unmount

Bruce B

#4 Post by Bruce B »

I hate to be the guy to do this, please accept it graciously.
/hda1 = first HD, first partition (C: usually), /hdd1 = second HD, first part.
/hda3 = first HD, sec. partition (ext3), /hda5 = first HD, sec. part. (fat32).
YES... IT'S HORRIBLY CONFUSING. I agree with you completely!
DOS & Win. just mount everything they find (makes sense doesn't it?).
To keep it simple, let's consider the basic computer with two IDE controllers. We will call them IDE 1 and IDE 2

Each IDE controller accepts one cable which accepts two IDE devices.

IDE 1 Master = hda
IDE 1 Slave = hdb
IDE 2 Master = hdc
IDE 2 Slave = hdd

In the lettering scheme, it makes no difference if its a CD or DVD Drive or Hard Drive

A typical factory built computer might have one hard drive and one cdrom drive set up like this

IDE 1 Master = hard disk hda
IDE 1 Slave = cdrom drive hdb

maybe

IDE 1 Single = hard disk hda
IDE 2 Single = cdrom drive hdc

Note that when it comes to Linux lettering scheme for the drives, it depends on which IDE controller and jumper settings. If the jumper settings are 'cable select' it will depend on position on the ribbon cable and which IDE controller.

The numbering schemes follow the lettering scheme and identify partitions.

hdb1 is first primary partition of first slave
hda5 is first logical partition of first master or single

----------

My brief opinion on Windows vs Linux automounting.

Windows mounts everything it wants, which is probably everything visible to it and does it seamlessly and out of your control.

Linux mounts what it must - the rest is in your full control and will happily mount everything you want seamlessly if you choose.

John Doe
Posts: 1681
Joined: Mon 01 Aug 2005, 04:46
Location: Michigan, US

#5 Post by John Doe »

Great post Bruce. Thanks from me 2 :-)

NinerSevenTango
Posts: 186
Joined: Sun 17 Jun 2007, 18:25

#6 Post by NinerSevenTango »

Thank you all for your kind responses.

That is what I thought the structure was.

Now, I wonder how the heck I wiped the directory I created and the files that were in it?

Is it possible that if I were fooling around with the Drive Mounter (not realizing until later that the color of the icon indicates whether the drive is mounted), I could have unmounted it before the actual data were written to the disk? I remember reading in here about disk writes being done on a 30 second schedule to minimize write cycles on thumb drives. But I think I played that game for more than 30 seconds.

Sunburnt, thank you for your offer, yes, I would like to auto-mount one partition at boot.

Thanks again, everyone,

--97T--

User avatar
steevieb
Posts: 289
Joined: Sun 31 Dec 2006, 00:11
Location: Poole, Dorset. UK

#7 Post by steevieb »

If you can remember the file name try a file search with Pfind. Your files are probably still there.

Menu>Filesystem>Pfind file finder

NinerSevenTango
Posts: 186
Joined: Sun 17 Jun 2007, 18:25

Update: the files are still there

#8 Post by NinerSevenTango »

Well, I'm naturally cornfused -- again.

Today, I see that the files are right where I put them. When I was looking for them before, musta been the partition wasn't mounted. Or something.

--97T--

nestor
Posts: 1
Joined: Sat 30 Jun 2007, 18:55

completely befuddled by the baroque linux file system

#9 Post by nestor »

Is there a properly documented way of making this thing more user friendly, and getting it to mount all partitions and the cdrom and dvd drives on bootup? I started playing with this system two days ago. I downloaded the iso (I alredy knew what an iso was, how it was to be used etc so I was able to skip all the meticulously detailed instructions in the newbie section, and I created a live cd using nero).

I have a k8mmv motherboard (msi) and via chipset, 256MB of shared memory, and a 250 GB hard drive, 132GB divided into four partitions (fat 32) for win98se, and the remainder unallocated (to be occupied in the future by windows xp, installed on single 120GB NTFS partition).

My problem with puppy is that it only mounts the partition that its files are saved on, by default and I am forced to manually mount everything else, which is a pain in the ass, to say the least! Is there any way at all of making the system more, do I dare say, "Windows like", and have it find and mount everything in sight on boot up? I have read your postings on this topic, it was suggested that there is a way to do this, but it was never elaborated on. I have only seen instructions for mounting devices from the command line, using very arcane scripts (excuse me but can't you simply invoke pmount and click on what you want to mount?). The problem is that puppy promptly forgets which devices were mounted the moment it shuts down and you have to invoke pmount and start all over again at the next boot!

Is there any reason for a modern version of linux to retain "features" that existed in mainframe versions of unix in the 1970s ? Do present day users of pcs really want to be bothered by the hassle of manual mounting and unmounting? Please tell me that there is a way of making this thing behave more intuitively, and to get its functionality to coform with more modern operating systems!

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#10 Post by Béèm »

I felt the same way as you in the beginning coming from Windows.
Now I find mount/unmount a safe way to protect your data.
Mount it when needed and unmount it when done.
If you go back to the 70's, that was the way thing worked on mainframes.
You had those operators who's job it was to mount those tape volumes on those hudge 'tape recorders' who were man high.

Now I am happing to mount/unmount when needed. I use MUT.

But if you want things mounted from boot you can create a script with those mount commands from the command line. This script can be executed at boot time.

I don't exactly know how to do it and it also depends on your real configuration.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#11 Post by GuestToo »

the first Linux distro i got to work with my hardware was Mandrake , about version 8.1

i learned very quickly to hate automount and learned to disable it just as quickly

i also learned to avoid searching for files using Konqueror (it had a horrible memory leak and would crash my system almost every time ... i had no problems using "find" and "locate" from the command line)

i mount hda11 automatically when Puppy boots ... i have something like this in /etc/rc.d/rc.local:

e2fsck -p /dev/hda11
mount -t ext3 -o data=journal,commit=5 /dev/hda11 /mnt/hda11

you should create a folder hda11 in /mnt as the mount point

this would work too:
e2fsck -p /dev/hda11
mount -t ext3 /dev/hda11 /mnt/hda11

you don't really need the file system check (fsck) but it is a good thing to do

rox will mount and unmount drives automatically, if you configure them in /etc/fstab (it would be a good idea to back up fstab in case Puppy over writes it when upgrading to a newer version)

for example, this will allow rox to mount and unmount the cd drive automatically:

/dev/hdc /mnt/hdc iso9660 ro

(assuming your cd drive is /dev/hdc and you have a folder in /mnt called hdc)

i think you can do this in Puppy 216, because mount is the real mount program and not busybox:

/dev/hdc /mnt/hdc udf,iso9660 ro

which should automatically mount udf packet-writing cds too

with a line in fstab, you can just click /mnt/hdc in a rox window, and rox will automatically mount the cd disc, and will automatically unmount it when you close the window

you can also automatically mount and unmount your partitions, if you put the appropriate lines in fstab ... something like this:

/dev/hda5 /mnt/hda5 vfat noauto,noexec
/dev/hda6 /mnt/hda6 vfat noauto,noexec
#
/dev/hda9 /mnt/hda9 reiserfs defaults,noauto
/dev/hda13 /mnt/hda15 ext3 defaults,noauto

i think if you change noauto to auto, Puppy should automatically mount those partitions when booting

Post Reply