Imaged Linux not able to boot in VMware

I have imaged a Linux phyisical machine and restored it to VMware (creating an empty linux VM and restoring the files via 3rd party imaging) when trying to boot the OS in VMware it is getting stuck at the GRUB bootloader, because the old partitions were defined by device-id instead of device-name.

I know I have to edit the fstab.conf file (and maybe a few others) so they are defined by device name (/dev/sda2/) but am unable to use the original install CD in rescue mode or using a live CD to edit the file due to permissions, any idea how I would go about doing this?

Please see attached error for more info.

Appreciate your help.
Linux.png
LVL 18
NetfloAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

farzanjCommented:
Are they labelled?

Try
e2label /dev/sda2

You can mount with label and create entry in /etc/fstab using label also

To mount using label

mount -L <label> source dest

In /etc/fstab

LABEL=<label>   as the first column

farzanjCommented:
Can't you start at runlevel s or 1?

Reboot the machine and at the grub, enter

e

down arrow key to point to kernel line

e
put 1 at the end of kernel line and press b to boot

You should get the root shell
NetfloAuthor Commented:
Where should this command be issued? On the Live CD, Recovery CD?

Just to confirm the file I'm trying to edit I don't have permission to, that's what I'm trying to get around. This also needs to be a permanent solution going forward as the virtual machine will remain in the virtual environment.
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

farzanjCommented:
Ok, there are two different scenarios.  If you use run level 1.  You should get the root prompt and there should not be any permissions issue.

Are you getting the root prompt #?  In the root prompt, your partition may be mounted read only but that is easy to fix.  You have to issue a command

mount -o remount,rw /mountPoint

In the second scenario when you boot with the rescue media, again you should get the root prompt and should have permissions.  The worst thing again can be read only partition which I already described.
NetfloAuthor Commented:
Managed to sort out the issue using Knoppix Live CD.

Thanks farzanj for your contributions, unfortunately your suggestions didn't help.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
farzanjCommented:
Sorry, what was the issue
farzanjCommented:
Were you able to get to run level 1 or S?

Did it not give you the root access?
NetfloAuthor Commented:
I'm afraid I was not able to get into single user mode and not able to get root access.
farzanjCommented:
With grub you always can.  I wish you had.  Anyways, good luck
NetfloAuthor Commented:
When you get the knoppix boot screen, type: knoppix 2, this will bott you into a command line and you are root.

Now from the command line, type: startx, this will start the xsession and you should be able to proceed, as root, in a graphical mode to peruse your partitions and edit /etc/fstab
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.