Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: How can I mount the boot filesystem in read only?< Next Oldest | Next Newest >
xmrkite Offline





Group: Members
Posts: 31
Joined: Oct. 2006
Posted: Oct. 26 2006,04:46 QUOTE

Hello. I want to have it so that the user can simply just power off the linux box without there being any problems.

Now I'm new to linux, so correct me if I'm wrong, but I believe I need to do this:

/dev/hda1 - swap partition
/dev/hda2 - linux OS partition (DSL Linux)
/dev/hda3 - User account partition (/home/dsl)

I want /dev/hda2 to be read only and the user "dsl" would be able to save all his stuff to /dev/hda3 aka /home/dsl or something like that.

How can i do it so that when root logs in, he can read and write to the filesystem (install programs, change settings, all that good stuff)?

If this is not possible, what are my options (and how) for making the entire /dev/hda2 partition read-only?

-Thanks


--------------
-Thanks
Back to top
Profile PM 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: Oct. 26 2006,13:33 QUOTE

What type of installation are you going to do your hard drive?


If you do a frugal, all you have to do is remove the "frugal" line from the bootloader to mount the partition that the DSL image is on as RO by default.  Using "toram" as well might be even better if you just want it in your volatile memory.  Of course root could still mount it as rw.  Just a note: usually a non-root user can only write to /home and /tmp anyways (user 'dsl' has sudo access by default however).

Use the bootcode home= (in your example, this would be hda3) to mount /home on it.


I suppose for a "traditional" hd-install, you can modify fstab to make the root partition RO.
Back to top
Profile PM 
xmrkite Offline





Group: Members
Posts: 31
Joined: Oct. 2006
Posted: Oct. 26 2006,15:04 QUOTE

Hello, where do i go to make those changes though? And also, if the entire partition is read only to the dsl user, will i be able to just unplug the laptop (an oldie but a goodie) and not worry about data loss on the hda2 partition (the OS and programs)?

Also, it's a standard HD install.
-Thanks


--------------
-Thanks
Back to top
Profile PM 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: Oct. 26 2006,18:53 QUOTE

Not using a frugal, but a "traditional"?
fstab is located in /etc

Just a question: if you unplug the laptop, doesn't the battery go active?
Anyways, I don't know about turning things suddenly off.  I hear it's okay to do it when it's RO, but personally I don't do that for any mounted drive.
Back to top
Profile PM 
xmrkite Offline





Group: Members
Posts: 31
Joined: Oct. 2006
Posted: Oct. 27 2006,05:27 QUOTE

Hey again. A few things.
1. Laptop has no battery (dead)
2. I'm find doing either a Frugal or a traditional install. I did traditional cause I thought it'd be faster, haven't tried the frugal yet. (what's your opinion on that?)
3. Boot Loader is Lilo (never used grub before)

Now my question...If i make the filesystem read only, how can i then go back to that same filesystem which has the fstab and change it since it's now read only? Or, does it set it to read only based on the user (so root would still be read/write)? Looking at /etc/fstab, what do i change to do this? For /dev/hda2 (my root partition), it currently reads:

Quote
/dev/hda2  /  ext2  defaults,errors=remount-ro  0  1
proc  /proc proc  defaults  0  0


Also, since the filesystem will be read only, do i need to move the /temp directory and how?  (as you can tell, i'm still a newbie to linux)

-Thanks for your help. I really appreciate it.


--------------
-Thanks
Back to top
Profile PM 
5 replies since Oct. 26 2006,04:46 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: How can I mount the boot filesystem in read only?

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code