LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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-29-2005, 05:56 PM   #46
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112

They means device hdb2 and hdb6 do not exist or have no filing system inside (unformatted)

The existence of hdb2 and hdb6 can be verified by fdisk -l

Only you would know if hdb2 and hdb6 have filing systems inside or not. If they have not been formatted then mounting them has no purpose. Also the partition should not be mounted when being formatted.

I thought you have dd the whole lot across. Have you not done so? Was there anything inside when you dd them?
 
Old 12-29-2005, 06:03 PM   #47
ctroyp
Member
 
Registered: Sep 2005
Distribution: Fedora Core 4 / CentOS
Posts: 92

Original Poster
Rep: Reputation: 15
Code:
[root@server1 ~]# fdisk -l

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1          12       96358+  83  Linux
/dev/hda2              13        9729    78051802+   5  Extended
/dev/hda5              13         237     1807281   82  Linux swap
/dev/hda6             238        9729    76244458+  83  Linux

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1   *           1          12       96358+  83  Linux
/dev/hdb2              13        9729    78051802+   5  Extended
/dev/hdb5              13         237     1807281   82  Linux swap
/dev/hdb6             238        9729    76244458+  83  Linux
Okay, I tried mounting hdb1 instead and it worked. When I ran the
dd command, hdb was not even formatted. It was just empty space (virgin drive).
The dd command created what you see in the fdisk -l results above(hdb portion of course).

What step did I miss? Was I supposed to format the virgin drive before the dd?
Why can't I mount hdb2 or hdb6? I think I am close to understanding all of this...
 
Old 12-29-2005, 06:29 PM   #48
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
You don't need to format the target disk if you dd it because the binary pattern is mirrored onto it. I don't partition or format when I dd the whole disk.

Your hdb1 can be mount because it has a filing system which can be read/write. Mounting an unformatted partition isn't possible because the operating system needs to prepare steps to read it, as you can mount a Dos disk Fat16, Win9x Fat32, XP NTFS ..... A raw partition can be dd but cannot be mounted because it has no filing system inside.

When you format a partition the OS will set reserve its first sector for the boot loader and install an filing index for the empty space. The indexing is different from file type to file type. The absence of the filing index will cause the OS not knowing how to deal with it.

My guess is your hda2 and hda6 were unformatted when dd into hdb.

hdb2 and hdb6 will be mountable if you do the following but please be absolutely sure there is nothing in them first
Code:
mke3fs -j /dev/hdb2
mke3fs -j /dev/hdb6
mount /dev/hdb2 /mnt/hdb2
mount /dev/hdb6 /mnt/hdb6
 
Old 12-29-2005, 07:08 PM   #49
ctroyp
Member
 
Registered: Sep 2005
Distribution: Fedora Core 4 / CentOS
Posts: 92

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by saikee
My guess is your hda2 and hda6 were unformatted when dd into hdb.

hdb2 and hdb6 will be mountable if you do the following but please be absolutely sure there is nothing in them first
Code:
mke3fs -j /dev/hdb2
mke3fs -j /dev/hdb6
mount /dev/hdb2 /mnt/hdb2
mount /dev/hdb6 /mnt/hdb6
I think you guess is correct because I did not make a file system on
any part of hdb before I ran the dd.

So to do this correctly (dd and make the setup the file types for hdb2
and hdb6) which do I do first?

Should I start over on hdb by deleting all partitions, make the file systems for
hdb2 and hdb6, then runn the dd?

The reason I ask is because if I run dd first it will create the image of hda
on hdb (which means there is data in those partitions). And when I make the file systems
on hdb2 and hdb6 it will delete the data, right?

At least I understand why I couldn't mount hdb2 and hdb6, but I am unsure what order
I am supposed to do this.

Actually, I need to go ahead and replace the current hdb with my old Debian. I need to go ahead and try to copy the relevant files back to hda (the new Mandriva install). When I restart the computer will it read the grub installed on hda or will the Debian drive cause a conflict since it has grub on it also? I presume since the Debian drive already has the file system setup, I should be able to mount the partitions to hda easily and start copying data. Does this sound correct?

Last edited by ctroyp; 12-29-2005 at 07:13 PM.
 
Old 12-29-2005, 07:51 PM   #50
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
I think you are confusing yourself and me.

In the Post #38 my suggestion was
Quote:
Partition only one disk, install all the software in it, use this command to mirror hda to hdb in one operation
This mean you put everything in hda first.

Now it seems that some of the partitions in hda were empty and unformatted. Logically the mirrored ones in hdb must also be empty and unformatted. That you can understand it now.

If you are not sure that source partitions hda2 and hda6 are empty you can mount them and see for yourself.

If you have any data in hda then they all should be in hdb now, perhaps not in hdb2 and hdb6.

In a nutshell

hdb1 is now a mirror image of your hda1
hdb2 is now a mirror image of your hdb2
and so on

Unless since dd you have introduce additional data in hdb2 and hdb6. If this is the case just format the two, mount it and copy the files across by drag and drop, tar or dd. Since you have made hdb2 identical in size to hda2 you can now do
Code:
dd if=dev/hda2 of=/dev/hdb2 bs=32256
to mirror the content of hda2 into hdb2, same for hda6 into hdb6, got it ?

The booting sequence is the BIOS will boot the first disk specified in the boooting queue. Unless you change it the first bootable should be hda. Therefore the Grub in hda will take control. If the hdb is replaced by your Debian disk then Debian will not boot at all. You can boot it only with a Grub floppy or amending the /boot/grub/menu.lst in Mandriva.

If you are transfering personal data from Debian disk (new hdb) to Mandriva disk (hda) it should be a drag and drop exercise, so just mount Debian's root and goto Mandriva desktop to do the file copying.

Last edited by saikee; 12-29-2005 at 07:53 PM.
 
Old 12-29-2005, 08:03 PM   #51
ctroyp
Member
 
Registered: Sep 2005
Distribution: Fedora Core 4 / CentOS
Posts: 92

Original Poster
Rep: Reputation: 15
You explained that perfectly. I think I've got it now.

Sometimes it takes me a couple times to grasp things and I understand it
perfectly now.

I went ahead and booted the mirrored drive hdb and I saw that the file types
were not set for some of the partitions. Mandriva wanred me and began to set them up.
It makes sense to me now.

Thanks for the awesome explaination. You answered all of my questions
and I have filled many gaps. Thank you SO much mate!

I owe you big-time!

I am now installing Debian on hda (the old hdb). I just found out that I cannot
use Mandriva 2005 because the package sources have moved from php4 to php5. I
cannot use php5 on the server due to conflicts w/3rd party software. This was the
whole reason I was going to use Mandriva 2005 because of php4, but they have changed
their ways...

Debian Sarge should work fine since I have already been using it. Now, since you
have helped me along I will be able to setup my mirroring scheme as desired.

The Debian net install cd doesn't install GNOME by default. Can GNOME be installed afterwards?
After I complete the install? I would really like to have the option to use GNOME unlie before.

Thanks again for all your help!
 
Old 12-30-2005, 05:07 AM   #52
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Sorry to hear your Mandriva has not worked out as you expected.

I have too many distros and will take me a while to know the individual Linux's way to add packages. But I think Debian is one of the well established ones and the installation CD should have Gnome in it. I think there is base-config you can run at Bash shell but I think you should be able to get it from the desktop's Synaptic packages manager. Do a post in Debian section. I want to refrain from giving advice in area that I have little experience.

I am glad that you are satisfied with the progress. I have been a newbie myself and so in addition to the pointers I tried to put in a little explanation. You are the one of those who appreciate it.

Have a happy GNU year!
 
Old 12-30-2005, 08:56 AM   #53
ctroyp
Member
 
Registered: Sep 2005
Distribution: Fedora Core 4 / CentOS
Posts: 92

Original Poster
Rep: Reputation: 15
I remembered during the net install of Debian that it does ask if you want to install the desktop
enviroment. I installed it, but I wasn't sure how to configure the video card so it doesn't start up
currently. I will seek help elsewhere...

Quote:
Originally Posted by saikee
I am glad that you are satisfied with the progress. I have been a newbie myself and so in addition to the pointers I tried to put in a little explanation. You are the one of those who appreciate it.

Have a happy GNU year!
Well, I love learning new things and I really do appreciate your efforts.

btw, I reinstalled Debian Sarge flawlessly and have my software running. I even mounted the
old Debian and I can see al the files. Now all I need to do is copy them over. See, this thread
has helped me tremendously. Not to mention the additional knowledge...thanks!

Happy GNU year to you too!
 
  


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
move grub dmenezes Linux - Newbie 1 08-27-2005 11:26 PM
Help with Grub: move it to /boot linda Slackware 14 11-01-2004 07:29 PM
How do i MOVE grub? MadSkillzMan Linux - General 5 10-26-2004 05:54 PM
Move from GRUB to XP geekBass Linux - Newbie 1 03-09-2004 12:24 AM
Grub/booting problems after partition move jacobly Linux - Newbie 3 09-02-2003 08:33 AM


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