2013-03-01 01:58:51 |
Scott Moser |
bug |
|
|
added bug |
2013-03-01 01:59:05 |
Scott Moser |
affects |
ubuntu |
linux (Ubuntu) |
|
2013-03-01 01:59:31 |
Scott Moser |
bug |
|
|
added subscriber Phillip Susi |
2013-03-01 02:00:11 |
Brad Figg |
linux (Ubuntu): status |
New |
Incomplete |
|
2013-03-01 02:00:12 |
Brad Figg |
tags |
|
raring |
|
2013-03-01 02:02:40 |
Scott Moser |
description |
It seems the kernel doesn't clear /proc/partitions information completely on detach of a device.
See the following:
DEVLOOP="/dev/loop5"
PT_IMG="/tmp/partitioned.img"
UNPT_IMG="/tmp/unpartitioned.img"
DEVLOOPB=${DEVLOOP##*/}
### Just show that loop device had no prior state ##
% ls -l $DEVLOOP*; echo "#/proc/partitions"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:40 /dev/loop5
--/proc/partitions--
% losetup --show $DEVLOOP
loop: can't get info on device /dev/loop5: No such device or address
### create an image file, put a partition table on it, losetup ###
% rm -f $UNPT_IMG; truncate --size 1G $PT_IMG
% echo "1,1" | sfdisk $PT_IMG >/dev/null 2>&1 ; echo $? # its just noisy
% losetup $DEVLOOP $PT_IMG
### no knowledge of this partition table yet ###
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:47 /dev/loop5
--/proc/partitions--
7 5 1048576 loop5
### tell the kernel about partition table ###
% partx --update $DEVLOOP
### See its there now ###
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:47 /dev/loop5
brw-rw---- 1 root disk 259, 0 Mar 1 01:48 /dev/loop5p1
--/proc/partitions--
7 5 1048576 loop5
259 0 8032 loop5p1
### get rid of it and show its really gone ###
% losetup --detach $DEVLOOP
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:49 /dev/loop5
brw-rw---- 1 root disk 259, 0 Mar 1 01:48 /dev/loop5p1
--/proc/partitions--
% losetup --show $DEVLOOP
loop: can't get info on device /dev/loop5: No such device or address
### create a new image file with no partition table ###
% rm -f $UNPT_IMG; truncate --size 1G $UNPT_IMG
### Set it up ###
% losetup $DEVLOOP $PT_IMG
### What?? it has a partition table on it ? ###
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:51 /dev/loop5
brw-rw---- 1 root disk 259, 0 Mar 1 01:48 /dev/loop5p1
--/proc/partitions--
7 5 1048576 loop5
259 0 8032 loop5p1
% uname -r
3.8.0-6-generic
% dpkg -S /boot/vmlinuz-$(uname -r)
linux-image-3.8.0-6-generic: /boot/vmlinuz-3.8.0-6-generic |
It seems the kernel doesn't clear /proc/partitions information completely on detach of a loop device.
See the following:
DEVLOOP="/dev/loop5"
PT_IMG="/tmp/partitioned.img"
UNPT_IMG="/tmp/unpartitioned.img"
DEVLOOPB=${DEVLOOP##*/}
### Just show that loop device had no prior state ##
% ls -l $DEVLOOP*; echo "#/proc/partitions"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:40 /dev/loop5
--/proc/partitions--
% losetup --show $DEVLOOP
loop: can't get info on device /dev/loop5: No such device or address
### create an image file, put a partition table on it, losetup ###
% rm -f $UNPT_IMG; truncate --size 1G $PT_IMG
% echo "1,1" | sfdisk $PT_IMG >/dev/null 2>&1 ; echo $? # its just noisy
% losetup $DEVLOOP $PT_IMG
### no knowledge of this partition table yet ###
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:47 /dev/loop5
--/proc/partitions--
7 5 1048576 loop5
### tell the kernel about partition table ###
% partx --update $DEVLOOP
### See its there now ###
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:47 /dev/loop5
brw-rw---- 1 root disk 259, 0 Mar 1 01:48 /dev/loop5p1
--/proc/partitions--
7 5 1048576 loop5
259 0 8032 loop5p1
### get rid of it and show its really gone ###
% losetup --detach $DEVLOOP
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:49 /dev/loop5
brw-rw---- 1 root disk 259, 0 Mar 1 01:48 /dev/loop5p1
--/proc/partitions--
% losetup --show $DEVLOOP
loop: can't get info on device /dev/loop5: No such device or address
### create a new image file with no partition table ###
% rm -f $UNPT_IMG; truncate --size 1G $UNPT_IMG
### Set it up ###
% losetup $DEVLOOP $PT_IMG
### What?? it has a partition table on it ? ###
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:51 /dev/loop5
brw-rw---- 1 root disk 259, 0 Mar 1 01:48 /dev/loop5p1
--/proc/partitions--
7 5 1048576 loop5
259 0 8032 loop5p1
% uname -r
3.8.0-6-generic
% dpkg -S /boot/vmlinuz-$(uname -r)
linux-image-3.8.0-6-generic: /boot/vmlinuz-3.8.0-6-generic |
|
2013-03-01 02:05:27 |
Scott Moser |
description |
It seems the kernel doesn't clear /proc/partitions information completely on detach of a loop device.
See the following:
DEVLOOP="/dev/loop5"
PT_IMG="/tmp/partitioned.img"
UNPT_IMG="/tmp/unpartitioned.img"
DEVLOOPB=${DEVLOOP##*/}
### Just show that loop device had no prior state ##
% ls -l $DEVLOOP*; echo "#/proc/partitions"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:40 /dev/loop5
--/proc/partitions--
% losetup --show $DEVLOOP
loop: can't get info on device /dev/loop5: No such device or address
### create an image file, put a partition table on it, losetup ###
% rm -f $UNPT_IMG; truncate --size 1G $PT_IMG
% echo "1,1" | sfdisk $PT_IMG >/dev/null 2>&1 ; echo $? # its just noisy
% losetup $DEVLOOP $PT_IMG
### no knowledge of this partition table yet ###
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:47 /dev/loop5
--/proc/partitions--
7 5 1048576 loop5
### tell the kernel about partition table ###
% partx --update $DEVLOOP
### See its there now ###
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:47 /dev/loop5
brw-rw---- 1 root disk 259, 0 Mar 1 01:48 /dev/loop5p1
--/proc/partitions--
7 5 1048576 loop5
259 0 8032 loop5p1
### get rid of it and show its really gone ###
% losetup --detach $DEVLOOP
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:49 /dev/loop5
brw-rw---- 1 root disk 259, 0 Mar 1 01:48 /dev/loop5p1
--/proc/partitions--
% losetup --show $DEVLOOP
loop: can't get info on device /dev/loop5: No such device or address
### create a new image file with no partition table ###
% rm -f $UNPT_IMG; truncate --size 1G $UNPT_IMG
### Set it up ###
% losetup $DEVLOOP $PT_IMG
### What?? it has a partition table on it ? ###
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:51 /dev/loop5
brw-rw---- 1 root disk 259, 0 Mar 1 01:48 /dev/loop5p1
--/proc/partitions--
7 5 1048576 loop5
259 0 8032 loop5p1
% uname -r
3.8.0-6-generic
% dpkg -S /boot/vmlinuz-$(uname -r)
linux-image-3.8.0-6-generic: /boot/vmlinuz-3.8.0-6-generic |
It seems the kernel doesn't clear /proc/partitions information completely on detach of a loop device.
See the following:
DEVLOOP="/dev/loop5"
PT_IMG="/tmp/partitioned.img"
UNPT_IMG="/tmp/unpartitioned.img"
DEVLOOPB=${DEVLOOP##*/}
### Just show that loop device had no prior state ##
% ls -l $DEVLOOP*; echo "#/proc/partitions"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:40 /dev/loop5
--/proc/partitions--
% losetup --show $DEVLOOP
loop: can't get info on device /dev/loop5: No such device or address
### create an image file, put a partition table on it, losetup ###
% rm -f $UNPT_IMG; truncate --size 1G $PT_IMG
% echo "1,1" | sfdisk $PT_IMG >/dev/null 2>&1 ; echo $? # its just noisy
% losetup $DEVLOOP $PT_IMG
### no knowledge of this partition table yet ###
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:47 /dev/loop5
--/proc/partitions--
7 5 1048576 loop5
### tell the kernel about partition table ###
% partx --update $DEVLOOP
### See its there now ###
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:47 /dev/loop5
brw-rw---- 1 root disk 259, 0 Mar 1 01:48 /dev/loop5p1
--/proc/partitions--
7 5 1048576 loop5
259 0 8032 loop5p1
### get rid of it and show its really gone ###
% losetup --detach $DEVLOOP
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:49 /dev/loop5
brw-rw---- 1 root disk 259, 0 Mar 1 01:48 /dev/loop5p1
--/proc/partitions--
% losetup --show $DEVLOOP
loop: can't get info on device /dev/loop5: No such device or address
### create a new image file with no partition table ###
% rm -f $UNPT_IMG; truncate --size 1G $UNPT_IMG
### Set it up ###
% losetup $DEVLOOP $UNPT_IMG
### What?? it has a partition table on it ? ###
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:51 /dev/loop5
brw-rw---- 1 root disk 259, 0 Mar 1 01:48 /dev/loop5p1
--/proc/partitions--
7 5 1048576 loop5
259 0 8032 loop5p1
% uname -r
3.8.0-6-generic
% dpkg -S /boot/vmlinuz-$(uname -r)
linux-image-3.8.0-6-generic: /boot/vmlinuz-3.8.0-6-generic |
|
2013-03-01 02:09:56 |
Scott Moser |
description |
It seems the kernel doesn't clear /proc/partitions information completely on detach of a loop device.
See the following:
DEVLOOP="/dev/loop5"
PT_IMG="/tmp/partitioned.img"
UNPT_IMG="/tmp/unpartitioned.img"
DEVLOOPB=${DEVLOOP##*/}
### Just show that loop device had no prior state ##
% ls -l $DEVLOOP*; echo "#/proc/partitions"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:40 /dev/loop5
--/proc/partitions--
% losetup --show $DEVLOOP
loop: can't get info on device /dev/loop5: No such device or address
### create an image file, put a partition table on it, losetup ###
% rm -f $UNPT_IMG; truncate --size 1G $PT_IMG
% echo "1,1" | sfdisk $PT_IMG >/dev/null 2>&1 ; echo $? # its just noisy
% losetup $DEVLOOP $PT_IMG
### no knowledge of this partition table yet ###
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:47 /dev/loop5
--/proc/partitions--
7 5 1048576 loop5
### tell the kernel about partition table ###
% partx --update $DEVLOOP
### See its there now ###
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:47 /dev/loop5
brw-rw---- 1 root disk 259, 0 Mar 1 01:48 /dev/loop5p1
--/proc/partitions--
7 5 1048576 loop5
259 0 8032 loop5p1
### get rid of it and show its really gone ###
% losetup --detach $DEVLOOP
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:49 /dev/loop5
brw-rw---- 1 root disk 259, 0 Mar 1 01:48 /dev/loop5p1
--/proc/partitions--
% losetup --show $DEVLOOP
loop: can't get info on device /dev/loop5: No such device or address
### create a new image file with no partition table ###
% rm -f $UNPT_IMG; truncate --size 1G $UNPT_IMG
### Set it up ###
% losetup $DEVLOOP $UNPT_IMG
### What?? it has a partition table on it ? ###
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:51 /dev/loop5
brw-rw---- 1 root disk 259, 0 Mar 1 01:48 /dev/loop5p1
--/proc/partitions--
7 5 1048576 loop5
259 0 8032 loop5p1
% uname -r
3.8.0-6-generic
% dpkg -S /boot/vmlinuz-$(uname -r)
linux-image-3.8.0-6-generic: /boot/vmlinuz-3.8.0-6-generic |
It seems the kernel doesn't clear /proc/partitions information completely on detach of a loop device.
See the following:
DEVLOOP="/dev/loop5"
PT_IMG="/tmp/partitioned.img"
UNPT_IMG="/tmp/unpartitioned.img"
DEVLOOPB=${DEVLOOP##*/}
### Just show that loop device had no prior state ##
% ls -l $DEVLOOP*; echo "#/proc/partitions"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:40 /dev/loop5
--/proc/partitions--
% losetup --show $DEVLOOP
loop: can't get info on device /dev/loop5: No such device or address
### create an image file, put a partition table on it, losetup ###
% rm -f $UNPT_IMG; truncate --size 1G $PT_IMG
% echo "1,1" | sfdisk $PT_IMG >/dev/null 2>&1 ; echo $? # its just noisy
% losetup $DEVLOOP $PT_IMG
### no knowledge of this partition table yet ###
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:47 /dev/loop5
--/proc/partitions--
7 5 1048576 loop5
### tell the kernel about partition table ###
% partx --update $DEVLOOP
### See its there now ###
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:47 /dev/loop5
brw-rw---- 1 root disk 259, 0 Mar 1 01:48 /dev/loop5p1
--/proc/partitions--
7 5 1048576 loop5
259 0 8032 loop5p1
### get rid of it and show its really gone ###
% losetup --detach $DEVLOOP
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:49 /dev/loop5
brw-rw---- 1 root disk 259, 0 Mar 1 01:48 /dev/loop5p1
--/proc/partitions--
% losetup --show $DEVLOOP
loop: can't get info on device /dev/loop5: No such device or address
### create a new image file with no partition table ###
% rm -f $UNPT_IMG; truncate --size 1G $UNPT_IMG
### Set it up ###
% losetup $DEVLOOP $UNPT_IMG
### What?? it has a partition table on it ? ###
% ls -l $DEVLOOP*; echo "--/proc/partitions--"; grep $DEVLOOPB /proc/partitions
brw-rw---- 1 root disk 7, 5 Mar 1 01:51 /dev/loop5
brw-rw---- 1 root disk 259, 0 Mar 1 01:48 /dev/loop5p1
--/proc/partitions--
7 5 1048576 loop5
259 0 8032 loop5p1
### unfortunately, clearing the partition table isn't as easy as just having
### partx -update do it ###
% partx --update $DEVLOOP
partx: /dev/loop5: failed to read partition table
% delpart /dev/loop5 1
% uname -r
3.8.0-6-generic
% dpkg -S /boot/vmlinuz-$(uname -r)
linux-image-3.8.0-6-generic: /boot/vmlinuz-3.8.0-6-generic |
|
2013-03-01 03:23:20 |
Scott Moser |
linux (Ubuntu): status |
Incomplete |
Confirmed |
|
2013-03-01 03:54:17 |
Phillip Susi |
marked as duplicate |
|
899717 |
|
2019-07-24 21:20:41 |
Brad Figg |
tags |
raring |
cscc raring |
|