LinuxQuestions.org
Visit Jeremy's Blog.
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 03-21-2013, 08:33 AM   #31
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 1,409

Rep: Reputation: 594Reputation: 594Reputation: 594Reputation: 594Reputation: 594Reputation: 594

Quote:
Originally Posted by alaios View Post
I can not copy the windows partitions through clonezilla software?
Yes, you can. The issue is that if you copy, for example, a 5GB filesystem into a 10GB partition, there is no tool that I have found that you can tell, "Expand this filesystem to fill the existing 10GB partition.) You would need to do something like, "Shrink the partition to 9.9GB, then expand the partition back to 10GB, adjusting the filesystem size each time." Personally, I try to avoid doing things that way. YMMV.

For ext2/3/4, using resize2fs to expand a filesystem to fill an existing partition is the default mode of operation.

clonezilla never changes the size of a filesystem. It will leave you with a small filesystem (same size as the original) sitting in your large partition.

Last edited by rknichols; 03-21-2013 at 08:37 AM.
 
Old 03-23-2013, 12:14 AM   #32
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,133

Original Poster
Rep: Reputation: 45
Total Failure:
I have been launching clonezilla (which I found a terribly designed gui) and went to konsole

I entered root mode through sudo su -

and then I did e2fsck -fp /dev/sdb1

then I did

ddrescue -v /dev/sda /dev/sdb

that returned an error that /dev/sdb has data that would be lost and I have to use --force.
So I used
ddrescue -v --force /dev/sda /dev/sdb

when I returned back. The /dev/sdb had only three partitions out of 8.

I have read also those two tutorials here
http://www.ghacks.net/2010/08/01/clo...with-ddrescue/
http://dimitar.me/clone-disk-drives-with-ubuntu/

but I can not see why it failed so much.

Any help now?
Alex[COLOR="Silver"]

Last edited by alaios; 03-23-2013 at 12:17 AM.
 
Old 03-23-2013, 02:57 AM   #33
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,133

Original Poster
Rep: Reputation: 45
Hi, I would be happy if just the 320gb hard disk (source) is written as it in the 750gb (target) and leave the rest space unallocated, I will try to expand it later with other tools.

I tried yesterday launching with clonezilla (what a bad interface is that!!) and launched the terminal. What a total failure was that.


I entered root mode through sudo su -

and then I did e2fsck -fp /dev/sdb1

then I did

ddrescue -v /dev/sda /dev/sdb

that returned an error that /dev/sdb has data that would be lost and I have to use --force.
So I used
ddrescue -v --force /dev/sda /dev/sdb

when I returned back. The /dev/sdb had only three partitions out of 8.

I have read also those two tutorials here
http://www.ghacks.net/2010/08/01/clo...with-ddrescue/
Clone Disk Drives with Ubuntu using dd or ddrescue | dimitar.me

but I can not see why it failed so much.

Any help now?

my source disk now looks like:


Quote:
fdisk -l /dev/sda

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x7de47de4

Device Boot Start End Blocks Id System
/dev/sda1 2048 24578047 12288000 27 Hidden NTFS WinRE
/dev/sda2 * 24578048 24782847 102400 7 HPFS/NTFS/exFAT
/dev/sda3 24782848 351562415 163389784 7 HPFS/NTFS/exFAT
/dev/sda4 351563776 625139711 136787968 f W95 Ext'd (LBA)
/dev/sda5 351565824 392525823 20480000 83 Linux
/dev/sda6 420814848 625139711 102162432 7 HPFS/NTFS/exFAT
/dev/sda7 392527872 396623871 2048000 82 Linux swap / Solaris
/dev/sda8 396625920 420812799 12093440 83 Linux

and the target disk is the:
Quote:
fdisk -l /dev/sdc
Note: sector size is 4096 (not 512)

Disk /dev/sdc: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 11400 cylinders, total 183143646 sectors
Units = sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000395d3

Device Boot Start End Blocks Id System
 
Old 03-23-2013, 03:18 AM   #34
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
So, are you trying to clone the disk from /dev/sda to /dev/sdb or to /dev/sdc ?
 
Old 03-23-2013, 03:30 AM   #35
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,133

Original Poster
Rep: Reputation: 45
From sda to sdb. After I tried with ddrescue that failed (as I described) the hard disk on the currently installed linux system (sda) was recognized as sdc (that is the reason I had to to fdisk -l /dev/sdc)
 
Old 03-23-2013, 04:24 AM   #36
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Can you run fdisk on /dev/sdb.
 
Old 03-23-2013, 05:56 AM   #37
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,133

Original Poster
Rep: Reputation: 45
No, because there isīno such disk in the system

I was also concerded why the kernel gave the disk the name sdc and not sdb.... When I also launch Yast-> Partitioner, there is no there sdb, only sda and sdc.

IF you want I can reboot but I think the main concern is how I make ddrescue clone partition by partition... and why it failed producing 3 non-sense partitions.

regards
Alex
 
Old 03-23-2013, 06:08 AM   #38
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
That is unusual. You probably should reboot and try again. Make sure that both disks are recognized before trying to clone the disk.
 
Old 03-23-2013, 06:25 AM   #39
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,133

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by H_TeXMeX_H View Post
That is unusual. You probably should reboot and try again. Make sure that both disks are recognized before trying to clone the disk.
Which command do you suggest me to run after both disks are recognized correctly as sda and sdb?

Alex
 
Old 03-23-2013, 09:04 AM   #40
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Do take into account that SMART reported read failure meaning that cloning the partitions may not work no matter what tool you use. In other words, the disk is corrupt and trying to clone corrupt partitions will likely lead to corrupt partitions or it just won't work.

I recommend trying to backup your files and then just reinstall everything onto the new disk.

It may have been my mistake to assume that you were doing this to try to salvage your data. It is true that cloning the drive is a good thing to do, but you shouldn't expect the drive you clone to to be bootable and usable. Instead you should recover your files from there and then reinstall everything onto this new drive.
 
Old 03-23-2013, 09:53 AM   #41
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,133

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by H_TeXMeX_H View Post
Do take into account that SMART reported read failure meaning that cloning the partitions may not work no matter what tool you use. In other words, the disk is corrupt and trying to clone corrupt partitions will likely lead to corrupt partitions or it just won't work.

I recommend trying to backup your files and then just reinstall everything onto the new disk.

It may have been my mistake to assume that you were doing this to try to salvage your data. It is true that cloning the drive is a good thing to do, but you shouldn't expect the drive you clone to to be bootable and usable. Instead you should recover your files from there and then reinstall everything onto this new drive.
Indeed that might be true. I would try again with dd_rhelp and see if there is anything coming out, if not I would say that the minimum is to copy just the hidden partition where the windows 7 installation resides (my opensuse is already downloaded and my data are backed up). Do you have any tips on how to copy the first hidden partition? Is there something important about a hidden partition or is just a normal one? Alex
 
Old 03-23-2013, 10:14 AM   #42
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 1,409

Rep: Reputation: 594Reputation: 594Reputation: 594Reputation: 594Reputation: 594Reputation: 594
The output from "fdisk -l" makes it appear that the new drive has a 4096-byte logical sector size. What is the make and model for that drive, and what is the output from "hdparm -I /dev/sdc | grep 'Sector size'". Drives with a 4096 logical sector size are only supported by recent kernels and tools, and even then are very bleeding edge. It well could be that clonezilla does not support them. (Drives with 4096 physical / 512 logical are not a problem except for alignment issues).

The drive probably migrated from sdb to sdc because you unplugged it (as sdb) while there was still some open reference to it. That leaves sdb in use, and when you reconnect the drive you get the next available device number.

Last edited by rknichols; 03-23-2013 at 10:16 AM.
 
Old 03-23-2013, 01:32 PM   #43
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,133

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by rknichols View Post
The output from "fdisk -l" makes it appear that the new drive has a 4096-byte logical sector size. What is the make and model for that drive, and what is the output from "hdparm -I /dev/sdc | grep 'Sector size'". Drives with a 4096 logical sector size are only supported by recent kernels and tools, and even then are very bleeding edge. It well could be that clonezilla does not support them. (Drives with 4096 physical / 512 logical are not a problem except for alignment issues).

The drive probably migrated from sdb to sdc because you unplugged it (as sdb) while there was still some open reference to it. That leaves sdb in use, and when you reconnect the drive you get the next available device number.
This is a normal 2.5 inches western digital 750gigabytes hard disk! If I did something wronng that should be easily fixable with some command line commands.
1. Which one should I try?

The target is just to clone only the first hidden windows partition to the hard disk and just restore windows from scratch. Installing linux then would be quite straightforward.


2. What is the ddrescue command for cloning the first partition of sda1 to sdb1?

3. Should I have in advance created an almost similar partition size to the target disk? If yes how I can do that with commands like fsck?

Regards
Alex
 
Old 03-23-2013, 06:54 PM   #44
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 1,409

Rep: Reputation: 594Reputation: 594Reputation: 594Reputation: 594Reputation: 594Reputation: 594
What exact model number, please.
 
Old 03-24-2013, 03:22 AM   #45
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,133

Original Poster
Rep: Reputation: 45
Western Digital WD7500BPKT Black 750GB . Where I can find the model number?
 
  


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
Hard disk failing ! prabhatsoni Linux - Software 4 04-25-2010 08:29 AM
Hard Disk Failing Error in Ubuntu 9.10 LilNInny77 Linux - Hardware 4 01-01-2010 07:59 AM
Is My Hard Disk failing? Diubidone Linux - Server 4 11-03-2009 05:42 AM
Is my hard disk failing David_Moses Linux - General 9 06-15-2005 12:29 PM
failing hard disk...i think... zepplin611 Linux - Hardware 3 03-03-2004 08:57 PM


All times are GMT -5. The time now is 07:27 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration