[SOLVED] How to install Linux on an external HDD from computer A and boot it on computer B?
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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to install Linux on an external HDD from computer A and boot it on computer B?
Part A:
I have an external harddisk and I wish to install Ubuntu
on it from a friend's machine which has a working CD
reader.
Part B:
I intend to boot from that external harddisk on my
computer which has Windows on it.
What do I need to know about Part B? If I simply plug
in the external harddisk and set the option `boot from USB`,
then will I be able to boot directly on another computer?
Are you able to boot from usb on your computer? If so, that would be simpler. Create a bootable flash drive, set your boot priority in the BIOS to boot from the usb and proceed with the install.
If your friends computer is made by the same manufacturer and has all the same hardware, this should work with no problems. That doesn't seem to be the case. During the install using your friends computer, you will need to make sure you get the name of your external drive so that your install the bootloader to your drive and not his. This happens a lot. Read everything carefully and if you don't understand, you need to stop as you are using someone else's computer. If that is successful, you should be able to select which drive to boot when you start your machine. Methods for this vary with manufacturer and you haven't indicated the type of computer you have.
if the install pc has a nvidia graphics adapter and the frankenstiened machine has a radeon graphics adapter (or vice-versa, or itel integrated, .../ or different wifi adapter, audio adapter, network card, ...) then the wrong driver will load. that is why live-usb's are so cool since they probe for devices upon every reboot.
Configure the bootloader the use the UUID of the device.
in grub.cfg the root=/dev/sdXX should be root=UUID=88888888-4444-4444-4444-cccccccccccc where the UUID matches that of the partition with the / aka root filesystem.
Setup the /etc/fstab to reflect the UUID as well.
You will likely need to rm some *net* stuff in /etc/udev/rules.d/ so your interface will assume eth0 and not eth1, and wlan0 and stuff like that. Before you boot it so it can regen the file at boot. Or change your firewall script(s) to reflect the active device and not rm that file.
You may want to boot to console and not a gui login in case you have driver issues with video. As in one machine is nvidia, the other is amd/ati.
Otherwise bootloader + UUID and fstab + UUID is all you need to boot an install on another device. I do this sort of thing on USB sticks all the time. Although a higher speed SDHC and a reader is more performant.
Am thankful to all for their constructive and helpful
replies.
Quote:
Originally Posted by schneidz
if the install pc has a nvidia graphics adapter and the frankenstiened machine has a radeon graphics adapter (or vice-versa, or itel integrated, .../ or different wifi adapter, audio adapter, network card, ...) then the wrong driver will load. that is why live-usb's are so cool since they probe for devices upon every reboot.
With live USBs can I actually program and then save the
program on that USB itself? Is that possible?
Are there any disadvantages of using live USBs?
Well, if I need GCC and the live USB doesn't have the
GCC then each time I reboot or use USB on some other
computer I'll have to install the GCC? Is there a way to
get around this?
if the install pc has a nvidia graphics adapter and the frankenstiened machine has a radeon graphics adapter (or vice-versa, or itel integrated, .../ or different wifi adapter, audio adapter, network card, ...) then the wrong driver will load.
Only if you're installed the closed source drivers (though you can hit a similar problem if you strip out 'unneeded' open source drivers). You will also have the same issue if you've got a XXXX video card, installed closed drivers from manufacturer XXXX, but the drivers are for XXXX.ZZ and it doesnt support your XXXX.XX card (real world example- if you've got nvidia 30X.XX drivers for geforce 6XXX+ and you ry to run on a system with a geforce 5XXX or earlier card)
With nothing but open source video drivers installed I've flipped a internal HDD back and forth between a Intel P4/nVidia 6600, AMD 48000+/nVidia 8400, Intel Pentium D CPU/radeon 5400 and never had an issue.
Quote:
Originally Posted by schneidz
that is why live-usb's are so cool since they probe for devices upon every reboot.
Basicly, if you only have the open source drivers installed the OS acts in a pretty similar way to a LiveCD/LiveUSB. With the advantage of actually keeping changes made like installing program XXXX.
Actually booting on different computers is not that problematic - even if the hardware is a little bit different - you might though need to install special Wifi / graphics sometimes - particularly if you install the system on the external HDD on a laptop which has well known Wifi components in them and then boot on a desktop that has say a BELKIN USB Wifi adapter.
The other problem to be aware of is that some computers use UEFI (don't confuse with PROTECTED BOOT - that's the system that keeps the OS licence key in the BIOS and is used sometimes for Windows. Disable Protected boot to allow legacy OS'es like Linux to boot - that doesn't mean disabling UEFI.
Now if you want the system to boot on several computers then don't go for the UEFI version - this will restrict to only running on UEFI systems. Install a NON UEFI version (which uses GRUB2 and not GRUB2-EFI) on an HDD which has a "normal" MBR and not the newer GPT scheme.
Most UEFI installations - especially if you are installing from a LIVE Distro don't allow you to specify where the GRUB boot loader is installed - which is always on the internal HDD.
Installing a non UEFI version will work on UEFI machines (disable protected boot) and you can install the boot loader where you like.
I refer you to this Post -- although on a WINDOWS Forum !!! it creates a portable Linux system, adds VMWARE PLAYER(FREE) so Windows users can essentially have a Portable Windows system by running a Windows Virtual machine on their Linux system using VMWARE. Simply don't install the Virtual machine if you just want a portable Linux box.
Works very well -- have tried this approach for OPENSUSE, DEBIAN and LINUX MINT -- all work fine.
Cheers (and it's a lot of fun doing that !!).
(Live distros are all very well but they can't do much in the way of adding software etc. Don't forget also you can COPY HDD's by the use of the DD command - check the Man documentation).
Finally I've used these both on INTEL and AMD machines -- I installed on the INTEL machine with the INTEL HD graphics - it ran also on the NVIDIA / AMD machine -- the base graphics works fine -- you can always install extra drivers later if you need them. Linux kernels are quite sophisticated these days and can recognize a lot of hardware at boot time now unlike a few years ago.
Last edited by dobradude45; 05-05-2014 at 06:18 AM.
Am thankful to all for their constructive and helpful
replies.
With live USBs can I actually program and then save the
program on that USB itself? Is that possible?
Are there any disadvantages of using live USBs?
Well, if I need GCC and the live USB doesn't have the
GCC then each time I reboot or use USB on some other
computer I'll have to install the GCC? Is there a way to
get around this?
fedora live-usb (others as well ?) have data persistence that can be alloted at time of using the liveusb-creator. you an even have it setup a different home partition.
Well, if I need GCC and the live USB doesn't have the
GCC then each time I reboot or use USB on some other
computer I'll have to install the GCC? Is there a way to
get around this?
The suggestion above to create a bootable flash drive with 'persistence' will enable you to do that. You can do that with a number of different distributions, some distro specific others not. You don't mention what you are using.
Am thankful to all for their constructive and helpful
replies.
With live USBs can I actually program and then save the
program on that USB itself? Is that possible?
Are there any disadvantages of using live USBs?
Well, if I need GCC and the live USB doesn't have the
GCC then each time I reboot or use USB on some other
computer I'll have to install the GCC? Is there a way to
get around this?
You can create a chroot if you're running a read-only option like an iso image. The chroot can also be used as your build environment. It's simpler to do a proper install on the USB in my opinion. But there are advantages to using your usb storage option in a primarily read-only manner. As in write speeds on a low end usb stick is very slow, but the read speed is semi-tollerable.
There are disadvantages to USB.
- Slow data rates.
- Slow write speeds, slow enough to make 360p youtube videos buffer for file I/O.
- Limited number of writes (if you do writes)
- Unreliable bus (cables can be disconnected / some USB ports are questionable at best)
- Limited bus quantity which could limit the number of usb storage devices available.
- live iso images tend to not have swap and will do the usual kernel things when you run out of RAM. (/home and /tmp in RAM?. aka browser cache and work files).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.