Question about mount
rob at landley.net
Mon Mar 27 18:35:30 UTC 2006
On Monday 27 March 2006 6:28 am, Peter S. Mazinger wrote:
> On Mon, 27 Mar 2006, Alexander Griesser wrote:
> > --[PinePGP]--------------------------------------------------[begin]--
> > Jean Wolter wrote:
> > >> In previous busybox releases I could do the following:
> > >>
> > >> mount -n -o remount,rw /
> > >
> > > The following works here with 1.1.1
> > >
> > > busybox mount -o remount,rw /dev/root /
> > Ah, ok, that works here for me too, thank you.
> > Today I spent quite some time reading the mount sourcecode and
> > I think I found code that should do the following:
> > If mount gets only one parameter, it is the directory where the
> > filesystem has to be mounted -> the mountpoint.
> Modified proposal: if it gets only one parameter consider it first the
> mountpoint and check fstab for appropiate entries, if not found, consider
> it as the device and search again fstab for appropiate entries
It should already check against both. I thought I had a test of the
single-argument version in the testsuite...
Yup, in mount.tests:
testing "mount remount ext2 image ro remembers noatime" \
"mount -o remount,ro images/ext2.dir && mount | tail -n 1" \
"/dev/loop1 on /images/ext2.dir type ext2 (ro,noatime)\n" "" ""
When doing a remount, it's not looking at /etc/fstab at all, it should be
looking at /proc/mounts (unless you enabled legacy mtab support despite the
big long explanation in the help text about why you should NOT enable legacy
mtab support, in which case it's quite possible there's a bug because I
didn't test that as heavily.)
Never bet against the cheap plastic solution.
More information about the busybox