From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Tue, 17 Jun 2008 20:59:07 +0200 From: "Sander van Dijk" To: 9fans@9fans.net MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: [9fans] Problem caused by recent change to diskparts Topicbox-Message-UUID: c156087c-ead3-11e9-9d60-3106f5b1d025 Hi, Between 11 and 12 June, there has been a change to /rc/bin/diskparts to detect plan9 partitions on disks without a mbr. This change seems to cause a problem with disks that do not have a plan9 partition at all though: after running diskparts, one of my harddisks (the one without a plan9 partition), shows only the files 'ctl', 'raw' and 'data'. I would expect my 'linux' and 'linux1' to be there as well. When I run 'disk/fdisk -p $disk/data > $disk/ctl' on it by hand, the files 'linux' and 'linux1' do show up. Here is the code that sets up the partitions: for(disk in /dev/sd[0-9A-Zabd-z]*) { if(test -f $disk/data && test -f $disk/ctl) disk/fdisk -p $disk/data >$disk/ctl >[2]/dev/null if(test -f $disk/plan9) parts=($disk/plan9*) if not parts=($disk/data) for(part in $parts) if(test -f $part) disk/prep -p $part >$disk/ctl >[2]/dev/null } The 'disk/fdisk' line sets the partitions up correctly, but then after that, the 'disk/prep' line seems to erase them again. I guess the output of the 'disk/fdisk' and 'disk/prep' lines should be accumulated and written to the $disk/ctl file all at once? Greetings, Sander.