LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This 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


Reply
  Search this Thread
Old 09-23-2017, 05:39 PM   #1
cipherbing
LQ Newbie
 
Registered: Sep 2017
Posts: 4

Rep: Reputation: Disabled
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.

Thanks guys!

Bing
 
Old 09-24-2017, 01:45 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 8,824

Rep: Reputation: 909Reputation: 909Reputation: 909Reputation: 909Reputation: 909Reputation: 909Reputation: 909Reputation: 909
Have you heard of PXE?

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.
 
Old 09-24-2017, 02:18 PM   #3
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: AntiX
Posts: 2,125

Rep: Reputation: Disabled
I'd also recommend network installs for that many machines, plus it would be a single point for updates to be sent out.

However, what your problem most likely is, is that the modern distros use UUID instead of /dev/sda1 (for instance) in the boot configuration of grub.
 
Old 09-24-2017, 02:52 PM   #4
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 9 Stretch
Posts: 2,299
Blog Entries: 8

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Quote:
Originally Posted by cipherbing View Post
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.
 
Old 09-24-2017, 03:11 PM   #5
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 9 Stretch
Posts: 2,299
Blog Entries: 8

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
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.
 
Old 09-24-2017, 03:27 PM   #6
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 9 Stretch
Posts: 2,299
Blog Entries: 8

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
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.
 
Old 09-24-2017, 03:45 PM   #7
!!!
Member
 
Registered: Jan 2017
Posts: 666

Rep: Reputation: 288Reputation: 288Reputation: 288
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

Last edited by !!!; 09-24-2017 at 03:54 PM.
 
Old 09-24-2017, 05:29 PM   #8
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 4,802

Rep: Reputation: 801Reputation: 801Reputation: 801Reputation: 801Reputation: 801Reputation: 801Reputation: 801
Ah, another OP posting his first question, probably never to return. And again LQ experts wasting their time in guessing what "it doesn't work" means.

@cipherbing: It does work. Just plug in your hard drive. If you need better help than this, describe exactly what "does not work"

jlinkels
 
2 members found this post helpful.
Old 09-25-2017, 01:24 AM   #9
trevoratxtal
Member
 
Registered: Dec 2012
Location: South Devon, UK
Distribution: PCLinuxOS, Suse, Mint, Puppy.
Posts: 67

Rep: Reputation: 17
Your own Distro

""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.

mylivecd --xz --nodir ^/home/,^/media/,^/remaster --tmp=/remaster/ --md5sum --ufs unionfs /remaster/my.iso


md5sum /remaster/my.iso > /remaster/my.md5sum

I have nothing to do with this distro accept a happy user most of the time.
 
Old 09-25-2017, 06:23 AM   #10
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, puppy, ubuntu
Posts: 2,241

Rep: Reputation: 325Reputation: 325Reputation: 325Reputation: 325
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 06:25 AM.
 
Old 09-27-2017, 01:09 AM   #11
cipherbing
LQ Newbie
 
Registered: Sep 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
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:

[root@server1.int ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_server1-lv_root
18G 5.7G 11G 35% /
tmpfs 939M 72K 939M 1% /dev/shm
/dev/sda1 485M 140M 321M 31% /boot


On older systems df returns:

[root@server1.int ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 18G 5.7G 11G 35% /

So what is this /dev/mapper stuff?

Last edited by cipherbing; 09-27-2017 at 01:47 AM.
 
Old 09-27-2017, 01:20 AM   #12
cipherbing
LQ Newbie
 
Registered: Sep 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by !!! View Post
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.
 
Old 09-27-2017, 01:35 AM   #13
cipherbing
LQ Newbie
 
Registered: Sep 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by trevoratxtal View Post
""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.

mylivecd --xz --nodir ^/home/,^/media/,^/remaster --tmp=/remaster/ --md5sum --ufs unionfs /remaster/my.iso


md5sum /remaster/my.iso > /remaster/my.md5sum

I have nothing to do with this distro accept a happy user most of the time.
Somebody that understands what I'm trying to say! (never was a great communicator!)

Thank you!
 
Old 09-27-2017, 01:49 AM   #14
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth( I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that works well on my cheapest; has been KDE or CLI but open... http://goo.gl/NqgqJx &c ;-)
Posts: 3,677
Blog Entries: 2

Rep: Reputation: 1123Reputation: 1123Reputation: 1123Reputation: 1123Reputation: 1123Reputation: 1123Reputation: 1123Reputation: 1123Reputation: 1123
Don't think this will help but live OS, eg: https://www.howtogeek.com/196933/how...ur-hard-drive/ maybe?
 
1 members found this post helpful.
Old 09-27-2017, 07:18 AM   #15
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth( I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that works well on my cheapest; has been KDE or CLI but open... http://goo.gl/NqgqJx &c ;-)
Posts: 3,677
Blog Entries: 2

Rep: Reputation: 1123Reputation: 1123Reputation: 1123Reputation: 1123Reputation: 1123Reputation: 1123Reputation: 1123Reputation: 1123Reputation: 1123
I agree the hardware needs be the same, unless you* work some magic...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hi. I am new to linux never have used it or installed it on computer. marisp27 Linux - Newbie 17 07-30-2017 01:18 PM
Installed GRUB on a USB, after reformatting the computer won't boot when plugged in. cravengemetzel Linux - Newbie 6 05-03-2015 07:33 PM
[SOLVED] How to install Linux on an external HDD from computer A and boot it on computer B? pls_help_URGENT Linux - Newbie 12 05-08-2014 02:42 AM
Red Hat GPU driver installed - computer fails to boot rogerp Linux - Software 6 03-21-2014 05:24 PM
Installed Linux - now I can't get on the computer ;) BlendedRacer LinuxQuestions.org Member Success Stories 2 06-21-2004 07:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 03:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration