From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <200205260302.g4Q31xS1037269@ducky.net> To: 9fans@cse.psu.edu From: Mike Haertel Subject: [9fans] bug in disk/format Date: Sat, 25 May 2002 20:01:59 -0700 Topicbox-Message-UUID: 9c6f9b62-eaca-11e9-9e20-41e7f4b1d025 Here is a report of a bug in disk/format that results in broken 9fat partitions that won't boot. The test system is using a 9GB IBM SCSI disk drive connected to an 53c875 based controller. Plan 9 is the only operating system on this computer. term% cat /dev/sd01/ctl inquiry IBM DGHS09Y 03E0682B91A1GAGSPMT03E geometry 17916240 512 part data 0 17916240 part plan9 63 17912475 part 9fat 63 20545 part fs 20545 16971267 part swap 16971267 17912475 In this demonstration, /dev/sd01/9fat initially contains all bytes 0 except for the Plan 9 partition table in block 1. Now we run disk/format following the example in the man page: term% disk/format -b /386/pbs -d -r 2 /dev/sd01/9fat /386/9load /386/9pcdisk /tmp/plan9.ini Initialising FAT file system type hard, 10 tracks, 64 heads, 32 sectors/track, 512 bytes/sec Adding file /386/9load, length 177320 Adding file /386/9pcdisk, length 1744105 Adding file /tmp/plan9.ini, length 185 used 1927168 bytes Now, using dossrv, we unfortunately find that 9load and 9pcdisk were not copied correctly! term% 9fat: term% cmp /386/9load /n/9fat/9load /386/9load /n/9fat/9load differ: char 55809 term% cmp /386/9pcdisk /n/9fat/9pcdisk /386/9pcdisk /n/9fat/9pcdisk differ: char 1 The system crashes in 9load when I try to boot from the resulting 9fat partition. Using dossrv and cp I was able to manually recopy 9load and 9pcdisk to the 9fat partition to make a bootable system, but this would be a bad experience for a new user.