LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-02-2010, 02:41 AM   #1
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
copy whole drive sdb to sda3


I installed Debian squeeze to 40Gig pata hdd on my AMD 1090T desktop, with1Tb sata hdd.
Now that I'm quite comfortable with dual-booting, I'd like to transfer 40Gig Hd(sdb) to sda3.

I viewed this thread, which is similar to my situation, but not quite the formula.
http://ubuntuforums.org/archive/inde...t-1382181.html

I intend on reading more on this 1 to see if what I'm looking for is include.
http://www.linuxquestions.org/questi...ommand-362506/

I've never done the dd command, so it's not like I'm going to do it today, but would like a little bit more documentation to get a further understanding of the dd command.
Any suggestions are very much appreciated.
Thanks in advance.
 
Old 12-02-2010, 03:01 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
You can't copy a whole drive such as /dev/sdb (unless it has no partitions?) to a partition such as /dev/sda3. You can copy partitions to partitions as long as the target partitions are at least the same size as the source partitions.
 
Old 12-02-2010, 03:10 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,959

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
There are plenty of threads re how to do similar.
My advice - do *NOT* use dd for copying. You can't do as you requested as catkin indicated, and dd is the wrong tool anyway. Use a filesystem aware tool like cp or rsync. Search on that would be a better bet.
 
Old 12-02-2010, 03:11 AM   #4
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Original Poster
Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Thank you catkin
I've been installing and reinstalling os'es since march of this year, so now I'm trying to get to the point where I can save some of the information and the setup that I have without
always starting over. Is it posible to do this using blu-ray burner?

Thank you also sygOO

Last edited by EDDY1; 12-02-2010 at 03:13 AM.
 
Old 12-02-2010, 03:36 AM   #5
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Original Poster
Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
I have moved partitions using gparted-live-cd is it possible to do the same?
 
Old 12-02-2010, 03:51 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,959

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
If you're looking for a "point in time" basis, I like to use something that verifies the data - see fsarchiver for example.
Use a liveCD.
 
Old 12-02-2010, 03:57 AM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,074

Rep: Reputation: 386Reputation: 386Reputation: 386Reputation: 386
Quote:
Originally Posted by catkin View Post
You can't copy a whole drive such as /dev/sdb (unless it has no partitions?) to a partition such as /dev/sda3. You can copy partitions to partitions as long as the target partitions are at least the same size as the source partitions.
You can just as you can store any random data inside any block device, it will be just an unformatted partition in which regards the Linux user land tools. So, is is possible to store a whole disk layout this way. I agree that it is not too practical, though.

You don't need that in linux. Just tar the files, burn them or copy them somewhere and be happy.

All you need to restore that is to boot a livecd, format, un-tar the big thing and re-install your bootloader (this might not be needed, depending on how you did things).
 
Old 12-02-2010, 04:16 AM   #8
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Original Poster
Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
That 1's very informative. Have to read up on it a little, and it's available through synaptic.
 
Old 12-02-2010, 08:09 AM   #9
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,437

Rep: Reputation: 197Reputation: 197
You can use cp to do this if sda3 is formatted and ready to go.

Code:
# cp -pidRv /dev/sdb/* /devsda3
the -pidRv preserves the data in the same state its in now - concerning permissions and timestamps, etc. Its just going to take a bit of time! That said, if you wish to boot from sda3, you will need to adjust whatever bootloader you use.
 
Old 12-02-2010, 08:55 AM   #10
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4852Reputation: 4852Reputation: 4852Reputation: 4852Reputation: 4852Reputation: 4852Reputation: 4852Reputation: 4852Reputation: 4852Reputation: 4852Reputation: 4852
Quote:
Originally Posted by mlangdn View Post
You can use cp to do this if sda3 is formatted and ready to go.

Code:
# cp -pidRv /dev/sdb/* /devsda3
the -pidRv preserves the data in the same state its in now - concerning permissions and timestamps, etc. Its just going to take a bit of time! That said, if you wish to boot from sda3, you will need to adjust whatever bootloader you use.
Maybe I am confused here, but this will not work. It will only work if sdb is used without partitions, what I assume is not the case here.
 
Old 12-02-2010, 09:00 AM   #11
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,437

Rep: Reputation: 197Reputation: 197
The OP said that sdb is a 40gb hd. The OP does not mention if it has multiple partitions. I am assuming it is only one partition.
 
Old 12-02-2010, 09:09 AM   #12
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
Quote:
Originally Posted by mlangdn View Post
The OP said that sdb is a 40gb hd. The OP does not mention if it has multiple partitions. I am assuming it is only one partition.
Also, it is possible to create an extX file system on an unpartitioned disk. It is probably ill advised due to the possibility of creating confusion when talking about it such as we see in this thread.

I recall that there was a recent thread about the person wanting to do this. I don't want to look it up.

Last edited by stress_junkie; 12-02-2010 at 09:10 AM.
 
Old 12-02-2010, 09:15 AM   #13
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4852Reputation: 4852Reputation: 4852Reputation: 4852Reputation: 4852Reputation: 4852Reputation: 4852Reputation: 4852Reputation: 4852Reputation: 4852Reputation: 4852
Quote:
Originally Posted by mlangdn View Post
The OP said that sdb is a 40gb hd. The OP does not mention if it has multiple partitions. I am assuming it is only one partition.
Even the, shouldn't it be /dev/sdb1 in your post, and not /dev/sdb? May be I am confusing something here, but if he is asking how to copy this, I doubt he has a setup without partitions.

@EDDY1: To clear things can you please post the output of
Code:
fdisk -l /dev/sdb
Don't forget that you have to fire up the command as root.
 
Old 12-02-2010, 09:38 AM   #14
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,437

Rep: Reputation: 197Reputation: 197
You are correct TobiSGD. There could be a swap partition in there, or it could be on another drive. If EDDY1 runs the above command, it will be crystal clear how to copy.
 
Old 12-02-2010, 12:10 PM   #15
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Original Poster
Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
Maybe I am confused here, but this will not work. It will only work if sdb is used without partitions, what I assume is not the case here.
They're separate partitions

Quote:
@EDDY1: To clear things can you please post the output of
Code:

fdisk -l /dev/sdb

Don't forget that you have to fire up the command as root.
The device name maybe different but I'll post the output.

Last edited by EDDY1; 12-02-2010 at 12:12 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 install Linux on second Hard Drive (hd1) (sdb) Please help! P@trick99 Linux - Newbie 5 07-19-2008 02:45 AM
FC6 drive/partitions reconfig question sda sdb swap CaptainInsane Fedora 6 02-02-2007 04:00 PM
cannot find sda or sdb for mounting pen drive in RH9 sakal_woman Linux - Hardware 3 11-20-2006 10:41 PM
zip drive alternately mounts on /sda and /sdb timsch75 Linux - Hardware 6 09-26-2004 11:00 AM
Cannot Install Bootloader, XP on hda, Linux on sdb (USB MASS STORAGE DRIVE) neo5064 Linux - Newbie 3 12-29-2003 05:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:06 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration