NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Problem with gpt partitioning in NetBSD-5.0.2 amd64




On 04/01/2010 11:09 PM, Christos Zoulas wrote:
> In article <4BB4FAE6.6030707%kerwien.homeip.net@localhost>,
> Peter Kerwien  <peter%kerwien.homeip.net@localhost> wrote:
>
>   
>> server1# gpt -v destroy sd0
>> gpt: rsd0d: mediasize=4499999293440; sectorsize=512; blocks=8789061120
>> gpt: unable to open device 'rsd0d': Invalid argument
>>
>>     
> Can you ktrace it and see which system call fails (I guess open()) and with
> what args?
>   
server1# ktrace gpt destroy sd0
server1# kdump ktrace.out
   289      1 ktrace   EMUL  "netbsd"
   289      1 ktrace   RET   ktrace 0
   289      1 ktrace   CALL 
execve(0x7f7fffffd460,0x7f7fffffd960,0x7f7fffffd980)
   289      1 ktrace   NAMI  "/sbin/gpt"
   289      1 ktrace   NAMI  "/libexec/ld.elf_so"
   289      1 gpt      EMUL  "netbsd"
   289      1 gpt      RET   syscall JUSTRETURN
   289      1 gpt      CALL  mmap(0,0x8000,3,0x1002,0xffffffff,0,0)
   289      1 gpt      RET   mmap 140187698954240/0x7f7ffdff8000
   289      1 gpt      CALL  open(0x7f7ffde0b72d,0,0)
   289      1 gpt      NAMI  "/etc/ld.so.conf"
   289      1 gpt      RET   open -1 errno 2 No such file or directory
   289      1 gpt      CALL  open(0x7f7fffffd180,0,0xfefefefefefeff2f)
   289      1 gpt      NAMI  "/lib/libprop.so.0"
   289      1 gpt      RET   open 3
   289      1 gpt      CALL  __fstat30(3,0x7f7fffffd0b0)
   289      1 gpt      RET   __fstat30 0
   289      1 gpt      CALL  mmap(0,0x1000,1,1,3,0,0)
   289      1 gpt      RET   mmap 140187698950144/0x7f7ffdff7000
   289      1 gpt      CALL  munmap(0x7f7ffdff7000,0x1000)
   289      1 gpt      RET   munmap 0
   289      1 gpt      CALL  mmap(0,0x111000,5,0x14000002,3,0,0)
   289      1 gpt      RET   mmap 140187694792704/0x7f7ffdc00000
   289      1 gpt      CALL  mmap(0x7f7ffdd10000,0x1000,3,0x12,3,0,0x10000)
   289      1 gpt      RET   mmap 140187695906816/0x7f7ffdd10000
   289      1 gpt      CALL  mmap(0x7f7ffdd11000,0,3,0x1012,0xffffffff,0,0)
   289      1 gpt      RET   mmap 140187695910912/0x7f7ffdd11000
   289      1 gpt      CALL  mprotect(0x7f7ffdc10000,0x100000,0)
   289      1 gpt      RET   mprotect 0
   289      1 gpt      CALL  close(3)
   289      1 gpt      RET   close 0
   289      1 gpt      CALL  open(0x7f7fffffd180,0,0x75)
   289      1 gpt      NAMI  "/lib/libutil.so.7"
   289      1 gpt      RET   open 3
   289      1 gpt      CALL  __fstat30(3,0x7f7fffffd0b0)
   289      1 gpt      RET   __fstat30 0
   289      1 gpt      CALL  mmap(0,0x1000,1,1,3,0,0)
   289      1 gpt      RET   mmap 140187698950144/0x7f7ffdff7000
   289      1 gpt      CALL  munmap(0x7f7ffdff7000,0x1000)
   289      1 gpt      RET   munmap 0
   289      1 gpt      CALL  mmap(0,0x116000,5,0x14000002,3,0,0)
   289      1 gpt      RET   mmap 140187692695552/0x7f7ffda00000
   289      1 gpt      CALL  mmap(0x7f7ffdb12000,0x2000,3,0x12,3,0,0x12000)
   289      1 gpt      RET   mmap 140187693817856/0x7f7ffdb12000
   289      1 gpt      CALL 
mmap(0x7f7ffdb14000,0x2000,3,0x1012,0xffffffff,0,0)
   289      1 gpt      RET   mmap 140187693826048/0x7f7ffdb14000
   289      1 gpt      CALL  mprotect(0x7f7ffda12000,0x100000,0)
   289      1 gpt      RET   mprotect 0
   289      1 gpt      CALL  close(3)
   289      1 gpt      RET   close 0
   289      1 gpt      CALL  open(0x7f7fffffd180,0,0xff31302d6e722d62)
   289      1 gpt      NAMI  "/lib/libc.so.12"
   289      1 gpt      RET   open 3
   289      1 gpt      CALL  __fstat30(3,0x7f7fffffd0b0)
   289      1 gpt      RET   __fstat30 0
   289      1 gpt      CALL  mmap(0,0x1000,1,1,3,0,0)
   289      1 gpt      RET   mmap 140187698950144/0x7f7ffdff7000
   289      1 gpt      CALL  munmap(0x7f7ffdff7000,0x1000)
   289      1 gpt      RET   munmap 0
   289      1 gpt      CALL  mmap(0,0x218000,5,0x14000002,3,0,0)
   289      1 gpt      RET   mmap 140187689549824/0x7f7ffd700000
   289      1 gpt      CALL  mmap(0x7f7ffd8fa000,0xc000,3,0x12,3,0,0xfa000)
   289      1 gpt      RET   mmap 140187691622400/0x7f7ffd8fa000
   289      1 gpt      CALL 
mmap(0x7f7ffd906000,0x12000,3,0x1012,0xffffffff,0,0)
   289      1 gpt      RET   mmap 140187691671552/0x7f7ffd906000
   289      1 gpt      CALL  mprotect(0x7f7ffd7fa000,0x100000,0)
   289      1 gpt      RET   mprotect 0
   289      1 gpt      CALL  close(3)
   289      1 gpt      RET   close 0
   289      1 gpt      CALL 
__sysctl(0x7f7fffffd840,2,0x7f7ffd9159c0,0x7f7fffffd838,0,0)
   289      1 gpt      RET   __sysctl 0
   289      1 gpt      CALL 
__sysctl(0x7f7fffffd430,2,0x7f7ffd90e090,0x7f7fffffd428,0,0)
   289      1 gpt      RET   __sysctl 0
   289      1 gpt      CALL 
__sysctl(0x7f7fffffd350,2,0x7f7ffd915e40,0x7f7fffffd348,0,0)
   289      1 gpt      RET   __sysctl 0
   289      1 gpt      CALL  readlink(0x7f7ffd7e275c,0x7f7fffffd440,0x400)
   289      1 gpt      NAMI  "/etc/malloc.conf"
   289      1 gpt      RET   readlink -1 errno 2 No such file or directory
   289      1 gpt      CALL  mmap(0,0x1000,3,0x1002,0xffffffff,0,0)
   289      1 gpt      RET   mmap 140187698950144/0x7f7ffdff7000
   289      1 gpt      CALL  mmap(0,0x1000,3,0x1002,0xffffffff,0,0)
   289      1 gpt      RET   mmap 140187698946048/0x7f7ffdff6000
   289      1 gpt      CALL  mmap(0,0x100000,3,0x14001002,0xffffffff,0,0)
   289      1 gpt      RET   mmap 140187688501248/0x7f7ffd600000
   289      1 gpt      CALL 
__sysctl(0x7f7fffffd760,2,0x7f7fffffd76c,0x7f7fffffd758,0,0)
   289      1 gpt      RET   __sysctl 0
   289      1 gpt      CALL  open(0x5088c0,0x802,0)
   289      1 gpt      NAMI  "sd0"
   289      1 gpt      RET   open -1 errno 2 No such file or directory
   289      1 gpt      CALL  open(0x5088c0,0x802,0)
   289      1 gpt      NAMI  "sd0d"
   289      1 gpt      RET   open -1 errno 2 No such file or directory
   289      1 gpt      CALL  open(0x5088c0,0x802,0)
   289      1 gpt      NAMI  "/dev/rsd0"
   289      1 gpt      RET   open -1 errno 2 No such file or directory
   289      1 gpt      CALL  open(0x5088c0,0x802,0)
   289      1 gpt      NAMI  "/dev/rsd0d"
   289      1 gpt      RET   open 3
   289      1 gpt      CALL  __fstat30(3,0x7f7fffffd7d0)
   289      1 gpt      RET   __fstat30 0
   289      1 gpt      CALL  open(0x406644,0,0)
   289      1 gpt      NAMI  "/dev/drvctl"
   289      1 gpt      RET   open 4
   289      1 gpt      CALL  ioctl(4,DRVCTLCOMMAND,0x7f7fffffd780)
   289      1 gpt      GIO   fd 4 wrote 16 bytes
       "\0\^Ra\M-}\^?\^?\0\0`\^A\0\0\0\0\0\0"
   289      1 gpt      GIO   fd 4 read 16 bytes
       "\0P\M^?\M-}\^?\^?\0\0\^W\^C\0\0\0\0\0\0"
   289      1 gpt      RET   ioctl 0
   289      1 gpt      CALL  munmap(0x7f7ffdff5000,0x317)
   289      1 gpt      RET   munmap 0
   289      1 gpt      CALL  close(4)
   289      1 gpt      RET   close 0
   289      1 gpt      CALL  lseek(3,0,0,0)
   289      1 gpt      RET   lseek 0
   289      1 gpt      CALL  read(3,0x7f7ffd616200,0x200)
   289      1 gpt      GIO   fd 3 read 512 bytes
      
"1\M-@\M^N\M-P\M-<\0|\M^N\M-@\M^N\M-X\M-?\^]\M^H\M->\^]|PW\M-9\M-c\^A\
       
\M-s\M-$\M-5\^C\M-s\M-+\M-K\M^@\M-z\M^O~\^B\M-2\M^@RR\M->\^]\M^I\M-hJ\
       
\^A\M-;\M^T\M^I\M^M\M-/*\0\M^JF\^D\M^D\M-@t\n\M^@~\0\M^@u\^D\M^I.\M^D\
        \M^M\M^C\M-E\^P\M^C\M-C
\M^@\M-{\M-8u\M-d\M-8\M-a\0\M-A\M-`\^B\M^I\M-F\
        \M^K\M-4\0\M^J\M^E\M-vu\^Y\M-8-\M^IP\M->\^S\M^I\M-h\^S\^A^\M-h 
\^AZ1\
       
\M-@\M-M\^S\M-M\^X\M-{\M-t\M-k\M-|f\M^Kl\b\M-v\^F\M^Q\M^I\^DuCZR\M-4\b\
       
\M-M\^S\M^KD\^BP\M-@\M-h\^F\M^F\M-D\M-A\M-j\bB\M-w\M-b\M^JT\^A\^A\M-P\
       
\M^C\M-a?\M-w\M-aZ\M^C\M-b?\^A\M-PH9\M-htG\M-;\M-*U\M-4AZR\M-M\^S\M-8e\
       
\M^Ir\M-'\M^A\M-{U\M-*u\M-!\M-v\M-A\^At\M^\f\M^I.\v\M^I\M->\^C\M^I\M-4\
       
BZR\M-M\^S\M-8A\M^Ir\M^I\240\0|\M^D\M-@t\^C\M-!\M-~}=U\M-*\M-8Q\M^I\^O\
        \M^Eu\M^?f\M^I\M-nZ\M-i\f\M-sZ\M^Jt\^A\M^KL\^B\M-;\0|\M-8\^A\^B\M-k\
        \M-N\^P\0\^A\0\0|\0\0\0\0\0\0\0\0\0\0Error \0\r\n\0NetBSD MBR
boot\0No\
         active partition\0Disk read error\0No operating system\0Invalid
CHS r\
       
ead\0\M-h\^C\0\M->\^Z\M^I`\M-,\M-4\^N\M-;\^A\0\M-M\^P\M-,\M^D\M-@u\M-t\
       
a\M-C\0\0\0\0\^\\M^@\M-6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\M-a\M-5\0\^A\^A\0\M-n\r\M-b\M^??\
       
\0\0\0\M-Am\M-^\v\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
        \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\M-*"
   289      1 gpt      RET   read 512/0x200
   289      1 gpt      CALL  lseek(3,0,0x200,0)
   289      1 gpt      RET   lseek 512/0x200
   289      1 gpt      CALL  read(3,0x7f7ffd616400,0x200)
   289      1 gpt      GIO   fd 3 read 512 bytes
      
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
        \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   289      1 gpt      RET   read 512/0x200
   289      1 gpt      CALL  lseek(3,0,0x417bcdbfe00,0)
   289      1 gpt      RET   lseek 4499999292928/0x417bcdbfe00
   289      1 gpt      CALL  read(3,0x7f7ffd616400,0x200)
   289      1 gpt      GIO   fd 3 read 512 bytes
       "EFI
PART\0\0\^A\0\\\0\0\0\"\M-L\M-)\M-]\0\0\0\0\M^?\M-g}\M-:\^B\0\0\0\
        \^A\0\0\0\0\0\0\0\"\0\0\0\0\0\0\0\M-^\M-g}\M-:\^B\0\0\0\M-4\M-{\M-=\
       
\M-U\M^Q:\M-_\^Q\M^Q\M-n\0\^U\^W\v\M^L6\M-_\M-g}\M-:\^B\0\0\0\M^@\0\0\
       
\0\M^@\0\0\0007\M-x\b\M-:\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
       
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
        \0\0\0\0\0\0\0\0\0\0\0\0\0"
   289      1 gpt      RET   read 512/0x200
   289      1 gpt      CALL  lseek(3,0,0x574fbcfbe00,0)
   289      1 gpt      RET   lseek 5999999041024/0x574fbcfbe00
   289      1 gpt      CALL  read(3,0x7f7ffd61e000,0x4000)
   289      1 gpt      RET   read -1 errno 22 Invalid argument
   289      1 gpt      CALL  close(3)
   289      1 gpt      RET   close 0
   289      1 gpt      CALL  write(2,0x7f7fffffce50,5)
   289      1 gpt      GIO   fd 2 wrote 5 bytes
       "gpt: "
   289      1 gpt      RET   write 5
   289      1 gpt      CALL  write(2,0x7f7fffffcf30,0x1d)
   289      1 gpt      GIO   fd 2 wrote 29 bytes
       "unable to open device 'rsd0d'"
   289      1 gpt      RET   write 29/0x1d
   289      1 gpt      CALL  write(2,0x7f7ffd7e4b2f,2)
   289      1 gpt      GIO   fd 2 wrote 2 bytes
       ": "
   289      1 gpt      RET   write 2
   289      1 gpt      CALL  issetugid
   289      1 gpt      RET   issetugid 0
   289      1 gpt      CALL  issetugid
   289      1 gpt      RET   issetugid 0
   289      1 gpt      CALL  open(0x7f7fffffca70,0,0)
   289      1 gpt      NAMI  "/usr/share/nls/nls.alias.db"
   289      1 gpt      RET   open -1 errno 2 No such file or directory
   289      1 gpt      CALL  open(0x7f7ffd7e25c7,0,0)
   289      1 gpt      NAMI  "/usr/share/nls/nls.alias"
   289      1 gpt      RET   open 3
   289      1 gpt      CALL  fcntl(3,2,1)
   289      1 gpt      RET   fcntl 0
   289      1 gpt      CALL  __fstat30(3,0x7f7fffffc9b0)
   289      1 gpt      RET   __fstat30 0
   289      1 gpt      CALL  mmap(0,0x5f0,1,2,3,0,0)
   289      1 gpt      RET   mmap 140187698941952/0x7f7ffdff5000
   289      1 gpt      CALL  close(3)
   289      1 gpt      RET   close 0
   289      1 gpt      CALL  munmap(0x7f7ffdff5000,0x5f0)
   289      1 gpt      RET   munmap 0
   289      1 gpt      CALL  open(0x7f7fffffcf00,0,0x7f7ffd7e0601)
   289      1 gpt      NAMI  "/usr/share/nls/C/libc.cat"
   289      1 gpt      RET   open 3
   289      1 gpt      CALL  __fstat30(3,0x7f7fffffce50)
   289      1 gpt      RET   __fstat30 0
   289      1 gpt      CALL  mmap(0,0x10be,1,1,3,0,0)
   289      1 gpt      RET   mmap 140187698937856/0x7f7ffdff4000
   289      1 gpt      CALL  close(3)
   289      1 gpt      RET   close 0
   289      1 gpt      CALL  munmap(0x7f7ffdff4000,0x10be)
   289      1 gpt      RET   munmap 0
   289      1 gpt      CALL  write(2,0x7f7fffffce80,0x11)
   289      1 gpt      GIO   fd 2 wrote 17 bytes
       "Invalid argument\n"
   289      1 gpt      RET   write 17/0x11
   289      1 gpt      CALL  exit(0)


> Can you try gpt -v destroy /dev/rsd0d or gpt -v destroy /dev/sd0d?
>   
server1# gpt -v destroy /dev/rsd0d
gpt: rsd0d: mediasize=4499999293440; sectorsize=512; blocks=8789061120
gpt: unable to open device 'rsd0d': Invalid argument

and

server1# gpt -v destroy /dev/sd0d
gpt: sd0d: mediasize=4499999293440; sectorsize=512; blocks=8789061120
gpt: unable to open device 'sd0d': Invalid argument


> christos
>
>   


Home | Main Index | Thread Index | Old Index