Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
I do quite a bit of desktop and laptop repair. I will take hard disks out and plug mount them to a linux machine to backup pictures and music before reformatting.
There are two hard disks with four partitions in one of my linux machines. Partition one is swap, partition two is OS, partition three is remaining space on hard disk after swap and OS, and partition four is the second hard disk. There are entries in /etc/fstab for partitions threee and four in order to mount during boot.
Code:
/dev/sda1 /mnt/WinDisk auto defaults 0 0
/dev/sdb3 /mnt/TempDisk auto defaults 0 0
My problem arises when I plug in a third hard disk. The third hard disk may replace either partition three or four from my original setup and leave the other partition unmounted.
My question is: how can a partition be uniquely identified to force mounting before hard disks that have never been mounted to the current OS?
Instead of dev name (which may change) use anything under /dev/disk/by-*
LABEL is probably most people friendly, UUID is getting to be most popular thanks to Ubuntu dictate, but by-id is most robust. UUIDs are not necessarily unique ...
Oops - cancel that. Probably won't work in fstab - and if it doesn't, you'll have a non-booting box.
Try UUID - if they are not copies of your disks you should be o.k.
Works fine. No "ID=" - just /dev/disk/by-id/... in place of /dev/sda?
Just tested it. I had previously only used it in mainframe environments, not "user" platforms.
I used to do the same, open the desktop case, plug a drive that either needed work or data recovery and boot up the machine, power it down when done and pull the drive out and close the case, next day, open the case again to play with another foreign drive.
Today someone came over with her daughter's old laptop and reminded me how I told her daughter a few months ago I could recover data from her non-booting laptop. Of course, a laptop has a 2.5" drive, the desktop has 5.25" drive bays, and different cable adaptors.
I bought a Bytecc USB 2.0 Drive Mate. It's an adaptor you plug 2.5",3.5",5.25" IDE or SATA drives into, then plug it into a running laptop or desktop via USB. No need to crack open the case anymore, and drives are not reasigned randomly as the unit is already running when the subject drive is plugged in, the subject drive will always be assigned the next position after the already installed permanent drives in whatever computer I use to work on the subject drive. If the subject drive is from a Mac, I can plug it into a running Mac to make things easier and faster.
I forget exacly what I paid for this adaptor, the only thing that comes to mind is how cheap it was and I wish I would have stumbled on it a lot sooner.
The only caviat, writing to a drive via USB is a little slower than through a SATA or IDE cable plugged directly to the mobo. But considering the time it takes to open the desktop case, risk frying something due to static electricity or bumping things the wrong way, I prefer using this adaptor and not have to get off my butt. Got a weak knee you know.
Last edited by Brains; 11-17-2011 at 04:06 AM.
Reason: Corrected laptop drive size
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.