[jaunty] bug when umounting the root partition
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu |
Invalid
|
Undecided
|
Unassigned |
Bug Description
umounting the root partition should give errors, but 9.04 returns no error, although umounting is unsuccessful.
and other strange things happens after that.
I found the bug because this script is an endless loop in 9.04 when $part happens to be the root partition:
while mount | grep "^$part " > /dev/null; do
umount $part || { echo "Failed to umount $part"; exit 1; }
done
Details:
billbear@
[sudo] password for billbear:
root@billbear-
root@billbear-
/dev/sda5 on / type ext4 (rw,relatime,
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,
proc on /proc type proc (rw,noexec,
sysfs on /sys type sysfs (rw,noexec,
varrun on /var/run type tmpfs (rw,nosuid,
varlock on /var/lock type tmpfs (rw,noexec,
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,
fusectl on /sys/fs/
lrm on /lib/modules/
/dev/sda1 on /boot type ext4 (rw,relatime)
/dev/sda6 on /home type ext4 (rw,relatime)
/dev/sda7 on /tmp type ext4 (rw,relatime)
/dev/sda8 on /usr type ext4 (rw,relatime)
/dev/sda9 on /var type ext4 (rw,relatime)
securityfs on /sys/kernel/
binfmt_misc on /proc/sys/
gvfs-fuse-daemon on /home/billbear/
root@billbear-
root@billbear-
root@billbear-
bin boot cdrom dev etc home initrd.img lib lost+found media mnt opt proc root sbin selinux srv sys tmp usr var vmlinuz
root@billbear-
/dev/sda5 on / type ext4 (rw,relatime,
/dev/sda5 on /mnt type ext4 (rw)
root@billbear-
root@billbear-
root@billbear-
/dev/sda5 on / type ext4 (rw,relatime,
root@billbear-
root@billbear-
root@billbear-
umount: /home: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
root@billbear-
root@billbear-
root@billbear-
0
root@billbear-
/dev/sda5 on / type ext4 (rw,relatime,
root@billbear-
root@billbear-
mount: /dev/sda5 already mounted or /mnt busy
mount: according to mtab, /dev/sda5 is mounted on /
root@billbear-
root@billbear-
billbear lost+found
root@billbear-
/dev/sda6 on /home type ext4 (rw,relatime)
root@billbear-
billbear lost+found
root@billbear-
umount: /home: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
root@billbear-
root@billbear-
root@billbear-
mkdir: cannot create directory `/mnt/1': Read-only file system
root@billbear-
mkdir: cannot create directory `/1': Read-only file system
ok i reinvestigated this problem and found that this happens only when i have separate /home /usr /var /tmp partitions.
This is not a 9.04 problem, 8.04 also behaves like this.
Maybe this is not a bug, although i don't like this behavior.
I think when booting ubuntu, "kernel /boot/vmlinuz... root=..." mounts root partition read-only, and then fstab mount root partition again, and when i have separate /home /usr /var /tmp partitions it's possible to umount root partition that is mounted in fstab, then root partition becomes read-only again.
I really wish that ubuntu told me "root is busy"!