Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/dev empty after copying to new harddrive [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
gul
n00b
n00b


Joined: 06 Apr 2004
Posts: 31

PostPosted: Sat Apr 09, 2005 10:29 pm    Post subject: /dev empty after copying to new harddrive [SOLVED] Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54317
Location: 56N 3W

PostPosted: Sat Apr 09, 2005 10:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
gul
n00b
n00b


Joined: 06 Apr 2004
Posts: 31

PostPosted: Sun Apr 10, 2005 6:39 am    Post subject: Reply with quote

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
View user's profile Send private message
gul
n00b
n00b


Joined: 06 Apr 2004
Posts: 31

PostPosted: Mon Apr 11, 2005 8:03 am    Post subject: Reply with quote

bump
Back to top
View user's profile Send private message
mhennings
n00b
n00b


Joined: 22 Feb 2005
Posts: 15
Location: Germany

PostPosted: Mon Apr 11, 2005 8:36 am    Post subject: Reply with quote

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
View user's profile Send private message
gul
n00b
n00b


Joined: 06 Apr 2004
Posts: 31

PostPosted: Tue Apr 12, 2005 7:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Fri Apr 15, 2005 9:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum