View previous topic :: View next topic |
Author |
Message |
gul n00b
Joined: 06 Apr 2004 Posts: 31
|
Posted: Sat Apr 09, 2005 10:29 pm Post subject: /dev empty after copying to new harddrive [SOLVED] |
|
|
I installed Gentoo on a old harddisk.
Then I copied it to a new larger disk.
Code: | cp -ax / /new-drive |
Because it is a old computer with a old BIOS (Compaq 300 MHz...) it can't boot with the new disk.
When I booted it with a LiveCD and chrooted to the disk, the /dev directory was empty.
Is there anything I can do besides reinstalling?
Last edited by gul on Tue Apr 12, 2005 7:28 pm; edited 1 time in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54317 Location: 56N 3W
|
Posted: Sat Apr 09, 2005 10:37 pm Post subject: |
|
|
gul,
cp does not copy the parts of grub installed outside the filesystems.
You must reinstall Grub on the new drive.
/dev should be almost empty, its managed dynamically.
No need to reinstall, this isn't Windows. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
gul n00b
Joined: 06 Apr 2004 Posts: 31
|
Posted: Sun Apr 10, 2005 6:39 am Post subject: |
|
|
The problem is that I can't install grub on the new drive
Code: | grub-install --root-directory=/boot /dev/hda | dosen't work because /dev is empty |
|
Back to top |
|
|
gul n00b
Joined: 06 Apr 2004 Posts: 31
|
Posted: Mon Apr 11, 2005 8:03 am Post subject: |
|
|
bump |
|
Back to top |
|
|
mhennings n00b
Joined: 22 Feb 2005 Posts: 15 Location: Germany
|
Posted: Mon Apr 11, 2005 8:36 am Post subject: |
|
|
When using devfs or udev you /dev of your root partition is hiden by the mounted devfs or in memory filesystem.
when coping the root partition it helps to bind it to /mnt/root/ for example
Code: |
mount -o bind / /mnt/root
|
should do it. you might want to remount it ro before that
Code: |
mount -o remount,ro /
|
|
|
Back to top |
|
|
gul n00b
Joined: 06 Apr 2004 Posts: 31
|
Posted: Tue Apr 12, 2005 7:28 pm Post subject: |
|
|
well the Code: | mount -o remount,ro / | didn't work (device was busy) but Code: | mount -o bind / /mnt/root | did the trick
now I can boot using a 160 GB harddisk in a old compaq computer (Pentium II 300 MHz) |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Fri Apr 15, 2005 9:31 pm Post subject: |
|
|
That's useful.
Can you detail what you did? What does mount show now?
Thx _________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
|