LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-30-2016, 08:06 AM   #1
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
swapping HDD w/linux already installed -- will it still run on a different LapTop?


I know this person who I gave a laptop too far far away so I cannot do this with that laptop in my view. It had a 60GB 1.8" HDD, the size aprox of a zippo lighter. HP 2730p Elightbook, I could not get Linux on it to save my life with what I had to work with. So I gave/mailed it to him with Windows on it, then got me another LapTop HP 6930p Elightbook.

I've seen in an online buy stuff web page a conveter that is able to make a 1.8" into a 2.5" hdd.

if I was to stick that 1.8" into this laptop install Linux, then unplug it, then send it to him, and he plugs it into his LapTop will Linux still work as if it was installed in that laptop?

thanks...
 
Old 01-30-2016, 08:10 AM   #2
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,111
Blog Entries: 21

Rep: Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474
It should work. I've done it before. Usually wlan0 for wireless is all that needs changing.
 
Old 01-30-2016, 08:17 AM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by rokytnji View Post
It should work. I've done it before. Usually wlan0 for wireless is all that needs changing.
Keeeeeuuuuullllll Thanks ---
 
Old 01-30-2016, 08:27 AM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Usually the only time there is a problem is if the disk had a custom video driver added, and that interface doesn't exist on the laptop the disk is being installed in.
 
Old 01-30-2016, 08:35 AM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by jpollard View Post
Usually the only time there is a problem is if the disk had a custom video driver added, and that interface doesn't exist on the laptop the disk is being installed in.
GOOD POINT: Thanks.

I know slackware has the big kernel that has, from what I understand, just about everything that is needed stuffed into it, so that it will start up on just about everything known to mankind that has a cpu.

if I could use that, or set it up to somehow to load the video driver that the other laptop has , as it is not that hard to find out what it is given we have the internet google search project in full swing.

then somehow have a work around so that it will work something like how slackware has it with different video drivers within it so that when it boots up the kernel will recognize the chip set then load the proper one needed.

got an idea on how to do that, seeings how you brought it up?

this way even though Slackware is not that hard to operate, I could look to maybe installing a different one, like Void perhaps - faster install of programs.

Last edited by BW-userx; 01-30-2016 at 08:37 AM.
 
Old 02-04-2016, 08:55 AM   #6
Pyrotech72
Member
 
Registered: Jan 2016
Location: Tennessee
Distribution: several, but trying to get away from systemd while keeping KDE and KVM
Posts: 45

Rep: Reputation: 11
If the hard drive interface is the same, I don't see why it wouldn't, given that they're the same series notebook. As a precaution, I would set the fstab options to mount by UUID's, if you don't already. Far more robust than something like /dev/sda1...

Even if it doesn't work, it's definitely worth a try. I'd like to know how this plays out.
 
Old 02-04-2016, 09:10 AM   #7
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by Pyrotech72 View Post
If the hard drive interface is the same, I don't see why it wouldn't, given that they're the same series notebook. As a precaution, I would set the fstab options to mount by UUID's, if you don't already. Far more robust than something like /dev/sda1...

Even if it doesn't work, it's definitely worth a try. I'd like to know how this plays out.
I'll think about it..

Last edited by BW-userx; 02-04-2016 at 09:27 AM.
 
Old 02-04-2016, 09:52 AM   #8
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by Pyrotech72 View Post
If the hard drive interface is the same, I don't see why it wouldn't, given that they're the same series notebook. As a precaution, I would set the fstab options to mount by UUID's, if you don't already. Far more robust than something like /dev/sda1...

Even if it doesn't work, it's definitely worth a try. I'd like to know how this plays out.
The only time I've seen problems with disks (this is on Fedora) it is due to the initrd containing UUIDs (usually for swap) that has to be modified. Now, cloning a disk will work, but that is because it also duplicates all the partitioning, UUIDs, filesystems, labels... everything.
 
Old 02-04-2016, 08:31 PM   #9
Pyrotech72
Member
 
Registered: Jan 2016
Location: Tennessee
Distribution: several, but trying to get away from systemd while keeping KDE and KVM
Posts: 45

Rep: Reputation: 11
Quote:
Originally Posted by jpollard View Post
The only time I've seen problems with disks (this is on Fedora) it is due to the initrd containing UUIDs (usually for swap) that has to be modified. Now, cloning a disk will work, but that is because it also duplicates all the partitioning, UUIDs, filesystems, labels... everything.
Assuming this will be the only hard drive in the system, given that it's a notebook, the UUID's won't be a problem since the installer will make the initrd that goes on that drive. I doubt moving the drive to another computer will change a UUID.
 
Old 02-04-2016, 09:08 PM   #10
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by Pyrotech72 View Post
Assuming this will be the only hard drive in the system, given that it's a notebook, the UUID's won't be a problem since the installer will make the initrd that goes on that drive. I doubt moving the drive to another computer will change a UUID.
I think I'd stay with the /dev/sda1 to play it safe, their is not that much of an performance hit as a result of it.

I was actually having problems with my own laptop and a second internal hdd I have in it. using UUID it kept losing the mount every time I booted it, so I changed it to /dev/sdb1 and never have problems with it mounting.
 
Old 02-05-2016, 05:29 AM   #11
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by BW-userx View Post
I think I'd stay with the /dev/sda1 to play it safe, their is not that much of an performance hit as a result of it.

I was actually having problems with my own laptop and a second internal hdd I have in it. using UUID it kept losing the mount every time I booted it, so I changed it to /dev/sdb1 and never have problems with it mounting.
That sounds more like the fstab, since it is the second disk.

The problem occurs when you have another disk installed... It then depends on which disk responds to the controller first, and in the case where both respond identically (I have a pair), it then randomly switches between the two.

The only guarantee of identity is the UUID, or an assigned label to the filesystem. Neither of these work if the UUID or label happens to be duplicated.
 
Old 02-05-2016, 09:43 AM   #12
Pyrotech72
Member
 
Registered: Jan 2016
Location: Tennessee
Distribution: several, but trying to get away from systemd while keeping KDE and KVM
Posts: 45

Rep: Reputation: 11
Quote:
Originally Posted by jpollard View Post
That sounds more like the fstab, since it is the second disk.

The problem occurs when you have another disk installed... It then depends on which disk responds to the controller first, and in the case where both respond identically (I have a pair), it then randomly switches between the two.

The only guarantee of identity is the UUID, or an assigned label to the filesystem. Neither of these work if the UUID or label happens to be duplicated.
In my experience, the position of a drive in the list is consistent and predictable, (sda, sdb, etc). I think it depends on what order the BIOS reports the drives to the bootloader (and subsequently the kernel). When I migrated the OS to my new SSD, I noticed that the drives were referenced by their model and serial numbers in the fstab. Same with the initrd IIRC.

There are several of ways to identify a filesystem and they all have their own pros and cons. GParted (and probably some similar programs) can generate a new random UUID without formatting the partition.
 
Old 02-05-2016, 10:56 AM   #13
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by Pyrotech72 View Post
In my experience, the position of a drive in the list is consistent and predictable, (sda, sdb, etc). I think it depends on what order the BIOS reports the drives to the bootloader (and subsequently the kernel). When I migrated the OS to my new SSD, I noticed that the drives were referenced by their model and serial numbers in the fstab. Same with the initrd IIRC.
Nope. The Linux kernel scans the controllers in parallel. Whatever disk spins up first is given the first name. Since USUALLY this is the boot drive (it is already spun up) it gets /dev/sda. However, the second disk on the same controller can then start spinning up... but the first disk on the next controller starts spinning up first.. Thus, /dev/sdb gets used by that drive, unless for some reason it is a bit slow in which case the second drive on the first controller gets /dev/sdb.

In my case, I have 5 SATA connections... and two SAS (I would have had more, but the SAS controller is limited to 2TB drives, and I have 4 3TB drives). When I plug in the third disk, it becomes sdb, and the original sdb becomes sdc. Same thing happens doing the other SATA connections... The order is not exactly random - as it tends to repeat. But if I change manufacturing or have slightly different characteristics of a disk - they DO come up in a different order.

Quote:
There are several of ways to identify a filesystem and they all have their own pros and cons. GParted (and probably some similar programs) can generate a new random UUID without formatting the partition.
Quite. But that is also why using a UUID becomes reliable. You CAN force it, but it will get a unique ID by default.
 
Old 02-05-2016, 11:06 AM   #14
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by jpollard View Post
When I plug in the third disk, it becomes sdb, and the original sdb becomes sdc.
That is what I have read on this other sight /dev/sda vs UUID - how using the old way can confuse the entire system and user if he has the system partitioned out spaning over seperate patrtitions. but I am only using one hard drive, with at the most 3 partitions.
Code:
swap
/
/home
all on the same hard drive. what chance would it be for the UUID to change itself if set up with UUID's on one computer, then removed and put into a different computer.

will that new (other) computer still understand what fstab is telling it ?

Code:
UUID=f79f684e-c079-4daa-8eb7-570890855ef9 swap swap defaults 0 0
UUID=aa6520d6-bf65-4039-abd1-4b55bf95b551 / ext4 defaults 0 1
UUID=cd01a154-f459-4b13-b867-1e4dbc86d677 /home ext4 defaults 0 2
or would it be a better, and safer to change that to. seeings how this other person has no idea of what to do if something goes wrong in fstab. (or any of it actually)

Code:
/dev/sda1   swap swap defaults 0 0
/dev/sda2  /     ext4 defaults 0 1
/dev/sda3  /home ext4 defaults 0 2

Last edited by BW-userx; 02-05-2016 at 11:09 AM.
 
Old 02-05-2016, 11:10 AM   #15
erik2282
Member
 
Registered: May 2011
Location: Texas
Distribution: Primarily Deb/Ubuntu, and some CentOS
Posts: 829

Rep: Reputation: 229Reputation: 229Reputation: 229
I once swapped a harddrive that had a working LM install from a Samsung laptop to a Dell Inspiron, I think was the model, and the only thing that didnt work was the broadcom wireless card. I could have made it work by installing drivers for it, but I just bought a $15 Intel wireless-n card and put it in the Dell and was back to work in no time. Worked for me. Doing this in Windows will prompt you to re-enter your Windows activation key.
 
  


Reply

Tags
hdd, laptop



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
how to run Fedora 8 installed at external usb hdd inside the windows MaLi035 General 2 07-10-2008 09:49 AM
Can I run Knoppix without an HDD installed? Fasn8n Linux - General 1 12-29-2005 01:12 AM
swapping linux hdd between pcs epoo Linux - Hardware 5 01-06-2004 09:34 PM
Swapping hardware (Compaq laptop)..how to in linux rainman4_8 Linux - Laptop and Netbook 2 12-02-2003 12:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:35 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
Open Source Consulting | Domain Registration