David C. Rankin kirjoitti maanantai, 21. kesäkuuta 2010 19:33:18: > Guys, > > I'm laughing at myself for being unable to get swap activated. Initially, > when I breezed through the install, I forgot to set /dev/sdb6 to type 82 > so the box came up with swap off (2G of ram so not much of an issue) > > But now, I want to activate it and I get an error activating swap that > frankly, I have never seen before: > > [11:27 dcrgx2:~] # swapon -a > swapon: /dev/sdb6: read swap header failed: Invalid argument > > Huh? > > Here are the current details of the install: > > [11:26 dcrgx2:~] # cat /proc/partitions > major minor #blocks name > > 8 16 488386584 sdb > 8 17 1 sdb1 > 8 21 144522 sdb5 > 8 22 1951866 sdb6 > 8 23 29294496 sdb7 > 8 24 456992991 sdb8 > 8 0 39062500 sda > 8 1 40131 sda1 > 8 2 39005820 sda2 > > [11:26 dcrgx2:~] # fdisk -l /dev/sdb > > Disk /dev/sdb: 500.1 GB, 500107862016 bytes > 255 heads, 63 sectors/track, 60801 cylinders > Units = cylinders of 16065 * 512 = 8225280 bytes > Sector size (logical/physical): 512 bytes / 512 bytes > I/O size (minimum/optimal): 512 bytes / 512 bytes > Disk identifier: 0x0005cd36 > > Device Boot Start End Blocks Id System > /dev/sdb1 1 60801 488384001 5 Extended > /dev/sdb5 * 1 18 144522 83 Linux > /dev/sdb6 19 261 1951866 82 Linux swap / > Solaris /dev/sdb7 262 3908 29294496 83 Linux > /dev/sdb8 3909 60801 456992991 83 Linux > > > # > # /etc/fstab: static file system information > # > # <file system> <dir> <type> <options> <dump> > <pass> devpts /dev/pts devpts defaults > 0 0 shm /dev/shm tmpfs nodev,nosuid > 0 0 > > #/dev/cdrom /media/cd auto ro,user,noauto,unhide 0 > 0 #/dev/dvd /media/dvd auto ro,user,noauto,unhide 0 > 0 #/dev/fd0 /media/fl auto user,noauto 0 > 0 > > /dev/sdb6 swap swap defaults 0 0 > UUID=30247a6b-c639-4180-9b44-3535ade87de2 /home ext4 defaults 0 1 > UUID=73356263-d92f-4914-bb0d-07f5611b5709 / ext3 defaults 0 1 > UUID=de71b9f1-a954-4d41-84c2-926de89d1edb /boot ext3 defaults 0 1 > > It looks to me like swap should activate. What am I missing? Thanks for > any insight you can lend here. you have to create the swap filesystem in to the partion by running mkswap /dev/sdb6