Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#19785 - [initscripts] 2010.06-2 handle mounts incorrectly
Attached to Project:
Arch Linux
Opened by Sylvain Laurent (Magicking) - Sunday, 13 June 2010, 12:43 GMT
Last edited by Andrea Scarpino (BaSh) - Wednesday, 14 July 2010, 21:48 GMT
Opened by Sylvain Laurent (Magicking) - Sunday, 13 June 2010, 12:43 GMT
Last edited by Andrea Scarpino (BaSh) - Wednesday, 14 July 2010, 21:48 GMT
|
DetailsDescription:
I recently updated my initscripts to initscripts version 2010.06-2 and now initscritps use /proc/mount as base for /etc/mtab wich leads to a crappy /etc/mtab Additional info: $ cat /etc/mtab rootfs on / type rootfs (rw) proc on /proc type proc (rw,relatime) sys on /sys type sysfs (rw,relatime) udev on /dev type tmpfs (rw,nosuid,relatime,size=10240k,mode=755) /dev/disk/by-uuid/0d21f223-9208-4661-9e82-3f77266173aa on / type ext4 (rw,noatime,nodiratime,barrier=1,data=ordered) /dev/sdb2 on /mnt/sdcard type ext2 (ro,relatime,errors=continue) devpts on /dev/pts type devpts (rw) shm on /dev/shm type tmpfs (rw,nosuid,nodev) /tmp on /tmp type tmpfs (rw,size=120m) /dev/sda1 on /boot type vfat (rw) /dev/mapper/home on /home type ext4 (rw,noatime,nodiratime) As you can see the / is specified two times and This diff(relevant lines) made with a last [core] rc.sysinit make it looks right: [14:28:48]% diff /etc/rc.sysinit rc.sysinit 300c300,306 < cat /proc/mounts >| /etc/mtab --- > : >| /etc/mtab > # make sure / gets written to /etc/mtab > /bin/mount -o remount,rw / > # Write /proc, /sys and /dev to /etc/mtab > if [ -e /proc/mounts ]; then > /bin/grep -e "/proc " -e "/sys " -e "/dev " /proc/mounts >> /etc/mtab > fi Regards |
This task depends upon
Closed by Andrea Scarpino (BaSh)
Wednesday, 14 July 2010, 21:48 GMT
Reason for closing: Fixed
Additional comments about closing: initscripts 2010.07-1
Wednesday, 14 July 2010, 21:48 GMT
Reason for closing: Fixed
Additional comments about closing: initscripts 2010.07-1
uuoc
$ diff -s <(cat /proc/self/mountinfo | cut -d\ -f9) <(cut -d\ -f9 /proc/self/mountinfo)
Files /dev/fd/63 and /dev/fd/62 are identical
For example in archiso [#1] there are others fs mounted before switch_root that are not moved to "/new_root" so having on /etc/mtab is not correct. (like for rootfs are part of another namespace).
Remember that mountinfo is available since Linux >= 2.6.26. So should be used conditionally. (Arch Linux is supposed to run with older kernel with some "hacks")
[#1]
FS#19983- [archiso] umount errors, on shutdown (with > initscripts 2010.06-2)See http://article.gmane.org/gmane.linux.utilities.util-linux-ng/3239
(the issue now, is that -u (notruncate) does not work correctly with OPTIONS column)
$ findmnt -rnu -o SOURCE,TARGET,FSTYPE,OPTIONS
proc /proc proc rw,relatime
sys /sys sysfs rw,relatime
udev /dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=216873,mode=
none / aufs rw,relatime,si=48993
none /dev/pts devpts rw,relatime,mode=600,ptmxmode=
none /dev/shm tmpfs rw,relatime
This patch can be used when findmnt works OK.
$ ./findmnt -rnu -o SOURCE,TARGET,FSTYPE,OPTIONS | grep loop
/dev/loop0 /tmp/a/veryloooonnnnn/ggggggg/pathhhhh/arch/linux/loves/you ext4 rw,noatime,nodiratime,min_batch_time=1,max_batch_time=1,barrier=1,data=ordered
[#1] http://article.gmane.org/gmane.linux.utilities.util-linux-ng/3291
Yes, I was thinking about that in these days, but these two parameters are optional, so if not present are (or should be) interpreted as 0 for programs that looks for it (dump, fsck).
There is another minor thing (I guess is inoffensive) is that small difference in the output (findmnt outputs more/few options that present on mtab regenerated via normal mount)
example will be better than my description:
rw,noatime,nodiratime,max_batch_time=1,min_batch_time=1,journal_ioprio=7 (mtab on mount -o loop,max_batch_time=1,min_batch_time=1,journal_ioprio=7,noatime,norelatime,nodiratime)
rw,noatime,nodiratime,min_batch_time=1,max_batch_time=1,barrier=1,data=ordered (findmnt output this)
The different in options is normal: when mount manages mtab, it omits some options, and may add some that the kernel doesn't know about. Note that the purpose here is not re-creation of mtab in the running system, but rather the initial creation of mtab.
Perfectly, mtab looks good now, tested on three scenarios:
* archiso (fixes
FS#19983)* machine that boots with root=/dev/sdaN
* machine that boot with root=/dev/disk/by-label/NNNNN.... and label is OK.
PS: there is a plan to release in next days a new initscripts and mkinitcpio? Thanks.