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

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

reply to topic new topic new poll
Topic: dsl-config should mount mydsl read-only< Next Oldest | Next Newest >
dizzy Offline

Group: Members
Posts: 1
Joined: Feb. 2007
Posted: Feb. 23 2007,19:30 QUOTE

When mounting the mydsl device for loading drivers and extensions the dsl-config initscript should mount the device read-only since read-write access is not needed in this context. This is particularly important if the mydsl location is on a USB flash disk which has a limited number of possible write operations.

The read-only mount can be done by substituting the 'mount' calls with calls to the following 'mount_ro' function:

mount_ro() {
  local mpoint="$1"
  local entry="$(awk "(\$2==\"$mpoint\") {print; exit}" /etc/fstab)"
  if [ -z "$entry" ]; then
      echo "mount_ro: can't find $mpoint in /etc/fstab" >&2
      return 1
  local mdev=$(echo "$entry" | awk '{print $1}')
  local type=$(echo "$entry" | awk '{print $3}')
  local opts=$(echo "$entry" | awk '{print $4}')
  mount -t $type -o "$opts,ro" $mdev $mpoint
Back to top
Profile PM 
ecc1234 Offline

Group: Members
Posts: 3
Joined: Sep. 2006
Posted: Mar. 22 2007,13:35 QUOTE

Hi dizzy, can you help me?

How to mount root(/) read only so that system boots normally after power failure?
Back to top
Profile PM 
1 replies since Feb. 23 2007,19:30 < Next Oldest | Next Newest >

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

reply to topic new topic new poll
Quick Reply: dsl-config should mount mydsl 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