[CentOS] Troubles with starting CentOS beta 5

Hendrik Strydom hns1 at iinet.net.au
Sat Apr 7 03:51:04 UTC 2007


On Fri, 2007-04-06 at 09:26 -0400, Manuel Enrique Chávez Manzano wrote:
> Hi list
> I'm new here, but I've been using CentOS for about 2 years.
> I had some problems today, there was a blackout and I couldn't poweroff my
> machine on the right way, when I turn on  the machine again everything
> when right until the dialogo Activating swap/fstab. the pc freezed there
> and didn't go on,
> my question is,what was going on and how can I resolve that without
> reinstalling the pc?
> 
> forgive me any bad writing, I'm not an english speaker.
> thanks for any help you can give me.
> manny
BEWARE - This procedure will destroy data if used incorrectly.  Read the
e-mail and understand what you are doing before you run any commands
listed in this e-mail.

I have not seen this on CentOS, but have seen similar behaviour on FC5.
In my case there is something wrong with the swap partition.
If you boot into single mode with recovery media or by 
appending the word single to the grub kernel line
the PC will boot into a root bash shell.
At this stage 
mkswap <swap partition, e.g. /dev/hda2, /dev/sda3 etc.>
will recreate the swap partition.  The trick is to know what partition
the swap is on.
The swap partition is probably listed in /etc/fstab, so
cat /etc/fstab | grep swap
will possibly list one or more swap entries.

Alternatively if your swap is not on LVM you can identify it with:
fdisk -l /dev/hda (or sda for SCSI / SATA).  IF you have multiple disks
the followings ones will be on hdb,hdc or sdb sdc etc.
Partitions with ID 82 is swap, ID 83 is Linux.
Note that this is a general rule - it is possible to force the creation
of partitions where the partitions was created as another type, for
example with improper use of mkswap above.

Once you have recreated your swap partiton 
init 3 or init 5 (depending on if you run a gui or not)
will get the PC back into its normal operating mode.

This procedure is a bit sketchy on lots of the detail, so ask if you
need more detail.

BEWARE - This procedure will destroy data if used incorrectly.  Read the
e-mail and understand what you are doing before you run any commands
listed in this e-mail.




More information about the CentOS mailing list