Want to swap the booting disk showing in Linux VMware
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Want to swap the booting disk showing in Linux VMware
This is my first question here and I am almost new to Linux. The background of my problem is...
I downloaded the Hadoop virtual machine(vmware) from Cloudera and there were some softwares that I wanted to install in that. However it(cloudera-demo-vm.vmdk) had the size of 4 GB only. Then I clicked on the hard disk portion of that virtual machine and it asked to clone a new virtual machine within same. So I did that and then the option to extend the disk was enabled in for the new vm(cloudera-demo-vm2.vmdk). I extended it to 10GB and it created the partition. I formatted and extended new partition(sdB, sdA was still showing 4GB) in Konquer utility.
But when I started my vm it still shows the same thing. when I give command "cat /proc/partitions" it shows me that there are sda, sda1, sda2 and had, hda1,hda2 partitions. Out of these one set is 4GB and another one is the extended on of 10 GB. When I see in "fstab" file it just shows 2 Label of ext3 and ext4 type. In which one of the label is same from which my linux vm starts.
Now if I go to Konquer disk partitioner utility it still shows two partitions sdA(4 GB) and sdB(10 GB).
My "fdisk" command doesn't return anything.
So I think if I can start the vm from extended partition it should work but how can I change that? If my understanding is not right then can anybody explain me what is happening here?
When working with VMware clients you should not use external tools like this "Konquer utility" unless you run it from within the virtualization client or when you've booted the client with say a Live CD or rescue disk. The simplest way to add a new disk to a client would be to add one from the VMware client configuration menu, boot the client letting it detect the secondary disk, then partition it using fdisk and create a file system and then add the corresponding partition entries in the clients /etc/fstab.
I have read this 5 times and I think I get the issue now.
You extended a virtual hard drive using the vm's tools. That allowed you to have more space on the original clients apparent size of drive. You should have some virtual hard drive now that has two partitions.
To change how the virtual machine boots, you'd need to fix the clients boot scheme. Example would be grub or lilo or other boot loader that tells the virtual computer to boot to a partition and load an OS.
What you wanted to do is simply copy and rename the vmdk and then fix the virtual machine construction so that it now has two virtual hard drives. Then you can either use the clients bios to select the drive you wish or change order in virtual machine construction.
I know you may not get all of that so ask away. I may not have understood the question either.
Thanks for looking into it. I will try to explain in more detail.
I downloaded the vm (cloudera-demo-vm.vmdk) from cloudera. It was showing disk space of 4.7 GB when I fired "df -h". I will attach the screenshot of the vm settings which captured. When I clicked on the Hard disk section it is showing like this. Now if you see here the disk is showing the size 0 GB and the name is "virtual disk.vmdk" which is different than the one that I downloaded. So I was not sure what to do with it. Then I created another disk called cloudera-demo-vm2.vmdk" within the vm as is shown in 2nd & 3rd screenshot. and then I got the size 4.7 GB showing in the vm and from there I could extend it to 10 GB. It did some operation and it was extended to 10 GB.
Then I started my vm with Konquer Live CD. I saw two disks. One for 4.7 GB and another for 10 GB. I formatted the remaining space in 10 GB one.
Now I booted my vm and saw the "df -h" I still see the old config. Now I think you might be able to relate to what I wrote earlier. Please let me know if you want me to run any command and send the output for you guys to figure out. But I really appreciate your help.
Take the vm and add a new drive the size you wish. So now you would be able to boot to the vm still and have a full 10G drive free. From here you could clone the drive to the free one. One thing you'd have to watchout for is how grub might name the drive. If it is "drive by id" UUID or drive by name then it needs to be changed to a generic like boot hd0 or such. Then just remove the original drive and leave the expanded drive to use as you wish.
I don't get those images so TobySGD may be correct that you are using VM tools and not using linux client to work on. Sorry to sound so vague.
You could have booted to the live cd image and used it to clone drive to drive and just try it that way. Use dd command and since it is a virtual machine you should be pretty safe. I mean dd within the vm, not host OS. Then switch drives/remove the original and boot to the new drive.