Moving an existing system to a new computer

Getting your soundcard to work, using Debian on non-i386 hardware, etc

Moving an existing system to a new computer

Postby Yaron » 2018-10-26 09:51

Hi,

Instead of installing Debian on a new computer, I copied the existing installation to the new computer. It works, but the hardware doesn't function properly. It's standard hardware, so I don't think it's anything Debian should have any trouble automatically detecting and configuring, however it doesn't seem to do so. Is there a way to tell Debian to automatically try to detect and configure new hardware, just as if I installed a fresh copy of Debian using the standard Debian installer? Is there an option to make Debian automatically try to detect and configure new hardware at boot time and whenever it detects anything new connected to the computer? My system is Debian 9. Thanks.
Yaron
 
Posts: 13
Joined: 2018-10-26 09:38

Re: Moving an existing system to a new computer

Postby p.H » 2018-10-26 10:59

Yaron wrote:the hardware doesn't function properly

This is not very informative.
Yaron wrote:It's standard hardware

This is not very informative.
p.H
 
Posts: 631
Joined: 2017-09-17 07:12

Re: Moving an existing system to a new computer

Postby Yaron » 2018-10-26 11:07

@p.H, this is by purpose, because I don't want this thread to be about how to configure some specific hardware. It's a general question. I eventually it turns out Debian can't automatically detect and configure the new hardware (which I don't think is the case), I'll try to manually configure the hardware, and if I can't I'll ask in a separate thread.
Yaron
 
Posts: 13
Joined: 2018-10-26 09:38

Re: Moving an existing system to a new computer

Postby bw123 » 2018-10-26 11:15

I think moving an existing installation is tricky, but it can be done. Hardware is automatically detected and configured, unless you copy or clone the system in a way that preserves incompatible settings.

A few potential problems that come to mind are graphics, network, hard drives and other media... the initramfs, firmware, X configuration.
User avatar
bw123
 
Posts: 3528
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Moving an existing system to a new computer

Postby Yaron » 2018-10-26 11:22

bw123: Why is it tricky, and how can I clone it "preserving incompatible things"? It's a single partition system, and I cloned it with "dd", and reinstalled grub, that's all. I think, though I haven't tried, that if I made a fresh installation all would work out of the box, therefore I think the Debian installer automatically detects and configures hardware in a way that doesn't happen automatically if I clone an existing system. I want to know what the installer uses, and imitate it, if possible.
Yaron
 
Posts: 13
Joined: 2018-10-26 09:38

Re: Moving an existing system to a new computer

Postby bw123 » 2018-10-26 11:28

I have found it tricky because there is some static config for devices under /boot, /etc and also under different places in /var along with the volatile places like /dev /sys /proc and that is why dd would probably not be my first choice to clone an installation.

The debian installer is a series of steps, and several of the steps create static configuration for hardware, that is one reason why we need an installer, isn't it? I had an os several yrs ago that claimed to be 'plug and pray' but I never had good luck moving it to another machine either...

Your claim that the devices that aren't working are "standard hardware," is really odd. I haven't really seen many devices that are standard, they are all idiosyncratic. Even the ordinary old mouse is rarely 'standard' between different manufacturers.

I don't know a simple answer to your very general question, but I'm interested in what you find out. If you want to imitate debian installer, then the steps are described in the installation manual. https://www.debian.org/releases/stable/ ... 06.html.en

Good Luck.
User avatar
bw123
 
Posts: 3528
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Moving an existing system to a new computer

Postby CwF » 2018-10-26 13:38

I mentioned this before and I do it this way, ie a generic install. I do a a basic install into a vm, a single partition with grub on the disk image. I clone the disk image, not just the partition. I use no specific configs or proprietary drivers in that image. Once it boots in its new home you can then tweak the specifics and expand the image to full size. It works fine for me.

A few times I have moved a system disk to a vm for fixing, that works too.

I make the base image with things like vdagent, qemu-utilities, many cli package versions, and unconfigured sensor-detect, base xorg, and aptitude. I preconfigure some command history and have it ready to drop to a VT so that re-configs and even uninstall/reinstall can happen without any WM, DM, DE complications. So startx goes to an xterm that can fire up a mouse driven, nice font'ed aptitude. Hardware sensors and net names will need re-tweaks, and from this point specifics added...

I've never had an issue or seen an issue that required a fresh install. Also, the domain, mailname, etc, can be changed also. Note that the uuid of the disk can be changed too, or note that an image can't mount its own clone on another disk... Keeping grub with the install in an image of small size (8.4 for me) makes it easy. Splitting multiboot images, or adding grub later is possible but a pain.

I've moved complete hypervisor images with vm's included to a newer machine without much issue.

Basically, un-configure specifics, move disc, reconfigure. Or use a vm with a capable image to begin with.

This lends itself to fixing those frankendebians so popular on this forum. I've fixed one and would like the challenge for more , but whatever. I fail to see the difficulty of dropping to the root VT and firing up aptitude, with a simplified and coherent sources.list, and striping the install clean and rebuilding it. Pop the disk in my dock, I configure the disk into a vm, get to the root VT, point to a local clean pool, and in 10-15 minutes it's clean. Personally I still haven't found any gotcha's...
CwF
 
Posts: 147
Joined: 2018-06-20 15:16

Re: Moving an existing system to a new computer

Postby Yaron » 2018-10-26 18:50

@bw123: By "standard hardware" I mean hardware that I believe linux already has good support for, and I don't think would require any drivers other than what's included in the debian installer.

@CwF: Thanks for sharing your experiences... I believe I can fix the issues myself. However, if it can be done automatically, I'd certainly prefer it to be so, for 2 reasons: 1) to spare time. 2) To get a "clean", "perfect" install. If a system works it doesn't mean it's ideally configured - e.g. it might use a sub-optimal driver for some hardware, and maybe if I made a clean install a better driver would be installed. Btw, in my case too the 1st install was actually in a VM, but that doesn't change the original question really - it could just as well be from a real computer.

Update: I've come across https://wiki.debian.org/HardwareAutodetection. So maybe it's possible using those tools? I don't know how up to date that page anyway, as it mentions things like "Sarge", that unless I were so old I wouldn't know what it refers to.
Yaron
 
Posts: 13
Joined: 2018-10-26 09:38

Re: Moving an existing system to a new computer

Postby debiman » 2018-10-27 11:11

Yaron wrote:I don't want this thread to be about how to configure some specific hardware. It's a general question.
ooookaaaayyy (i remain sceptical).

If eventually it turns out Debian can't automatically detect and configure the new hardware...

the vanilla kernel (not debian) definitely does that.
with a few notable exceptions:
  • /etc/fstab and grub etc use UUIDs, those will need to be adjusted to the new hardware UUIDs
  • proprietary Graphics drivers and/or Xorg graphics
esp. for the second point: there is no "standard hardware".

but if you do this between, say, 2 100% intel machines, and if moving the system means actually moving the hard drive from machine to the other, it should Just Work (tm).
User avatar
debiman
 
Posts: 3017
Joined: 2013-03-12 07:18

Re: Moving an existing system to a new computer

Postby Yaron » 2018-10-27 11:40

Actually I didn't even have to change the UUID in "/etc/fstab", as "dd" seems to preserve the UUID. If I create a new partition and copy the files from the old one then I have to change the UUID.

I'm talking about hardware that doesn't require any proprietary drivers.

So, you're saying, the vanilla kernel automatically tries to detect and configure new hardware on boot, and that debian disabled that behavior? If so, any idea why debian disables it, and is there a way to re-enable it in debian?
Yaron
 
Posts: 13
Joined: 2018-10-26 09:38

Re: Moving an existing system to a new computer

Postby v&n » 2018-10-28 01:48

debiman wrote:but if you do this between, say, 2 100% intel machines, and if moving the system means actually moving the hard drive from machine to the other, it should Just Work (tm).

+1 with personal experience.

Just about a week ago, I got my new laptop, an i3 7th generation based HP 14q-CS0006TU. Almost as soon as opening its box I also opened the laptop's body and immediately replaced its Win10 preinstalled 1TB harddisk with my Xubuntu installed 240GB Intel SSD, moved from my old Asus X54C laptop (an i3-2nd Gen based 6 years old laptop!). The only other thing that I (obviously) needed to do was to disable secure boot from the UEFI firmware. Worked like a charm except exactly ONE problem that I could immediately notice - the WiFi wasn't working. Why? Because it was an old kernel which didn't have the required driver in it. So I downloaded & compiled, installed it, and the laptop is all peachy since then.

Okay, so the OS was not exactly 'Debian' but since we are talking about 'general' :roll: cases here, I guess that shouldn't make much difference as I'm sure a vanilla installation of Debian, having the same or better kernel, should have done the same.

But without defining the hardware and the 'Problem' at least to some degree ("..it doesn't seem to do so.." is a bit too much of 'generalization', don't you think?), I think the question is on the border of being vague, and is therefore going to attract answers of similar nature - being nearly vague to the extent of being un-useful.
v&n
 
Posts: 604
Joined: 2015-02-04 02:57

Re: Moving an existing system to a new computer

Postby bw123 » 2018-10-28 03:30

Another vague detail is whether all hardware on the target is "automatically detected", "automatically configured", or "automatically detected and configured". Configuration is not automatic for all hardware, but I think detection should be, depending on how contemporary the kernel release and the specific hardware. The new hardware might be not "...functioning properly" because it was not detected, or because it is misconfigured by copying an incompatible configuration.

So, let's be purposefully vague... it's a somewhat trollish, sort of non-sensical, possibly hypothetical thread describing a totally non specific general roundabout problem on "standard hardware," whatever that is. And it's specifically about a non-supported method of installation.

My hardware is not functioning, but I refuse to tell you what hardware it is, but I'd like to discuss it..., Give me a break.

For example, every system probably has a clock (standard hardware) that will be detected, but can it be automatically configured? No, the installer will try to determine if it is set to UTC by asking for input. If you later copy or clone that system, then it would be possible for the clock to not function correctly because you copied the incompatible configuration. Since the static TZ (that you copied) is based off of that, then who knows what time it is on the cloned system? since some fs checks and other system services like cron, etc. are based on date and time, then well, I would reckon that would have a little potential for improper behavior.
User avatar
bw123
 
Posts: 3528
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Moving an existing system to a new computer

Postby debiman » 2018-10-28 07:42

Yaron wrote:So, you're saying, the vanilla kernel automatically tries to detect and configure new hardware on boot, and that debian disabled that behavior?

no, i'm not saying that at all.

i'm just saying that hardware detection is not distro-specific, but kernel-specific.

but all binary distros use a kernel package that is fairly large to include as many hardwares as possible.
User avatar
debiman
 
Posts: 3017
Joined: 2013-03-12 07:18

Re: Moving an existing system to a new computer

Postby Yaron » 2018-10-28 11:20

As no general solution has come up yet, and as some of you seem so curious, I'll give you info about my specific attempt. The system is Debian 9 with Mate. The original hardware was a VMWare Worksataion 14 with default options. The new hardware is Asus T102HA. At boot I got errors regarding firmware, plus the internet and sound didn't work. I don't care about the rest of the hardware like webcam etc, just graphics, sound and internet. I managed to improve things a bit by manually installing the packages "firmware-linux, firmware-atheros, firmware-intel-sound". At least now I get a DE with working internet. Some operations I try fail with "read only filesystem" kind of messages. The kernel log is here: https://pastebin.com/msCfTU2y . I'd like to emphasize, though, that despite some of you being skeptical, my main concern is whether those problems can be somehow automatically (or semi-automatically) solved, in a way that I can also use in the future if I try to copy a debian installation between different hardwares than in this case. If I were only interested in a working system I could simply install from scratch (shouldn't take long) and things would probably go much more smoothly.
Yaron
 
Posts: 13
Joined: 2018-10-26 09:38

Re: Moving an existing system to a new computer

Postby CwF » 2018-10-28 13:34

When I mentioned making an image on a vm, I didn't mean to suggest making it 'for' a vm. So, add all related firmwares you'd like to my vdagaent, things I want for a vm...to end up with a 'all-purpose' image. You didn't do that.

So the general summary here is clear.

Debian will autodetect and adapt to anything it has the information for. It will respect all prior manual configurations and either work because of similarity, or fail due to dissimilarity.

So, you should be able to configure for most anything before you move it...as I was saying.
CwF
 
Posts: 147
Joined: 2018-06-20 15:16

Next

Return to Hardware

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable