Unable to start up Linux VM because it's looking for a data disk, which I don't need.

Hi there,

I copied the OS drive from the Azure environment as I want to work on a copy of the VM locally instead of in the cloud.  When I turn on the VM, it fails because it is trying to attach a data disk that I didn't download.  The data disk is 1TB so I don't want to download it just to attach it and not use it.  How can I fix this copied VM so that it only tries to boot and not look for this second drive?  I believe I can remove it by putting int he root password so that I can do some maintenance, but with Azure VMs, the root password isn't set and I don't want to change it just in case something happens on the live VM.   Is there another way around it?

I'm getting these errors:

fsck.ext4: Unable to resolve 'UUID=451a8a0d-0c99-4b34-8702-361627fda1a2a' [FAILED]
*** An error occurred during the file system check.  
Give root password for maintenance (or type Control-D to continue):

Christian PalaciosSenior IT Systems AdministratorAsked:
Who is Participating?
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.

Out of curiosity, did you try the “CTRL+D” option?Also, USUALLY you can set the root pwd before booting into the OS. Did not understand why you do not want to set it
Christian PalaciosSenior IT Systems AdministratorAuthor Commented:
I pressed "CTRL+D" and then is just rebooted and had the same issue.  I don't know if I can set the root password on a VM that is hosted in Azure.  Typically you create a user that is part of the sudo group and that's the user you use when working on an Azure Linux VM.  From there, you can switch to root with sudo su -, but there is never a point where I set the password for root.
I understand you downloaded the vm so it is a copy of the original one - or you just somehow migrated it on a on prem hypervisor? In the former case you should be able to operate on it without caring about the original vm on azure.
In the latter case, you should still be able to create a root password (yes it can be done, it’s unix. It’s just not set) without consequences.
CEOs need to know what they should worry about

Nearly every week during the past few years has featured a headline about the latest data breach, malware attack, ransomware demand, or unrecoverable corporate data loss. Those stories are frequently followed by news that the CEOs at those companies were forced to resign.

Christian PalaciosSenior IT Systems AdministratorAuthor Commented:
Thank you.  How can I set the root password on my local copy?  I can't even log into it to set it.
nociSoftware EngineerCommented:
If during boot you can access the kernel command line (from grub or lilo or whatever boot manager...

add init=/bin/bash to the command line, then the pid 1 process will be bash in place of init (systemv) or systemd mast daemon.
... from there you can either remove the  offending entry from fstab  or you can set a root password ...
(you may need to remount the root filesystem rw before you can update /etc/fstab)

use sync; sync; sync if all updates are done to ensure writing them out to disk.
You may need to remount the root filesystem ro again if continuing.
if you then want to continue normal booting type exec /sbin/init  as a command or reboot the hardware  some other way.
(note shutdown / reboot etc. don't work as the original init is not working... halt may work but just halt the system, requiring a powercycle anyway.
Also have a look here for a complete walkthrough :
Philip ElderTechnical Architect - HA/Compute/StorageCommented:
The download was the VM and its configuration files?


Set up a new VM in Hyper-V and attach the existing VHD. Boot.
noci already pointed to the item as well. not sure whether you can edit it at the boot  (have not tried that so not sure of the effectiveness)

the point is that you have a record in /etc/fstab reference to this drive and is set to be mounted on boot.
remove/comment out the entry in /etc/fstab that reference this mount point and it should stop complaining.

This is based on the error and that you have a device that it was mounting but you do not need it anymore, what was done in between to make sure the system is configured not to need this "drive" any more.

Was the disk already deleted from the VM configuration environment?
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Haven't worked with your specific setup + normally the way this is done...

1) Go through the root password reset, to make sure you have a working password.

2) Boot into single user mode (runlevel == 1).

This bypasses all setup steps, like disks.

3) When your shell starts, mount the device which contains your /etc, so something like...

mount /dev/sda /mnt

What your device name might be, just look through /dev for sdX or mdX (RAID) devices + mount them one at a time.

3) Check for /mnt/etc/fstab + when it appears, edit + remove the offending disk reference.

4) Hit CNTL-D to end the single user shell + continue multi user boot (default runlevel you have set).
Ravi Kumar AtreyCloud Specialist- AzureCommented:
Just follow the below steps:

at the grub prompt, hit a to append options
add init=/bin/bash to the end of the kernel command line and press enter
The system will boot to a prompt enter the following commands at the prompt

mount -o remount,rw /
vim /etc/fstab

edit the fstab file commenting the secondary mounts by adding a # at the begining of each problematic line, save the file

reboot by pressing CTRL+ALT+DEL
Christian PalaciosSenior IT Systems AdministratorAuthor Commented:
Thanks noci.  I can see the Grub menu and then I highlighted the first option and typed 'e' to edit it.  From there I see entries like
"root (0,0)"
"kernel ..."

I put the init=/bin/bash text at the end of the first option "root (0,0)", is that where it should go?  I assumed it was the first option that I needed to edit.  When I did that I'm stuck at a windows that says "Probing EDD (edd=off to disable)....ok".

Christian PalaciosSenior IT Systems AdministratorAuthor Commented:
Oops, sorry Ravi, I missed your reply.  I just tried your suggestion but I go the EDD message.  I put edd=off at the end of the edited line, but now the screen is black and I can only see the cursor flashing.  Any suggestions?
Ii am unfamiliar with the Noci grub.conf path,

Letting the system go through the boot process, enter root password at the maintenance prompt.
Then follow through on looking at /etc/fstab to comment out (put # as the first character on the line that referenced the UUID or the "drive" you no longer need)
Exit out the maintenance window at which point the system will resume to boot.

Was the virtual drive (file ) deleted on the host?. As that is the only way I can think of it going missing.
nociSoftware EngineerCommented:
you need to add the init=... to the end of the "kernel line".
So the line  kernel....  is the right one..., the other one is identifying the boot partition root(0,0)
Christian PalaciosSenior IT Systems AdministratorAuthor Commented:
Ok, I added the init=/bin/bash to the end of the "kernel" line.  I then pressed enter and then 'b' so it would boot from there.  I'm still getting the "Probing EDD" message and it just stays there.  Did I make a mistake somewhere?
Could you try the normal boot process, and type in the root password at the maintenance prompt, instead of hitting ctrl-D.

or hit edit, and at the end of the line add single (for single user mode)
nociSoftware EngineerCommented:
Are you sure the disk you didn't copy wan't the one with the root file system?...
Please verify this on the running system.. (and can you show here)


Would show mounted filesystems & sizes.
You may obfusciate entries if they show identifiabla info..
And be sure continer it is NOT in the VMWARE profile that fails to boot.
Christian PalaciosSenior IT Systems AdministratorAuthor Commented:
We ended up just getting help from Microsoft to do it on the live VM instead of trying to this test change on a local VM.  Please go ahead and close this request.

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
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

From novice to tech pro — start learning today.