LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to install Linux on an external HDD from computer A and boot it on computer B? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-install-linux-on-an-external-hdd-from-computer-a-and-boot-it-on-computer-b-4175503775/)

pls_help_URGENT 05-03-2014 02:23 AM

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?

floppy_stuttgart 05-03-2014 07:58 AM

or option "boot from USB HDD" in the BIOS setup.
Do it. Now. (the time you ask you will be probably finish). Good luck.

yancek 05-03-2014 08:56 AM

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.

schneidz 05-03-2014 08:57 AM

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.

colorpurple21859 05-04-2014 08:19 AM

If the hardware is different may have to install drivers manually.

Shadow_7 05-04-2014 10:38 AM

Caveats of that way.

Install a bootloader on the external disk.

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.

pls_help_URGENT 05-05-2014 04:00 AM

Am thankful to all for their constructive and helpful
replies.

Quote:

Originally Posted by schneidz (Post 5163868)
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?

cascade9 05-05-2014 05:30 AM

Quote:

Originally Posted by schneidz (Post 5163868)
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 (Post 5163868)
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.

dobradude45 05-05-2014 06:09 AM

Hi there

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.

http://www.eightforums.com/installat...y-version.html


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.

schneidz 05-05-2014 07:33 AM

Quote:

Originally Posted by pls_help_URGENT (Post 5164789)
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.

yancek 05-05-2014 08:50 AM

Quote:

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.

Shadow_7 05-05-2014 10:27 AM

Quote:

Originally Posted by pls_help_URGENT (Post 5164789)
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).

pls_help_URGENT 05-08-2014 01:42 AM

Thankful to everyone for information about the `persistence`
key. Will read about that.


All times are GMT -5. The time now is 04:41 AM.