How to disable mounting of SATA / IDE drives?

Booting, installing, newbie
Message
Author
marada2
Posts: 64
Joined: Sat 19 Oct 2013, 22:50

How to disable mounting of SATA / IDE drives?

#1 Post by marada2 »

When I boot puppy into ram from the live CD it automatically mounts internal SATA drives on the computer. I was wondering if it was possible to set puppy up so that it never mounts or recognizes internal hard drives? I still want puppy to automatically mount usb flash drives when plugged in, it’s just the mounting / recognizing of internal SATA or IDE drives that I want to disable.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#2 Post by mikeb »

Ok its not supposed to mount drives when running from a live CD.
What might be happening is some pups copy the main sfs to the hard drive for faster startup ... there would be a temporary mount to load in unless there was not enough memory to do so in which case the mount would be permanent. Another reason would be the existence of a save file or partition on the hard drive.
A swap file used to be created but i believe that has not been done for years.
I would check for any files that may have appeared on your drives.

Another though is you mention an automount for flash sticks... have you added anything to do this yet?.

Your last thread was invaded by the confusion squad which did not help

mike

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#3 Post by Karl Godt »

Look for the lines that start clean_desk_icons and pup_event_frontend_d in /root/.xinitrc :

/sbin/clean_desk_icons #v4.02 tidy up drive icons first.
/sbin/pup_event_frontend_d & #v403

and delete these lines or comment them .
«Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal :P

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#4 Post by Karl Godt »

And then delete the

/root/.pup_event

directory .

Then restart X .
«Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal :P

marada2
Posts: 64
Joined: Sat 19 Oct 2013, 22:50

#5 Post by marada2 »

So if I delete:


/root/.pup_event
/sbin/clean_desk_icons #v4.02 tidy up drive icons first.
/sbin/pup_event_frontend_d & #v403


will It still automount usb flash drives? Remember I only want to stop the mounting of intenal SATA / IDE drives.


As for Mikes comment when you say running form a live CD is not supposed to mount internal drives, that's strange because it has always mounted my internal drives. It's quite alarming that this may be writing save files to a location when it does not have my permission. Maybe I should fellow this thread:

http://murga-linux.com/puppy/viewtopic.php?t=51466

to make sure puppy never uses save files - If I do this I you sure it will never mount internal hard dries

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#6 Post by mikeb »

that's strange because it has always mounted my internal drives.
Yes and it appears the cause for this has not been found. As its unexpected behaviour there are only theories on why this is happening and again normally it requires human intervention to save in some way.
It comes into this topic as an unintended save may be why you have a mounted drive(s)....but that's just one possibility.

Does the mounted drive(s) have a yellow or green dot on it?
How much ram do you have...below a threshold there will be a mounted drive...either optical or hard drive (the copied sfs theory)

mike

marada2
Posts: 64
Joined: Sat 19 Oct 2013, 22:50

#7 Post by marada2 »

No there are no dots on there. My memory is 8GB running a core2quad processor.

Jasper

#8 Post by Jasper »

marada2, you wrote
So if I delete:
I ask:

exactly how are you going to implement any deletions so they are persistent?

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#9 Post by mikeb »

If there are no dots then nothing is mounted.
Drives are briefly mounted at startup to scan for system files.... there are boot parameters aimed at directing searches to specific locations if this is a problem... perhaps you refer to the slowness of a full scan.

mike

marada2
Posts: 64
Joined: Sat 19 Oct 2013, 22:50

#10 Post by marada2 »

Jasper wrote:marada2, you wrote
So if I delete:
I ask:

exactly how are you going to implement any deletions so they are persistent?
Well if I delete things I thought I could always remaster puppy to a new CD?

Sorry there are some small dots on the drives. They are definitely mounted as I can click on the mounts and browse all the internal files on my windows hard drive. Any idea how I can stop puppy mounting these drives?

Jasper

#11 Post by Jasper »

Well if I delete things I thought I could always remaster puppy to a new CD?
...but if you then burn a new CD from that iso - all your settings and changes will on it (so you could have just saved to a multi-session CD),

marada2
Posts: 64
Joined: Sat 19 Oct 2013, 22:50

#12 Post by marada2 »

I don't want a multisession CD. I just want build a puppy exactly the way I want it and then burn it to a CD. I don't plan on tweaking anything once I get things the way I want them. I am definitely not interested in multisession. The CD will purely be used as a security CD for internet banking, TOR and various encryption purposes. I definately don't want multisession or anything saved anywhere. The whole reason I am attracted to a live distro like puppy is the fact that I can boot it into ram and never have anything saved. This is an excellent security feature.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#13 Post by mikeb »

They are definitely mounted as I can click on the mounts and browse all the internal files on my windows hard drive.
Ok need to clarify that one..... what colour are the dots?

Are the dots present before clicking?... mounting only happens when you actually click on the icon.... the dot signifies mounted in other words.
If preventing drive access is your aim then karls suggestion might be suitable or alternatively I believe the icons can be disabled in their config.

Mike

marada2
Posts: 64
Joined: Sat 19 Oct 2013, 22:50

#14 Post by marada2 »

Well I am a little confused about what you mean by dots. There are 2 tiny dots on the icon. I have uploaded a screenshot so you can see what I mean.
Attachments
sdtm.png
(28.4 KiB) Downloaded 316 times

Jasper

#15 Post by Jasper »

Tick.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#16 Post by mikeb »

Ok seems like the graphics vary so in this case its crosses and that BEOS look....the dots were sweet and gave a feeling of mountedness. :D

Your first image shows no drives mounted...the icons are only showing drives that exist. Hopefully that clarifies what is happening.
If you wanted to confirm then run the 'mount' command in a terminal.

In other distros the default is commonly to mount all drives which is not the case with puppy.

mike

marada2
Posts: 64
Joined: Sat 19 Oct 2013, 22:50

#17 Post by marada2 »

If I understand this correctly you are saying that unless I click on the drives they are not mounted and puppy only shows what exists. If this is the case how do I stop puppy recognizing these drives at all? I want puppy to be blind to all internal drives and not know they exist. If I make a puppy boot CD for another person in my house I really don't want them being able to browse my personal files on the internal hard drive. So how do I make puppy blind to these internal drives?

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#18 Post by mikeb »

If I understand this correctly you are saying that unless I click on the drives they are not mounted and puppy only shows what exists
.thats the one.


Preventing the kernel seeing drives that are present is not feasible but hiding access is.

You could hide the icons the way karl mentioned or there is the eventmanager which gives the option to disable them. That would probably be enough to prevent casual browsing. The only problem is that you still want access to usb drives which gets a bit tricky especially since hard drives and usb both use the same names.. There is pmount in the menu.... or some form of auto mounter (which for puppy might want to use the standard icons.)... I would search here for automounters and see whats available.

Beyond that it would be a case of script hacking to selectively block certain drives...or play with udev rules.

mike

Jasper

#19 Post by Jasper »

Encryption.

"Tick again" is a double joke so confusing that only mikeb may understand it.

marada2
Posts: 64
Joined: Sat 19 Oct 2013, 22:50

#20 Post by marada2 »

I followed the instructions provided by mike and this appears to prevent the drives from mounting. The only problem is when the user wants to plug in a usb flash drive, the internal drives then become automatically mounted again.

Heres another approach I was thinking of. Say if the internal drives are windows drives and formatted as NTFS. What about loading an old version of puppy that is unable to mount NTFS drives. I suppose the problem then is I would sacrifice some of the latest advances made in puppy. So I really don't know what to do?

Post Reply