LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-21-2012, 04:46 PM   #1
skinney
Member
 
Registered: Oct 2012
Location: oakland,ca
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86

Rep: Reputation: Disabled
Change the drive my system is on from usb to sata


i have an old pc i'm running ubuntu server 12 on
it has two sata slots and i'm using both to run two 2TB drives and my sys is installed on a 8GB flash drive. i've learned that flash drives don't handle lots of writes and will fail eventually. i'm going to move my system to a 350 laptop HDD i have in a usb enclosure. i'll just run it from usb and maybe in the future i'll spring for a pci sata card to add a few more sata ports.
If I have my system installed on a drive connected via usb and then switch it to an sata connection will it work? will it boot?
It probably isn’t even necessary but I’m curious about my options down the road after I move my system to this USB HDD

Last edited by skinney; 10-21-2012 at 04:47 PM.
 
Old 10-22-2012, 04:01 AM   #2
qlue
Member
 
Registered: Aug 2009
Location: Umzinto, South Africa
Distribution: Crunchbangified Debian 8 (Jessie)
Posts: 747
Blog Entries: 1

Rep: Reputation: 172Reputation: 172
The simple answer is yes. However, you have to transfer the system the right way and there are a few issues that can complicate things.
For one thing, you will have to other use a different pc or boot from a different disk in order to copy the system.
I normally use this line to transfer the system. (note this overwrites the destination drive completely)
Code:
dd if=/dev/sdb of=/dev/sdc bs=1M
/dev/sdb and /dev/sdc are as examples only and you must make certain of the correct drives. in this example, /dev/sdc is the destination drive.
After that finishes, and it could take some time, I use gparted to expand partitions as needed.
But be very careful with dd as it will wipe out anything on the destination drive you specify, even if it's the wrong drive.
 
Old 10-22-2012, 04:59 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
Many distro's have enough support in them but a combination of bios and OS and boot device may need to be checked. Also when you move stuff around, some device names may need to be changed in both grub and fstab and maybe other places. Might make them generic before moving.

Clonezilla or redobackup or as above dd may work fine.

Using a cf disk isn't bad as long as you limit writes. Normal embedded system are fine for constant reads.

Might be easy to just load the new OS to the hard drive from original media.
 
Old 10-23-2012, 10:39 AM   #4
skinney
Member
 
Registered: Oct 2012
Location: oakland,ca
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by qlue View Post
I normally use this line to transfer the system. (note this overwrites the destination drive completely)
Code:
dd if=/dev/sdb of=/dev/sdc bs=1M
do you need to reinstall grub to make it bootable or doesn't dd do it all?
 
Old 10-23-2012, 10:43 AM   #5
skinney
Member
 
Registered: Oct 2012
Location: oakland,ca
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post

Using a cf disk isn't bad as long as you limit writes. Normal embedded system are fine for constant reads.
can you explain this a little more? i'm new to linux

Quote:
Originally Posted by jefro View Post
Might be easy to just load the new OS to the hard drive from original media.
do you mean do a fresh os install? can i do that and keep all my lvm info for my two existing harddrives?
 
Old 10-23-2012, 01:24 PM   #6
skinney
Member
 
Registered: Oct 2012
Location: oakland,ca
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by qlue View Post
Code:
dd if=/dev/sdb of=/dev/sdc bs=1M
wow, it's that easy. no grub reinstall or nothing.

thx!

wait, i cant resize my pv or lv. it still thinks it's on an 8GB drive

Last edited by skinney; 10-23-2012 at 04:01 PM.
 
  


Reply



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
[SOLVED] 13.37 Boot fails if a particular SATA drive is in system Noony Slackware 17 01-01-2012 02:45 PM
Install Linux to SATA drive but GRUB2 on to USB thumb drive Quija Linux - General 2 11-22-2011 06:40 PM
How to change retry times of removable disk scan when plug SATA drive into Linux PC? yanzi Linux - Kernel 0 06-17-2011 11:17 PM
using GRUB 1.5 with boot on sata-drive and system on usb drive(ipod photo) Scorp-D Linux - Laptop and Netbook 1 03-16-2007 02:34 AM
cfdisk not able to see/change partitions on a SATA drive on a 915 chipset system. rsamurti Slackware - Installation 1 12-07-2005 10:32 AM

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

All times are GMT -5. The time now is 10:09 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