home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / linux / 10269 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  1.8 KB

  1. Path: sparky!uunet!mcsun!news.funet.fi!hydra!klaava!torvalds
  2. From: torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds)
  3. Newsgroups: comp.os.linux
  4. Subject: Re: problems making a swap partition useable
  5. Keywords: 0.97.1
  6. Message-ID: <1992Sep9.095543.19608@klaava.Helsinki.FI>
  7. Date: 9 Sep 92 09:55:43 GMT
  8. References: <1992Sep8.162500.16716@tamsun.tamu.edu>
  9. Organization: University of Helsinki
  10. Lines: 34
  11.  
  12. In article <1992Sep8.162500.16716@tamsun.tamu.edu> greg@carnivore.tamu.edu (Greg Economides) writes:
  13. >
  14. >When I do: mkswap -c /dev/hda5 10583, I get this:
  15. >
  16. >    mkswap: will not try to make swapdevice on /dev/hda5
  17. >
  18. >I am wondering if mkswap is complaining because the partition does not
  19. >end at an even boundary (or whatever it is that the '+' indicates, I don't
  20. >remember the exact wording in the fdisk intro file).
  21.  
  22. Hmm.  This sounds like the message I put into the original mkfs sources
  23. that checked that mkfs didn't write over the full disk devices (/dev/hda
  24. and /dev/hdb).  And as mkswap evolved from that, I assume the test also
  25. did. 
  26.  
  27. The reason you see it on /dev/hda5 is that I wrote mkfs (and the
  28. original mkswap) back in prehistoric times when linux still used the
  29. minix disk-numbering scheme: under minix, /dev/hdb0 (linux's /dev/hdb)
  30. has the same major/minor as linux's /dev/hda5.  I guess the test has
  31. never gotten updated, as you see the problems so seldom (most people
  32. don't have or don't use a /dev/hda5). 
  33.  
  34. Actually there is a (ugly) workaround for this, assuming you have an
  35. error-free disk. Just do
  36.  
  37.     # mkswap tmp 10583
  38.     # cp tmp /dev/hda5
  39.  
  40. This won't try to find bad blocks, though, so it's not always a
  41. solution.  The real solution is to find the mkswap/mkfs sources, look
  42. the the error message, and either remove the check, or update it to use
  43. the new minor numbers (3,0 and 3,64 instead of 3,0 and 3,5). 
  44.  
  45.         Linus
  46.