Why can't I boot my Linux installed HD on a different computer?
Linux - DistributionsThis forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on...
Note: An (*) indicates there is no official participation from that distribution here at LQ.
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.
Why can't I boot my Linux installed HD on a different computer?
I really need this feature. Is there any distros that still allow this feature? Would it be hard to hack an existing distros to do what I want? We have to install 400-500 units and I thought I'd install one unit and then just dd the rest.
Why was that feature removed? That alone made Linux way better than windows.
Basically, it's an automagic network installer, and most Bios feature some method of network boot.
The bios looks for a basic system (kernel), boots on that, looks for an OS and installs that. It calls for tftp and dhcp, and needs some undocumented features, but many ftp programs support them. The Slackware DVD has a directory called 'usb-and-pxe-installers' and I'm sure others do too. With 400-500 installs in front of you, it's worth reading up on it, and setting up a server.
I really need this feature. Is there any distros that still allow this feature? Would it be hard to hack an existing distros to do what I want? We have to install 400-500 units and I thought I'd install one unit and then just dd the rest.
Why was that feature removed? That alone made Linux way better than windows.
Thanks guys!
Bing
What distro have you tried where this does not work? dd should generally work just fine. Certainly, it works fine with Debian. I do it all the time.
The only thing that you really need to be careful about is how some things can get confused if more than one partition on any attached drives has the same UUID. Therefore, it is no longer a very good idea to directly clone from one drive to another. Instead, you should make "dd" image to an image file, and then "dd" from that file to create the cloned drives.
So, instead of:
Code:
dd if=/dev/sdb of=/dev/sdc
Do something like:
Code:
dd if=/dev/sdb of=/mnt/data/IMAGE.img
...swap in drive to clone...
dd if=/mnt/data/IMAGE.img of=/dev/sdb
In your case, this may be the most efficient manner of doing things anyway. Personally, I do often do direct cloning from one drive to another, but I'm careful to do little else other than the cloning before shutting down and swapping the drives out to their respective destinations. In particular, I do NOT immediately try to mount any partitions after cloning in order to apply various customizations (such as changing /etc/hostname or whatever). I do that stuff after removing the other drive.
And I would extremely recommend against using dd cloning with btrfs. If you ever in the future accidentally have more than one installed drive with btrfs clones, they'll break. In contrast, plain old ext4 partitions will not break at all. Some things may get confused mounting stuff, but it won't break.
BTW, if you want to use dd, you can save a LOT of time by doing an install to a small partition and then using gparted or even a simple shell script to expand the partiton after dd.
Basically:
1) Do a basic install onto a small but adequate partition. Maybe start with 20GB and then do all the customizations.
2) Plug that hard drive into your cloning computer's external hard drive reader (or internally), booted up to a different OS install.
3) Use gparted to shrink the partition to whatever will still fit the contents.
4) Use dd to create a partial image file, that is just big enough to contain that partiton (plus MBR etc). Store that image onto the main hard drive. Use the "bs" and "count" flags to specify the desired image size.
Then, to clone from the image you just dd from that image and then expand the partition with gparted or equivalent script commands.
Personally, if I had that many workstations to administer I'd be looking at eliminating the local hard drives entirely and using PXE booting (not just for PXE based installer - for booting entirely off of PXE). That way, perhaps 10-20 clients can run off of the SSD of a single computer with little impact on performance. The big benefit is that there's less hardware to fail. Only 1 in 10-20 of the workstations needs to have an SSD.
Furthermore, using btrfs (don't clone!) on the workstation/file servers lets you dedupe files. This means that the drive space consumed by 20 independent installs is little more than the space consumed by just one.
Also, if all workstations have 12+GB of RAM, then I would seriously consider using my NFS-RAMBOOT hack. This loads the entire OS into RAM from a compressed tarball over the network. You still want /home to be mapped to an nfs share.
Due to the way NFS-RAMBOOT works, you can have any number of clients booting off a single image and there is no performance penalty once boot is complete. In fact, running off of uncompressed RAM is even faster than running off a fast local SSD. You also only have to update that one image, so this has the potential to vastly minimize the amount of maintenance effort. No need to fiddle with btrfs deduping to save space.
One fun thing--a laptop with no internal drive at all can use NFS-RAMBOOT and this adds an interesting level of extra security when it's used on-the-go. You can deactivate the reboot option (while still allowing SUSPEND to conserve battery life). That means that the only way to boot up a liveUSB is to first forcibly power down the system. This will inherently wipe the contents of RAM, preventing an attacker from accessing data.
I think I've seen more posts where people are amazed that it "just works" than "didn't work"!!!
I tried to find such lq posts with this search, but my Goo-fu syntax tricks were insufficient:
site:linuxquestions.org worked on "another|different" computer|system just plug* in disk
(I got too many non-relevant matches; maybe need an intitle: )
Think about (research) concepts of: device drivers (initrd) and 32 vs 64 bit.
Is your failure on wifi or video card? Or grub/MBR? Specifically what doesn't work?
(What exactly did you try, so others could reproduce problem???)
Cool idea: rescuing(?) hundreds of (old?) computers (or did I jump to wrong conclusion here?)
Or is it a (modern?) UEFI issue not working? (signing? Idk that stuff!!!)
Try slackware Did latest Mint fail? How exactly? The LQgurus will 'get you thru this'
Welcome to LQ
""I really need this feature. Is there any distros that still allow this feature? ""
YES PcLinuxOS
I use it all the time to install to a new machine exactly as I like it set up with the software I require.
The following two commands work, make a folder in root named remaster to put the iso in.
The nodir command ensures you do not add home, media, and of course remaster folders or it would go forever. maybe I should add tmp?
As root! yes PcLinuxOs allows it for this kind of thing.
You can if you wish add home but then all your personal data will be installed on the new machine.
If the computers are identical should work. Maybe the difference is that one boots in efi mode and the other boots in bios mode. Will have to take extra steps for hard drive install to boot in both efi mode and bios mode.
Last edited by colorpurple21859; 09-25-2017 at 05:25 AM.
So I have some really old systems that does work the way I want. I compared them to the newer systems that doesn't work.
On newer systems df returns thus:
I think I've seen more posts where people are amazed that it "just works" than "didn't work"!!!
I tried to find such lq posts with this search, but my Goo-fu syntax tricks were insufficient:
site:linuxquestions.org worked on "another|different" computer|system just plug* in disk
(I got too many non-relevant matches; maybe need an intitle: )
Think about (research) concepts of: device drivers (initrd) and 32 vs 64 bit.
Is your failure on wifi or video card? Or grub/MBR? Specifically what doesn't work?
(What exactly did you try, so others could reproduce problem???)
Cool idea: rescuing(?) hundreds of (old?) computers (or did I jump to wrong conclusion here?)
Or is it a (modern?) UEFI issue not working? (signing? Idk that stuff!!!)
Try slackware Did latest Mint fail? How exactly? The LQgurus will 'get you thru this'
Welcome to LQ
What i mean is when I take the hd to a different system, it does not boot. Blank Screen.
""I really need this feature. Is there any distros that still allow this feature? ""
YES PcLinuxOS
I use it all the time to install to a new machine exactly as I like it set up with the software I require.
The following two commands work, make a folder in root named remaster to put the iso in.
The nodir command ensures you do not add home, media, and of course remaster folders or it would go forever. maybe I should add tmp?
As root! yes PcLinuxOs allows it for this kind of thing.
You can if you wish add home but then all your personal data will be installed on the new machine.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.