Question about mount

Peter S. Mazinger ps.m at gmx.net
Mon Mar 27 03:28:28 PST 2006


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

> If so, check /etc/fstab to 
get all other credentials for this > mountpoint and finally do the mount.
> 
> If the mountpoint can't be found in /etc/fstab, try to mount
> the last entry in /etc/fstab and that is exact that, what happens.

I do not see the reason for the above

Peter

> 
> The following behaviour is really strange, at least some parts
> of the output are definetly wrong:
> 
> My fstab:
> 
> [lxtc3861 - ~ #] cat /etc/fstab
> # /etc/fstab: static file system information.
> #
> # <file system> <mount point>   <type>  <options>               <dump>
> <pass>
> /dev/hda3       /               ext3    defaults                0       0
> proc            /proc           proc    defaults                0       0
> tmpfs           /var/tmp        tmpfs   defaults,size=100M      0       0
> none            /proc/bus/usb   usbfs   defaults                0       0
> /dev/hda1       /system         ext3    defaults                0       0
> 
> Currently mounted filesystems:
> 
> [lxtc3861 - ~ #] mount
> /dev/root on / type ext3 (rw)
> proc on /proc type proc (rw,nodiratime)
> sysfs on /sys type sysfs (rw)
> none on /proc/bus/usb type usbfs (rw)
> devpts on /dev/pts type devpts (rw)
> tmpfs on /var/tmp type tmpfs (rw)
> 
> I can mount and unmount /system (/dev/hda1) with the following
> commands:
> 
> [lxtc3861 - ~ #] mount /system
> [lxtc3861 - ~ #] umount /system
> 
> But if I try to mount / I get the following error:
> 
> [lxtc3861 - ~ #] mount /
> mount: Mounting /dev/hda1 on /system failed: No such device
> [lxtc3861 - ~ #]
> 
> According to the output, mount tries to mount /dev/hda1 on /system and
> that should work, according to my previous try.
> 
> 'umount /' "works" as it does mount the root-filesystem readonly.
> 
> As /dev/root does not exist on the filesystem I assume its value is
> derived from the root= kernel boot parameter, right?
> That would definetly solve my problem then...
> 
> But the above behaviour seems strange to me.
> 
> ciao,
> --
> Alexander Griesser (Netzwerkadministration)
> E-Mail: alexander.griesser at lkh-vil.or.at | Web: http://www.lkh-vil.or.at
> KABEG LKH Villach | Nikolaigasse 43 | 9500 Villach
> Tel.:   +43 4242 208 3061 | Fax.:   +43 4242 971 3061
> --[PinePGP]-----------------------------------------------------------
> gpg: WARNING: using insecure memory!
> gpg: please see http://www.gnupg.org/faq.html for more information
> gpg: Signature made Mon 27 Mar 2006 12:50:26 PM CEST using DSA key ID A2949B5A
> gpg: Can't check signature: public key not found
> PinePGP: Encryption backend encountered error.
> --[PinePGP]----------------------------------------------------[end]--
> 

-- 
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2



More information about the busybox mailing list