Results 1 to 10 of 10
I have 2 usb drives one has backtracks a linux distro on it.
Boots up fine when I select boot from usb drive in the bios.
using df to list ...
- 10-15-2011 #1Just Joined!
- Join Date
- Apr 2011
- Posts
- 87
problem cloning drive?
I have 2 usb drives one has backtracks a linux distro on it.
Boots up fine when I select boot from usb drive in the bios.
using df to list the device files and mountings
I see /dev/sdc1 as the backtracks usb the other usb drive device file is /dev/sdh1
I issued
dd if=/dev/sdc1 of=/dev/sdh1
when it finished I tried booting with the other usb drive which should be an exact bit for bit copy of the other bootable one.
But it doesn't boot? Why?
I have tried umount the devices before issueing dd command as well . Still doesn't work?
Do I need an special switches for the dd command like a bs , notrunc , or noerrors ?
Also I did dd if=/dev/sdc1 count=1 | md5sum
and dd if=/dev/sdh1 | count=1 | md5sum
This gave me the same md5 hash for the begining of both drives
So how can it not be booting
- 10-15-2011 #2
This is just a guess but I think you may have forgotten to copy the MBR to the new drive. Does that sound about right? See this link for more info on using DD command.
dd (Unix) - Wikipedia, the free encyclopediaI do not respond to private messages asking for Linux help, Please keep it on the forums only.
All new users please read this.** Forum FAQS. ** Adopt an unanswered post.
- 10-15-2011 #3
Right, but an copy will only work, if the new drive has exactly the same size and geometry.
It is probably better to create a new bootloader in the mbr with the apropiate grub/lilo tools.You must always face the curtain with a bow.
- 10-15-2011 #4Just Joined!
- Join Date
- Apr 2011
- Posts
- 87
Well it works fine if I use the same type of usb drive.
I was successful in copying the bootable backtracks usb
to the same type of usb then booting from it instead of the original.
I had bought an extra sandisk usb the same type as the working backtracks linux usb. When I used the commands above it was successful and I could boot from that one as well.
I am wondering why though the other usb thumb drive is not working with dd and is not booting correctly (just black screen and a cursor show)?
This thumb drive is new, no disk errors (i checked), bios recognizes it but has a blank name for it.
- 10-15-2011 #5
Just a random thought here, and it may not be the case...
If it's a different type of drive, have you verified that the UUID of the partitions is remaining the same?Jay
New users, read this first.
New Member FAQ
Registered Linux User #463940
I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.
- 10-15-2011 #6Just Joined!
- Join Date
- Apr 2011
- Posts
- 87
well, I am not sure what that info means? Care to explain why this would have any effect on things.
Anyway
using sudo blkid I have
/dev/sdb1: UUID="B840-A4C8" TYPE="vfat"
/dev/sdg1: UUID="B840-A4C8" TYPE="vfat"
/dev/sdg1 is the thumb drive that is not bootable.
/dev/sdb1 is the thumb drive that working with dd and boots fine
when I use df , sfdisk or any other tool that displays drive geometry they all display identical for both thumb drives.
/dev/sdb1 3904640 2029168 1875472 52% /cdrom
/dev/sdg1 3904640 2029168 1875472 52% /media/B840-A4C8
/dev/sdb1: 1017 cylinders, 124 heads, 62 sectors/track
/dev/sdg1: 1017 cylinders, 124 heads, 62 sectors/track
But I think these tools are just reading the partition table to get this info and since I used dd to bit for bit copy every possible tool is going to have the same results.
Plus if it is a bit for bit copy then I cann't see it not being bootable if the bios at least identifies it as bootable and the sector sizes are the same?
- 10-15-2011 #7Just Joined!
- Join Date
- Apr 2011
- Posts
- 87
The only other thought is
since the bootable one is mounted on /cdrom
maybe the physical sector size of it is 2048bytes and the other thumb drive is the standard 512bytes
But I am not sure since all the tools I know of return the exact same thing for both usb drives.
Is their any usb thumb drives out their that have a sector size of 2048 bytes (same as a cd)? I have only ever seen 512 , or 4098 bytes.
- 10-15-2011 #8Try dd if=/dev/sdc of=/dev/sdhI issued
dd if=/dev/sdc1 of=/dev/sdh1
You want to clone the whole device, not just the partition.
- 10-15-2011 #9Just Joined!
- Join Date
- Apr 2011
- Posts
- 87
Your my hero!
That did it
I know why the same model ones where working.
Because I was only cloning the partition and not the mbr with it.
The same model ones must have had the same partition table by default and same bootloader code to get to that partitions mbr code.
Where as the other usb thumb drive that wasn't the same make or model didn't. So it probably had a default mbr code that just jmp in an infinite loop ( thats why I saw the black screen and couldn't boot into the cloned partition)
Thought /dev/sdb1 , /dev/sdh1 ,...etc where device files for the whole device but learned that these where just the partitions of the device if I wanted to access the whole thing/copy whole think then I would need to leave off the numbers.
Thank you very much
- 10-16-2011 #10
Good catch there, rcgreen!
Jay
New users, read this first.
New Member FAQ
Registered Linux User #463940
I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.


1Likes
Reply With Quote
