LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-11-2006, 01:51 PM   #1
pingvina
Member
 
Registered: Nov 2005
Distribution: slack
Posts: 188

Rep: Reputation: 30
Question HDD write protection


how can HDD be protected from installing new OS over it, i mean inserting install CD of new OS and overwriting previous??
 
Old 02-11-2006, 02:06 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Does your BIOS support turning off the ability to boot from anything except the hard disk (and password protecting the settings)? Also, hdparm supports a '-r' flag to make a drive read-only but I don't know if the setting is permanent and it's probably not the effect you want anyway.
 
Old 02-11-2006, 02:22 PM   #3
pingvina
Member
 
Registered: Nov 2005
Distribution: slack
Posts: 188

Original Poster
Rep: Reputation: 30
hmm BIOs can boot only from HDD, i try to protect only the hard disk
if HDD is read only will it boot?
 
Old 02-11-2006, 02:35 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
If your whole hard disk is read-only you will have trouble booting. Are you trying to keep a known configuration or stop users modifying files? There may be another way to do what you need to.
 
Old 02-11-2006, 02:41 PM   #5
pingvina
Member
 
Registered: Nov 2005
Distribution: slack
Posts: 188

Original Poster
Rep: Reputation: 30
when i mess Linux to a state when it is unrecoverable i insert CD and install anew...
is it possible to set up password so that HD is protected from this??
i mean if somebody wants to erase Linux taht way... accidently or intently...
tnx
 
Old 02-11-2006, 02:56 PM   #6
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
It depends on your computer's BIOS - it is possible to password protect your BIOS settings so that they can't be changed without a password, then you need to set up your BIOS so you can't boot with a CD without changing the BIOS and entering a password.

There's only so much you can do though - if someone with a screwdriver has access to your PC they can just walk away with your hard disk.
 
Old 02-11-2006, 03:10 PM   #7
pingvina
Member
 
Registered: Nov 2005
Distribution: slack
Posts: 188

Original Poster
Rep: Reputation: 30
he will steal tux's linux...
what about MBR.. it is the first thing that is read on a HDD?
if it is read only??
 
Old 02-11-2006, 03:13 PM   #8
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
That won't stop someone - if they can boot with a CDROM they can still install an operating system on the hard disk and overwrite the MBR.
 
Old 02-11-2006, 03:35 PM   #9
pingvina
Member
 
Registered: Nov 2005
Distribution: slack
Posts: 188

Original Poster
Rep: Reputation: 30
so any1 can destroy carefully adjusted Linux with one move...
i want to protect myself from that
 
Old 02-11-2006, 03:55 PM   #10
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
password-protecting your Bios from being changed (after you set it to boot _only_ from HDD and not offering any choices like a boot-menu which can be used to boot something other than what you installed and/or password-protecting the boot menu from being changed if you need to have one) is the only way to prevent anyone from just popping in a CD and do _whatever_ they want - locking away your PC when you are not there left aside - anyone who has physical access to your PC can still do pretty much everything...(by taking the harddisk out for example...)

Last edited by jomen; 02-11-2006 at 03:59 PM.
 
Old 02-11-2006, 04:01 PM   #11
pingvina
Member
 
Registered: Nov 2005
Distribution: slack
Posts: 188

Original Poster
Rep: Reputation: 30
hmmm, that's strange - only one level of security...
what exactly is MBR?? master boot record...
is it the first thing to be read when boot initiates??
if somehow i make it read-only??
 
Old 02-11-2006, 04:31 PM   #12
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
Quote:
if somehow i make it read-only
you cannot write protect a harddisk and much less parts of it - well you can, but this is on the operating-system-level - when there is a system already running.
MBR is the first few (512 ?) bytes of a harddisk and is read by bios to find information on how to continue in bringing up the system.
To prevent anyone from just booting your machine in a different way than you wanted or by using another medium (CD...) you can only password protect the Bios against making changes to it.
There is a feature to password-protect harddisks (depends on the model used - this is on hardware-level) - but there is like no way in the world to get to or change the data on it if you loose that password - no recovery whatsoever - not even by taking the disk to another machine.
If you are concerned about someone reading your data - there is encryption of files and even the whole disk - so someone can take it away, but will not be able to read or use it - it is still lost to you though.

Last edited by jomen; 02-11-2006 at 04:35 PM.
 
Old 02-11-2006, 05:16 PM   #13
pingvina
Member
 
Registered: Nov 2005
Distribution: slack
Posts: 188

Original Poster
Rep: Reputation: 30
hmmm ... so if MBR is read only ... it can override BIOS and keep Linux safe...
what is that hardware level protection.. it sounds good to me...
i will lock the harddisk and throw the key in the river...
sounds prefect...
 
Old 02-11-2006, 05:46 PM   #14
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
Quote:
it can override BIOS and keep Linux safe
not quite...
1.) the Bios
2.) the MBR
Bios is _using_ (and needing) the MBR - but Bios comes as the very first thing - no way around that.
If you want to protect the disk (or MBR - which is on the disk) you need to do this through Bios.
Bios just knows how to interpret the MBR and executes whatever it finds there - usually a boot loader which in turn passes control on to the operating system.
I have no specific knowledge about hardware level protection aside from reading posts here from people trying (mostly in vain) to get to their data when the disk is somehow failing...
 
Old 02-11-2006, 06:01 PM   #15
pingvina
Member
 
Registered: Nov 2005
Distribution: slack
Posts: 188

Original Poster
Rep: Reputation: 30
so i guess i have to edit MBR somehow...
where it is located? is it a regular file??
how to edit?
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba Write Protection amajos Linux - Networking 1 08-11-2005 07:58 PM
write protection speed_viper Linux - Software 5 10-02-2004 12:10 AM
Write-protection in scripts Louis_Carole Linux From Scratch 1 09-02-2004 11:22 PM
Write protection question... floridagators1 Mandriva 5 05-22-2004 09:29 AM
Write Protection mfo6463 Linux - Newbie 5 03-31-2004 03:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration