You are not logged in.
Hello everyone,
I admit there are easier ways for what I intent to do but this is more about personal interest and ambition than logic and simplicity.
This is for me to learn.
I recently installed ArchLinux as VM on my laptop. Now I want to migrate it as main OS on that laptop.
This started as a personal challenge which got me rather frustrated. Of course there are several wiki-pages handling this exact topic.
I read this Wiki-article a lot. Problem is I don't really understand what and how to do.
I've three USB-sticks available. I installed ArchLinux live installation medium on one of them already. I also tried to copy the files for each partition using rsync to an USB-Stick with three partitions but I noticed I messed up.
Now I'm asking you:
How would you migrate your VM to a physical machine?
How would you start? Which tools to use with what params and why?
Remember this is all about a Newbie willing to learn.
Thank you in advance. Best regards,
Alex
Last edited by UltraHorst (2020-10-11 18:53:38)
Offline
Why are you using USB sticks instead of setting up a shared folder, or (if needed) creating a new partition on your existing hard drive? What is not clear in the wiki specifically?
Last edited by zpg443 (2020-10-09 13:20:14)
Offline
1. Create partition / logical volume / whatever where you want to move Arch installation
2. Format it (mkfs.ext4 is usually a good choice)
3. Attach this filesystem to VM
3. Use the rsync command from wiki or cp -a [all directories except what is in --exclude= array] /mnt/your_attached_partition
4. Fix /etc/fstab
5. Fix the bootloader
...
6. https://explainshell.com/explain?cmd=rsync+-aAXv will explain you which parameters and why.
ad3) rsync doesn't do anything magic, it just contains --exclude switch, so can be easily used as single line command, contrary to cp which doesn't have exclude functionality.
You usually want to exclude files and directories that are automatically created by system.
For points 4 and 5 you can find detailed articles on Arch's Wiki.
Offline
... I noticed I messed up.
"I messsed up" is not an error message.
How would I migrated from a VM to a physical machine? I'd follow the wiki page you already claim to have read. Where would I start? At the beginning. How would I proceed? Step by step.
If you have specific questions about the instructions in the wiki, feel free to ask them, but don't expect us to type it all out just for you when it's already presented there (even though the previous responder did just that).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Thank you all for your replies. I need to mention that I'm very insecure on what I do. If what I try doesn't work I lose confidence and start looking for different strategies.
Why are you using USB sticks instead of setting up a shared folder, or (if needed) creating a new partition on your existing hard drive? What is not clear in the wiki specifically?
Well that's where it all begins. I wasn't able to mount my share folder to the VM.
[hoas-t@archlinux ~]$ sudo mkdir /mnt/share
[hoas-t@archlinux ~]$ sudo mount -t vboxsf share /mnt/share
/usr/bin/mount.vboxsf: mounting failed with the error: No such device
Yes I have host and guest-utils installed.
As I'm approaching this carefully I thought it might be a good idea to create a bootable USB-stick first before blowing my main OS. Successfully creating a live USB of my VM would also indicate that I learned enough to successfully migrate to the Laptop.
What I did was mounting the VM's VHD to my laptop using qemu-nbd, copied all the files from the three partitions using rsync -Pr to my USB (which I created three partitions on) and fixed fstab. I flagged the stick to be bootable using fdisk.
This didn't boot at all "no bootable device".
Note: I installed the intel microcode and nvidia graphics driver when I installed the VM.
1. Create partition / logical volume / whatever where you want to move Arch installation
2. Format it (mkfs.ext4 is usually a good choice)
3. Attach this filesystem to VM
3. Use the rsync command from wiki or cp -a [all directories except what is in --exclude= array] /mnt/your_attached_partition
4. Fix /etc/fstab
5. Fix the bootloader
...
Guess I think it's more of a deal than it actually is.
6. https://explainshell.com/explain?cmd=rsync+-aAXv will explain you which parameters and why.
This website is awesome thank you very much.
ad3) rsync doesn't do anything magic, it just contains --exclude switch, so can be easily used as single line command, contrary to cp which doesn't have exclude functionality.
The Wiki is mentioning hard links, soft links, permissions and what not? So I believe if I don't use the exact correct params at this point it would miss something (and I believe there is a lot to miss).
cp seemed to me to be too trivial. Maybe linux isn't as complicated as I think it is.
"I messsed up" is not an error message.
How would I migrated from a VM to a physical machine? I'd follow the wiki page you already claim to have read. Where would I start? At the beginning. How would I proceed? Step by step.
If you have specific questions about the instructions in the wiki, feel free to ask them, but don't expect us to type it all out just for you when it's already presented there (even though the previous responder did just that).
Thank you
Offline
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
... (and I believe there is a lot to miss). cp seemed to me to be too trivial. Maybe linux isn't as complicated as I think it is.
OP: this tells me you are not experienced enough on Linux to move your ArchLinux VM to the host and be self-sufficient in running that as your main OS without hand-holding by this community. Arch is not meant for hand-holding, there are other communities with more user-friendly distros for that. Keep the ArchLinux VM and start performing more and more day-to-day tasks on that VM instead of your host machine. This will also teach you how to create a shared folder on the VM and move files back and forth, so it's useful practice for that one day in the future where you will be ready to switch to Arch on your host machine.
Offline
Yeah I already love it here.
Offline