I have 2 partitions sda1 XP and sda2 CENTOS. I have reinstalled grub on /dev/sda but on rebooting, I experienced: error : 22 no such parition for Centos; while Windows boots charmingly on the other.

fdisk -l gives sda1 as boot, is there a possibility that I can change it to sda2 on shell, since I am on rescue mode.


is there a possibility that I can change it to sda2

fdisk utility itself has an option to toggle the boot partition.

fdisk /dev/sda

type 'a' to toggle the bootable flag

  • failed to read image. and replicates error:22
    – Corleone
    Jul 30 '14 at 11:54

sudo fdisk /dev/sda

Command (m for help): m
   Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the DOS compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.