LinuxQuestions.org
Review your favorite Linux distribution.
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 05-22-2008, 07:15 PM   #1
mikhrus
LQ Newbie
 
Registered: May 2008
Distribution: Ubuntu 8.04
Posts: 8

Rep: Reputation: 0
Question Help cloning CF wit Linux


Hi, I'm really new to Linux. Just installed Ubuntu 8.04 on my Laptop.

I have a Centroid M-400 CNC Mill, which runs on Compact Flash Drive with Linux. (CF card is Kingston Elite Pro 512Mb 50X). And for some days when I boot up the machine I receive an error sayng that I have to run manually a command to check the drive. I run it... it corrects some sectors and then OS starts well... the problem is that it began losing some programs and parameters (I still can restore them from flopy once machine is running). So, I think CF card is dying.

So, I installed Ubuntu on my laptop and tryed to clone the partition to another CF memory (Sandisk 512MB). According to Partition Editor, it copies without a problem: resulting partition (ext3) has same size, etc... When I intall it to machine, I can see it from BIOS as IDE0, but when I try to boot up the machine with it, it says "Operation System Missing" or something like this...

Where could be the problem? Maybe it's Partition manager?... Is there another application to clone Linux Partitions, so they can be booted up?

Thank you very much.

I really appreciate your help...

Last edited by mikhrus; 05-22-2008 at 07:17 PM. Reason: tYpos
 
Old 05-22-2008, 10:55 PM   #2
LinuxManMikeC
Member
 
Registered: Nov 2007
Location: Provo, Utah
Distribution: Debian and Ubuntu
Posts: 74

Rep: Reputation: 15
Sounds like you didn't copy the MBR (Master Boot Record) on the flash media. It contains a little specialized program that initiates the boot process. Since you have a replacement flash card that is the same size I would try just raw copying the entire media (partition table and all) to the new card. What device is it detected as in Linux? /dev/sda? /dev/hda?
 
Old 05-22-2008, 11:42 PM   #3
mikhrus
LQ Newbie
 
Registered: May 2008
Distribution: Ubuntu 8.04
Posts: 8

Original Poster
Rep: Reputation: 0
Thank you for replying so soon, LinuxManMikeC.

Here are answers so far:

Quote:
Originally Posted by LinuxManMikeC View Post
Sounds like you didn't copy the MBR (Master Boot Record) on the flash media...
Maybe, I would like to try this. Where can I find this MBR?

Quote:
Originally Posted by LinuxManMikeC View Post
...Since you have a replacement flash card that is the same size I would try just raw copying the entire media...
Well, the first thing I did was to create same partition on new media and try to copy all files from the original card. But on every file I was getting an error message saying that I dont have a permision...

Quote:
Originally Posted by LinuxManMikeC View Post
...(partition table and all) ...
I'm not sure where to find partition table, since only one partition appears in "partition Editor".

Quote:
Originally Posted by LinuxManMikeC View Post
... What device is it detected as in Linux? /dev/sda? /dev/hda?
It is detected as /dev/sda

Any ideas?
 
Old 05-23-2008, 12:31 AM   #4
LinuxManMikeC
Member
 
Registered: Nov 2007
Location: Provo, Utah
Distribution: Debian and Ubuntu
Posts: 74

Rep: Reputation: 15
The MBR is the first 512 bytes of the disk. You can copy it with this command. (note: replace /dev/sda with your original device, and /dev/sdb with your new device)
Code:
dd bs=512 count=1 if=/dev/sda of=/dev/sdb
When I said raw copy, I meant to copy the raw disk image from device to device. /dev/sda gives you the entire raw contents of the device (mbr, partition table, and each partition). The /dev/sda1 and so on give you access to just the individual partitions. If you do a slight variation on the above command you can copy the entire disk image and make an exact "clone" of the original disk.
Code:
dd if=/dev/sda of=/dev/sdb
As it stands all you've done is make a clone of the filesystem from the first partition. Anyway, it's probably quicker to try the first command, and if it doesn't work you can try the second.
 
Old 05-23-2008, 12:59 AM   #5
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
To clone the CF try using ghost for linux.
It does everything for you.
I used it too.
But you need to have the destination drive atleast eqaul to the size of source even if theres not much data.
 
Old 05-23-2008, 09:26 AM   #6
mikhrus
LQ Newbie
 
Registered: May 2008
Distribution: Ubuntu 8.04
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by LinuxManMikeC View Post
Code:
dd bs=512 count=1 if=/dev/sda of=/dev/sdb
Code:
dd if=/dev/sda of=/dev/sdb
When I try either of this commands I get: "Permiso denegado" something like "permision denyied"
 
Old 05-23-2008, 09:45 AM   #7
mikhrus
LQ Newbie
 
Registered: May 2008
Distribution: Ubuntu 8.04
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by linuxlover.chaitanya View Post
To clone the CF try using ghost for linux.
It does everything for you.
I used it too.
Could you please write which command to use to see which drive is each disck and how to clone?
 
Old 05-23-2008, 10:31 AM   #8
mikhrus
LQ Newbie
 
Registered: May 2008
Distribution: Ubuntu 8.04
Posts: 8

Original Poster
Rep: Reputation: 0
Just tryied Clonezilla....
But when I boot up the machine, appears:

-------------------------------
Verifying DMI Pool Data....

LI
-------------------------------

...and that's all, it just stucks there
I already tried it with 3 differente CF cards (512MB, 1Gb, 8Gb) and the same result...

Ideas?

Last edited by mikhrus; 05-23-2008 at 11:49 AM. Reason: tYpos again
 
Old 05-23-2008, 11:57 AM   #9
mikhrus
LQ Newbie
 
Registered: May 2008
Distribution: Ubuntu 8.04
Posts: 8

Original Poster
Rep: Reputation: 0
I also tryed dd code with "sudo" command... This is what I get:

Image

But the result is the same:

-------------------------------
Verifying DMI Pool Data....

LI
-------------------------------

Last edited by mikhrus; 05-23-2008 at 12:01 PM.
 
Old 05-24-2008, 12:34 AM   #10
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
Basically cloning a hard drive is like making one like already present one.
This can be possible only if the HDD to be cloned and the other are same in size.
One that is used for cloning i.e. on which the cloning will be done, can be greater in size but can not be smaller.
And if you are trying to clone the HDD into a usb stick make sure you are not cloning with RAW mode.
This will copy the free sectors and will take a lot of space and time.
If you want to make a bootable usb stick then better look at the online manuals.
I needed to do the same thing but it is not possible as such.
Download the ghost for linux from google. It comes as iso and burn it to the cd and boot from it.
It will give you the graphical windows which are self explanatory. But it wont take your usb stick as destination as far as I know.
 
Old 05-24-2008, 11:57 AM   #11
mikhrus
LQ Newbie
 
Registered: May 2008
Distribution: Ubuntu 8.04
Posts: 8

Original Poster
Rep: Reputation: 0
Well, ghost for linux is a bit difficult because it uses commands only... no graphical support like Clonezilla...

But anyway even makin Raw copy of data I get the same screen at powerup:

-------------------------------
Verifying DMI Pool Data....

LI
-------------------------------

Ideas?
 
Old 05-25-2008, 01:23 AM   #12
Biglinuxnewb
Member
 
Registered: Jul 2003
Distribution: Gentoo, FreeBSD, OpenBSD, Debian, Knoppix, Digital Unix
Posts: 33

Rep: Reputation: 15
The problem you're experiencing is one that I have also had with lilo. A way around this may actually be to boot into a livecd, mount your compact flash drive and chroot into it, and then from there run /sbin/lilo (assuming you have a lilo.conf where it is supposed to be). This method is not unlike a stage3 linux install. Let me know if you need more specific instructions.
 
Old 05-25-2008, 11:09 PM   #13
mikhrus
LQ Newbie
 
Registered: May 2008
Distribution: Ubuntu 8.04
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Biglinuxnewb View Post
...Let me know if you need more specific instructions.
Yeah, more specific would be really appreciated. It the third day of my contact with Linux world...

Thank you
 
Old 05-27-2008, 01:47 AM   #14
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
Ghost for linux has ncurses graphical windows and is pretty good.
Let it boot completely and it will give you a window where you specify the option what you need to do.
It is self explanatory as far as I think.
I used it first time and never had much problem to guess what I needed to specify and where.
 
  


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
Cloning Linux OS kid_rizal Linux - Newbie 6 04-24-2008 12:51 AM
Internal Modems wit built-in support for linux jerry_popperq Linux - Newbie 4 08-24-2005 07:05 AM
re-installing winXP wit linux usman Linux - General 2 09-26-2003 02:08 PM

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

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