need to protect partitions when running puppy

Booting, installing, newbie
Message
Author
jbrush
Posts: 9
Joined: Sat 15 Sep 2007, 19:41

need to protect partitions when running puppy

#1 Post by jbrush »

Hi, my computer is like most new ones today, in that there are small partitions on the only hard drive, which contain the images of the original system for restoring after problems.

I am building a puppy system on a USB stick, and as I am going about business, I realize that I must find a way to avoid ever, accidentally or on purpose, writing to one of those partitions, obviously.

The sweetest part of Puppy that turned me on to it years ago was the simple method of mounting drives, and this latest slacko version does that and provides utilities for it, which means I am using the right distro.

But enough of the praises :-) I must protect those two system partitions or the consequences are obvious.

When I boot puppy, it dutifully mounts those partitions, which I cannot have, so can anyone tell me how to go about doing what I need to do in order to be able to boot my Puppy, but to avoid ever mounting what are sd1 and sda2 so I can enjoy it and not be concerned about screwing up the windows stuff accidentally as I go about learning and using Puppy?

I am very appreciative of these kinds of forums and all the time and effort folks put into helping others out, so I often am guilty of "over-explaining" things in hopes that answers will apply :-)

I just need to make it so those partitions cannot ever be touched by puppy. I hope this can be done, and I thank you all for you time and consideration in advance.

John

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

Re: need to protect partitions when running puppy

#2 Post by rcrsn51 »

jbrush wrote:When I boot puppy, it dutifully mounts those partitions
??? Where are you seeing this? Do the drive icons at the bottom of your desktop have the "mounted" symbol on them? In Slacko, it's a little x in the corner.

jbrush
Posts: 9
Joined: Sat 15 Sep 2007, 19:41

Re: need to protect partitions when running puppy

#3 Post by jbrush »

rcrsn51 wrote:
jbrush wrote:When I boot puppy, it dutifully mounts those partitions
??? Where are you seeing this? Do the drive icons at the bottom of your desktop have the "mounted" symbol on them? In Slacko, it's a little x in the corner.
the partitions appear on the desktop as drive icons, and are mounted, verified using the console and attempting to view them. I use the mount utility (don't ask me the name, its new and I don't want to reboot just to find it) and this utility says they are mounted. This is the utility that lets me mount and unmount with the GUI

Your reply seems to imply that Puppy does not mount all available partitions upon start up, but it does. I actually like that 'feature' I just want to tell puppy to "stay off of sba1 and sba2 all the time or else I might accidentally destroy the image files located there that are irreplaceable. That would be bad :-)
Thanks,
John

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

Re: need to protect partitions when running puppy

#4 Post by rcrsn51 »

jbrush wrote:Your reply seems to imply that Puppy does not mount all available partitions upon start up, but it does.
1. Are you using Slacko?

2. Is this a frugal install?

3. When you boot up, do the drive icons have a little x on them?

4. Do they have a yellow box around them?

5. If you type the "mount" command, what do you see?

jbrush
Posts: 9
Joined: Sat 15 Sep 2007, 19:41

Re: need to protect partitions when running puppy

#5 Post by jbrush »

How about I take advantage of your kindness and willingness to help and just stick with the issue in the subject line :-)

I should have just asked that question, since it is really a puppy/linux question not related to versions or installs.

I have to protect two partitions and need to make them boot up as read only. Anything less than them being read only could lead to a disaster when I am poking around and try to learn.

I have no clue if I have a frugal install. I used the install to USB stick application and that is it. I am using slacko,

I do understand how to find out if a partition is mounted, and I also see that I am wrong about puppy mounting partitions when it boots. Sorry. It threw me because if I click on the drive icon, it mounts the partition. Bad thing to do, imho. If I am in an app looking for a file and inadvertently click on a partition, puppy mounts it and that may sound like a dumb thing, but I am shopping around Puppy and learning the basics of file management and I make mistakes.

plus, I know how bad it will be if I do alter one of those partitions so I want to make absolutely certain that they are protected, and read only. I want to enjoy Puppy, but I don't want to live in fear of destroying my windows restore functions.

In case it makes no sense: ---- When I was setting up the usb Flash boot,it went easy and quick until I shut down and it asked about writing the pup file. I know what that means but drive identification is not second nature to me, so when I finally decided where to save the pup file, I really was not happy with the idea of "if I chose wrong" I would never be able to restore my windows7 operating system. I could live without the stress :-) How do I insure that puppy cannot write to those partitions?

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#6 Post by rcrsn51 »

There are two issues here: 1-hiding the drive icons so you don't accidentally mount them and 2-only allowing them to be mounted read-only so they don't get damaged.

1.
Right-click on a drive icon.
Run Desktop Drive Icon Manager.
Uncheck the box "Tick box for drive icons on desktop".
Reboot.

2. With what filesystems are these partitions formatted?

jbrush
Posts: 9
Joined: Sat 15 Sep 2007, 19:41

#7 Post by jbrush »

Any time I am working with files, if I click on a partition, it mounts. Removing them from the desktop does not have any affect on mounting. There are multiple ways to mount a partition, not just the desktop icons.

I don't really care about the ways of mounting, I just need to make it impossible to access the data on those partitions, or R/W to them

2. With what filesystems are these partitions formatted?

I need to make them read only at all times. If they are VFAT, FAT, NTFS, or whatever, why would it matter?

I won't use puppy if it could damage my image files on those partitions.

Have I asked the question wrong? I appreciate your help, but I just want to move on and i can't do it until I am protected from the "newbie-ooops" I have been known to do that :-)

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#8 Post by rcrsn51 »

I asked about filesystems because there is an easy way to write-protect all NTFS filesystems.

I believe that in the big-boy distros you could get what you want by editing the /etc/fstab file. But I have never had any luck changing it - possibly because Puppy uses its own mounting logic.

Hopefully, someone else can give you more helpful advice.

User avatar
dk60902
Posts: 230
Joined: Sun 26 Sep 2010, 22:34
Location: In front of my computer

Re: need to protect partitions when running puppy

#9 Post by dk60902 »

jbrush wrote:Hi, my computer is like most new ones today, in that there are small partitions on the only hard drive, which contain the images of the original system for restoring after problems.

I am building a puppy system on a USB stick, and as I am going about business, I realize that I must find a way to avoid ever, accidentally or on purpose, writing to one of those partitions, obviously.

The sweetest part of Puppy that turned me on to it years ago was the simple method of mounting drives, and this latest slacko version does that and provides utilities for it, which means I am using the right distro.

But enough of the praises :-) I must protect those two system partitions or the consequences are obvious.

When I boot puppy, it dutifully mounts those partitions, which I cannot have, so can anyone tell me how to go about doing what I need to do in order to be able to boot my Puppy, but to avoid ever mounting what are sd1 and sda2 so I can enjoy it and not be concerned about screwing up the windows stuff accidentally as I go about learning and using Puppy?

I am very appreciative of these kinds of forums and all the time and effort folks put into helping others out, so I often am guilty of "over-explaining" things in hopes that answers will apply :-)

I just need to make it so those partitions cannot ever be touched by puppy. I hope this can be done, and I thank you all for you time and consideration in advance.

John
Are you using Windows Vista or 7? If so, you can create recovery discs from these partitions. It took 3 DVD's for Vista, and probably about the same for 7. It is a good idea to make these recovery discs because if the HD ever crashes, you may have difficulty accessing the recovery partitions. If you have a WinXP recovery partition, there may be a way to make recovery discs, but I'm not sure about it.
HP Pavilion Mini Pentium 1.7 GHz Dual Core 12 GB RAM 120 GB SSD Linux Lite 3.8 64-bit w/ Kensington Slimblade Trackball
Bionic8.0 Xenial64 Tahr64 USB frugal install
Samsung Chromebook Plus
LG V20 LG Xpression Plus Huawei Ascend XT2

User avatar
dk60902
Posts: 230
Joined: Sun 26 Sep 2010, 22:34
Location: In front of my computer

Re: need to protect partitions when running puppy

#10 Post by dk60902 »

Sorry, double post
HP Pavilion Mini Pentium 1.7 GHz Dual Core 12 GB RAM 120 GB SSD Linux Lite 3.8 64-bit w/ Kensington Slimblade Trackball
Bionic8.0 Xenial64 Tahr64 USB frugal install
Samsung Chromebook Plus
LG V20 LG Xpression Plus Huawei Ascend XT2

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#11 Post by rcrsn51 »

@jbrush: Is this machine 64bit? If so, consider running Fatdog. You could create an unprivileged user that could not accidentally damage your filesystem.

Peterm321
Posts: 411
Joined: Thu 29 Jan 2009, 14:09
Location: UK

#12 Post by Peterm321 »

jbrush Today, at 18:37 wrote:I am building a puppy system on a USB stick, and as I am going about business, I realize that I must find a way to avoid ever, accidentally or on purpose, writing to one of those partitions, obviously.
If you are booting off a flash drive or running with pfix=ram, then it seems that you do not need the hard drive running at all and therefore if all filesystems on the hard drive are unmounted on it then the hard drive can be powered down with the hdparm command:

Code: Select all

hdparm -Y   /dev/sda 
(I am assuming that SDA is the hard drive you want to disable). Once you have unmounted all filesystems on the hard drive and powered it down it can be kept offline with the command:

Code: Select all

echo  "offline"   >/sys/block/sda/device/state
(NB again assuming that if booting flash, sda is the hard drive name at issue).

http://www.linuxformat.com/forums/viewtopic.php?p=89671

It is a command I use when I connect an external hard drive to my system to copy files from it. When finished I power down and disable it to save strain on the power supply. When powered down and disabled theres no way I can see of anything being accidentally or even carelessly written on it.

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

#13 Post by Karl Godt »

if you run a Puppy that has a static /dev directory and most have, except newer derivates like i read jamesbond posted on barry's blog recently that fatdog has a dynamic /dev directory , then you can try to remove the /dev/sda1 nodes in the /dev directory . That should give something like
mount: /dev/sda99 is not a block device
and mount should fail . But you have to watch if somehow the /dev/sda1 node gets recreated again by a script that runs partprobe or udevd might recreate it .

jbrush
Posts: 9
Joined: Sat 15 Sep 2007, 19:41

Re: need to protect partitions when running puppy

#14 Post by jbrush »

dk60902 wrote:
jbrush wrote:
Are you using Windows Vista or 7? If so, you can create recovery discs from these partitions. It took 3 DVD's for Vista, and probably about the same for 7. It is a good idea to make these recovery discs because if the HD ever crashes, you may have difficulty accessing the recovery partitions. If you have a WinXP recovery partition, there may be a way to make recovery discs, but I'm not sure about it.
The basic flaw in the entire restore disk theory is that there is No way to verify that they will put the system back where they belong. The only way to know for sure is if you blow things up, and have to use them, and if you use them and it corrupts everything else, the user no longer owns Window 7 and has to pay cash for another license of the OS. This is a windows issue, and I know it doesn't belong here -)

What belongs here is the fact that last night puppy destroyed the partition that once held the image file I would need to recover from a problem. That is the reason for this topic, I was concerned and rightly so. I am not a novice computer user, and I pay careful attention to details, but somehow I was not diligent enough and now I no longer have an operating system for my computer, if things go wrong.

I have recovery disks, but its kind of a shame that the only way to find out if they work will be to have a disaster and come up short on the recovery process. :-)

Mostly, it would be a good thing to be have been able to make those partitions read only but as was explained it can't be done. I get that, but I sure won't be booting up Puppy on my machine or anyone else's ....

booting puppy on a flash stick or CD and not having access to the files elswhere on the system makes no sense to me. I figure one would boot that way to maybe fix issues of save files, or to hone their linux skills and see what is new but to boot an OS and not have access to music, text files, emails bookmarks, and sundry items, and then no place to store the pup file after installing programs and setting things up is kind of and odd thing to do, far as I can see.


Thanks for the input. I appreciate those who are willing to help. My disaster is not the fault of any other user.

We probably all know its easy to throw stones :-) but I think if I had a wish list for linux distros it would be a fail safe for the other partitions unless purposely accessed.
John

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

#15 Post by Karl Godt »

Seems that you have some sort of "Mount-all-drives-at -startup" script somewhere in /etc/init.d/ or /root/Startup .

Lighthouse-pup had a special scattered script-environment called "Muppy-quick-mount" or similar that did this . Took me quite some time to figure out how to disable that .

davec60

#16 Post by davec60 »

For the future perhaps you could mark your Windoze 'system files' as 'hidden' by using Disk Management in Windoze and/or simply copied whatever was on them and pasted it into a back-up USB (bearing in mind that you cannot rely on Windows usual back-up methods). I think it's a mistake to reject Puppy now because your system doesn't seem to have been set-up quite right - Puppy is the business!
dave

sfeeley
Posts: 812
Joined: Sun 14 Feb 2010, 16:34

#17 Post by sfeeley »

What belongs here is the fact that last night puppy destroyed the partition that once held the image file I would need to recover from a problem. That is the reason for this topic, I was concerned and rightly so. I am not a novice computer user, and I pay careful attention to details, but somehow I was not diligent enough and now I no longer have an operating system for my computer, if things go wrong.
Can you briefly explain how? it Might help others avoid similar mistakes.

For what its worth, on one of my machines that I'm a bit nervous to tamper with, I have puppy installed and running only on an sdhc card. The harddrive is never mounted unless I decide to mount it. To hurt my HD I would need to do both A) mount it; followed by B) execute some sort of damaging command. The likelihood that I do both is fairly slim.

There are threads regarding how to set up puppy as a terminal--in which users can't alter the system. There may be some usable suggestions there?

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#18 Post by bigpup »

last night puppy destroyed the partition that once held the image file I would need to recover from a problem.
I find this hard to understand how Puppy did this.
Under normal operations of programs, the only thing that Puppy would do to this partition is place some files or directories on the partition. Normal data storage operations. You would have to specifically tell it to use this partition for storage.
If you deleted some Windows recovery files, again you would need to be doing specific controlled steps in a file manager program.
If you know that sda1 or sda2 partition is a Windows system recovery partition. Why are you even accessing them?
I use my specific Windows partition, all the time, to store data on, while using Puppy.
To destroy a partition you would need to run a program that is for manipulating partitions. The only one that comes with Puppy is Gparted.
For it to destroy a partition you would have to use it to delete the partition or reformat.
You do not seem to be that stupid! :shock:

I too would like to know what you think you did and how you did it?
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#19 Post by greengeek »

Peterm321 wrote:If you are booting off a flash drive or running with pfix=ram, then it seems that you do not need the hard drive running at all and therefore if all filesystems on the hard drive are unmounted on it then the hard drive can be powered down with the hdparm command:

Code: Select all

hdparm -Y   /dev/sda 
I just want to tie together several common threads detailing disk spindown:

http://www.murga-linux.com/puppy/viewto ... 606#549606

http://www.murga-linux.com/puppy/viewto ... 641#770641

http://murga-linux.com/puppy/viewtopic. ... 135#652135

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

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#20 Post by Sylvander »

The following "Banksy 3" may be of interest:

See:
HERE where it says:
EDIT : I have made an alternative (experimental) version available here in response to Sylvanders request to save ALL changes rather than a select few. I call it "b3 Impersonator" as it effectively "clones" your setup.

The link leads to THIS POST offering "b3 Impersonator", which includes the following features:

a. Partitions are unseen/un-readable, and cannot be mounted unless you know the special/non-normal method for doing so.
Right now, you won't know the method, so won't be able to see or mount partitions.
I've never used this Puppy to run GParted, so I'd need to investigate that possible method and report back.
------------------------------------------------------------------------------------------------
Yes, GParted displays the partitions, and appears to work normally.
I guess you could remaster with GParted eliminated.
------------------------------------------------------------------------------------------------

b. It normally boots from a bootable optical disk.
This normally cannot be changed by any hacker or infection.
It gives you the same OS each time it is booted.

c. Remastering is designed to be REALLY EASY, and makes a new ISO file, then burns it to an optical disk.
I've not tried using the ISO file to install it to a Flash Drive.

d. During the 1st session only [of b above] you can make ANY personalizations you like, and all of those will be included in the remastered ISO, and can be burned to a new [2nd] optical disk.
Hence, the 1st disk will be a basic/generic "b3 Impersonator", and the 2nd disk will be a personalized "b3 Impersonator".

e. There is no method [other than remastering] of saving any changes to this Puppy.
i.e. No Pupsave file/folder; hence no auto-mounting of any partition holding a Pupsave.

Worth investigating? :D

Post Reply