[Voyage-linux] Mount /rw on usb drive: how?
Giuseppe Barichello
(spam-protected)
Thu Sep 27 04:20:53 HKT 2007
Il giorno Sun, 23 Sep 2007 02:30:19 +0200
Giuseppe Barichello <beppuz at freemail.it> ha scritto:
> Hi all,
>
> I just installed Voyage Linux on an Alix board. Nice distribution
> indeed!
> Since I'll be using this board as an Asterisk PBX, I'd like to make /rw
> stuff permanent without writing to the ro-partition (hda1 Compact
> Flash). So I planned to use an usb pen drive (/dev/sda1) as partition
> to write to.
>
> What I did was editing /etc/fstab like this:
> #/dev/hda1 / ext2 defaults,noatime,rw 0 0
> proc /proc proc defaults 0 0
> #tmpfs /rw tmpfs defaults,size=8M 0 0
> /dev/sda1 /rw ext2 auto,defaults,rw 0 0
>
I answer to myself, proposing the solution I found. It's not that
elegant, but it works for my purposes.
> now I get 2 problems:
> 1) /dev/sda1 is not mounted on boot (even if the hardware is correctly
> recognized and mount -a works after boot)
I noticed that mounting of the usb device takes place just after udev
recognized the hardware. Maybe the sistem has not enough time to
realize the presence of the storage device, so it fails mounting.
I edited /etc/init.d/mountall.sh adding
sleep 3
mount -t ext2 /dev/sda1 /myrw
after the mount -a command
>
> 2) /dev/hda1 is always mounted rw (remountro doesn't work, it complains
> "/ is busy")
It was because asterisk was loaded _before_ the execution of
voyage-util.
I renamed /etc/rc2.d/S99* into /etc/rc2.d/S98*
and /etc/rc2.d/S20asterisk into /etc/rc2.d/S99asterisk
so it is loaded after the remountro stuff
BTW, now my /etc/fstab looks like this:
#/dev/hda1 / ext2 defaults,noatime,rw 0 0
proc /proc proc defaults 0 0
tmpfs /rw tmpfs defaults,size=8M 0 0
/dev/sda1 /myrw ext2 auto,defaults,rw 0 0
I created a second rw directory (myrw) reserving it to logs, spool
(inclusive asterisk stuff) and mail.
My 2 cents,
Giuseppe
More information about the Voyage-linux
mailing list