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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
|
09-23-2017, 04:39 PM
|
#1
|
LQ Newbie
Registered: Sep 2017
Posts: 4
Rep: 
|
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
|
|
|
09-24-2017, 12:45 PM
|
#2
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,603
|
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.
|
|
|
09-24-2017, 01:18 PM
|
#3
|
LQ Guru
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: One main distro, & some smaller ones casually.
Posts: 5,883
Rep: 
|
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.
|
|
|
09-24-2017, 01:52 PM
|
#4
|
Senior Member
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
|
Quote:
Originally Posted by cipherbing
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.
|
|
|
09-24-2017, 02:11 PM
|
#5
|
Senior Member
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
|
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.
|
|
|
09-24-2017, 02:27 PM
|
#6
|
Senior Member
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
|
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.
|
|
|
09-24-2017, 02:45 PM
|
#7
|
Member
Registered: Jan 2017
Location: Fremont, CA, USA
Distribution: Trying any&ALL on old/minimal
Posts: 997
|
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 02:54 PM.
|
|
|
09-24-2017, 04:29 PM
|
#8
|
LQ Guru
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,196
|
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.
|
09-25-2017, 12:24 AM
|
#9
|
Member
Registered: Dec 2012
Location: South Devon, UK
Distribution: PCLinuxOS, Suse, Mint, Puppy.
Posts: 81
Rep:
|
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.
|
|
|
09-25-2017, 05:23 AM
|
#10
|
LQ Veteran
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,843
|
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.
|
|
|
09-27-2017, 12:09 AM
|
#11
|
LQ Newbie
Registered: Sep 2017
Posts: 4
Original Poster
Rep: 
|
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 12:47 AM.
|
|
|
09-27-2017, 12:20 AM
|
#12
|
LQ Newbie
Registered: Sep 2017
Posts: 4
Original Poster
Rep: 
|
Quote:
Originally Posted by !!!
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.
|
|
|
09-27-2017, 12:35 AM
|
#13
|
LQ Newbie
Registered: Sep 2017
Posts: 4
Original Poster
Rep: 
|
Quote:
Originally Posted by trevoratxtal
""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!
|
|
|
09-27-2017, 12:49 AM
|
#14
|
Senior Member
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
|
|
|
1 members found this post helpful.
|
09-27-2017, 06:18 AM
|
#15
|
Senior Member
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
|
I agree the hardware needs be the same, unless you* work some magic... 
|
|
|
All times are GMT -5. The time now is 08:00 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|