0

I have a CentOS 6.5 with a iSCSI disk connected. This disk is mounted as partition.

Everything is working fine but after I tried to reboot, the system won't boot. It can't mount the partition /dev/sdc1 (the iSCSI disk). The system is asking me for the root password but once logged on, I'm in read-only, so I can't change the boot priority or anything else.

Dave M
  • 4,494
  • 21
  • 30
  • 30

2 Answers2

3

Boot from CD in rescue mode, mount root (/) partition and edit /mountpoint/etc/fstab file. (/mountpoint is the directory where you mount your root partition)

If you do not have CD follow those steps from this answer:

  1. Shutdown the computer
  2. Boot into Recovery Mode --After BIOS load, hold down Shift key to access the grub menu --Once in grub menu, select the entry ending in "(recovery mode)"
  3. From the next menu selected option to enter Root Session
  4. At the root session, execute command mount -o rw,remount / to remount the filesystem as read-write

and then edit /etc/fstab

Romeo Ninov
  • 3,195
  • 2
  • 13
  • 16
1

iSCSI partitions should use the _netdev mount option to avoid a mount attempt prior network activation.

From man mount:

_netdev
The filesystem resides on a device that requires network access (used to prevent the system from attempting to mount these filesystems until the network has been enabled on the system).

At the point of failing the system is probably not live and likely in the initramfs stage. To recover check with mount if the root partition is mounted somewhere. On Cent OS 7 the path should be in /sysroot, not quite sure where Cent OS 6 has the partition mounted. Once found, edit <rootprefix>/etc/fstab and add the _netdev option to the according iSCSI entry.

Verify SELinux contexts of <rootprefix>/etc/fstab before/after activation (if enabled on the system). The context needs to be correct, otherwise rebooting will bring up different issues.

Reboot the system.

hargut
  • 3,848
  • 6
  • 10