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 - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-06-2005, 11:17 AM   #1
infinity42
Member
 
Registered: Apr 2005
Location: England
Distribution: Gentoo
Posts: 142

Rep: Reputation: 16
used dd to clone linux install - problems after


I have 2 IDE harddrives connected at the moment:
hdd - 60Gb Seagate - Currently holds my entire FC3 linux install (inc. home, etc..)
hdc - 80Gb Hitachi DeskStar - New, Blank

What I want to do is to put the complete linux from hdd onto the blank hdc, then remove hdd, and boot from hdc. (There are several reasons for it, it's just a stopgap measure, I will soon be wiping and installing Gentoo )

So what I did was this
Code:
 $dd if=/dev/hdd of=/dev/hdc bs=64M
I then used fdisk to verify the partition table, and created a new partion with the unused space (because i dd'ed 60Gb onto an 80Gb drive). Then I installed Grub onto hdc.

All seemed fine. Booted fine etc., but when I logged in I started noticing lots of little things:
XMMS had changed back to it's default skin, but my playlist was still there as I had left it. It started claiming that it had no mp3 support (in the FC3 base install mp3 is not installed, but I have installed it) and yet, would play mp3s. Then I fired up firefox, and home had reverted to file:///usr/share/doc/HTML/index.html, which is the default after a fresh install. But all my bookmarks were still there. Also worker fails to start because
Code:
 Cannot create temporary directory /tmp/thomas-tmp.1627eaf/files/worker-thomas: Read-only file system
Most things were still fine, Bluefish, GKrellM, xfce.. all were exactly how I left them.

I still have the 'original' copy on hdd, and won't be wiping it until I'm sure I haven't lost anything.

I'm just getting a bad feeling about it..
Is this a Bad Sign?
Have I done something wrong?
Might I have lost some data?

Any thoughts/random mumblings/rants etc. welcome
 
Old 07-06-2005, 11:29 AM   #2
whizbit
Member
 
Registered: Jul 2005
Location: uk
Distribution: mandriva....not out of choice
Posts: 65

Rep: Reputation: 15
wwhat does the 64m mean
 
Old 07-06-2005, 11:34 AM   #3
infinity42
Member
 
Registered: Apr 2005
Location: England
Distribution: Gentoo
Posts: 142

Original Poster
Rep: Reputation: 16
The 64M means dd in blocks of 64Mb; so read 64Mb, then write that 64Mb, then read 64Mb, then write that 64Mb... and so on.

I think I may have just found the problem: It would seem that my root partition is mounted Read-Only. mtab clearly says
Code:
 /dev/hdc2 / ext3 rw 0 0
but whenever I try to write anything it fails with 'read only filesystem', even root can't touch anything. Will try remounting root.
 
Old 07-06-2005, 11:42 AM   #4
FinalFantasy
Member
 
Registered: Sep 2003
Distribution: Debian
Posts: 49

Rep: Reputation: Disabled
why not use tar instead of dd?

two harddrive with different sizes, dd is not a good choice, IMO.
 
Old 07-06-2005, 11:46 AM   #5
infinity42
Member
 
Registered: Apr 2005
Location: England
Distribution: Gentoo
Posts: 142

Original Poster
Rep: Reputation: 16
I have just tried to remount my root partition, but it refuses:
Code:
# mount -t ext3 /dev/hdc2 / -o remount,rw
mount: block device /dev/hdc2 is write-protected, mounting read-only
However, my boot partition (hdc1) is mounted rw, and I can remount it fine.
Code:
# ll /dev/hdc*
brw-rw----  1 root disk 22, 0 Jul  6 17:13 /dev/hdc
brw-rw----  1 root disk 22, 1 Jul  6 17:13 /dev/hdc1
brw-rw----  1 root disk 22, 2 Jul  6 17:13 /dev/hdc2
brw-rw----  1 root disk 22, 3 Jul  6 17:13 /dev/hdc3
brw-rw----  1 root disk 22, 4 Jul  6 17:13 /dev/hdc4
They have the same permissions, so why does hdc2 refuse to mount rw?

Any help/suggestions would be greatly appreciated.
 
Old 07-06-2005, 11:47 AM   #6
infinity42
Member
 
Registered: Apr 2005
Location: England
Distribution: Gentoo
Posts: 142

Original Poster
Rep: Reputation: 16
Sorry about that FinalFantasy, you must have pasted as I was replying. Yes, I didn't think dd was ideal.. but I didn't think of tar. I will have a look, thanks for the tip.
 
Old 07-06-2005, 12:12 PM   #7
FinalFantasy
Member
 
Registered: Sep 2003
Distribution: Debian
Posts: 49

Rep: Reputation: Disabled
did you have rw in the grub config file?

such as

kernel /...... rw root=.....
 
Old 07-06-2005, 01:53 PM   #8
infinity42
Member
 
Registered: Apr 2005
Location: England
Distribution: Gentoo
Posts: 142

Original Poster
Rep: Reputation: 16
No, they are all 'kernel ... ro ...' This has always worked fine when root=hdd2. Doesn't this just mean that the initrd initially mounts the root readonly, and then it is remounted read-write later on in the boot? That's what seems to happen in the boot proccess anyway. I would give rw a go, but I ran fsck on hdc2, and it found quite a few biggies, enough to make it drop out and request that I do it manually. I guess this means that the dd went wrong at some point, so I will wipe it and try a different method. (I have now booted back to hdd). Might dump all my data onto my 200Gb SATA drive (Just got to decide between Reiser3 and ext3 for it.. hmm..) & then install FC2 (Someone has nicked off with my FC3 DVD grrr) over the old FC3, just to get a working system for a few days, then I can get gentoo on it.

Moral of the story: Don't use dd to do silly things

Thanks for all the help, I'll post back if I get it all worked out.
 
  


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
Clone the current install on other PC ??? sys7em Slackware 8 08-21-2005 02:57 AM
I have Ghost For Linux (G4L) -- how to avoid problems with Click and Clone option? loninappleton Linux - Newbie 0 10-27-2004 07:27 PM
How do clone Linux partition? samxiao Linux - Software 5 12-24-2003 07:50 PM
clone linux ext3fs possible? Jeroen Linux - General 7 10-31-2003 11:05 AM
Problems on using Norton ghost to clone RedHat 7.3 (ext3) gsbarry Linux - Software 5 01-30-2003 11:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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