0

Ok so I bought/rent a dedicated server from nocix with Centos 6.8 installed, also came with 2 hard drives sda - 128GB SSD & sdb - 2TB HDD and I think I made a mistake by partitioning the second drive /dev/sdb and then reboot but lost the ability to connect via SSH, so I contacted nocix and they said I had to reload with the SystemRescueCd.

So I did that and have been reading/following the steps outlined here: https://www.system-rescue-cd.org/Sysresccd-Partitioning-EN-Repairing-a-damaged-Grub

See below error messages I got when I ran grub-install /dev/sda

df: Warning: cannot read table of mounted file systems: No such file or directory df: Warning: cannot read table of mounted file systems: No such file or directory Could not find device for /boot: Not found or not a block device.

See my partitions below. I've got 2 drives sda and sdb.

[=====DEVICE=====] [==FILESYS==] [======LABEL======] [====SIZE====] [MAJ] [MIN]
[loop0           ] [squashfs   ] [<unknown>        ] [   275.14 MB] [  7] [  0]
[sda1            ] [ext2       ] [<unknown>        ] [   250.00 MB] [  8] [  1]
[sda2            ] [LVM2_member] [<unknown>        ] [   119.00 GB] [  8] [  2]
[sdb1            ] [ext3       ] [/userdata        ] [     1.82 TB] [  8] [ 17]
[dm-0            ] [ext4       ] [<unknown>        ] [   110.25 GB] [253] [  0]
[dm-1            ] [ext4       ] [<unknown>        ] [     1.00 GB] [253] [  1]
[dm-2            ] [swap       ] [<unknown>        ] [     7.72 GB] [253] [  2]

I did see there is another guide about restoring on LVM and then noticed I have an LVM drive.. I am very new to this so I'm not sure what to do.. It's also quite urgent as the websites this server is hosting are down because of I can't get it back online.

EDIT: Output of vgscan

WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it!
  Reading all physical volumes.  This may take a while...
  Found volume group "vg" using metadata type lvm2

And output of lvscan

  WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it!
  ACTIVE            '/dev/vg/root' [110.25 GiB] inherit
  ACTIVE            '/dev/vg/tmp' [1.00 GiB] inherit
  ACTIVE            '/dev/vg/swap' [7.72 GiB] inherit
  • Please add the output of vgscan and lvscan to your question. – Sven Jan 10 '17 at 15:40
  • @Sven no problem – Shane Buckley Jan 10 '17 at 15:46
  • Anybody? I really need help – Shane Buckley Jan 10 '17 at 18:23
  • Forget the rescue CD, just boot normally and login at the (remote) console. Or, at least, look at the remote console to find out if it's not booting and why. – Michael Hampton Jan 10 '17 at 18:32
  • What is the remote console? (sorry I am very new) – Shane Buckley Jan 10 '17 at 18:41
1

I somehow managed to figure it out!

When I first tried reinstalling grub I thought that /root was on a partition called /dev/loop0 and was mounting that.

Then I learned that my system is using LVM and then mounted /dev/vg/root to do the reinstall and it worked! Server rebooted as if nothing happened! It was down for more than 24 hours..

|improve this answer|||||

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.