Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 06-29-2008, 09:41 AM   #1
Registered: Jan 2006
Posts: 60

Rep: Reputation: 15
Copying Linux to New HD - Grub Install Problem

I have an HD with mulitple partitions and multiple systems. I am going to make my own game machine, and what I wanted to do was copy everything from hda6 (my / drive) and hda7 ( my home drive). I formated the new drive as hda1 and hda5 is the swap (40 gig hd).

I mounted the drive onto the 2nd IDE channel (so it was hdb1 and hdb5), copied the hda6 partition, and then copied the hda7 partition to the /home directory on hdb1.

I modified the menu.lst in /boot/grub to hd(0,0) and the fstab accordingly on the new system.

However, no matter what, I keep running into grub errors. I chroot to the drive and run "grub-install --remap /dev/hdb" and that didn't work.

I went and installed the hd in the new system, and still had problems, so I booted off a cd-rom and did the same thing, but with /dev/hda now, and I keep getting stage1 file problems...

What am I doing wrong? Is there an easy fix?
Old 06-29-2008, 10:59 AM   #2
Senior Member
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
The easiest fix that I can think of is to boot your Linux installation CD and select "System Repair" from the list. I've found that several of the largest distributions have this option.

I would have expected the chroot + grub-install to work based on your already edited menu.lst on the partition into which you chrooted. I'm surprised that it didn't work. Maybe it would work if you leave out the remap parameter on grub-install.
Old 06-29-2008, 11:09 AM   #3
LQ 5k Club
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,087

Rep: Reputation: 407Reputation: 407Reputation: 407Reputation: 407Reputation: 407
I modified the menu.lst in /boot/grub to hd(0,0) and the fstab accordingly on the new system.
I think you'll find that grub is still looking at/for the menu.list that is (was?) on hda6 which was your previous root partition.
For help with grub, please search LQ for posts by Saikee - his sig has excellent grub links.
Old 06-29-2008, 02:16 PM   #4
Registered: Jan 2006
Posts: 60

Original Poster
Rep: Reputation: 15
I don't know why it didn't work either... I just ran mandriva installer, selected upgrade, and it put lilo on there and works (didn't pick the right settings for the x server though...)... ran xorgconf and I was able to get it up and running...

Thanks for suggesting running the disk again! I used the console mode first, but I was unlucky... no biggie!
Old 06-29-2008, 03:24 PM   #5
Registered: Feb 2004
Distribution: Debian
Posts: 113

Rep: Reputation: 16

google for supergrub it can fix linux and windows mbr.

remember that when you create new partitions and add drives they are reordered in their listed sequence and grub's menu must be told where they are now located.
Old 06-29-2008, 08:55 PM   #6
Registered: Jan 2006
Posts: 60

Original Poster
Rep: Reputation: 15
I had tried supergrub, but didn't get anywhere with it, actually... so... the reinstall and reverting to lilo worked for now... once I get the computer set up the way I want, I might play with it a bit more...
Old 07-02-2008, 09:21 PM   #7
Registered: Jan 2006
Posts: 60

Original Poster
Rep: Reputation: 15
Turns out the problem was my inode on the new drive was set to 256, and if it isn't set to 128, grub has problems... lilo worked, and since this is actually my arcade machine (in an arcade cabinet I built), I won't really be using the boot options anyway...


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
installing GRUB 2, grub-install problem r00tb33r Linux - Software 1 02-26-2007 09:42 PM
copying linux install from reiserfs to ext3 ninjabob7 Linux - General 1 11-09-2005 10:33 PM
Copying partitions and grub too jobless_joe Linux - Software 3 02-10-2005 09:10 PM
Copying a windows or linux install to a new hard disk using linux.... some_cs_student Linux - Software 7 05-24-2004 07:17 PM
problem with copying files from linux to Win2k rob99 Linux - Networking 3 01-30-2003 11:42 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:02 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration