Monday, July 25, 2016

boot - How to move ubuntu to main hardrive off usb


So my PC'S hard drive got fried so i got another and so i needed a OS so i make ubuntu bootable and put it on a usb. Everything runs good except. It runs off the usb and whenever i restart it resets. Not to mention if i unplug the usb it messes up. How do I fix this do i use ubuntu from the usb and download ubuntu then install it on the PC while using the flash drive ubuntu. Or do I somehow transfer it onto the hard drive. What should i do? Also this is a brand new hard drive and theres no windows on it.



I'm going to assume that the version of Ubuntu you're running from your USB is the version of Ubuntu you want installed on your hard drive. If I'm reading your question correctly, it sounds like you want to install Ubuntu to the hard drive.


If you're booted into Ubuntu from a USB, you can do this without having to download Ubuntu again. At the top of the panel on the left, is an icon with the Ubuntu logo on it. Just under that should be the launcher for the Ubuntu installation application. If you don't see it, you could always click the Ubuntu logo and then in the search field that pops up, type "install". The first search result should be the Ubuntu installer. Click the installer and follow the prompts to install Ubuntu to your hard drive.




If you do not need to copy documents you created in the live OS to your new installation, you can stop here, wait for installation to complete, and then reboot. If you did create documents in the live OS that you want to copy to your new installation, keep reading.


Regarding CelticWarrior's comment, if you have already created documents, these are most likely in the /home/Ubuntu directory. Once Ubuntu has started installing (right after submitting your desired username/password), open a terminal window by pressing Ctrl+Alt+T. Then type cd /target, and press Enter before installation finishes. Leave this window open. This should prevent the system from unmounting your hard drive partition after installation.


When installation finishes, click the "Continue Testing" button. If you wish to copy everything from your user directory in the live OS to the your user directory in the newly installed OS, you can do so by running the following commands (pressing Enter after each line) in the terminal window that you left open...


user=$(ls /target/home)
sudo cp -r /home/ubuntu/* /target/home/$user/
sudo rm /target/home/$user/Desktop/ubiquity.desktop
sudo chown -R 1000:1000 /target/home/$user

Finally, reboot your computer and boot from the hard drive, not the USB. You will have to reinstall any programs you installed while using the live OS, but this should pull documents you created into your new installation.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...